Add support for collapse navigator and global config (#33)

This commit is contained in:
AceDataCloud committed 2024-01-07 19:05:16 +08:00
1 parent 9a18b417f6
commit 439be1797d
20 files changed
+305 -50

No files matched your search

+11 -5
View File
@@ -1,7 +1,7 @@
<template>
<div class="side-panel">
<div>
<img v-if="isOfficial" src="@/assets/images/logo.svg" class="logo" @click="onHome" />
<img src="@/assets/images/logo.svg" class="logo" @click="onHome" />
</div>
<div class="links">
<a
@@ -75,14 +75,20 @@ export default defineComponent({
text: this.$t('console.menu.orderList'),
name: ROUTE_CONSOLE_ORDER_LIST,
icon: 'fa-solid fa-store'
},
{
}
];
// if forcedInviterId is set, only the forced inviter can see the distribution menu
// if forcedInviterId is not set, everyone can see the distribution menu
if (!this.$config.distribution?.forceInviterId || this.user?.id === this.$config.distribution?.forceInviterId) {
links.push({
key: 'distribution-index',
text: this.$t('console.menu.distributionIndex'),
name: ROUTE_CONSOLE_DISTRIBUTION_INDEX,
icon: 'fa-solid fa-coins'
}
];
});
}
return links;
}
},