mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 19:49:16 +01:00
feat: ✨ Add post composer
This commit is contained in:
parent
c550978872
commit
3004bf4816
4 changed files with 126 additions and 6 deletions
|
|
@ -17,7 +17,6 @@
|
|||
</NuxtLink>
|
||||
</div>
|
||||
|
||||
<!-- Login buttons -->
|
||||
<div class="flex flex-col gap-3 mt-auto">
|
||||
<h3 class="font-semibold text-gray-300 text-xs uppercase opacity-0 group-hover:opacity-100 duration-200">
|
||||
Account</h3>
|
||||
|
|
@ -41,13 +40,14 @@
|
|||
<h3 v-if="tokenData"
|
||||
class="font-semibold text-gray-300 text-xs uppercase opacity-0 group-hover:opacity-100 duration-200">
|
||||
Posts</h3>
|
||||
<ButtonsBase v-if="tokenData" @click="compose" disabled
|
||||
<ButtonsBase v-if="tokenData" @click="compose"
|
||||
class="flex flex-row text-left items-center justify-start gap-3 text-lg hover:ring-1 ring-white/10 bg-gradient-to-tr from-pink-300 via-purple-300 to-indigo-400 overflow-hidden h-12 w-full duration-200">
|
||||
<Icon name="tabler:writing" class="shrink-0 text-2xl" />
|
||||
<span class="pr-28 line-clamp-1">Compose</span>
|
||||
</ButtonsBase>
|
||||
</div>
|
||||
</aside>
|
||||
<ComposerModal :open="composerOpen" @close="composerOpen = false" />
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
|
@ -64,6 +64,7 @@ const timelines = ref([
|
|||
},
|
||||
]);
|
||||
|
||||
const composerOpen = ref(false);
|
||||
const loadingAuth = ref(false);
|
||||
|
||||
const appData = useAppData();
|
||||
|
|
@ -71,7 +72,7 @@ const tokenData = useTokenData();
|
|||
const client = useMegalodon();
|
||||
|
||||
const compose = () => {
|
||||
alert("Not implemented yet");
|
||||
composerOpen.value = true;
|
||||
};
|
||||
|
||||
const signIn = async () => {
|
||||
|
|
@ -122,7 +123,7 @@ const signOut = async () => {
|
|||
tokenData.value.access_token,
|
||||
tokenData.value.access_token,
|
||||
)
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
|
||||
tokenData.value = null;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue