mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 03:29:16 +01:00
feat: ✨ Add multi-account support, more options for posts, UI improvements
This commit is contained in:
parent
48954baf06
commit
ef9a6f1da4
36 changed files with 649 additions and 344 deletions
|
|
@ -1,12 +1,25 @@
|
|||
<template>
|
||||
<div class="from-dark-600 to-dark-900 bg-gradient-to-tl min-h-dvh">
|
||||
<div class="from-dark-600 to-dark-900 bg-gradient-to-tl relative min-h-dvh">
|
||||
<svg class="absolute inset-0 h-full w-full stroke-white/10 [mask-image:radial-gradient(100%_100%_at_top_right,white,transparent)]"
|
||||
aria-hidden="true">
|
||||
<defs>
|
||||
<pattern id="983e3e4c-de6d-4c3f-8d64-b9761d1534cc" width="200" height="200" x="50%" y="-1"
|
||||
patternUnits="userSpaceOnUse">
|
||||
<path d="M.5 200V.5H200" fill="none"></path>
|
||||
</pattern>
|
||||
</defs><svg x="50%" y="-1" class="overflow-visible fill-gray-800/20">
|
||||
<path d="M-200 0h201v201h-201Z M600 0h201v201h-201Z M-400 600h201v201h-201Z M200 800h201v201h-201Z"
|
||||
stroke-width="0"></path>
|
||||
</svg>
|
||||
<rect width="100%" height="100%" stroke-width="0" fill="url(#983e3e4c-de6d-4c3f-8d64-b9761d1534cc)"></rect>
|
||||
</svg>
|
||||
<LazySidebarsNavigation />
|
||||
<div class="relative md:pl-20 min-h-dvh flex flex-row overflow-hidden justify-center xl:justify-between">
|
||||
<OverlayScrollbarsComponent :defer="true" class="w-full max-h-dvh overflow-y-auto">
|
||||
<slot />
|
||||
</OverlayScrollbarsComponent>
|
||||
<ClientOnly>
|
||||
<LazySidebarsCollapsibleAside v-if="width > 1280 && tokenData" direction="right"
|
||||
<LazySidebarsCollapsibleAside v-if="width > 1280 && identity" direction="right"
|
||||
class="max-w-md max-h-dvh overflow-y-auto w-full hidden absolute inset-y-0 xl:flex">
|
||||
<LazyTimelinesTimelineScroller>
|
||||
<LazyTimelinesNotifications />
|
||||
|
|
@ -46,8 +59,8 @@ import { OverlayScrollbarsComponent } from "#imports";
|
|||
const { width } = useWindowSize();
|
||||
|
||||
const { n, o_i_d_c } = useMagicKeys();
|
||||
const tokenData = useTokenData();
|
||||
const client = useClient(tokenData);
|
||||
const identity = useCurrentIdentity();
|
||||
const client = useClient();
|
||||
const providers = useSSOConfig();
|
||||
|
||||
watchEffect(async () => {
|
||||
|
|
@ -70,19 +83,16 @@ watchEffect(async () => {
|
|||
return;
|
||||
}
|
||||
|
||||
const response = await fetch(
|
||||
new URL("/api/v1/sso", client.value?.url),
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: `Bearer ${tokenData.value?.access_token}`,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({
|
||||
issuer: issuer.id,
|
||||
}),
|
||||
const response = await fetch(new URL("/api/v1/sso", client.value.url), {
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: `Bearer ${identity.value?.tokens.access_token}`,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
);
|
||||
body: JSON.stringify({
|
||||
issuer: issuer.id,
|
||||
}),
|
||||
});
|
||||
|
||||
const json = await response.json();
|
||||
window.location.href = json.link;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue