Drive the account menu from settings and show notification/permission actions.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -22,6 +22,7 @@ export const MENU_ID_FEATURE_SETTING: Record<string, string> = {
|
|||||||
giftCard: 'has_page_gift_card',
|
giftCard: 'has_page_gift_card',
|
||||||
notify: 'has_page_price_trigger',
|
notify: 'has_page_price_trigger',
|
||||||
notifyTrigger: 'has_page_price_trigger',
|
notifyTrigger: 'has_page_price_trigger',
|
||||||
|
appNotifications: 'has_page_notification',
|
||||||
conditionalOrder: 'enable_conditional_order',
|
conditionalOrder: 'enable_conditional_order',
|
||||||
permissions: 'permision__enabled',
|
permissions: 'permision__enabled',
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -126,6 +126,13 @@ export function useUserPage() {
|
|||||||
onClick: () => router.push({ name: 'notifyTrigger' }),
|
onClick: () => router.push({ name: 'notifyTrigger' }),
|
||||||
visible: settingsStore.isSettingTruthy('has_page_price_trigger'),
|
visible: settingsStore.isSettingTruthy('has_page_price_trigger'),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'appNotifications',
|
||||||
|
label: 'اعلانها',
|
||||||
|
icon: 'vuesax-linear:notification',
|
||||||
|
onClick: () => router.push({ name: 'appNotifications' }),
|
||||||
|
visible: settingsStore.isSettingTruthy('has_page_notification'),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 'piggy',
|
id: 'piggy',
|
||||||
label: 'قلکها',
|
label: 'قلکها',
|
||||||
@@ -178,6 +185,13 @@ export function useUserPage() {
|
|||||||
onClick: () => router.push({ name: 'rules' }),
|
onClick: () => router.push({ name: 'rules' }),
|
||||||
visible: true,
|
visible: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'permissions',
|
||||||
|
label: 'مجوز ها',
|
||||||
|
icon: 'vuesax-linear:archive-book',
|
||||||
|
onClick: () => router.push({ name: 'permissions' }),
|
||||||
|
visible: settingsStore.isSettingTruthy('permision__enabled'),
|
||||||
|
},
|
||||||
].filter((action) => action.visible !== false),
|
].filter((action) => action.visible !== false),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -66,112 +66,19 @@
|
|||||||
<InstallButton />
|
<InstallButton />
|
||||||
<div class="h-40vh overflow-y-auto mt-4">
|
<div class="h-40vh overflow-y-auto mt-4">
|
||||||
<BasicButton
|
<BasicButton
|
||||||
|
v-for="action in menuActions"
|
||||||
|
:key="action.id"
|
||||||
class="mt-2 w-full"
|
class="mt-2 w-full"
|
||||||
icon=""
|
icon=""
|
||||||
iconSize="18"
|
iconSize="18"
|
||||||
size="large"
|
size="large"
|
||||||
@click="editPasswordVisible = true"
|
@click="action.onClick"
|
||||||
>
|
>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<BasicIcon icon="vuesax-linear:lock" class="absolute right-8" />
|
<BasicIcon :icon="action.icon" class="absolute right-8" />
|
||||||
<div>تغییر رمز عبور</div>
|
<div>{{ action.label }}</div>
|
||||||
</div>
|
</div>
|
||||||
</BasicButton>
|
</BasicButton>
|
||||||
<BasicButton
|
|
||||||
class="mt-2 w-full"
|
|
||||||
icon=""
|
|
||||||
iconSize="18"
|
|
||||||
size="large"
|
|
||||||
@click="openGoldDayCalculator"
|
|
||||||
>
|
|
||||||
<div class="flex">
|
|
||||||
<BasicIcon icon="vuesax-linear:chart-2" class="absolute right-8" />
|
|
||||||
<div>قیمت روز طلا</div>
|
|
||||||
</div>
|
|
||||||
</BasicButton>
|
|
||||||
<!-- <BasicButton
|
|
||||||
class="w-full mt-2"
|
|
||||||
size="large"
|
|
||||||
@click="$router.push({ name: 'address' })"
|
|
||||||
>
|
|
||||||
<div class="flex">
|
|
||||||
<BasicIcon icon="vuesax-linear:map" class="absolute right-8" />
|
|
||||||
<div>آدرس ها</div>
|
|
||||||
</div>
|
|
||||||
</BasicButton>-->
|
|
||||||
<BasicButton
|
|
||||||
class="mt-2 w-full"
|
|
||||||
icon=""
|
|
||||||
iconSize="18"
|
|
||||||
size="large"
|
|
||||||
@click="$router.push({ name: 'physicalReceive' })"
|
|
||||||
>
|
|
||||||
<div class="flex">
|
|
||||||
<BasicIcon icon="vuesax-linear:direct-inbox" class="absolute right-8" />
|
|
||||||
<div>تحویل فیزیکی</div>
|
|
||||||
</div>
|
|
||||||
</BasicButton>
|
|
||||||
<BasicButton
|
|
||||||
class="mt-2 w-full"
|
|
||||||
icon=""
|
|
||||||
iconSize="18"
|
|
||||||
size="large"
|
|
||||||
@click="$router.push({ name: 'about' })"
|
|
||||||
>
|
|
||||||
<div class="flex">
|
|
||||||
<BasicIcon icon="vuesax-linear:info-circle" class="absolute right-8" />
|
|
||||||
<div>درباره ما</div>
|
|
||||||
</div>
|
|
||||||
</BasicButton>
|
|
||||||
<BasicButton
|
|
||||||
v-if="trackingSystemsEnabled"
|
|
||||||
class="mt-2 w-full"
|
|
||||||
icon=""
|
|
||||||
iconSize="18"
|
|
||||||
size="large"
|
|
||||||
@click="$router.push({ name: 'recoverySites' })"
|
|
||||||
>
|
|
||||||
<div class="flex">
|
|
||||||
<BasicIcon icon="vuesax-linear:global" class="absolute right-8" />
|
|
||||||
<div>سایتهای ریگیری</div>
|
|
||||||
</div>
|
|
||||||
</BasicButton>
|
|
||||||
<BasicButton
|
|
||||||
class="mt-2 w-full"
|
|
||||||
icon=""
|
|
||||||
iconSize="18"
|
|
||||||
size="large"
|
|
||||||
@click="$router.push({ name: 'rules' })"
|
|
||||||
>
|
|
||||||
<div class="flex">
|
|
||||||
<BasicIcon icon="vuesax-linear:task" class="absolute right-8" />
|
|
||||||
<div>قوانین و مقررات</div>
|
|
||||||
</div>
|
|
||||||
</BasicButton>
|
|
||||||
<!-- <BasicButton
|
|
||||||
class="mt-2 w-full"
|
|
||||||
icon=""
|
|
||||||
iconSize="18"
|
|
||||||
size="large"
|
|
||||||
@click="$router.push({ name: 'permissions' })"
|
|
||||||
>
|
|
||||||
<div class="flex">
|
|
||||||
<BasicIcon icon="vuesax-linear:archive-book" class="absolute right-8" />
|
|
||||||
<div>مجوز ها</div>
|
|
||||||
</div>
|
|
||||||
</BasicButton>-->
|
|
||||||
<!-- <BasicButton-->
|
|
||||||
<!-- class="mt-2 w-full"-->
|
|
||||||
<!-- icon=""-->
|
|
||||||
<!-- iconSize="18"-->
|
|
||||||
<!-- size="large"-->
|
|
||||||
<!-- @click="$router.push({ name: 'earnMoney' })"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <div class="flex">-->
|
|
||||||
<!-- <BasicIcon icon="vuesax-linear:dollar-circle" class="absolute right-8" />-->
|
|
||||||
<!-- <div>کسب درآمد</div>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </BasicButton>-->
|
|
||||||
<BasicButton
|
<BasicButton
|
||||||
class="mt-2 w-full"
|
class="mt-2 w-full"
|
||||||
icon=""
|
icon=""
|
||||||
@@ -199,16 +106,13 @@ import BasicButton from '@/components/BasicPacks/BasicButton.vue'
|
|||||||
import BasicIcon from '@/components/BasicPacks/BasicIcon.vue'
|
import BasicIcon from '@/components/BasicPacks/BasicIcon.vue'
|
||||||
import InstallButton from '@/components/InstallButton.vue'
|
import InstallButton from '@/components/InstallButton.vue'
|
||||||
import Icon from '@/components/BasicPacks/BasicIcon.vue'
|
import Icon from '@/components/BasicPacks/BasicIcon.vue'
|
||||||
import { useTrackingSystemsFeature } from '@/composables/useTrackingSystemsFeature'
|
|
||||||
import { useUserStore } from '@/store/userStore'
|
import { useUserStore } from '@/store/userStore'
|
||||||
import { useUserPageContext } from '../composables/useUserPage'
|
import { useUserPageContext } from '../composables/useUserPage'
|
||||||
import MobilePageHeader from '@/layouts/components/MobilePageHeader.vue'
|
import MobilePageHeader from '@/layouts/components/MobilePageHeader.vue'
|
||||||
import { openGoldDayCalculator } from '@/composables/useGoldDayCalculator'
|
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const { trackingSystemsEnabled } = useTrackingSystemsFeature()
|
|
||||||
|
|
||||||
const { editPassVisible, editPasswordVisible, copyCode, shareCode, requestLogout } =
|
const { editPassVisible, copyCode, shareCode, requestLogout, menuActions } =
|
||||||
useUserPageContext()
|
useUserPageContext()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user