feat(theme-2): sync inbox/announcements/presence/deposit from main
This commit is contained in:
23
apps/player/src/composables/useInboxFeature.ts
Normal file
23
apps/player/src/composables/useInboxFeature.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { computed } from 'vue';
|
||||
import { usePlayerHome } from './usePlayerHome';
|
||||
|
||||
/** 玩家端站内邮箱功能开关(来自 /player/home) */
|
||||
export function useInboxFeature() {
|
||||
const { homeRaw } = usePlayerHome();
|
||||
|
||||
const inboxEnabled = computed(() => homeRaw.value?.inboxEnabled !== false);
|
||||
|
||||
const hubRoute = computed(() =>
|
||||
inboxEnabled.value ? '/messages' : '/messages?tab=support',
|
||||
);
|
||||
|
||||
const hubOpenLabelKey = computed(() =>
|
||||
inboxEnabled.value ? 'inbox_hub.open' : 'inbox_hub.open_support',
|
||||
);
|
||||
|
||||
const hubTitleKey = computed(() =>
|
||||
inboxEnabled.value ? 'inbox_hub.title' : 'inbox_hub.tab_support',
|
||||
);
|
||||
|
||||
return { inboxEnabled, hubRoute, hubOpenLabelKey, hubTitleKey };
|
||||
}
|
||||
Reference in New Issue
Block a user