Browse Source

maintenance ui (#8909)

* feat: maintenance alert ui

* fix: add dayjs advanced plugin
pull/8944/head
Anbarasu 6 months ago committed by GitHub
parent
commit
480ec51953
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      packages/nc-gui/components/dashboard/Sidebar/UserInfo.vue
  2. 5
      packages/nc-gui/components/general/MaintenanceAlert.vue
  3. 15
      packages/nc-gui/composables/useServerConfig.ts
  4. 2
      packages/nc-gui/plugins/a.dayjs.ts

1
packages/nc-gui/components/dashboard/Sidebar/UserInfo.vue

@ -55,6 +55,7 @@ onMounted(() => {
<template>
<div class="flex w-full flex-col py-0.9 px-1 border-gray-200 gap-y-1">
<LazyGeneralMaintenanceAlert />
<div class="flex items-center pr-2 justify-between">
<NcDropdown v-model:visible="isMenuOpen" placement="topLeft" overlay-class-name="!min-w-64">
<div

5
packages/nc-gui/components/general/MaintenanceAlert.vue

@ -0,0 +1,5 @@
<script setup lang="ts"></script>
<template></template>
<style scoped lang="scss"></style>

15
packages/nc-gui/composables/useServerConfig.ts

@ -0,0 +1,15 @@
const useServerConfig = () => {
const getConfig = async () => {}
const checkMaintenance = async () => {}
const dismissMaintenance = () => {}
return {
getConfig,
checkMaintenance,
dismissMaintenance,
}
}
export default useServerConfig

2
packages/nc-gui/plugins/a.dayjs.ts

@ -9,6 +9,7 @@ import updateLocale from 'dayjs/plugin/updateLocale'
import isSameOrBefore from 'dayjs/plugin/isSameOrBefore'
import isSameOrAfter from 'dayjs/plugin/isSameOrAfter'
import isBetween from 'dayjs/plugin/isBetween'
import advanced from 'dayjs/plugin/advancedFormat'
export default defineNuxtPlugin(() => {
extend(utc)
@ -21,6 +22,7 @@ export default defineNuxtPlugin(() => {
extend(isSameOrBefore)
extend(isSameOrAfter)
extend(isBetween)
extend(advanced)
dayjs.updateLocale('en', {
weekStart: 1,
})

Loading…
Cancel
Save