mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 03:29:16 +01:00
perf: ♻️ Use global instance of composable instead of an instance per component for identities, client and settings
This commit is contained in:
parent
f1ada1745d
commit
3428e4b5b6
38 changed files with 104 additions and 131 deletions
|
|
@ -32,7 +32,6 @@ import type { ResponseError } from "@lysand-org/client";
|
|||
import Button from "~/packages/ui/components/buttons/button.vue";
|
||||
import Avatar from "../avatars/avatar.vue";
|
||||
|
||||
const client = useClient();
|
||||
const ssoConfig = useSSOConfig();
|
||||
const linkedProviders = useLinkedSSO(client);
|
||||
const loading = ref(false);
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@ 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);
|
||||
const note = ref(account.value?.source?.note ?? "");
|
||||
const displayName = ref(account.value?.display_name ?? "");
|
||||
|
|
@ -61,7 +60,6 @@ const bio = computed(
|
|||
() => identity.value?.instance.configuration.statuses.max_characters ?? 0,
|
||||
);
|
||||
|
||||
const client = useClient();
|
||||
const loading = ref(false);
|
||||
|
||||
const revert = () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue