From 681b926fb88dabcf80167742d016ebe5f29d4799 Mon Sep 17 00:00:00 2001 From: Wan Qi Chen <495709+wa0x6e@users.noreply.github.com> Date: Tue, 9 Apr 2024 20:09:50 +0400 Subject: [PATCH 001/104] feat: add placeholder page for followings --- apps/ui/src/components/App/Nav.vue | 4 ++++ apps/ui/src/router.ts | 2 ++ apps/ui/src/views/Settings/Followings.vue | 13 +++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 apps/ui/src/views/Settings/Followings.vue diff --git a/apps/ui/src/components/App/Nav.vue b/apps/ui/src/components/App/Nav.vue index 2aba00c48..573aa70f9 100644 --- a/apps/ui/src/components/App/Nav.vue +++ b/apps/ui/src/components/App/Nav.vue @@ -63,6 +63,10 @@ const navigationConfig = computed(() => ({ : undefined) }, settings: { + followings: { + name: 'Followings', + icon: IHNewspaper + }, spaces: { name: 'My spaces', icon: IHStop diff --git a/apps/ui/src/router.ts b/apps/ui/src/router.ts index 870921937..788e7dd5d 100644 --- a/apps/ui/src/router.ts +++ b/apps/ui/src/router.ts @@ -18,6 +18,7 @@ import Settings from '@/views/Settings.vue'; import Contacts from '@/views/Settings/Contacts.vue'; import Explore from '@/views/Explore.vue'; import SettingsSpaces from '@/views/Settings/Spaces.vue'; +import SettingsFollowings from '@/views/Settings/Followings.vue'; import Apps from '@/views/Apps.vue'; import App from '@/views/App.vue'; @@ -61,6 +62,7 @@ const routes: any[] = [ component: Settings, children: [ { path: '', name: 'settings-spaces', component: SettingsSpaces }, + { path: 'followings', name: 'settings-followings', component: SettingsFollowings }, { path: 'contacts', name: 'settings-contacts', component: Contacts } ] }, diff --git a/apps/ui/src/views/Settings/Followings.vue b/apps/ui/src/views/Settings/Followings.vue new file mode 100644 index 000000000..9527987c0 --- /dev/null +++ b/apps/ui/src/views/Settings/Followings.vue @@ -0,0 +1,13 @@ + + + From 17b5bbb70b8659461aedcd74e3eb50c8456d656f Mon Sep 17 00:00:00 2001 From: Wan Qi Chen <495709+wa0x6e@users.noreply.github.com> Date: Tue, 9 Apr 2024 20:16:33 +0400 Subject: [PATCH 002/104] feat: redirect logged user to timeline when on homepage --- apps/ui/src/views/Home.vue | 13 ++++++++++++- apps/ui/src/views/Settings/Followings.vue | 2 -- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/apps/ui/src/views/Home.vue b/apps/ui/src/views/Home.vue index 9117c9958..c89515bcb 100644 --- a/apps/ui/src/views/Home.vue +++ b/apps/ui/src/views/Home.vue @@ -5,7 +5,6 @@ import ICDiscord from '~icons/c/discord'; import ICGithub from '~icons/c/github'; const COMMIT_SHA = import.meta.env.VITE_COMMIT_SHA || ''; - const SOCIALS = [ { href: 'https://twitter.com/SnapshotLabs', @@ -20,6 +19,18 @@ const SOCIALS = [ icon: ICGithub } ]; + +const router = useRouter(); +const { web3 } = useWeb3(); + +watch( + () => web3.value.account, + value => { + if (!value) return; + + router.push('/settings/followings'); + } +);