Skip to content

Commit

Permalink
fix: Use v-item-group to display settings list again (#1855)
Browse files Browse the repository at this point in the history
  • Loading branch information
Janbong authored and ferferga committed Jan 26, 2023
1 parent d7b1665 commit a29acfb
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 33 deletions.
24 changes: 14 additions & 10 deletions frontend/src/components/System/AboutLinks.vue
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
<template>
<v-list>
<v-list-group>
<v-item-group>
<v-list-item
v-for="linkItem in linkItems"
:key="linkItem.name"
rel="noreferrer noopener"
:href="linkItem.link"
target="_blank">
<v-avatar>
<v-icon :icon="linkItem.icon" />
</v-avatar>
<template #prepend>
<v-avatar>
<v-icon :icon="linkItem.icon" />
</v-avatar>
</template>
<v-list-item-title>
{{ linkItem.name }}
</v-list-item-title>
<v-list-item-action>
<v-icon>
<i-mdi-open-in-new />
</v-icon>
</v-list-item-action>
<template #append>
<v-list-item-action>
<v-icon>
<i-mdi-open-in-new />
</v-icon>
</v-list-item-action>
</template>
</v-list-item>
</v-list-group>
</v-item-group>
</v-list>
</template>

Expand Down
53 changes: 30 additions & 23 deletions frontend/src/pages/settings/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,59 +42,66 @@
</v-col>
<v-col cols="12" md="6" lg="5" class="py-4">
<!-- User settings -->
<v-list lines="two" class="mb-4">
<v-list-group>
<v-list lines="two" class="mb-4 overflow-y-hidden">
<v-item-group>
<v-list-item
v-for="userItem in userItems"
:key="userItem.name"
:to="userItem.link"
:disabled="!userItem.link">
<v-avatar>
<v-icon :icon="userItem.icon" />
</v-avatar>
<template #prepend>
<v-avatar>
<v-icon :icon="userItem.icon" />
</v-avatar>
</template>
<v-list-item-title>
{{ userItem.name }}
</v-list-item-title>
<v-list-item-subtitle>
{{ userItem.description }}
</v-list-item-subtitle>
<v-list-item-action>
<v-icon>
<i-mdi-chevron-right />
</v-icon>
</v-list-item-action>
<template #append>
<v-list-item-action>
<v-icon>
<i-mdi-chevron-right />
</v-icon>
</v-list-item-action>
</template>
</v-list-item>
</v-list-group>
</v-item-group>
</v-list>
<!-- Administrator settings -->
<div v-if="$remote.auth.currentUser.value?.Policy?.IsAdministrator">
<v-list
v-for="(adminSection, index) in adminSections"
:key="`admin-section-${index}`"
lines="two"
class="mb-4">
<v-list-group>
class="mb-4 overflow-y-hidden">
<v-item-group>
<v-list-item
v-for="adminItem in adminSection"
:key="adminItem.name"
:to="adminItem.link"
:disabled="!adminItem.link">
<v-avatar>
<v-icon :icon="adminItem.icon" />
</v-avatar>
<template #prepend>
<v-avatar>
<v-icon :icon="adminItem.icon" />
</v-avatar>
</template>
<v-list-item-title>
{{ adminItem.name }}
</v-list-item-title>
<v-list-item-subtitle>
{{ adminItem.description }}
</v-list-item-subtitle>
<v-list-item-action>
<v-icon>
<i-mdi-chevron-right />
</v-icon>
</v-list-item-action>
<template #append>
<v-list-item-action>
<v-icon>
<i-mdi-chevron-right />
</v-icon>
</v-list-item-action>
</template>
</v-list-item>
</v-list-group>
</v-item-group>
</v-list>
</div>
<about-links v-if="$vuetify.display.mobile" />
Expand Down

0 comments on commit a29acfb

Please sign in to comment.