Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use VItemGroup to display settings list again #1855

Merged
merged 2 commits into from
Jan 19, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 v-slot:prepend>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<template v-slot:prepend>
<template #prepend>

This is the first occurence in the PR, but you used this syntax everywhere else. Revisit those as well please.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

My VSCode did not warn me about it.
I am using the development container and installed all suggested extensions.
Something else I should have configured?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Janbong Did you wait for npm install to complete?

<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 v-slot: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 v-slot: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 v-slot: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 v-slot: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 v-slot: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