mirror of
https://github.com/versia-pub/frontend.git
synced 2026-06-14 15:39:15 +02:00
refactor: ♻️ Rewrite state system to use Pinia for composer and auth
This commit is contained in:
parent
a6db9e059d
commit
b510782a30
80 changed files with 999 additions and 1011 deletions
|
|
@ -11,8 +11,10 @@ import {
|
|||
import * as m from "~~/paraglide/messages.js";
|
||||
import Composer from "./composer.vue";
|
||||
|
||||
const authStore = useAuthStore();
|
||||
|
||||
useListen("composer:open", () => {
|
||||
if (identity.value) {
|
||||
if (authStore.isSignedIn) {
|
||||
open.value = true;
|
||||
}
|
||||
});
|
||||
|
|
@ -21,7 +23,7 @@ useListen("composer:edit", async (note) => {
|
|||
const id = toast.loading(m.wise_late_fireant_walk(), {
|
||||
duration: 0,
|
||||
});
|
||||
const { data: source } = await client.value.getStatusSource(note.id);
|
||||
const { data: source } = await authStore.client.getStatusSource(note.id);
|
||||
relation.value = {
|
||||
type: "edit",
|
||||
note,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue