feat: make user defaults global + add accessible view docs / refresh labels in admin

pull/6775/head
NGPixel 2 years ago
parent e8cb5f9773
commit 9ecaebba32
No known key found for this signature in database
GPG Key ID: B755FB6870B30F63

@ -74,6 +74,10 @@ defaults:
experimental: false
authDebug: false
sqlLog: false
userDefaults:
timezone: 'America/New_York'
dateFormat: 'YYYY-MM-DD'
timeFormat: '12h'
# System defaults
channel: NEXT
cors:

@ -509,6 +509,14 @@ export async function up (knex) {
value: {
locales: true
}
},
{
key: 'userDefaults',
value: {
timezone: 'America/New_York',
dateFormat: 'YYYY-MM-DD',
timeFormat: '12h'
}
}
])
@ -536,9 +544,6 @@ export async function up (knex) {
footerExtra: '',
pageExtensions: ['md', 'html', 'txt'],
defaults: {
timezone: 'America/New_York',
dateFormat: 'YYYY-MM-DD',
timeFormat: '12h',
tocDepth: {
min: 1,
max: 2

@ -79,6 +79,11 @@ export default {
// return usr
// },
async userDefaults (obj, args, context) {
return WIKI.config.userDefaults
},
async lastLogins (obj, args, context, info) {
return WIKI.db.users.query()
.select('id', 'name', 'lastLoginAt')
@ -352,6 +357,20 @@ export default {
WIKI.logger.warn(err)
return generateError(err)
}
},
/**
* UPDATE USER DEFAULTS
*/
async updateUserDefaults (obj, args, context) {
WIKI.config.userDefaults = {
timezone: args.timezone,
dateFormat: args.dateFormat,
timeFormat: args.timeFormat
}
await WIKI.configSvc.saveToDb(['userDefaults'])
return {
operation: generateSuccess('User defaults saved successfully')
}
}
},
User: {

@ -89,9 +89,6 @@ type SiteFeatures {
}
type SiteDefaults {
timezone: String
dateFormat: String
timeFormat: String
tocDepth: PageTocDepth
}
@ -206,9 +203,6 @@ input SiteFeaturesInput {
}
input SiteDefaultsInput {
timezone: String
dateFormat: String
timeFormat: String
tocDepth: PageTocDepthInput
}

@ -16,6 +16,8 @@ extend type Query {
id: UUID!
): User
userDefaults: UserDefaults
lastLogins: [UserLastLogin]
userPermissions: [String]
@ -90,6 +92,12 @@ extend type Mutation {
clearUserAvatar(
id: UUID!
): DefaultResponse
updateUserDefaults(
timezone: String!
dateFormat: String!
timeFormat: String!
): DefaultResponse
}
# -----------------------------------------------
@ -142,6 +150,12 @@ type UserAuth {
config: JSON
}
type UserDefaults {
timezone: String
dateFormat: String
timeFormat: String
}
type UserTokenResponse {
operation: Operation
jwt: String

@ -58,9 +58,10 @@ export class Site extends Model {
footerExtra: '',
pageExtensions: ['md', 'html', 'txt'],
defaults: {
timezone: 'America/New_York',
dateFormat: 'YYYY-MM-DD',
timeFormat: '12h'
tocDepth: {
min: 1,
max: 2
}
},
features: {
ratings: false,

@ -588,10 +588,10 @@ export class User extends Model {
},
prefs: {
cvd: 'none',
timezone: 'America/New_York',
timezone: WIKI.config.userDefaults.timezone || 'America/New_York',
appearance: 'site',
dateFormat: 'YYYY-MM-DD',
timeFormat: '12h'
dateFormat: WIKI.config.userDefaults.dateFormat || 'YYYY-MM-DD',
timeFormat: WIKI.config.userDefaults.timeFormat || '12h'
}
})

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="96px" height="96px"><linearGradient id="e_IkPMJeWJ2fyCSAXNMQPa" x1="15" x2="15" y1="249.94" y2="231.981" gradientTransform="matrix(1 0 0 -1 0 254)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#9dffce"/><stop offset="1" stop-color="#50d18d"/></linearGradient><path fill="url(#e_IkPMJeWJ2fyCSAXNMQPa)" d="M23,22H7c-0.55,0-1-0.45-1-1V5c0-0.55,0.45-1,1-1h16c0.55,0,1,0.45,1,1v16 C24,21.55,23.55,22,23,22z"/><linearGradient id="e_IkPMJeWJ2fyCSAXNMQPb" x1="-45.352" x2="-38.683" y1="-791.151" y2="-784.575" gradientTransform="matrix(1 0 0 -1 52.373 -754.646)" gradientUnits="userSpaceOnUse"><stop offset=".282" stop-color="#ffc430"/><stop offset=".401" stop-color="#f8bd2d"/><stop offset=".574" stop-color="#e5aa23"/><stop offset=".78" stop-color="#c58a14"/><stop offset="1" stop-color="#9c6000"/></linearGradient><path fill="url(#e_IkPMJeWJ2fyCSAXNMQPb)" d="M4.364,29c-1.358,0-1.972,0.843-1.972,1.967l9.541,11.154 c0.098,0.098,0.204,0.186,0.307,0.278V30.791c-1.794,3.063-3.11,0.321-4.476,0.639C7.764,31.43,7.195,29,4.364,29z"/><linearGradient id="e_IkPMJeWJ2fyCSAXNMQPc" x1="9.5" x2="21" y1="240.603" y2="240.603" gradientTransform="matrix(1 0 0 -1 0 254)" gradientUnits="userSpaceOnUse"><stop offset=".824" stop-color="#135d36"/><stop offset=".931" stop-color="#125933"/><stop offset="1" stop-color="#11522f"/></linearGradient><path fill="url(#e_IkPMJeWJ2fyCSAXNMQPc)" d="M13.646,17.354l-4-4c-0.195-0.196-0.195-0.512,0-0.707l0.707-0.707 c0.196-0.196,0.512-0.196,0.707,0L14,14.879l5.439-5.439c0.195-0.196,0.512-0.196,0.707,0l0.707,0.707 c0.195,0.196,0.195,0.512,0,0.707l-6.5,6.5C14.158,17.549,13.842,17.549,13.646,17.354z"/><linearGradient id="e_IkPMJeWJ2fyCSAXNMQPd" x1="26.55" x2="44.266" y1="249.45" y2="231.734" gradientTransform="matrix(1 0 0 -1 0 254)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#33bef0"/><stop offset="1" stop-color="#22a5e2"/></linearGradient><path fill="url(#e_IkPMJeWJ2fyCSAXNMQPd)" d="M43,4H27c-0.552,0-1,0.448-1,1v16c0,0.552,0.448,1,1,1h16c0.552,0,1-0.448,1-1V5 C44,4.448,43.552,4,43,4z"/><path d="M28.5,20.5h13c0.552,0,1-0.448,1-1v-13c0-0.552-0.448-1-1-1h-13 c-0.552,0-1,0.448-1,1v13C27.5,20.052,27.948,20.5,28.5,20.5z" opacity=".05"/><path d="M28.5,20.25h13c0.414,0,0.75-0.336,0.75-0.75v-13 c0-0.414-0.336-0.75-0.75-0.75h-13c-0.414,0-0.75,0.336-0.75,0.75v13C27.75,19.914,28.086,20.25,28.5,20.25z" opacity=".07"/><radialGradient id="e_IkPMJeWJ2fyCSAXNMQPe" cx="33.109" cy="242.616" r="12.79" gradientTransform="matrix(1.0769 0 0 -1.0769 -4.536 268.997)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fafafb"/><stop offset=".293" stop-color="#f6f7f8"/><stop offset=".566" stop-color="#ebecee"/><stop offset=".832" stop-color="#d8dcdf"/><stop offset="1" stop-color="#c8cdd1"/></radialGradient><path fill="url(#e_IkPMJeWJ2fyCSAXNMQPe)" d="M41.5,20h-13c-0.276,0-0.5-0.224-0.5-0.5v-13C28,6.224,28.224,6,28.5,6h13 C41.776,6,42,6.224,42,6.5v13C42,19.776,41.776,20,41.5,20z"/><linearGradient id="e_IkPMJeWJ2fyCSAXNMQPf" x1="70.913" x2="70.915" y1="358.532" y2="358.532" gradientTransform="scale(1 -1) rotate(-9.317 -2375.252 568.726)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ffc430"/><stop offset=".57" stop-color="#f8bd29"/><stop offset="1" stop-color="#f0b421"/></linearGradient><path fill="url(#e_IkPMJeWJ2fyCSAXNMQPf)" d="M4.63,34.743c0.001-0.006,0.003-0.009,0.004-0.015l-0.002-0.001L4.63,34.743z"/><path d="M17.091,22v-5.914c0-1.573-1.203-2.922-2.736-3.071C14.25,13.005,14.147,13,14.045,13 C12.366,13,11,14.334,11,15.974V22H17.091z" opacity=".05"/><path d="M16.591,22v-5.914c0-1.318-1.004-2.449-2.286-2.574c-0.087-0.009-0.174-0.013-0.26-0.013 c-1.403,0-2.545,1.11-2.545,2.474V22H16.591z" opacity=".07"/><linearGradient id="e_IkPMJeWJ2fyCSAXNMQPg" x1="13.559" x2="33.571" y1="226.075" y2="205.294" gradientTransform="matrix(1 0 0 -1 0 254)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ffc430"/><stop offset=".41" stop-color="#fec130"/><stop offset=".72" stop-color="#fcb730"/><stop offset=".998" stop-color="#f7a72f"/><stop offset="1" stop-color="#f7a72f"/></linearGradient><path fill="url(#e_IkPMJeWJ2fyCSAXNMQPg)" d="M26.513,26.554l-10.422-1.502v-8.966c0-1.033-0.77-1.973-1.834-2.076 C13.032,13.892,12,14.816,12,15.974c0,0.187,0,26.422,0,26.422C13.195,43.422,14.738,44,16.348,44h8.743 C27.802,44,30,41.879,30,39.263v-8.805C30,28.503,28.517,26.843,26.513,26.554z"/><linearGradient id="e_IkPMJeWJ2fyCSAXNMQPh" x1="17.034" x2="15.196" y1="225.815" y2="226.815" gradientTransform="matrix(1 0 0 -1 0 254)" gradientUnits="userSpaceOnUse"><stop offset=".282" stop-color="#ffc430"/><stop offset=".401" stop-color="#f8bd2d"/><stop offset=".574" stop-color="#e5aa23"/><stop offset=".78" stop-color="#c58a14"/><stop offset="1" stop-color="#9c6000"/></linearGradient><polygon fill="url(#e_IkPMJeWJ2fyCSAXNMQPh)" points="16.076,25.053 16.076,31.357 18.818,25.462"/><circle cx="14" cy="16" r="1" fill="#fff0c9"/></svg>

After

Width:  |  Height:  |  Size: 4.9 KiB

@ -0,0 +1,211 @@
<template lang="pug">
q-menu.translucent-menu(
anchor='bottom right'
self='top right'
:offset='[0, 10]'
ref='menuRef'
)
q-card(style='width: 850px;')
q-card-section.card-header
q-icon(name='img:/_assets/icons/fluent-choose.svg', left, size='sm')
span {{t(`admin.users.defaults`)}}
q-list(padding)
q-item
blueprint-icon(icon='timezone')
q-item-section
q-item-label {{t(`admin.general.defaultTimezone`)}}
q-item-label(caption) {{t(`admin.general.defaultTimezoneHint`)}}
q-item-section
q-select(
outlined
v-model='state.timezone'
:options='timezones'
option-value='value'
option-label='text'
emit-value
map-options
dense
options-dense
:virtual-scroll-slice-size='1000'
:aria-label='t(`admin.general.defaultTimezone`)'
)
q-separator.q-my-sm(inset)
q-item
blueprint-icon(icon='calendar')
q-item-section
q-item-label {{t(`admin.general.defaultDateFormat`)}}
q-item-label(caption) {{t(`admin.general.defaultDateFormatHint`)}}
q-item-section
q-select(
outlined
v-model='state.dateFormat'
emit-value
map-options
dense
:aria-label='t(`admin.general.defaultDateFormat`)'
:options='dateFormats'
)
q-separator.q-my-sm(inset)
q-item
blueprint-icon(icon='clock')
q-item-section
q-item-label {{t(`admin.general.defaultTimeFormat`)}}
q-item-label(caption) {{t(`admin.general.defaultTimeFormatHint`)}}
q-item-section.col-auto
q-btn-toggle(
v-model='state.timeFormat'
push
glossy
no-caps
toggle-color='primary'
:options='timeFormats'
)
q-card-actions.card-actions
q-space
q-btn.acrylic-btn(
flat
:label='t(`common.actions.cancel`)'
color='grey'
padding='xs md'
v-close-popup
)
q-btn(
unelevated
:label='t(`common.actions.save`)'
color='primary'
padding='xs md'
@click='save'
)
q-inner-loading(:showing='state.loading > 0')
</template>
<script setup>
import { useI18n } from 'vue-i18n'
import { useQuasar } from 'quasar'
import { onMounted, reactive, ref } from 'vue'
import gql from 'graphql-tag'
import { cloneDeep } from 'lodash-es'
import { usePageStore } from 'src/stores/page'
import { useSiteStore } from 'src/stores/site'
// QUASAR
const $q = useQuasar()
// STORES
const pageStore = usePageStore()
const siteStore = useSiteStore()
// I18N
const { t } = useI18n()
// DATA
const state = reactive({
loading: 0,
timezone: '',
dateFormat: '',
timeFormat: ''
})
const menuRef = ref(null)
const dateFormats = [
{ value: '', label: t('profile.localeDefault') },
{ value: 'DD/MM/YYYY', label: 'DD/MM/YYYY' },
{ value: 'DD.MM.YYYY', label: 'DD.MM.YYYY' },
{ value: 'MM/DD/YYYY', label: 'MM/DD/YYYY' },
{ value: 'YYYY-MM-DD', label: 'YYYY-MM-DD' },
{ value: 'YYYY/MM/DD', label: 'YYYY/MM/DD' }
]
const timeFormats = [
{ value: '12h', label: t('admin.general.defaultTimeFormat12h') },
{ value: '24h', label: t('admin.general.defaultTimeFormat24h') }
]
const timezones = Intl.supportedValuesOf('timeZone')
// METHODS
async function save () {
state.loading++
try {
const resp = await APOLLO_CLIENT.mutate({
mutation: gql`
mutation saveSite (
$timezone: String!
$dateFormat: String!
$timeFormat: String!
) {
updateUserDefaults (
timezone: $timezone
dateFormat: $dateFormat
timeFormat: $timeFormat
) {
operation {
succeeded
slug
message
}
}
}
`,
variables: {
timezone: state.timezone,
dateFormat: state.dateFormat,
timeFormat: state.timeFormat
}
})
if (resp?.data?.updateUserDefaults?.operation?.succeeded) {
$q.notify({
type: 'positive',
message: t('admin.users.defaultsSaveSuccess')
})
menuRef.value.hide()
} else {
throw new Error(resp?.data?.updateUserDefaults?.operation?.message)
}
} catch (err) {
$q.notify({
type: 'negative',
message: 'Failed to save user defaults.',
caption: err.message
})
}
state.loading--
}
// MOUNTED
onMounted(async () => {
state.loading++
try {
const resp = await APOLLO_CLIENT.query({
query: gql`
query getUserDefaults {
userDefaults {
timezone
dateFormat
timeFormat
}
}
`,
fetchPolicy: 'network-only'
})
const respData = cloneDeep(resp?.data?.userDefaults)
state.timezone = respData.timezone
state.dateFormat = respData.dateFormat
state.timeFormat = respData.timeFormat
} catch (err) {
$q.notify({
type: 'negative',
message: 'Failed to load user defaults',
caption: err.message
})
}
state.loading--
})
</script>

@ -882,6 +882,8 @@
"admin.users.darkModeHint": "Display the user interface using dark mode.",
"admin.users.dateFormat": "Date Format",
"admin.users.dateFormatHint": "How dates should be formatted when displayed to the user.",
"admin.users.defaults": "Manage User Defaults",
"admin.users.defaultsSaveSuccess": "User defaults saved successfully.",
"admin.users.delete": "Delete User",
"admin.users.deleteConfirmForeignNotice": "Note that you cannot delete a user that already created content. You must instead either deactivate the user or delete all content that was created by that user.",
"admin.users.deleteConfirmReplaceWarn": "Any content (pages, uploads, comments, etc.) that was created by this user will be reassigned to the user selected below. It is recommended to create a dummy target user (e.g. Deleted User) if you don't want the content to be reassigned to any current active user.",
@ -1202,6 +1204,7 @@
"common.actions.update": "Update",
"common.actions.upload": "Upload",
"common.actions.view": "View",
"common.actions.viewDocs": "View Documentation",
"common.clipboard.failure": "Failed to copy to clipboard.",
"common.clipboard.success": "Copied to clipboard successfully.",
"common.clipboard.uuid": "Copy UUID to clipboard.",

@ -19,17 +19,21 @@ q-page.admin-api
icon='las la-question-circle'
flat
color='grey'
:aria-label='t(`common.actions.viewDocs`)'
:href='siteStore.docsBase + `/dev/api`'
target='_blank'
type='a'
)
q-tooltip {{ t(`common.actions.viewDocs`) }}
q-btn.acrylic-btn.q-mr-sm(
icon='las la-redo-alt'
flat
color='secondary'
:loading='state.loading > 0'
:aria-label='t(`common.actions.refresh`)'
@click='refresh'
)
q-tooltip {{ t(`common.actions.refresh`) }}
q-btn.q-mr-sm(
unelevated
icon='las la-power-off'

@ -11,10 +11,12 @@ q-page.admin-mail
icon='las la-question-circle'
flat
color='grey'
:aria-label='t(`common.actions.viewDocs`)'
:href='siteStore.docsBase + `/admin/auth`'
target='_blank'
type='a'
)
q-tooltip {{ t(`common.actions.viewDocs`) }}
q-btn(
unelevated
icon='mdi-check'

@ -11,17 +11,21 @@ q-page.admin-flags
icon='las la-question-circle'
flat
color='grey'
:aria-label='t(`common.actions.viewDocs`)'
:href='siteStore.docsBase + `/admin/editors`'
target='_blank'
type='a'
)
q-tooltip {{ t(`common.actions.viewDocs`) }}
q-btn.q-mr-sm.acrylic-btn(
icon='las la-redo-alt'
flat
color='secondary'
:loading='state.loading > 0'
:aria-label='t(`common.actions.refresh`)'
@click='refresh'
)
q-tooltip {{ t(`common.actions.refresh`) }}
q-btn(
unelevated
icon='mdi-check'

@ -11,17 +11,21 @@ q-page.admin-extensions
icon='las la-question-circle'
flat
color='grey'
:aria-label='t(`common.actions.viewDocs`)'
:href='siteStore.docsBase + `/system/extensions`'
target='_blank'
type='a'
)
q-tooltip {{ t(`common.actions.viewDocs`) }}
q-btn.acrylic-btn(
icon='las la-redo-alt'
flat
color='secondary'
:loading='state.loading > 0'
:aria-label='t(`common.actions.refresh`)'
@click='load'
)
q-tooltip {{ t(`common.actions.refresh`) }}
q-separator(inset)
.row.q-pa-md.q-col-gutter-md
.col-12

@ -11,17 +11,21 @@ q-page.admin-flags
icon='las la-question-circle'
flat
color='grey'
:aria-label='t(`common.actions.viewDocs`)'
:href='siteStore.docsBase + `/system/flags`'
target='_blank'
type='a'
)
q-tooltip {{ t(`common.actions.viewDocs`) }}
q-btn.q-mr-sm.acrylic-btn(
icon='las la-redo-alt'
flat
color='secondary'
:loading='state.loading > 0'
:aria-label='t(`common.actions.refresh`)'
@click='load'
)
q-tooltip {{ t(`common.actions.refresh`) }}
q-btn(
unelevated
icon='mdi-check'

@ -11,17 +11,21 @@ q-page.admin-general
icon='las la-question-circle'
flat
color='grey'
:aria-label='t(`common.actions.viewDocs`)'
:href='siteStore.docsBase + `/admin/sites#general`'
target='_blank'
type='a'
)
q-tooltip {{ t(`common.actions.viewDocs`) }}
q-btn.q-mr-sm.acrylic-btn(
icon='las la-redo-alt'
flat
color='secondary'
:loading='state.loading > 0'
:aria-label='t(`common.actions.refresh`)'
@click='load'
)
q-tooltip {{ t(`common.actions.refresh`) }}
q-btn(
unelevated
icon='mdi-check'
@ -336,57 +340,6 @@ q-page.admin-general
q-card.q-pb-sm.q-mt-md(v-if='state.config.defaults')
q-card-section
.text-subtitle1 {{t('admin.general.defaults')}}
q-item
blueprint-icon(icon='timezone')
q-item-section
q-item-label {{t(`admin.general.defaultTimezone`)}}
q-item-label(caption) {{t(`admin.general.defaultTimezoneHint`)}}
q-item-section
q-select(
outlined
v-model='state.config.defaults.timezone'
:options='timezones'
option-value='value'
option-label='text'
emit-value
map-options
dense
options-dense
:virtual-scroll-slice-size='1000'
:aria-label='t(`admin.general.defaultTimezone`)'
)
q-separator.q-my-sm(inset)
q-item
blueprint-icon(icon='calendar')
q-item-section
q-item-label {{t(`admin.general.defaultDateFormat`)}}
q-item-label(caption) {{t(`admin.general.defaultDateFormatHint`)}}
q-item-section
q-select(
outlined
v-model='state.config.defaults.dateFormat'
emit-value
map-options
dense
:aria-label='t(`admin.general.defaultDateFormat`)'
:options='dateFormats'
)
q-separator.q-my-sm(inset)
q-item
blueprint-icon(icon='clock')
q-item-section
q-item-label {{t(`admin.general.defaultTimeFormat`)}}
q-item-label(caption) {{t(`admin.general.defaultTimeFormatHint`)}}
q-item-section.col-auto
q-btn-toggle(
v-model='state.config.defaults.timeFormat'
push
glossy
no-caps
toggle-color='primary'
:options='timeFormats'
)
q-separator.q-my-sm(inset)
q-item
blueprint-icon(icon='depth')
q-item-section
@ -589,26 +542,12 @@ const reasonForChangeModes = [
{ value: 'optional', label: t('admin.general.reasonForChangeOptional') },
{ value: 'required', label: t('admin.general.reasonForChangeRequired') }
]
const dateFormats = [
{ value: '', label: t('profile.localeDefault') },
{ value: 'DD/MM/YYYY', label: 'DD/MM/YYYY' },
{ value: 'DD.MM.YYYY', label: 'DD.MM.YYYY' },
{ value: 'MM/DD/YYYY', label: 'MM/DD/YYYY' },
{ value: 'YYYY-MM-DD', label: 'YYYY-MM-DD' },
{ value: 'YYYY/MM/DD', label: 'YYYY/MM/DD' }
]
const timeFormats = [
{ value: '12h', label: t('admin.general.defaultTimeFormat12h') },
{ value: '24h', label: t('admin.general.defaultTimeFormat24h') }
]
const uploadConflictBehaviors = [
{ value: 'overwrite', label: t('admin.general.uploadConflictBehaviorOverwrite') },
{ value: 'reject', label: t('admin.general.uploadConflictBehaviorReject') },
{ value: 'new', label: t('admin.general.uploadConflictBehaviorNew') }
]
const timezones = Intl.supportedValuesOf('timeZone')
const rulesTitle = [
val => /^[^<>"]+$/.test(val) || t('admin.general.siteTitleInvalidChars')
]
@ -664,9 +603,6 @@ async function load () {
search
}
defaults {
timezone
dateFormat
timeFormat
tocDepth {
min
max
@ -735,9 +671,6 @@ async function save () {
search: state.config.features?.search ?? false
},
defaults: {
timezone: state.config.defaults?.timezone ?? 'America/New_York',
dateFormat: state.config.defaults?.dateFormat ?? 'YYYY-MM-DD',
timeFormat: state.config.defaults?.timeFormat ?? '12h',
tocDepth: {
min: state.config.defaults?.tocDepth?.min ?? 1,
max: state.config.defaults?.tocDepth?.max ?? 2

@ -20,16 +20,20 @@ q-page.admin-groups
flat
color='grey'
type='a'
:aria-label='t(`common.actions.viewDocs`)'
:href='siteStore.docsBase + `/admin/groups`'
target='_blank'
)
q-tooltip {{ t(`common.actions.viewDocs`) }}
q-btn.q-mr-sm.acrylic-btn(
icon='las la-redo-alt'
flat
color='secondary'
:aria-label='t(`common.actions.refresh`)'
@click='load'
:loading='state.loading > 0'
)
q-tooltip {{ t(`common.actions.refresh`) }}
q-btn(
unelevated
icon='las la-plus'

@ -11,17 +11,21 @@ q-page.admin-icons
icon='las la-question-circle'
flat
color='grey'
:aria-label='t(`common.actions.viewDocs`)'
:href='siteStore.docsBase + `/system/icons`'
target='_blank'
type='a'
)
q-tooltip {{ t(`common.actions.viewDocs`) }}
q-btn.acrylic-btn.q-mr-sm(
icon='las la-redo-alt'
flat
color='secondary'
:loading='state.loading > 0'
:aria-label='t(`common.actions.refresh`)'
@click='load'
)
q-tooltip {{ t(`common.actions.refresh`) }}
q-btn(
unelevated
icon='mdi-check'

@ -11,17 +11,21 @@ q-page.admin-terminal
icon='las la-question-circle'
flat
color='grey'
:aria-label='t(`common.actions.viewDocs`)'
:href='siteStore.docsBase + `/admin/instances`'
target='_blank'
type='a'
)
q-tooltip {{ t(`common.actions.viewDocs`) }}
q-btn.q-mr-sm.acrylic-btn(
icon='las la-redo-alt'
flat
color='secondary'
:loading='state.loading > 0'
:aria-label='t(`common.actions.refresh`)'
@click='load'
)
)
q-tooltip {{ t(`common.actions.refresh`) }}
q-separator(inset)
.q-pa-md.q-gutter-md
q-card

@ -20,17 +20,21 @@ q-page.admin-locale
icon='las la-question-circle'
flat
color='grey'
:aria-label='t(`common.actions.viewDocs`)'
:href='siteStore.docsBase + `/admin/localisation`'
target='_blank'
type='a'
)
q-tooltip {{ t(`common.actions.viewDocs`) }}
q-btn.q-mr-sm.acrylic-btn(
icon='las la-redo-alt'
flat
color='secondary'
:loading='state.loading > 0'
:aria-label='t(`common.actions.refresh`)'
@click='load'
)
q-tooltip {{ t(`common.actions.refresh`) }}
q-btn(
unelevated
icon='mdi-check'

@ -11,17 +11,21 @@ q-page.admin-login
icon='las la-question-circle'
flat
color='grey'
:aria-label='t(`common.actions.viewDocs`)'
:href='siteStore.docsBase + `/admin/auth`'
target='_blank'
type='a'
)
q-tooltip {{ t(`common.actions.viewDocs`) }}
q-btn.q-mr-sm.acrylic-btn(
icon='las la-redo-alt'
flat
color='secondary'
:loading='state.loading > 0'
:aria-label='t(`common.actions.refresh`)'
@click='load'
)
q-tooltip {{ t(`common.actions.refresh`) }}
q-btn(
unelevated
icon='mdi-check'

@ -11,17 +11,21 @@ q-page.admin-mail
icon='las la-question-circle'
flat
color='grey'
:aria-label='t(`common.actions.viewDocs`)'
:href='siteStore.docsBase + `/system/mail`'
target='_blank'
type='a'
)
q-tooltip {{ t(`common.actions.viewDocs`) }}
q-btn.q-mr-sm.acrylic-btn(
icon='las la-redo-alt'
flat
color='secondary'
:loading='state.loading > 0'
:aria-label='t(`common.actions.refresh`)'
@click='load'
)
q-tooltip {{ t(`common.actions.refresh`) }}
q-btn(
unelevated
icon='mdi-check'

@ -11,17 +11,21 @@ q-page.admin-navigation
icon='las la-question-circle'
flat
color='grey'
:aria-label='t(`common.actions.viewDocs`)'
:href='siteStore.docsBase + `/admin/navigation`'
target='_blank'
type='a'
)
q-tooltip {{ t(`common.actions.viewDocs`) }}
q-btn.q-mr-sm.acrylic-btn(
icon='las la-redo-alt'
flat
color='secondary'
:loading='state.loading > 0'
:aria-label='t(`common.actions.refresh`)'
@click='load'
)
q-tooltip {{ t(`common.actions.refresh`) }}
q-btn(
unelevated
icon='mdi-check'

@ -22,6 +22,7 @@ q-page.admin-mail
:loading='state.loading > 0'
@click='load'
)
q-tooltip {{ t(`common.actions.refresh`) }}
q-btn(
unelevated
icon='mdi-check'

@ -29,17 +29,21 @@ q-page.admin-terminal
icon='las la-question-circle'
flat
color='grey'
:aria-label='t(`common.actions.viewDocs`)'
:href='siteStore.docsBase + `/admin/scheduler`'
target='_blank'
type='a'
)
q-tooltip {{ t(`common.actions.viewDocs`) }}
q-btn.q-mr-sm.acrylic-btn(
icon='las la-redo-alt'
flat
color='secondary'
:loading='state.loading > 0'
:aria-label='t(`common.actions.refresh`)'
@click='load'
)
)
q-tooltip {{ t(`common.actions.refresh`) }}
q-separator(inset)
.q-pa-md.q-gutter-md
template(v-if='state.displayMode === `scheduled`')

@ -11,17 +11,21 @@ q-page.admin-mail
icon='las la-question-circle'
flat
color='grey'
:aria-label='t(`common.actions.viewDocs`)'
:href='siteStore.docsBase + `/system/security`'
target='_blank'
type='a'
)
q-tooltip {{ t(`common.actions.viewDocs`) }}
q-btn.q-mr-sm.acrylic-btn(
icon='las la-redo-alt'
flat
color='secondary'
:loading='state.loading > 0'
:aria-label='t(`common.actions.refresh`)'
@click='load'
)
q-tooltip {{ t(`common.actions.refresh`) }}
q-btn(
unelevated
icon='mdi-check'

@ -12,15 +12,19 @@ q-page.admin-locale
flat
color='grey'
type='a'
:aria-label='t(`common.actions.viewDocs`)'
:href='siteStore.docsBase + `/admin/sites`'
target='_blank'
)
q-tooltip {{ t(`common.actions.viewDocs`) }}
q-btn.q-mr-sm.acrylic-btn(
icon='las la-redo-alt'
flat
color='secondary'
:aria-label='t(`common.actions.refresh`)'
@click='refresh'
)
q-tooltip {{ t(`common.actions.refresh`) }}
q-btn(
unelevated
icon='las la-plus'

@ -30,10 +30,12 @@ q-page.admin-storage
icon='las la-question-circle'
flat
color='grey'
:aria-label='t(`common.actions.viewDocs`)'
:href='siteStore.docsBase + `/admin/storage`'
target='_blank'
type='a'
)
q-tooltip {{ t(`common.actions.viewDocs`) }}
q-btn(
unelevated
icon='mdi-check'

@ -11,17 +11,21 @@ q-page.admin-system
icon='las la-question-circle'
flat
color='grey'
:aria-label='t(`common.actions.viewDocs`)'
:href='siteStore.docsBase + `/system/`'
target='_blank'
type='a'
)
q-tooltip {{ t(`common.actions.viewDocs`) }}
q-btn.q-mr-sm.acrylic-btn(
icon='las la-redo-alt'
flat
color='secondary'
:loading='state.loading > 0'
:aria-label='t(`common.actions.refresh`)'
@click='load'
)
q-tooltip {{ t(`common.actions.refresh`) }}
q-btn.acrylic-btn(
ref='copySysInfoBtn'
flat

@ -37,10 +37,12 @@ q-page.admin-terminal
icon='las la-question-circle'
flat
color='grey'
:aria-label='t(`common.actions.viewDocs`)'
:href='siteStore.docsBase + `/admin/terminal`'
target='_blank'
type='a'
)
q-tooltip {{ t(`common.actions.viewDocs`) }}
q-separator(inset)
.q-pa-md.q-gutter-md
q-card

@ -12,16 +12,20 @@ q-page.admin-theme
flat
color='grey'
type='a'
:aria-label='t(`common.actions.viewDocs`)'
:href='siteStore.docsBase + `/admin/theme`'
target='_blank'
)
q-tooltip {{ t(`common.actions.viewDocs`) }}
q-btn.q-mr-sm.acrylic-btn(
icon='las la-redo-alt'
flat
color='secondary'
:loading='state.loading > 0'
:aria-label='t(`common.actions.refresh`)'
@click='load'
)
q-tooltip {{ t(`common.actions.refresh`) }}
q-btn(
unelevated
icon='mdi-check'

@ -20,16 +20,29 @@ q-page.admin-groups
flat
color='grey'
type='a'
:aria-label='t(`common.actions.viewDocs`)'
:href='siteStore.docsBase + `/admin/groups`'
target='_blank'
)
q-tooltip {{ t(`common.actions.viewDocs`) }}
q-btn.q-mr-sm.acrylic-btn(
icon='las la-redo-alt'
flat
color='secondary'
:aria-label='t(`common.actions.refresh`)'
@click='load'
:loading='state.loading > 0'
)
q-tooltip {{ t(`common.actions.refresh`) }}
q-btn.q-mr-sm(
icon='las la-user-cog'
unelevated
color='secondary'
:aria-label='t(`admin.users.defaults`)'
@click=''
)
q-tooltip {{ t(`admin.users.defaults`) }}
user-defaults-menu
q-btn(
unelevated
icon='las la-plus'
@ -117,6 +130,7 @@ import { useAdminStore } from 'src/stores/admin'
import { useSiteStore } from 'src/stores/site'
import UserCreateDialog from '../components/UserCreateDialog.vue'
import UserDefaultsMenu from 'src/components/UserDefaultsMenu.vue'
// QUASAR

@ -11,10 +11,12 @@ q-page.admin-utilities
icon='las la-question-circle'
flat
color='grey'
:aria-label='t(`common.actions.viewDocs`)'
:href='siteStore.docsBase + `/admin/utilities`'
target='_blank'
type='a'
)
q-tooltip {{ t(`common.actions.viewDocs`) }}
q-separator(inset)
.q-pa-md.q-gutter-md
q-card

@ -11,17 +11,21 @@ q-page.admin-webhooks
icon='las la-question-circle'
flat
color='grey'
:aria-label='t(`common.actions.viewDocs`)'
:href='siteStore.docsBase + `/system/webhooks`'
target='_blank'
type='a'
)
q-tooltip {{ t(`common.actions.viewDocs`) }}
q-btn.acrylic-btn.q-mr-sm(
icon='las la-redo-alt'
flat
color='secondary'
:loading='state.loading > 0'
:aria-label='t(`common.actions.refresh`)'
@click='load'
)
q-tooltip {{ t(`common.actions.refresh`) }}
q-btn(
unelevated
icon='las la-plus'

Loading…
Cancel
Save