mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-31 05:10:45 +08:00
Refactor navigator utility functions and add isPWA check
This commit is contained in:
@@ -92,7 +92,9 @@ const canEditUser = computed(() => {
|
||||
|
||||
// 计算是否有用户管理权限
|
||||
const canManageUser = computed(() => {
|
||||
return canEditUser
|
||||
if (props.user.name == currentLoginUser) return false
|
||||
if (store.state.auth.superUser) return true
|
||||
return false
|
||||
})
|
||||
|
||||
// 用户重新完成时
|
||||
|
||||
@@ -63,7 +63,7 @@ const userForm = ref<User>({
|
||||
name: props.username ?? '',
|
||||
password: '',
|
||||
email: '',
|
||||
is_active: false,
|
||||
is_active: true,
|
||||
is_superuser: false,
|
||||
avatar: avatar1,
|
||||
is_otp: false,
|
||||
|
||||
@@ -15,9 +15,7 @@ import { useDisplay } from 'vuetify'
|
||||
const display = useDisplay()
|
||||
|
||||
// APP
|
||||
const appMode = computed(() => {
|
||||
return localStorage.getItem('MP_APPMODE') != '0' && display.mdAndDown.value
|
||||
})
|
||||
const appMode = inject('appMode')
|
||||
|
||||
// 输入参数
|
||||
const inProps = defineProps({
|
||||
@@ -119,7 +117,7 @@ const currentImgLink = ref('')
|
||||
|
||||
// 大小控制
|
||||
const scrollStyle = computed(() => {
|
||||
return appMode.value
|
||||
return appMode
|
||||
? 'height: calc(100vh - 15.5rem - env(safe-area-inset-bottom) - 3.5rem)'
|
||||
: 'height: calc(100vh - 14.5rem - env(safe-area-inset-bottom)'
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user