mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 08:28:20 +01:00
chore: ⬆️ Update @lysand-org/client for new types
This commit is contained in:
parent
18b4bc64b3
commit
a889f8d142
|
|
@ -19,8 +19,10 @@
|
|||
</div>
|
||||
<div v-if="notification?.type === 'follow_request' && relationship?.requested_by"
|
||||
class="w-full grid grid-cols-2 gap-4 p-2 ">
|
||||
<ButtonsPrimary :loading="isWorkingOnFollowRequest" @click="acceptFollowRequest"><span>Accept</span></ButtonsPrimary>
|
||||
<ButtonsSecondary :loading="isWorkingOnFollowRequest" @click="rejectFollowRequest"><span>Reject</span></ButtonsSecondary>
|
||||
<ButtonsPrimary :loading="isWorkingOnFollowRequest" @click="acceptFollowRequest"><span>Accept</span>
|
||||
</ButtonsPrimary>
|
||||
<ButtonsSecondary :loading="isWorkingOnFollowRequest" @click="rejectFollowRequest"><span>Reject</span>
|
||||
</ButtonsSecondary>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -47,7 +49,7 @@ const acceptFollowRequest = async () => {
|
|||
const { data } = await client.value.acceptFollowRequest(
|
||||
props.notification.account.id,
|
||||
);
|
||||
relationship.value = data as Relationship;
|
||||
relationship.value = data;
|
||||
isWorkingOnFollowRequest.value = false;
|
||||
};
|
||||
|
||||
|
|
@ -57,7 +59,7 @@ const rejectFollowRequest = async () => {
|
|||
const { data } = await client.value.rejectFollowRequest(
|
||||
props.notification.account.id,
|
||||
);
|
||||
relationship.value = data as Relationship;
|
||||
relationship.value = data;
|
||||
isWorkingOnFollowRequest.value = false;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ export const useCurrentIdentity = (): Ref<Identity | null> => {
|
|||
);
|
||||
|
||||
if (identities.value.length > 0) {
|
||||
currentId.value = identities.value[0].id;
|
||||
currentId.value = identities.value[0]?.id;
|
||||
} else {
|
||||
currentId.value = null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ export const useNote = (
|
|||
ref(client)
|
||||
.value?.getStatus(noteId)
|
||||
.then((res) => {
|
||||
output.value = res.data as Status;
|
||||
output.value = res.data;
|
||||
});
|
||||
|
||||
return output;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ export const useNoteContext = (
|
|||
ref(client)
|
||||
.value?.getStatusContext(toValue(noteId) ?? "")
|
||||
.then((res) => {
|
||||
output.value = res.data as Context;
|
||||
output.value = res.data;
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ export const useNoteData = (
|
|||
);
|
||||
|
||||
if (result?.data) {
|
||||
useEvent("note:delete", result.data as Status);
|
||||
useEvent("note:delete", result.data);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ export const useRelationship = (
|
|||
toValue(client)
|
||||
?.getRelationship(toValue(accountId) ?? "")
|
||||
.then((res) => {
|
||||
relationship.value = res.data as Relationship;
|
||||
relationship.value = res.data;
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ export const useTimeline = <
|
|||
);
|
||||
if (newNotes.length > 0) {
|
||||
fetchedNotes.value = [...fetchedNotes.value, ...newNotes];
|
||||
nextMaxId = newNotes[newNotes.length - 1].id;
|
||||
nextMaxId = newNotes[newNotes.length - 1]?.id;
|
||||
for (const note of newNotes) {
|
||||
fetchedNoteIds.add(note.id);
|
||||
}
|
||||
|
|
@ -70,7 +70,7 @@ export const useTimeline = <
|
|||
);
|
||||
if (newNotes.length > 0) {
|
||||
fetchedNotes.value = [...newNotes, ...fetchedNotes.value];
|
||||
prevMinId = newNotes[0].id;
|
||||
prevMinId = newNotes[0]?.id;
|
||||
for (const note of newNotes) {
|
||||
fetchedNoteIds.add(note.id);
|
||||
}
|
||||
|
|
@ -132,7 +132,7 @@ export const useIdTimeline = <
|
|||
);
|
||||
if (newNotes.length > 0) {
|
||||
fetchedNotes.value = [...fetchedNotes.value, ...newNotes];
|
||||
nextMaxId = newNotes[newNotes.length - 1].id;
|
||||
nextMaxId = newNotes[newNotes.length - 1]?.id;
|
||||
for (const note of newNotes) {
|
||||
fetchedNoteIds.add(note.id);
|
||||
}
|
||||
|
|
@ -153,7 +153,7 @@ export const useIdTimeline = <
|
|||
);
|
||||
if (newNotes.length > 0) {
|
||||
fetchedNotes.value = [...newNotes, ...fetchedNotes.value];
|
||||
prevMinId = newNotes[0].id;
|
||||
prevMinId = newNotes[0]?.id;
|
||||
for (const note of newNotes) {
|
||||
fetchedNoteIds.add(note.id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@ark-ui/vue": "^3.3.1",
|
||||
"@lysand-org/client": "^0.1.6",
|
||||
"@lysand-org/client": "^0.1.7",
|
||||
"@nuxt/fonts": "^0.7.0",
|
||||
"@tailwindcss/typography": "^0.5.13",
|
||||
"@vee-validate/nuxt": "^4.13.1",
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
"nuxt-shiki": "^0.3.0",
|
||||
"overlayscrollbars": "^2.8.3",
|
||||
"overlayscrollbars-vue": "^0.5.9",
|
||||
"shiki": "^1.6.3",
|
||||
"shiki": "^1.6.4",
|
||||
"vue": "^3.4.27",
|
||||
"vue-router": "^4.3.3",
|
||||
"zod": "^3.23.8"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import type { Role as LysandRole } from "~/composables/Identities";
|
||||
import type { Emoji } from "./emoji";
|
||||
import type { Field } from "./field";
|
||||
import type { Role } from "./role";
|
||||
|
|
@ -30,5 +31,6 @@ export type Account = {
|
|||
bot: boolean | null;
|
||||
source?: Source;
|
||||
role?: Role;
|
||||
roles: LysandRole[];
|
||||
mute_expires_at?: string;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue