From 9501e8a8826661e16eb4b6d782ca2889ce4c0cdf Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Thu, 13 Apr 2023 20:11:39 -0700 Subject: [PATCH] only show index posts action if admin --- packages/client/src/pages/admin/index.vue | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/client/src/pages/admin/index.vue b/packages/client/src/pages/admin/index.vue index 77c90aeee8..34d0404fcd 100644 --- a/packages/client/src/pages/admin/index.vue +++ b/packages/client/src/pages/admin/index.vue @@ -161,12 +161,16 @@ const menuDef = $computed(() => [ }, ] : []), - { - type: "button", - icon: "ph-list-magnifying-glass ph-bold ph-lg", - text: i18n.ts.indexPosts, - action: indexPosts, - }, + ...($i.isAdmin + ? [ + { + type: "button", + icon: "ph-list-magnifying-glass ph-bold ph-lg", + text: i18n.ts.indexPosts, + action: indexPosts, + }, + ] + : []), ], }, {