Refactor MasterDetailMntC.vue for improved readability and consistency
This commit is contained in:
@@ -1,23 +1,36 @@
|
||||
<template>
|
||||
<v-col
|
||||
v-if="features.showFavorites && showFavoritesBar && !isMobile"
|
||||
class="d-flex align-center pr-2 pl-3 py-1 bg-surface">
|
||||
v-if="features.showFavorites && showFavoritesBar && !isMobile"
|
||||
class="d-flex align-center pr-2 pl-3 py-1 bg-surface"
|
||||
>
|
||||
<div class="favorites-label text-body-2 text-no-wrap pe-2">
|
||||
{{ favoritesConfig.label }}
|
||||
</div>
|
||||
<div class="favorites-list flex-grow-1 d-flex flex-wrap ga-2">
|
||||
<transition-group class="d-flex flex-wrap ga-2" name="favorite-list" tag="div">
|
||||
<v-chip
|
||||
v-for="item in favoriteItems" :key="item.path ?? item.title" class="favorite-item" closable
|
||||
color="secondary" size="small" variant="outlined" @click="emit('select', item)"
|
||||
@click:close="emit('remove-favorite', item)">
|
||||
v-for="item in favoriteItems"
|
||||
:key="item.path ?? item.title"
|
||||
class="favorite-item"
|
||||
closable
|
||||
color="secondary"
|
||||
size="small"
|
||||
variant="outlined"
|
||||
@click="emit('select', item)"
|
||||
@click:close="emit('remove-favorite', item)"
|
||||
>
|
||||
<v-icon v-if="item.icon" class="me-1" size="16" :icon="item.icon" />
|
||||
<span class="text-caption">{{ item.title }}</span>
|
||||
</v-chip>
|
||||
</transition-group>
|
||||
<v-btn
|
||||
v-if="favoritesConfig.showAdd" class="favorite-add" color="primary" size="small" variant="outlined"
|
||||
@click="emit('add-favorite')">
|
||||
v-if="favoritesConfig.showAdd"
|
||||
class="favorite-add"
|
||||
color="primary"
|
||||
size="small"
|
||||
variant="outlined"
|
||||
@click="emit('add-favorite')"
|
||||
>
|
||||
<v-icon class="mr-1" size="16" :icon="mdiPlus" />
|
||||
<span class="text-caption">{{ favoritesConfig.addLabel }}</span>
|
||||
</v-btn>
|
||||
|
||||
Reference in New Issue
Block a user