-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into fix-allow-space-avatar-edition-on-testnet
- Loading branch information
Showing
6 changed files
with
72 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<script setup lang="ts"> | ||
const route = useRoute(); | ||
const { env, domain } = useApp(); | ||
const link = computed(() => { | ||
const baseUrl = | ||
env === 'demo' | ||
? 'https://testnet.snapshot.box/#/' | ||
: 'https://snapshot.box/#/'; | ||
let path = 'home'; | ||
const prefix = env === 'demo' ? `s-tn` : 's'; | ||
switch (route.name) { | ||
case 'home': { | ||
path = 'explore'; | ||
break; | ||
} | ||
case 'spaceProposals': { | ||
path = `${prefix}:${route.params.key}`; | ||
break; | ||
} | ||
case 'spaceSettings': { | ||
path = `${prefix}:${route.params.key}/settings`; | ||
break; | ||
} | ||
case 'spaceAbout': { | ||
path = `${prefix}:${route.params.key}`; | ||
break; | ||
} | ||
case 'spaceProposal': { | ||
path = `${prefix}:${route.params.key}/proposal/${route.params.id}`; | ||
break; | ||
} | ||
case 'spaceCreate': { | ||
path = `${prefix}:${route.params.key}/create`; | ||
break; | ||
} | ||
case 'spaceDelegates': { | ||
path = `${prefix}:${route.params.key}/delegates`; | ||
break; | ||
} | ||
case 'delegate': { | ||
path = `${prefix}:${route.params.key}/delegates`; | ||
break; | ||
} | ||
case 'profileAbout': { | ||
path = `profile/${route.params.address}`; | ||
break; | ||
} | ||
case 'profileActivity': { | ||
path = `profile/${route.params.address}`; | ||
break; | ||
} | ||
} | ||
return `${baseUrl}${path}`; | ||
}); | ||
</script> | ||
|
||
<template> | ||
<a | ||
v-if="!domain" | ||
:href="link" | ||
class="flex bg-blue-700 text-white rounded-full px-[10px] py-[2px] gap-1" | ||
> | ||
<div class="leading-6 hidden md:block">Switch to the new interface</div> | ||
<div class="leading-6 md:hidden">Switch to v2</div> | ||
<i-ho-arrow-narrow-right class="shrink-0 hidden xs:block" /> | ||
</a> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters