1405/04/27
-responive bugs
This commit is contained in:
@@ -12,12 +12,14 @@ import type { FormInstance } from 'ant-design-vue'
|
||||
import { message } from 'ant-design-vue'
|
||||
import { updateMe, updatePass } from '@/api/me'
|
||||
import { useUserStore } from '@/store/userStore'
|
||||
import { useTrackingSystemsFeature } from '@/composables/useTrackingSystemsFeature'
|
||||
|
||||
export interface UserMenuAction {
|
||||
id: string
|
||||
label: string
|
||||
icon: string
|
||||
onClick: () => void
|
||||
visible?: boolean
|
||||
}
|
||||
|
||||
export interface UserPageContext {
|
||||
@@ -59,6 +61,7 @@ export function useUserPage() {
|
||||
const userStore = useUserStore()
|
||||
const editPassVisible = ref(false)
|
||||
const editPasswordVisible = ref(false)
|
||||
const { trackingSystemsEnabled } = useTrackingSystemsFeature()
|
||||
|
||||
const isLegal = computed(() => {
|
||||
const result = { title: '', color: '', icon: '' }
|
||||
@@ -80,32 +83,45 @@ export function useUserPage() {
|
||||
|
||||
const shareButtonLabel = computed(() => 'اشتراک گذاری')
|
||||
|
||||
const menuActions = computed<UserMenuAction[]>(() => [
|
||||
{
|
||||
id: 'password',
|
||||
label: 'تغییر رمز عبور',
|
||||
icon: 'vuesax-linear:lock',
|
||||
onClick: () => { editPasswordVisible.value = true },
|
||||
},
|
||||
{
|
||||
id: 'notify',
|
||||
label: 'هشدار قیمت',
|
||||
icon: 'vuesax-linear:bill',
|
||||
onClick: () => router.push({ name: 'notifyTrigger' }),
|
||||
},
|
||||
{
|
||||
id: 'about',
|
||||
label: 'درباره ما',
|
||||
icon: 'vuesax-linear:info-circle',
|
||||
onClick: () => router.push({ name: 'about' }),
|
||||
},
|
||||
{
|
||||
id: 'rules',
|
||||
label: 'قوانین و مقررات',
|
||||
icon: 'vuesax-linear:task',
|
||||
onClick: () => router.push({ name: 'rules' }),
|
||||
},
|
||||
])
|
||||
const menuActions = computed<UserMenuAction[]>(() =>
|
||||
[
|
||||
{
|
||||
id: 'password',
|
||||
label: 'تغییر رمز عبور',
|
||||
icon: 'vuesax-linear:lock',
|
||||
onClick: () => { editPasswordVisible.value = true },
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: 'notify',
|
||||
label: 'هشدار قیمت',
|
||||
icon: 'vuesax-linear:bill',
|
||||
onClick: () => router.push({ name: 'notifyTrigger' }),
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: 'about',
|
||||
label: 'درباره ما',
|
||||
icon: 'vuesax-linear:info-circle',
|
||||
onClick: () => router.push({ name: 'about' }),
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: 'recoverySites',
|
||||
label: 'سایتهای ریگیری',
|
||||
icon: 'vuesax-linear:global',
|
||||
onClick: () => router.push({ name: 'recoverySites' }),
|
||||
visible: trackingSystemsEnabled.value,
|
||||
},
|
||||
{
|
||||
id: 'rules',
|
||||
label: 'قوانین و مقررات',
|
||||
icon: 'vuesax-linear:task',
|
||||
onClick: () => router.push({ name: 'rules' }),
|
||||
visible: true,
|
||||
},
|
||||
].filter((action) => action.visible !== false),
|
||||
)
|
||||
|
||||
function setForm() {
|
||||
if (userStore.userInfo) {
|
||||
|
||||
Reference in New Issue
Block a user