kopia lustrzana https://dev.funkwhale.audio/funkwhale/funkwhale
refactor(front): use ui Sections throughout user settings page
rodzic
59d22edb28
commit
61d16448c5
|
@ -21,10 +21,11 @@ import Input from '~/components/ui/Input.vue'
|
||||||
import Layout from '~/components/ui/Layout.vue'
|
import Layout from '~/components/ui/Layout.vue'
|
||||||
import Slider from '~/components/ui/Slider.vue'
|
import Slider from '~/components/ui/Slider.vue'
|
||||||
import Alert from '~/components/ui/Alert.vue'
|
import Alert from '~/components/ui/Alert.vue'
|
||||||
import Heading from '~/components/ui/Heading.vue'
|
import Header from '~/components/ui/Header.vue'
|
||||||
import Button from '~/components/ui/Button.vue'
|
import Button from '~/components/ui/Button.vue'
|
||||||
import Link from '~/components/ui/Link.vue'
|
import Link from '~/components/ui/Link.vue'
|
||||||
import Textarea from '~/components/ui/Textarea.vue'
|
import Textarea from '~/components/ui/Textarea.vue'
|
||||||
|
import Section from '~/components/ui/Section.vue'
|
||||||
|
|
||||||
const SETTINGS_ORDER: FieldId[] = ['summary', 'privacy_level']
|
const SETTINGS_ORDER: FieldId[] = ['summary', 'privacy_level']
|
||||||
|
|
||||||
|
@ -278,8 +279,9 @@ fetchOwnedApps()
|
||||||
v-title="labels.title"
|
v-title="labels.title"
|
||||||
main
|
main
|
||||||
stack
|
stack
|
||||||
|
gap-84
|
||||||
>
|
>
|
||||||
<Heading
|
<Header
|
||||||
:h1="t('components.auth.Settings.header.accountSettings')"
|
:h1="t('components.auth.Settings.header.accountSettings')"
|
||||||
page-heading
|
page-heading
|
||||||
/>
|
/>
|
||||||
|
@ -343,10 +345,10 @@ fetchOwnedApps()
|
||||||
{{ t('components.auth.Settings.button.updateSettings') }}
|
{{ t('components.auth.Settings.button.updateSettings') }}
|
||||||
</Button>
|
</Button>
|
||||||
</Layout>
|
</Layout>
|
||||||
<section class="ui text container">
|
<Section
|
||||||
<h2 class="ui header">
|
large-section-heading
|
||||||
{{ t('components.auth.Settings.header.avatar') }}
|
:h2="t('components.auth.Settings.header.avatar')"
|
||||||
</h2>
|
>
|
||||||
<Layout form>
|
<Layout form>
|
||||||
<Alert
|
<Alert
|
||||||
v-if="avatarErrors.length > 0"
|
v-if="avatarErrors.length > 0"
|
||||||
|
@ -374,12 +376,12 @@ fetchOwnedApps()
|
||||||
{{ t('components.auth.Settings.label.avatar') }}
|
{{ t('components.auth.Settings.label.avatar') }}
|
||||||
</attachment-input>
|
</attachment-input>
|
||||||
</Layout>
|
</Layout>
|
||||||
</section>
|
</Section>
|
||||||
|
|
||||||
<section class="ui text container">
|
<Section
|
||||||
<h2 class="ui header">
|
large-section-heading
|
||||||
{{ t('components.auth.Settings.header.changePassword') }}
|
:h2="t('components.auth.Settings.header.changePassword')"
|
||||||
</h2>
|
>
|
||||||
<div class="ui message">
|
<div class="ui message">
|
||||||
{{ t('components.auth.Settings.description.changePassword.paragraph1') }} {{ t('components.auth.Settings.description.changePassword.paragraph2') }}
|
{{ t('components.auth.Settings.description.changePassword.paragraph1') }} {{ t('components.auth.Settings.description.changePassword.paragraph2') }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -400,6 +402,7 @@ fetchOwnedApps()
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</Alert>
|
</Alert>
|
||||||
|
<!-- TODO: Use -->
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="old-password-field">{{ t('components.auth.Settings.label.currentPassword') }}</label>
|
<label for="old-password-field">{{ t('components.auth.Settings.label.currentPassword') }}</label>
|
||||||
<password-input
|
<password-input
|
||||||
|
@ -446,18 +449,15 @@ fetchOwnedApps()
|
||||||
</Layout>
|
</Layout>
|
||||||
<div class="ui hidden divider" />
|
<div class="ui hidden divider" />
|
||||||
<subsonic-token-form />
|
<subsonic-token-form />
|
||||||
</section>
|
</Section>
|
||||||
|
|
||||||
<section
|
<Section
|
||||||
id="content-filters"
|
id="content-filters"
|
||||||
|
large-section-heading
|
||||||
|
icon="bi-eye-slash"
|
||||||
|
:h2="t('components.auth.Settings.header.contentFilters')"
|
||||||
class="ui text container"
|
class="ui text container"
|
||||||
>
|
>
|
||||||
<h2 class="ui header">
|
|
||||||
<i class="bi bi-eye-slash" />
|
|
||||||
<div class="content">
|
|
||||||
{{ t('components.auth.Settings.header.contentFilters') }}
|
|
||||||
</div>
|
|
||||||
</h2>
|
|
||||||
<p>
|
<p>
|
||||||
{{ t('components.auth.Settings.description.contentFilters') }}
|
{{ t('components.auth.Settings.description.contentFilters') }}
|
||||||
</p>
|
</p>
|
||||||
|
@ -508,18 +508,14 @@ fetchOwnedApps()
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</section>
|
</Section>
|
||||||
<section
|
<Section
|
||||||
id="grants"
|
id="grants"
|
||||||
|
:h2="t('components.auth.Settings.header.authorizedApps')"
|
||||||
|
large-section-heading
|
||||||
|
icon="bi-unlock-fill"
|
||||||
class="ui text container"
|
class="ui text container"
|
||||||
>
|
>
|
||||||
<div class="ui hidden divider" />
|
|
||||||
<h2 class="ui header">
|
|
||||||
<i class="bi bi-unlock-fill" />
|
|
||||||
<div class="content">
|
|
||||||
{{ t('components.auth.Settings.header.authorizedApps') }}
|
|
||||||
</div>
|
|
||||||
</h2>
|
|
||||||
<p>
|
<p>
|
||||||
{{ t('components.auth.Settings.description.authorizedApps') }}
|
{{ t('components.auth.Settings.description.authorizedApps') }}
|
||||||
</p>
|
</p>
|
||||||
|
@ -581,18 +577,14 @@ fetchOwnedApps()
|
||||||
</template>
|
</template>
|
||||||
{{ t('components.auth.Settings.help.noApps') }}
|
{{ t('components.auth.Settings.help.noApps') }}
|
||||||
</empty-state>
|
</empty-state>
|
||||||
</section>
|
</Section>
|
||||||
<section
|
<Section
|
||||||
id="apps"
|
id="apps"
|
||||||
|
large-section-heading
|
||||||
|
icon="bi-code-slash"
|
||||||
|
:h2="t('components.auth.Settings.header.yourApps')"
|
||||||
class="ui text container"
|
class="ui text container"
|
||||||
>
|
>
|
||||||
<div class="ui hidden divider" />
|
|
||||||
<h2 class="ui header">
|
|
||||||
<i class="bi bi-code-slash" />
|
|
||||||
<div class="content">
|
|
||||||
{{ t('components.auth.Settings.header.yourApps') }}
|
|
||||||
</div>
|
|
||||||
</h2>
|
|
||||||
<p>
|
<p>
|
||||||
{{ t('components.auth.Settings.description.yourApps') }}
|
{{ t('components.auth.Settings.description.yourApps') }}
|
||||||
</p>
|
</p>
|
||||||
|
@ -667,19 +659,15 @@ fetchOwnedApps()
|
||||||
</template>
|
</template>
|
||||||
{{ t('components.auth.Settings.help.noPersonalApps') }}
|
{{ t('components.auth.Settings.help.noPersonalApps') }}
|
||||||
</empty-state>
|
</empty-state>
|
||||||
</section>
|
</Section>
|
||||||
|
|
||||||
<section
|
<Section
|
||||||
id="plugins"
|
id="plugins"
|
||||||
|
large-section-heading
|
||||||
|
icon="bi-code"
|
||||||
|
:h2="t('components.auth.Settings.header.plugins')"
|
||||||
class="ui text container"
|
class="ui text container"
|
||||||
>
|
>
|
||||||
<div class="ui hidden divider" />
|
|
||||||
<h2 class="ui header">
|
|
||||||
<i class="bi bi-code" />
|
|
||||||
<div class="content">
|
|
||||||
{{ t('components.auth.Settings.header.plugins') }}
|
|
||||||
</div>
|
|
||||||
</h2>
|
|
||||||
<p>
|
<p>
|
||||||
{{ t('components.auth.Settings.description.plugins') }}
|
{{ t('components.auth.Settings.description.plugins') }}
|
||||||
</p>
|
</p>
|
||||||
|
@ -691,15 +679,12 @@ fetchOwnedApps()
|
||||||
>
|
>
|
||||||
{{ t('components.auth.Settings.link.managePlugins') }}
|
{{ t('components.auth.Settings.link.managePlugins') }}
|
||||||
</Link>
|
</Link>
|
||||||
</section>
|
</Section>
|
||||||
<section class="ui text container">
|
<Section
|
||||||
<div class="ui hidden divider" />
|
large-section-heading
|
||||||
<h2 class="ui header">
|
icon="bi-envelope-at"
|
||||||
<i class="bi bi-envelope-at" />
|
:h2="t('components.auth.Settings.header.changeEmail')"
|
||||||
<div class="content">
|
>
|
||||||
{{ t('components.auth.Settings.header.changeEmail') }}
|
|
||||||
</div>
|
|
||||||
</h2>
|
|
||||||
<p>
|
<p>
|
||||||
{{ t('components.auth.Settings.description.changeEmail') }}
|
{{ t('components.auth.Settings.description.changeEmail') }}
|
||||||
</p>
|
</p>
|
||||||
|
@ -751,15 +736,12 @@ fetchOwnedApps()
|
||||||
{{ t('components.auth.Settings.button.update') }}
|
{{ t('components.auth.Settings.button.update') }}
|
||||||
</Button>
|
</Button>
|
||||||
</Layout>
|
</Layout>
|
||||||
</section>
|
</Section>
|
||||||
<section class="ui text container">
|
<Section
|
||||||
<div class="ui hidden divider" />
|
large-section-heading
|
||||||
<h2 class="ui header">
|
:h2="t('components.auth.Settings.header.deleteAccount')"
|
||||||
<i class="bi bi-trash" />
|
icon="bi-trash"
|
||||||
<div class="content">
|
>
|
||||||
{{ t('components.auth.Settings.header.deleteAccount') }}
|
|
||||||
</div>
|
|
||||||
</h2>
|
|
||||||
<p>
|
<p>
|
||||||
{{ t('components.auth.Settings.description.deleteAccount') }}
|
{{ t('components.auth.Settings.description.deleteAccount') }}
|
||||||
</p>
|
</p>
|
||||||
|
@ -811,6 +793,6 @@ fetchOwnedApps()
|
||||||
</template>
|
</template>
|
||||||
</dangerous-button>
|
</dangerous-button>
|
||||||
</Layout>
|
</Layout>
|
||||||
</section>
|
</Section>
|
||||||
</Layout>
|
</Layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -17,6 +17,8 @@ interface Props {
|
||||||
fieldId: string
|
fieldId: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Migrate `defaultShow` and `copyButton` functionality to ui password component and delete this module
|
||||||
|
|
||||||
const emit = defineEmits<Events>()
|
const emit = defineEmits<Events>()
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
defaultShow: false,
|
defaultShow: false,
|
||||||
|
|
|
@ -97,15 +97,6 @@ const headingProps = computed(() =>
|
||||||
v
|
v
|
||||||
:size="64"
|
:size="64"
|
||||||
/>
|
/>
|
||||||
<div
|
|
||||||
v-if="icon"
|
|
||||||
style="display: flex; justify-content: center; align-items: center; width: 48px;"
|
|
||||||
>
|
|
||||||
<i
|
|
||||||
:class="['bi', icon]"
|
|
||||||
style="font-size: 18px;"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<slot name="topleft" />
|
<slot name="topleft" />
|
||||||
<Heading
|
<Heading
|
||||||
v-bind="headingProps"
|
v-bind="headingProps"
|
||||||
|
@ -113,7 +104,16 @@ const headingProps = computed(() =>
|
||||||
padding: 0 0 24px 0;
|
padding: 0 0 24px 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
"
|
"
|
||||||
/>
|
>
|
||||||
|
<template
|
||||||
|
v-if="icon"
|
||||||
|
#before
|
||||||
|
>
|
||||||
|
<div style="float: left; padding-right: .5em;">
|
||||||
|
<i :class="['bi', icon]" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</Heading>
|
||||||
<Spacer grow />
|
<Spacer grow />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -854,7 +854,7 @@
|
||||||
"button": {
|
"button": {
|
||||||
"delete": "Delete",
|
"delete": "Delete",
|
||||||
"deleteAccount": "Delete my account…",
|
"deleteAccount": "Delete my account…",
|
||||||
"deleteAccountConfirm": "Delete my account",
|
"deleteAccountConfirm": "I accept the risk. Delete my account",
|
||||||
"disableSubsonic": "Disable access",
|
"disableSubsonic": "Disable access",
|
||||||
"edit": "Edit",
|
"edit": "Edit",
|
||||||
"password": "Change password",
|
"password": "Change password",
|
||||||
|
|
Ładowanie…
Reference in New Issue