refactor: ♻️ Rewrite state system to use Pinia for composer and auth

This commit is contained in:
Jesse Wierzbinski 2025-08-28 07:41:51 +02:00
parent a6db9e059d
commit b510782a30
No known key found for this signature in database
80 changed files with 999 additions and 1011 deletions

View file

@ -14,6 +14,8 @@ export type UserData = {
value: z.infer<typeof Account>;
};
const authStore = useAuthStore();
const updatePosition = (editor: Editor, element: HTMLElement): void => {
const virtualElement = {
getBoundingClientRect: () =>
@ -42,7 +44,9 @@ export const mentionSuggestion = {
return [];
}
const users = await client.value.searchAccount(query, { limit: 20 });
const users = await authStore.client.searchAccount(query, {
limit: 20,
});
return go(
query,
@ -122,7 +126,7 @@ export const emojiSuggestion = {
return [];
}
const emojis = (identity.value as Identity).emojis;
const emojis = authStore.emojis;
return go(
query,