mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 03:29:16 +01:00
refactor: ♻️ Disable Nuxt component auto-importing (obscures code flow)
This commit is contained in:
parent
32d1acb4c1
commit
e309c56a86
58 changed files with 440 additions and 292 deletions
|
|
@ -9,17 +9,17 @@
|
|||
<div v-for="provider of ssoConfig?.providers" :key="provider.id"
|
||||
class="flex items-center justify-between p-4 bg-dark-700 rounded">
|
||||
<div class="flex items-center gap-4">
|
||||
<AvatarsCentered :src="provider.icon" :alt="provider.name" class="h-8 w-8" />
|
||||
<Avatar :src="provider.icon" :alt="provider.name" class="h-8 w-8" />
|
||||
<span class="font-semibold text-gray-300">{{ provider.name }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<ButtonsPrimary :loading="loading" v-if="!linkedProviders?.find(p => p.id === provider.id)"
|
||||
<ButtonPrimary :loading="loading" v-if="!linkedProviders?.find(p => p.id === provider.id)"
|
||||
@click="link(provider.id)">
|
||||
<span>Link</span>
|
||||
</ButtonsPrimary>
|
||||
<ButtonsSecondary :loading="loading" v-else @click="unlink(provider.id)">
|
||||
</ButtonPrimary>
|
||||
<ButtonSecondary :loading="loading" v-else @click="unlink(provider.id)">
|
||||
<span>Unlink</span>
|
||||
</ButtonsSecondary>
|
||||
</ButtonSecondary>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -29,6 +29,9 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import type { ResponseError } from "@lysand-org/client";
|
||||
import Avatar from "../avatars/avatar.vue";
|
||||
import ButtonPrimary from "../buttons/button-primary.vue";
|
||||
import ButtonSecondary from "../buttons/button-secondary.vue";
|
||||
|
||||
const client = useClient();
|
||||
const ssoConfig = useSSOConfig();
|
||||
|
|
|
|||
|
|
@ -3,20 +3,20 @@
|
|||
class="w-full md:px-8 px-4 py-4 bg-dark-700 grid justify-center lg:grid-cols-[minmax(auto,_36rem)_1fr] grid-cols-1 gap-4">
|
||||
<form class="w-full ring-1 ring-inset ring-white/5 pb-5 bg-dark-800 rounded overflow-hidden"
|
||||
@submit.prevent="save">
|
||||
<AvatarsCentered :src="account?.header" :alt="`${account?.acct}'s header image'`"
|
||||
<Avatar :src="account?.header" :alt="`${account?.acct}'s header image'`"
|
||||
class="w-full aspect-[8/3] border-b border-white/10 bg-dark-700 !rounded-none" />
|
||||
|
||||
<div class="flex items-start justify-between px-4 py-3">
|
||||
<AvatarsCentered :src="account?.avatar" :alt="`${account?.acct}'s avatar'`"
|
||||
<Avatar :src="account?.avatar" :alt="`${account?.acct}'s avatar'`"
|
||||
class="h-32 w-32 -mt-[4.5rem] z-10 shrink-0 rounded ring-2 ring-dark-800" />
|
||||
</div>
|
||||
|
||||
<div class="mt-2 px-4">
|
||||
<InputsText @input="displayName = ($event.target as HTMLInputElement).value" :value="displayName"
|
||||
<TextInput @input="displayName = ($event.target as HTMLInputElement).value" :value="displayName"
|
||||
aria-label="Display name" :disabled="loading" />
|
||||
<div class="mt-2 grid grid-cols-[auto_1fr] items-center gap-x-2">
|
||||
<iconify-icon icon="tabler:at" width="none" class="size-6" aria-hidden="true" />
|
||||
<InputsText @input="acct = ($event.target as HTMLInputElement).value" :value="acct"
|
||||
<TextInput @input="acct = ($event.target as HTMLInputElement).value" :value="acct"
|
||||
aria-label="Username" :disabled="loading" />
|
||||
</div>
|
||||
<p class="text-gray-300 text-xs mt-2">
|
||||
|
|
@ -25,27 +25,33 @@
|
|||
</div>
|
||||
|
||||
<div class="mt-3 px-4">
|
||||
<InputsRichTextbox v-model:model-content="note" :max-characters="bio" :disabled="loading"
|
||||
<RichTextboxInput v-model:model-content="note" :max-characters="bio" :disabled="loading"
|
||||
class="rounded ring-white/10 ring-2 focus:ring-primary-600 px-4 py-2 max-h-[40dvh] max-w-full" />
|
||||
</div>
|
||||
|
||||
<div class="px-4 mt-4 grid grid-cols-2 gap-2">
|
||||
<ButtonsPrimary class="w-full" type="submit" :loading="loading">
|
||||
<ButtonPrimary class="w-full" type="submit" :loading="loading">
|
||||
<span>Save</span>
|
||||
</ButtonsPrimary>
|
||||
<ButtonsSecondary class="w-full" @click="revert" type="button" :loading="loading">
|
||||
</ButtonPrimary>
|
||||
<ButtonSecondary class="w-full" @click="revert" type="button" :loading="loading">
|
||||
<span>Revert</span>
|
||||
</ButtonsSecondary>
|
||||
</ButtonSecondary>
|
||||
</div>
|
||||
</form>
|
||||
<div>
|
||||
<SettingsOidc />
|
||||
<Oidc />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { ResponseError } from "@lysand-org/client";
|
||||
import Avatar from "../avatars/avatar.vue";
|
||||
import ButtonPrimary from "../buttons/button-primary.vue";
|
||||
import ButtonSecondary from "../buttons/button-secondary.vue";
|
||||
import RichTextboxInput from "../inputs/rich-textbox-input.vue";
|
||||
import TextInput from "../inputs/text-input.vue";
|
||||
import Oidc from "./oidc.vue";
|
||||
|
||||
const identity = useCurrentIdentity();
|
||||
const account = computed(() => identity.value?.account);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue