feat(layout): hide "Back to hub" for the events-only launch

Comment out the profile sheet's "Back to hub" link (and its hubRootUrl)
since only the events app ships first — nothing to go back to yet. The
commented markup swaps the old Home icon for the HUB's brand-kit logo
(noted as a @brand-hub-logo alias to add when re-enabled — the hub logo,
not the per-standalone @brand-app-logo) so it's ready to re-enable when
the hub launches.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Padreug 2026-06-17 18:56:30 +02:00 committed by padreug
commit c037d45255

View file

@ -1,7 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { computed, ref } from 'vue' import { computed, ref } from 'vue'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import { Check, Copy, Home, LogIn, LogOut, Pencil, Zap } from 'lucide-vue-next' import { Check, Copy, LogIn, LogOut, Pencil, Zap } from 'lucide-vue-next'
import { nip19 } from 'nostr-tools' import { nip19 } from 'nostr-tools'
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar' import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
@ -66,7 +66,9 @@ const npubPreview = computed(() => {
return value.length > 24 ? `${value.slice(0, 12)}${value.slice(-8)}` : value return value.length > 24 ? `${value.slice(0, 12)}${value.slice(-8)}` : value
}) })
const hubRootUrl = computed(() => import.meta.env.VITE_HUB_ROOT_URL || '/') // "Back to hub" is hidden for the events-only launch (see template).
// Re-enable this alongside the commented-out link below when the hub ships.
// const hubRootUrl = computed(() => import.meta.env.VITE_HUB_ROOT_URL || '/')
const copiedField = ref<string | null>(null) const copiedField = ref<string | null>(null)
async function copyToClipboard(text: string, field: string) { async function copyToClipboard(text: string, field: string) {
@ -188,16 +190,24 @@ async function onLogout() {
<!-- Cross-app links + global preferences (always visible, auth or not) --> <!-- Cross-app links + global preferences (always visible, auth or not) -->
<div class="mt-4"> <div class="mt-4">
<!-- "Back to hub" hidden for the events-only launch re-enable when
the hub ships. When re-enabled, show the HUB's brand-kit logo
(the brand's primary/global logo, or a hub-specific override)
NOT the per-standalone @brand-app-logo, which resolves to this
standalone's own logo. This needs a hub-logo alias (e.g.
@brand-hub-logo = resolveAppLogo for the hub) added in
vite-branding.ts + the standalone vite configs.
<a <a
:href="hubRootUrl" :href="hubRootUrl"
class="flex items-center justify-between gap-3 px-3 py-3 hover:bg-accent rounded-md transition-colors" class="flex items-center justify-between gap-3 px-3 py-3 hover:bg-accent rounded-md transition-colors"
:aria-label="t('common.nav.backToHub')" :aria-label="t('common.nav.backToHub')"
> >
<div class="flex items-center gap-3"> <div class="flex items-center gap-3">
<Home class="w-5 h-5 text-muted-foreground" /> <img src="@brand-hub-logo" :alt="t('common.nav.backToHub')" class="w-5 h-5 shrink-0" />
<span class="text-sm font-medium">{{ t('common.nav.backToHub') }}</span> <span class="text-sm font-medium">{{ t('common.nav.backToHub') }}</span>
</div> </div>
</a> </a>
-->
<PreferencesRow layout="list" /> <PreferencesRow layout="list" />
</div> </div>