File tree Expand file tree Collapse file tree 3 files changed +28
-19
lines changed
Expand file tree Collapse file tree 3 files changed +28
-19
lines changed Original file line number Diff line number Diff line change 1414 color : var (--white );
1515 border-radius : 8px ;
1616 @include focus-visible ;
17+ @include text-outline ();
1718
1819 & :active {
1920 background-color : var (--item-hover-bg );
Original file line number Diff line number Diff line change 11<script lang="ts" setup>
22import { exit } from ' @tauri-apps/api/process'
33import { Page } from ' ../constants'
4+ import { AppStorage } from ' ../storage'
45import { useStore } from ' ../stores/store'
56import { Icons } from ' ./Icons'
67import SidebarButton from ' ./SidebarButton.vue'
78
89const store = useStore ()
10+
11+ const accessToken = AppStorage .asComputed (' accessToken' )
12+
13+ function handleBack() {
14+ let page = Page .Home
15+
16+ if (accessToken .value == null )
17+ page = Page .Landing
18+
19+ store .setPage (page )
20+ }
921 </script >
1022
1123<template >
1224 <nav class =" nav" >
13- <div
14- v-if = " store.currentPage !== Page.Landing "
15- class = " upper "
16- >
17- < SidebarButton @click = " store.setPage(Page.Home) " >
18- <Icons .Bell16 />
25+ <div class = " upper " >
26+ < SidebarButton
27+ v-if = " store.currentPage === Page.Settings "
28+ @click = " handleBack "
29+ >
30+ <Icons .ChevronLeft />
1931 </SidebarButton >
2032 </div >
2133 <div class =" lower" >
22- <template v-if =" store .currentPage !== Page .Landing " >
23- <SidebarButton @click =" store.fetchNotifications(true)" >
24- <Icons .Sync16 />
25- </SidebarButton >
26-
27- <SidebarButton @click =" store.setPage(Page.Settings)" >
28- <Icons .Gear16 />
29- </SidebarButton >
30- </template >
31-
3234 <SidebarButton
33- v-else
34- @click =" exit(0 )"
35+ v-if = " accessToken != null "
36+ @click =" store.fetchNotifications(true )"
3537 >
36- <Icons .SignOut16 />
38+ <Icons .Sync16 />
39+ </SidebarButton >
40+
41+ <SidebarButton @click =" store.setPage(Page.Settings)" >
42+ <Icons .Gear16 />
3743 </SidebarButton >
3844 </div >
3945 </nav >
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import AlertIcon from 'virtual:icons/octicon/alert-24'
2323import QuestionIcon from 'virtual:icons/octicon/question-24'
2424import MailIcon from 'virtual:icons/octicon/mail-24'
2525import SignOutIcon16 from 'virtual:icons/octicon/sign-out-16'
26+ import ChevronLeftIcon from 'virtual:icons/octicon/chevron-left'
2627
2728export const Icons = {
2829 More : markRaw ( MoreIcon ) ,
@@ -48,4 +49,5 @@ export const Icons = {
4849 Bell16 : markRaw ( BellIcon16 ) ,
4950 Gear16 : markRaw ( GearIcon16 ) ,
5051 Sync16 : markRaw ( SyncIcon16 ) ,
52+ ChevronLeft : markRaw ( ChevronLeftIcon ) ,
5153}
You can’t perform that action at this time.
0 commit comments