sync: bring over remaining release/custom-0.1.115 changes
- Extract PublicSettingsInjectionPayload named struct with drift test - Add channel_monitor_default_interval_seconds to SSR injection - Add image_output_price to SupportedModelChip - Simplify AppSidebar buildSelfNavItems (admins see available channels) - Add gateway WARN logs for 503 no-available-accounts branches - Wire ChannelMonitorRunner into provideCleanup for graceful shutdown - Add migrations 130/131 (CC template userid fix + mimicry field cleanup) - Clean up fork-only features (sora, claude max simulation, client affinity) - Remove ~320 obsolete i18n keys - Add codexUsage utility, WechatServiceButton, BulkEditAccountModal - Tidy go.sum
This commit is contained in:
@@ -125,7 +125,6 @@
|
||||
<Icon name="key" size="sm" />
|
||||
{{ t('nav.apiKeys') }}
|
||||
</router-link>
|
||||
|
||||
<a
|
||||
v-if="authStore.isAdmin"
|
||||
href="https://github.com/Wei-Shaw/sub2api"
|
||||
@@ -143,7 +142,6 @@
|
||||
</svg>
|
||||
{{ t('nav.github') }}
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Contact Support (only show if configured) -->
|
||||
|
||||
@@ -634,18 +634,15 @@ const ChevronDownIcon = {
|
||||
const flagChannelMonitor = makeSidebarFlag(FeatureFlags.channelMonitor)
|
||||
const flagPayment = makeSidebarFlag(FeatureFlags.payment)
|
||||
const flagAvailableChannels = makeSidebarFlag(FeatureFlags.availableChannels)
|
||||
void flagAvailableChannels
|
||||
const flagOpsMonitoring = () => adminSettingsStore.opsMonitoringEnabled
|
||||
const flagAdminPayment = () => adminSettingsStore.paymentEnabled
|
||||
|
||||
// buildSelfNavItems 构造用户自己的导航项(用户端主菜单和管理员的"我的账户"子菜单共享这组声明)。
|
||||
// withDashboard=true 时包含仪表盘(用户端),false 时不含(管理员的个人区已经有独立仪表盘入口)。
|
||||
// includeAvailableChannels=false 时省略"可用渠道"入口——管理员在 admin 区已经有一个显眼入口,
|
||||
// 重复显示会让管理员同时看到两处"可用渠道"。
|
||||
//
|
||||
// 条目顺序:密钥 → 用量 → 可用渠道 → 渠道状态 → 订阅/支付 → 兑换/资料。
|
||||
// 可用渠道紧挨渠道状态之上,让用户"先看自己能用什么、再看对应状态"。
|
||||
function buildSelfNavItems(withDashboard: boolean, includeAvailableChannels = true): NavItem[] {
|
||||
function buildSelfNavItems(withDashboard: boolean): NavItem[] {
|
||||
const items: NavItem[] = []
|
||||
if (withDashboard) {
|
||||
items.push({ path: '/dashboard', label: t('nav.dashboard'), icon: DashboardIcon })
|
||||
@@ -653,11 +650,7 @@ function buildSelfNavItems(withDashboard: boolean, includeAvailableChannels = tr
|
||||
items.push(
|
||||
{ path: '/keys', label: t('nav.apiKeys'), icon: KeyIcon },
|
||||
{ path: '/usage', label: t('nav.usage'), icon: ChartIcon, hideInSimpleMode: true },
|
||||
)
|
||||
if (includeAvailableChannels) {
|
||||
items.push({ path: '/available-channels', label: t('nav.availableChannels'), icon: ChannelIcon, hideInSimpleMode: true, featureFlag: flagAvailableChannels })
|
||||
}
|
||||
items.push(
|
||||
{ path: '/available-channels', label: t('nav.availableChannels'), icon: ChannelIcon, hideInSimpleMode: true, featureFlag: flagAvailableChannels },
|
||||
{ path: '/monitor', label: t('nav.channelStatus'), icon: SignalIcon, featureFlag: flagChannelMonitor },
|
||||
{ path: '/subscriptions', label: t('nav.mySubscriptions'), icon: CreditCardIcon, hideInSimpleMode: true },
|
||||
{ path: '/purchase', label: t('nav.buySubscription'), icon: RechargeSubscriptionIcon, hideInSimpleMode: true, featureFlag: flagPayment },
|
||||
@@ -683,7 +676,9 @@ function finalizeNav(items: NavItem[]): NavItem[] {
|
||||
// User navigation items (for regular users)
|
||||
const userNavItems = computed((): NavItem[] => finalizeNav(buildSelfNavItems(true)))
|
||||
|
||||
// Personal navigation items (for admin's "My Account" section, without Dashboard)
|
||||
// Personal navigation items (for admin's "My Account" section, without Dashboard).
|
||||
// Admins access 可用渠道 from this section just like regular users — there is no
|
||||
// separate admin entry, since the page is purely a user-facing view.
|
||||
const personalNavItems = computed((): NavItem[] => finalizeNav(buildSelfNavItems(false)))
|
||||
|
||||
// Custom menu items filtered by visibility
|
||||
|
||||
Reference in New Issue
Block a user