bfg-common 1.5.773 → 1.5.775
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CODE_STYLE.md +109 -109
- package/assets/img/icons/icons-sprite-dark-1.svg +3 -2
- package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
- package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
- package/assets/img/icons/icons-sprite-light-1.svg +4 -3
- package/assets/img/icons/icons-sprite-light-3.svg +227 -227
- package/assets/img/icons/icons-sprite-light-5.svg +488 -488
- package/assets/localization/local_be.json +27 -165
- package/assets/localization/local_en.json +27 -165
- package/assets/localization/local_hy.json +26 -164
- package/assets/localization/local_kk.json +26 -164
- package/assets/localization/local_ru.json +33 -171
- package/assets/localization/local_zh.json +26 -164
- package/assets/scss/common/global.scss +5 -5
- package/assets/scss/common/icons/icons-1.scss +1 -1
- package/assets/scss/common/icons/icons-2.scss +0 -18
- package/assets/scss/common/theme.scss +0 -2
- package/assets/scss/components/auth.scss +5 -32
- package/components/atoms/TheIcon3.vue +50 -50
- package/components/atoms/collapse/CollapseNav.vue +170 -170
- package/components/atoms/dropdown/tree/Tree.vue +0 -2
- package/components/atoms/nav/NavBar.vue +0 -1
- package/components/atoms/perPage/PerPage.vue +58 -58
- package/components/atoms/switch/Switch.vue +1 -7
- package/components/atoms/table/dataGrid/DataGrid.vue +16 -17
- package/components/atoms/table/dataGrid/DataGridPagination.vue +97 -97
- package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +94 -94
- package/components/atoms/table/dataGrid/lib/utils/export.ts +16 -16
- package/components/atoms/wizard/Wizard.vue +1 -1
- package/components/common/backup/storage/actions/add/Old.vue +1 -22
- package/components/common/backup/storage/actions/add/lib/config/createDatastore.ts +1 -1
- package/components/common/backup/storage/actions/add/lib/utils.ts +51 -51
- package/components/common/backup/storage/actions/add/steps/typeMode/TypeModeOld.vue +48 -1
- package/components/common/backup/storage/actions/add/steps/typeMode/lib/config/typeOptions.ts +20 -20
- package/components/common/backup/storage/actions/delete/Delete.vue +15 -37
- package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
- package/components/common/diagramMain/Header.vue +0 -4
- package/components/common/diagramMain/lib/models/interfaces.ts +0 -2
- package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
- package/components/common/diagramMain/modals/viewSettings/info/Info.vue +1 -5
- package/components/common/diagramMain/modals/viewSettings/info/InfoOld.vue +0 -16
- package/components/common/diagramMain/port/Port.vue +580 -580
- package/components/common/graph/graphNew/EmptyBlock.vue +1 -2
- package/components/common/help/navbar/left/lib/utils/constructAccordion.ts +1 -2
- package/components/common/help/navbar/right/Right.vue +23 -86
- package/components/common/layout/theHeader/TheHeader.vue +81 -44
- package/components/common/layout/theHeader/{New.vue → TheHeaderNew.vue} +26 -14
- package/components/common/layout/theHeader/{Old.vue → TheHeaderOld.vue} +21 -13
- package/components/common/layout/theHeader/ThemeSwitch.vue +18 -8
- package/components/common/layout/theHeader/feedback/new/email/Email.vue +2 -2
- package/components/common/layout/theHeader/helpMenu/{about/About.vue → About.vue} +22 -12
- package/components/common/layout/theHeader/helpMenu/HelpMenu.vue +8 -6
- package/components/common/layout/theHeader/helpMenu/{about/New.vue → aboutNew/AboutNew.vue} +4 -5
- package/components/common/layout/theHeader/helpMenu/aboutOld/AboutOld.vue +79 -0
- package/components/common/layout/theHeader/helpMenu/{new/New.vue → helpMenuNew/HelpMenuNew.vue} +1 -1
- package/components/common/layout/theHeader/helpMenu/{new → helpMenuNew}/lib/config/dropMenu.ts +1 -1
- package/components/common/layout/theHeader/helpMenu/{old/Old.vue → helpMenuOld/HelpMenuOld.vue} +2 -2
- package/components/common/layout/theHeader/helpMenu/{old → helpMenuOld}/lib/config/dropMenu.ts +1 -1
- package/components/common/layout/theHeader/modals/reconnect/Reconnect.vue +11 -11
- package/components/common/layout/theHeader/modals/reconnect/{New.vue → ReconnectNew.vue} +1 -1
- package/components/common/layout/theHeader/modals/reconnect/{Old.vue → ReconnectOld.vue} +0 -2
- package/components/common/layout/theHeader/userMenu/UserMenu.vue +28 -21
- package/components/common/layout/theHeader/userMenu/modals/changePassword/ChangePassword.vue +21 -12
- package/components/common/layout/theHeader/userMenu/modals/changePassword/New.vue +43 -36
- package/components/common/layout/theHeader/userMenu/modals/changePassword/Old.vue +2 -0
- package/components/common/layout/theHeader/userMenu/modals/changePassword/lib/utils.ts +3 -3
- package/components/common/layout/theHeader/userMenu/modals/preferences/Preferences.vue +44 -19
- package/components/common/layout/theHeader/userMenu/modals/preferences/{New.vue → PreferencesNew.vue} +16 -24
- package/components/common/layout/theHeader/userMenu/modals/preferences/{Old.vue → PreferencesOld.vue} +18 -10
- package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguage.vue +18 -17
- package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/{New.vue → ChangeLanguageNew.vue} +30 -6
- package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/{Old.vue → ChangeLanguageOld.vue} +30 -5
- package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/DefaultConsole.vue +20 -8
- package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/{New.vue → DefaultConsoleNew.vue} +3 -3
- package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/{Old.vue → DefaultConsoleOld.vue} +2 -2
- package/components/common/layout/theHeader/userMenu/modals/preferences/inventory/Inventory.vue +21 -7
- package/components/common/layout/theHeader/userMenu/modals/preferences/inventory/{New.vue → InventoryNew.vue} +2 -3
- package/components/common/layout/theHeader/userMenu/modals/preferences/inventory/{Old.vue → InventoryOld.vue} +2 -2
- package/components/common/layout/theHeader/userMenu/modals/preferences/lib/models/types.ts +7 -7
- package/components/common/layout/theHeader/userMenu/modals/preferences/security/New.vue +12 -277
- package/components/common/layout/theHeader/userMenu/modals/preferences/security/Old.vue +56 -30
- package/components/common/layout/theHeader/userMenu/modals/preferences/security/Security.vue +6 -65
- package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/TimeFormat.vue +22 -9
- package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/{New.vue → TimeFormatNew.vue} +3 -3
- package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/{Old.vue → TimeFormatOld.vue} +2 -2
- package/components/common/layout/theHeader/userMenu/modals/preferences/view/View.vue +22 -13
- package/components/common/layout/theHeader/userMenu/modals/preferences/view/{New.vue → ViewNew.vue} +3 -29
- package/components/common/layout/theHeader/userMenu/modals/preferences/view/{Old.vue → ViewOld.vue} +2 -21
- package/components/common/layout/theHeader/userMenu/{new/New.vue → userMenuNew/UserMenuNew.vue} +1 -1
- package/components/common/layout/theHeader/userMenu/{old/Old.vue → userMenuOld/UserMenuOld.vue} +2 -2
- package/components/common/layout/theHeader/userMenu/{old → userMenuOld}/lib/config/dropMenu.ts +1 -1
- package/components/common/monitor/advanced/graphView/GraphView.vue +0 -8
- package/components/common/monitor/advanced/tools/Tools.vue +1 -5
- package/components/common/monitor/overview/OverviewNew.vue +1 -1
- package/components/common/pages/backups/DetailView.vue +52 -52
- package/components/common/pages/backups/backupsNew/BackupsNew.vue +19 -107
- package/components/common/pages/backups/backupsNew/contextMenuView/ContextMenuView.vue +10 -16
- package/components/common/pages/backups/lib/models/interfaces.ts +36 -36
- package/components/common/pages/backups/modals/Modals.vue +243 -243
- package/components/common/pages/backups/modals/createBackup/CreateBackup.vue +10 -6
- package/components/common/pages/backups/modals/createBackup/New.vue +9 -22
- package/components/common/pages/backups/modals/createBackup/Old.vue +10 -8
- package/components/common/pages/backups/modals/createBackup/configuration/ConfigurationNew.vue +3 -17
- package/components/common/pages/backups/modals/createBackup/configuration/backupWindow/BackupWindow.vue +29 -29
- package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/MaxBandwidth.vue +69 -69
- package/components/common/pages/backups/modals/createBackup/configuration/strategy/Strategy.vue +38 -38
- package/components/common/pages/backups/modals/createBackup/datastores/Datastores.vue +0 -6
- package/components/common/pages/backups/modals/createBackup/datastores/DatastoresOld.vue +2 -22
- package/components/common/pages/backups/modals/createBackup/datastores/tableView/new/lib/config/table.ts +8 -8
- package/components/common/pages/backups/modals/createBackup/disks/Disks.vue +0 -6
- package/components/common/pages/backups/modals/createBackup/disks/DisksOld.vue +1 -22
- package/components/common/pages/backups/modals/createBackup/disks/tableView/new/TableView.vue +1 -1
- package/components/common/pages/backups/modals/createBackup/disks/tableView/new/lib/config/table.ts +7 -7
- package/components/common/pages/backups/modals/createBackup/general/General.vue +1 -7
- package/components/common/pages/backups/modals/createBackup/general/GeneralNew.vue +1 -1
- package/components/common/pages/backups/modals/createBackup/general/GeneralOld.vue +0 -17
- package/components/common/pages/backups/modals/createBackup/lib/config/readyToCompleteOptions.ts +5 -5
- package/components/common/pages/backups/modals/createBackup/lib/config/steps.ts +1 -1
- package/components/common/pages/backups/modals/createBackup/lib/config/strategyOptions.ts +2 -11
- package/components/common/pages/backups/modals/createBackup/lib/models/interfaces.ts +8 -8
- package/components/common/pages/backups/modals/createBackup/lib/validation/validations.ts +14 -6
- package/components/common/pages/backups/modals/deleteBackup/DeleteBackup.vue +0 -1
- package/components/common/pages/backups/modals/lib/config/restore.ts +0 -1
- package/components/common/pages/backups/modals/lib/models/interfaces.ts +1 -2
- package/components/common/pages/backups/modals/restore/Restore.vue +26 -25
- package/components/common/pages/backups/modals/restore/{Old.vue → RestoreOld.vue} +0 -5
- package/components/common/pages/backups/modals/restore/disks/Disks.vue +8 -26
- package/components/common/pages/backups/modals/restore/disks/DisksNew.vue +2 -2
- package/components/common/pages/backups/modals/restore/disks/DisksOld.vue +2 -2
- package/components/common/pages/backups/modals/restore/lib/config/readyToCompleteOptions.ts +14 -46
- package/components/common/pages/backups/modals/restore/lib/config/restoreCodes.ts +1 -1
- package/components/common/pages/backups/modals/restore/lib/config/steps.ts +20 -42
- package/components/common/pages/backups/modals/restore/name/lib/models/interfaces.ts +6 -6
- package/components/common/pages/backups/modals/restore/types/Types.vue +3 -15
- package/components/common/pages/backups/modals/restore/types/{New.vue → TypesNew.vue} +11 -11
- package/components/common/pages/backups/modals/restore/types/{Old.vue → TypesOld.vue} +6 -7
- package/components/common/pages/backups/modals/restore/types/lib/config/descriptions.ts +0 -1
- package/components/common/pages/hardwareHealth/historyTestimony/tools/Tools.vue +2 -7
- package/components/common/pages/hardwareHealth/tableView/TableView.vue +0 -8
- package/components/common/pages/hardwareHealth/tableView/lib/config/sensorTable.ts +1 -13
- package/components/common/pages/hardwareHealth/toolsPanel/lib/config/actionsPanel.ts +4 -4
- package/components/common/pages/home/lib/models/interfaces.ts +48 -48
- package/components/common/pages/home/widgets/hosts/Hosts.vue +27 -27
- package/components/common/pages/home/widgets/hosts/lib/config/items.ts +23 -23
- package/components/common/pages/home/widgets/vms/VmsOld.vue +35 -35
- package/components/common/pages/home/widgets/vms/lib/config/items.ts +19 -19
- package/components/common/pages/home/widgets/warnings/lib/config/config.ts +2 -2
- package/components/common/pages/home/widgets/warnings/table/lib/config/config.ts +2 -2
- package/components/common/pages/home/widgets/warnings/table/lib/models/enums.ts +12 -0
- package/components/common/pages/scheduledTasks/lib/utils/utils.ts +84 -84
- package/components/common/pages/tasks/Tasks.vue +0 -3
- package/components/common/pages/tasks/table/Table.vue +1 -4
- package/components/common/pages/tasks/table/expandDetails/ExpandDetails.vue +1 -1
- package/components/common/pages/tasks/table/lib/config/config.ts +13 -22
- package/components/common/qrcode/Qrcode.vue +56 -0
- package/components/common/readyToComplete/ReadyToComplete.vue +17 -17
- package/components/common/select/radio/RadioGroup.vue +137 -137
- package/components/common/selectLanguage/SelectLanguage.vue +5 -5
- package/components/common/spiceConsole/Drawer.vue +420 -420
- package/components/common/spiceConsole/SpiceConsole.vue +184 -184
- package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
- package/components/common/split/horizontal/New.vue +2 -0
- package/components/common/split/vertical/New.vue +1 -2
- package/components/common/tools/Actions.vue +207 -207
- package/components/common/treeView/TreeView.vue +52 -52
- package/components/common/vm/actions/add/New.vue +11 -13
- package/components/common/vm/actions/add/Old.vue +1 -1
- package/components/common/vm/actions/clone/lib/config/steps.ts +295 -295
- package/components/common/vm/actions/clone/new/New.vue +438 -438
- package/components/common/vm/actions/clone/old/Old.vue +0 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/New.vue +36 -12
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/Old.vue +37 -15
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +50 -50
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/coresPerSocket/CoresPerSocket.vue +3 -3
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +28 -28
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces.ts +1 -3
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +283 -283
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +7 -13
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/New.vue +4 -7
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +45 -52
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/Old.vue +8 -5
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIo.vue +3 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/New.vue +2 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/Old.vue +2 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/New.vue +2 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/Old.vue +2 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/New.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGrid.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/Old.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/vmoptions/New.vue +2 -2
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +156 -156
- package/components/common/vm/actions/common/select/compatibility/New.vue +1 -0
- package/components/common/vm/actions/common/select/compatibility/Old.vue +107 -107
- package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/common/select/options/New.vue +264 -264
- package/components/common/vm/actions/common/select/options/Old.vue +2 -1
- package/components/common/vm/actions/common/select/options/Options.vue +58 -58
- package/components/common/vm/actions/common/select/storage/Old.vue +125 -125
- package/components/common/vm/actions/common/select/storage/new/New.vue +1 -1
- package/components/common/vm/actions/common/select/storage/new/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/common/select/storage/new/lib/utils/utils.ts +21 -21
- package/components/common/vm/actions/common/select/template/old/Old.vue +50 -50
- package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
- package/components/common/wizards/common/compatibility/Compatibility.vue +35 -35
- package/components/common/wizards/common/compatibility/New.vue +1 -1
- package/components/common/wizards/common/compatibility/Old.vue +1 -1
- package/components/common/wizards/common/steps/computeResource/New.vue +1 -9
- package/components/common/wizards/common/steps/name/Name.vue +178 -178
- package/components/common/wizards/common/steps/name/New.vue +221 -221
- package/components/common/wizards/common/steps/name/Old.vue +121 -121
- package/components/common/wizards/common/steps/name/lib/models/interfaces.ts +4 -4
- package/components/common/wizards/common/steps/name/location/New.vue +40 -40
- package/components/common/wizards/datastore/add/Add.vue +1 -0
- package/components/common/wizards/datastore/add/Old.vue +0 -16
- package/components/common/wizards/datastore/add/lib/config/createDatastore.ts +0 -1
- package/components/common/wizards/datastore/add/lib/models/interfaces.ts +0 -1
- package/components/common/wizards/datastore/add/lib/utils.ts +85 -85
- package/components/common/wizards/datastore/add/steps/nameAndDevice/NameAndDeviceNew.vue +0 -5
- package/components/common/wizards/datastore/add/steps/nameAndDevice/NameAndDeviceOld.vue +0 -5
- package/components/common/wizards/datastore/add/steps/nameAndDevice/table/old/Old.vue +3 -2
- package/components/common/wizards/datastore/add/steps/readyComplete/lib/config/propertiesDetails.ts +1 -8
- package/components/common/wizards/datastore/add/steps/typeMode/TypeModeOld.vue +48 -1
- package/components/common/wizards/datastore/add/steps/typeMode/lib/config/typeOptions.ts +43 -43
- package/components/common/wizards/network/add/Add.vue +5 -28
- package/components/common/wizards/network/add/lib/config/config.ts +1 -1
- package/components/common/wizards/network/add/lib/config/initialData.ts +3 -6
- package/components/common/wizards/network/add/lib/config/selectConnectionTypeStep.ts +0 -1
- package/components/common/wizards/network/add/steps/portProperties/PortProperties.vue +192 -192
- package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceNew.vue +1 -2
- package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceOld.vue +6 -18
- package/components/common/wizards/vm/migrate/lib/models/enums.ts +2 -2
- package/components/common/wizards/vm/migrate/steps/computeResource/tableView/old/lib/config/hostTable.ts +1 -1
- package/components/common/wizards/vm/migrate/steps/selectStorage/SelectStorage.vue +4 -4
- package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/new/lib/config/diskTable.ts +2 -6
- package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/old/lib/config/diskTable.ts +13 -29
- package/composables/deepCopy.ts +21 -0
- package/composables/useAppVersion.ts +21 -21
- package/composables/useEnvLanguage.ts +8 -7
- package/composables/useLocal.ts +6 -6
- package/composables/useLocalCommon.ts +39 -39
- package/composables/useUniqueId.ts +5 -0
- package/lib/config/regExp.ts +1 -1
- package/lib/models/enums.ts +0 -28
- package/lib/models/interfaces.ts +0 -2
- package/lib/models/types.ts +21 -20
- package/lib/utils/localizationMapper.ts +2 -1
- package/package.json +4 -3
- package/plugins/console.ts +21 -21
- package/plugins/date.ts +37 -14
- package/plugins/mouse.ts +21 -21
- package/plugins/panelStates.ts +70 -70
- package/plugins/text.ts +59 -59
- package/plugins/validation.ts +6 -6
- package/public/spice-console/application/clientgui.js +854 -854
- package/public/spice-console/application/packetfactory.js +211 -211
- package/public/spice-console/application/virtualmouse.js +147 -147
- package/public/spice-console/lib/images/bitmap.js +203 -203
- package/public/spice-console/network/spicechannel.js +440 -440
- package/public/spice-console/process/cursorprocess.js +128 -128
- package/public/spice-console/process/inputprocess.js +227 -227
- package/public/spice-console/process/mainprocess.js +212 -212
- package/public/spice-console/run.js +210 -210
- package/store/main/getters.ts +2 -2
- package/store/main/mutations.ts +7 -7
- package/store/main/state.ts +7 -7
- package/store/tasks/actions.ts +1 -1
- package/store/tasks/mappers/recentTasks.ts +123 -123
- package/store/tasks/mappers/tasks.ts +1 -8
- package/store/tasks/mutations.ts +82 -82
- package/components/common/backup/storage/actions/add/steps/typeMode/tooltip/Tooltip.vue +0 -33
- package/components/common/certificate/Certificate.vue +0 -27
- package/components/common/certificate/CertificateInfo.vue +0 -139
- package/components/common/certificate/Tools.vue +0 -59
- package/components/common/certificate/lib/config/tabsPannel.ts +0 -22
- package/components/common/certificate/lib/models/interfaces.ts +0 -9
- package/components/common/certificate/lib/models/types.ts +0 -1
- package/components/common/certificate/modals/renew/New.vue +0 -64
- package/components/common/certificate/modals/renew/Old.vue +0 -122
- package/components/common/certificate/modals/renew/Renew.vue +0 -67
- package/components/common/layout/console/Console.vue +0 -70
- package/components/common/layout/console/lib/models/interfaces.ts +0 -10
- package/components/common/layout/theHeader/helpMenu/about/Old.vue +0 -78
- package/components/common/pages/auth/TheFooter.vue +0 -104
- package/components/common/pages/backups/backupsNew/Skeleton.vue +0 -136
- package/components/common/pages/files/lib/models/enums.ts +0 -36
- package/components/common/pages/tasks/table/lib/models/interfaces.ts +0 -9
- package/components/common/qr/Qr.vue +0 -69
- package/components/common/vm/snapshots/DetailView.vue +0 -90
- package/components/common/vm/snapshots/Old.vue +0 -71
- package/components/common/vm/snapshots/Snapshots.vue +0 -82
- package/components/common/vm/snapshots/lib/models/interfaces.ts +0 -5
- package/components/common/vm/snapshots/lib/models/types.ts +0 -11
- package/components/common/vm/snapshots/modals/confirm/Confirm.vue +0 -48
- package/components/common/vm/snapshots/modals/confirm/New.vue +0 -128
- package/components/common/vm/snapshots/modals/confirm/Old.vue +0 -140
- package/components/common/vm/snapshots/modals/confirm/lib/models/enums.ts +0 -19
- package/components/common/vm/snapshots/modals/lib/config/modalTexts.ts +0 -30
- package/components/common/vm/snapshots/modals/takeOrEdit/Old.vue +0 -220
- package/components/common/vm/snapshots/modals/takeOrEdit/TakeOrEdit.vue +0 -51
- package/components/common/vm/snapshots/modals/takeOrEdit/new/New.vue +0 -184
- package/components/common/vm/snapshots/modals/takeOrEdit/new/lib/utils/getSnapshotsName.ts +0 -15
- package/components/common/vm/snapshots/new/New.vue +0 -471
- package/components/common/vm/snapshots/new/Skeleton.vue +0 -136
- package/components/common/vm/snapshots/new/contextMenuView/ContextMenuView.vue +0 -103
- package/components/common/vm/snapshots/new/contextMenuView/lib/config/contextMenuItems.ts +0 -34
- package/components/common/vm/snapshots/new/lib/models/interfaces.ts +0 -12
- package/components/common/vm/snapshots/new/lib/utils/contextMenu.ts +0 -29
- package/components/common/vm/snapshots/new/lib/utils/details.ts +0 -48
- package/components/common/vm/snapshots/tools/Tools.vue +0 -56
- package/components/common/vm/snapshots/tools/lib/config/tabsPannel.ts +0 -39
- package/components/common/wizards/datastore/add/steps/nameAndDevice/advancedOptions/AdvancedOptions.vue +0 -43
- package/components/common/wizards/datastore/add/steps/nameAndDevice/advancedOptions/New.vue +0 -114
- package/components/common/wizards/datastore/add/steps/nameAndDevice/advancedOptions/Old.vue +0 -114
- package/components/common/wizards/datastore/add/steps/typeMode/tooltip/Tooltip.vue +0 -33
- package/composables/useBrowse.ts +0 -24
- package/lib/models/composables/useBrowse/interfaces.ts +0 -4
- package/store/inventory/modules/snapshots/lib/models/interfaces.ts +0 -45
- /package/components/common/layout/theHeader/helpMenu/{old → helpMenuOld}/lib/models/types.ts +0 -0
- /package/components/common/layout/theHeader/userMenu/{new → userMenuNew}/lib/config/dropMenu.ts +0 -0
- /package/components/common/layout/theHeader/userMenu/{old → userMenuOld}/lib/models/types.ts +0 -0
- /package/components/common/pages/backups/modals/restore/{New.vue → RestoreNew.vue} +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import type { UI_I_UseAppVersionReturnType } from '~/lib/models/composables/useAppVersion/interfaces'
|
|
2
|
-
|
|
3
|
-
export function useAppVersion(): UI_I_UseAppVersionReturnType {
|
|
4
|
-
const config = useRuntimeConfig()
|
|
5
|
-
const version = config.public.APP_VERSION as string
|
|
6
|
-
|
|
7
|
-
// const regexHasDot = /\./
|
|
8
|
-
// const regexHasDotAndB = /\.\d*b$/
|
|
9
|
-
// const regexHasDotAndD = /\..*d/
|
|
10
|
-
|
|
11
|
-
// const isBeta = regexHasDotAndB.test(version)
|
|
12
|
-
// const isDev =
|
|
13
|
-
// regexHasDotAndD.test(version) ||
|
|
14
|
-
// (!regexHasDot.test(version) && version.length < 8)
|
|
15
|
-
|
|
16
|
-
return {
|
|
17
|
-
version,
|
|
18
|
-
// isBeta,
|
|
19
|
-
// isDev,
|
|
20
|
-
}
|
|
21
|
-
}
|
|
1
|
+
import type { UI_I_UseAppVersionReturnType } from '~/lib/models/composables/useAppVersion/interfaces'
|
|
2
|
+
|
|
3
|
+
export function useAppVersion(): UI_I_UseAppVersionReturnType {
|
|
4
|
+
const config = useRuntimeConfig()
|
|
5
|
+
const version = config.public.APP_VERSION as string
|
|
6
|
+
|
|
7
|
+
// const regexHasDot = /\./
|
|
8
|
+
// const regexHasDotAndB = /\.\d*b$/
|
|
9
|
+
// const regexHasDotAndD = /\..*d/
|
|
10
|
+
|
|
11
|
+
// const isBeta = regexHasDotAndB.test(version)
|
|
12
|
+
// const isDev =
|
|
13
|
+
// regexHasDotAndD.test(version) ||
|
|
14
|
+
// (!regexHasDot.test(version) && version.length < 8)
|
|
15
|
+
|
|
16
|
+
return {
|
|
17
|
+
version,
|
|
18
|
+
// isBeta,
|
|
19
|
+
// isDev,
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export function useEnvLanguage(): string {
|
|
2
|
-
|
|
2
|
+
const { $store }: any = useNuxtApp()
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
let localizationCode = 'en_US'
|
|
5
5
|
const langFromLocalStorage =
|
|
6
|
-
|
|
7
|
-
useLocalStorage('lang')
|
|
6
|
+
$store.getters['main/getInterfaceLang'] || // Из $store для Сферы, но думаю нужно сделать одинаково из localStorage
|
|
7
|
+
useLocalStorage('lang') ||
|
|
8
|
+
useLocalStorage('languageType')
|
|
8
9
|
|
|
9
10
|
if (langFromLocalStorage) {
|
|
10
11
|
if (
|
|
@@ -12,11 +13,11 @@ export function useEnvLanguage(): string {
|
|
|
12
13
|
langFromLocalStorage === 'ru_RU' ||
|
|
13
14
|
langFromLocalStorage === 'hy_AM'
|
|
14
15
|
) {
|
|
15
|
-
localizationCode
|
|
16
|
+
localizationCode = langFromLocalStorage
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
localizationCode
|
|
20
|
+
localizationCode = localizationCode.slice(0, 2).toUpperCase()
|
|
20
21
|
|
|
21
|
-
return localizationCode
|
|
22
|
+
return localizationCode
|
|
22
23
|
}
|
package/composables/useLocal.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import { useLocalCommon } from '~/composables/useLocalCommon'
|
|
3
|
-
|
|
4
|
-
export const useLocal = (): UI_I_Localization => {
|
|
5
|
-
return useLocalCommon()
|
|
6
|
-
}
|
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
import { useLocalCommon } from '~/composables/useLocalCommon'
|
|
3
|
+
|
|
4
|
+
export const useLocal = (): UI_I_Localization => {
|
|
5
|
+
return useLocalCommon()
|
|
6
|
+
}
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import localAr from '~/assets/scss/clarity/local_ar.json'
|
|
3
|
-
import localRu from '~/assets/localization/local_ru.json'
|
|
4
|
-
import localEn from '~/assets/localization/local_en.json'
|
|
5
|
-
import localHy from '~/assets/localization/local_hy.json'
|
|
6
|
-
import localZh from '~/assets/localization/local_zh.json'
|
|
7
|
-
import localKk from '~/assets/localization/local_kk.json'
|
|
8
|
-
import localBe from '~/assets/localization/local_be.json'
|
|
9
|
-
import { productNameLocal } from '~/lib/utils/localizationMapper'
|
|
10
|
-
|
|
11
|
-
const rawLocals: Record<string, any> = {
|
|
12
|
-
ar: localAr,
|
|
13
|
-
ru: localRu,
|
|
14
|
-
en: localEn,
|
|
15
|
-
hy: localHy,
|
|
16
|
-
zh: localZh,
|
|
17
|
-
kk: localKk,
|
|
18
|
-
be: localBe,
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// Кешируем уже обработанные локали
|
|
22
|
-
const processedCache: Record<string, UI_I_Localization | undefined> = {}
|
|
23
|
-
|
|
24
|
-
export const useLocalCommon = (): UI_I_Localization => {
|
|
25
|
-
const config = useRuntimeConfig()
|
|
26
|
-
let code = String(config?.public?.LOCALIZATION_CODE || 'ru').toLowerCase()
|
|
27
|
-
|
|
28
|
-
if (code === 'ar' && !useLocalStorage('rtl')) code = 'ru'
|
|
29
|
-
|
|
30
|
-
if (typeof document !== 'undefined') document.documentElement.lang = code
|
|
31
|
-
|
|
32
|
-
// если в кеше нет — создаём и сохраняем
|
|
33
|
-
if (!processedCache[code]) {
|
|
34
|
-
const raw = rawLocals[code] || rawLocals['ru']
|
|
35
|
-
processedCache[code] = productNameLocal(raw)
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return processedCache[code] as UI_I_Localization
|
|
39
|
-
}
|
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
import localAr from '~/assets/scss/clarity/local_ar.json'
|
|
3
|
+
import localRu from '~/assets/localization/local_ru.json'
|
|
4
|
+
import localEn from '~/assets/localization/local_en.json'
|
|
5
|
+
import localHy from '~/assets/localization/local_hy.json'
|
|
6
|
+
import localZh from '~/assets/localization/local_zh.json'
|
|
7
|
+
import localKk from '~/assets/localization/local_kk.json'
|
|
8
|
+
import localBe from '~/assets/localization/local_be.json'
|
|
9
|
+
import { productNameLocal } from '~/lib/utils/localizationMapper'
|
|
10
|
+
|
|
11
|
+
const rawLocals: Record<string, any> = {
|
|
12
|
+
ar: localAr,
|
|
13
|
+
ru: localRu,
|
|
14
|
+
en: localEn,
|
|
15
|
+
hy: localHy,
|
|
16
|
+
zh: localZh,
|
|
17
|
+
kk: localKk,
|
|
18
|
+
be: localBe,
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Кешируем уже обработанные локали
|
|
22
|
+
const processedCache: Record<string, UI_I_Localization | undefined> = {}
|
|
23
|
+
|
|
24
|
+
export const useLocalCommon = (): UI_I_Localization => {
|
|
25
|
+
const config = useRuntimeConfig()
|
|
26
|
+
let code = String(config?.public?.LOCALIZATION_CODE || 'ru').toLowerCase()
|
|
27
|
+
|
|
28
|
+
if (code === 'ar' && !useLocalStorage('rtl')) code = 'ru'
|
|
29
|
+
|
|
30
|
+
if (typeof document !== 'undefined') document.documentElement.lang = code
|
|
31
|
+
|
|
32
|
+
// если в кеше нет — создаём и сохраняем
|
|
33
|
+
if (!processedCache[code]) {
|
|
34
|
+
const raw = rawLocals[code] || rawLocals['ru']
|
|
35
|
+
processedCache[code] = productNameLocal(raw)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return processedCache[code] as UI_I_Localization
|
|
39
|
+
}
|
package/lib/config/regExp.ts
CHANGED
|
@@ -8,7 +8,7 @@ const url = /https?:\/\/([a-zA-Zа-яА-Я0-9.-]+\.[a-zA-Zа-яА-Я]{2,6})\b/
|
|
|
8
8
|
const specialChar = /[!@#$%^&*(),.?":{}|<>]/
|
|
9
9
|
const specialCharWidthSpace = /[!@#$%^&*(),?":{}|<>]|(\s)|\.$/
|
|
10
10
|
const cron = /^(\*|([0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])|\*\/([0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])) (\*|([0-9]|1[0-9]|2[0-3])|\*\/([0-9]|1[0-9]|2[0-3])) (\*|([1-9]|1[0-9]|2[0-9]|3[0-1])|\*\/([1-9]|1[0-9]|2[0-9]|3[0-1])) (\*|([1-9]|1[0-2])|\*\/([1-9]|1[0-2])) (\*|([0-6])|\*\/([0-6]))$/
|
|
11
|
-
export const
|
|
11
|
+
export const RegExp = {
|
|
12
12
|
ip,
|
|
13
13
|
email,
|
|
14
14
|
password,
|
package/lib/models/enums.ts
CHANGED
|
@@ -18,34 +18,6 @@ export enum UI_E_NodeIconsByState {
|
|
|
18
18
|
'network_Error' = 'vsphere-icon-network-error',
|
|
19
19
|
'network_Warning' = 'vsphere-icon-network-warning',
|
|
20
20
|
'network_connected' = 'vsphere-icon-network',
|
|
21
|
-
|
|
22
|
-
'network-error' = 'vsphere-icon-network-error',
|
|
23
|
-
'network' = 'vsphere-icon-network',
|
|
24
|
-
'network-warning' = 'vsphere-icon-network-warning',
|
|
25
|
-
|
|
26
|
-
'folder_Normal' = 'vsphere-icon-folder',
|
|
27
|
-
'folder_Error' = 'vsphere-icon-folder-error',
|
|
28
|
-
'folder_Warning' = 'vsphere-icon-folder-warning',
|
|
29
|
-
'folder_connected' = 'vsphere-icon-folder',
|
|
30
|
-
|
|
31
|
-
'file_Normal' = 'vsphere-icon-file',
|
|
32
|
-
'file_Error' = 'vsphere-icon-file-error',
|
|
33
|
-
'file_Warning' = 'vsphere-icon-file-warning',
|
|
34
|
-
'file_connected' = 'vsphere-icon-file',
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export enum UI_E_TabsByType {
|
|
38
|
-
'zone' = 'h',
|
|
39
|
-
'datacenter' = 'h',
|
|
40
|
-
'folder' = 'h',
|
|
41
|
-
'cluster' = 'h',
|
|
42
|
-
'zonedir' = 'h', // TODO ??
|
|
43
|
-
'zone_dir' = 'h',
|
|
44
|
-
// для прокуратор
|
|
45
|
-
'host' = 'h',
|
|
46
|
-
'vm' = 'v',
|
|
47
|
-
'datastore' = 's',
|
|
48
|
-
'network' = 'n',
|
|
49
21
|
}
|
|
50
22
|
|
|
51
23
|
export enum UI_E_State {
|
package/lib/models/interfaces.ts
CHANGED
|
@@ -60,8 +60,6 @@ export interface UI_I_Localization {
|
|
|
60
60
|
registerVm: UI_I_ArbitraryObject<string>
|
|
61
61
|
files: UI_I_ArbitraryObject<string>
|
|
62
62
|
myPreferences: UI_I_ArbitraryObject<string>
|
|
63
|
-
cacheConfiguration: UI_I_ArbitraryObject<string>
|
|
64
|
-
configureSecurityProfile: UI_I_ArbitraryObject<string>
|
|
65
63
|
}
|
|
66
64
|
export interface UI_I_SendTaskParams {
|
|
67
65
|
method: string
|
package/lib/models/types.ts
CHANGED
|
@@ -3,9 +3,8 @@ export type UI_T_Project = 'sphere' | 'procurator'
|
|
|
3
3
|
export type UI_T_Lang = 'ru' | 'en' | 'be' | 'hy' | 'kk' | 'zh'
|
|
4
4
|
|
|
5
5
|
export type UI_T_NavNodes =
|
|
6
|
-
// для Сферы
|
|
7
6
|
| 'h'
|
|
8
|
-
// для
|
|
7
|
+
// для прокуратор
|
|
9
8
|
| 'v'
|
|
10
9
|
| 's'
|
|
11
10
|
| 'n'
|
|
@@ -31,6 +30,25 @@ export type UI_T_LangValue =
|
|
|
31
30
|
| 'be_BY'
|
|
32
31
|
| 'BROWSER'
|
|
33
32
|
|
|
33
|
+
export type UI_T_LanguageKey =
|
|
34
|
+
| 'common'
|
|
35
|
+
| 'auth'
|
|
36
|
+
| 'home'
|
|
37
|
+
| 'tasks'
|
|
38
|
+
| 'layout'
|
|
39
|
+
| 'mainNavigation'
|
|
40
|
+
| 'administration'
|
|
41
|
+
| 'inventoryConfigure'
|
|
42
|
+
| 'vmOverrides'
|
|
43
|
+
| 'datastoreWizard'
|
|
44
|
+
| 'inventorySummary'
|
|
45
|
+
| 'contextMenu'
|
|
46
|
+
| 'networks'
|
|
47
|
+
| 'inventory'
|
|
48
|
+
| 'inventoryMonitor'
|
|
49
|
+
| 'inventoryTabs'
|
|
50
|
+
| 'bottomPanel'
|
|
51
|
+
|
|
34
52
|
export type UI_T_ProcuratorTypeNodes =
|
|
35
53
|
| 'host'
|
|
36
54
|
| 'vm'
|
|
@@ -39,21 +57,4 @@ export type UI_T_ProcuratorTypeNodes =
|
|
|
39
57
|
| 'folder'
|
|
40
58
|
| 'file'
|
|
41
59
|
|
|
42
|
-
export type UI_T_SphereTypeNodes =
|
|
43
|
-
| UI_T_ProcuratorTypeNodes
|
|
44
|
-
| 'zone'
|
|
45
|
-
| 'datacenter'
|
|
46
|
-
| 'cluster'
|
|
47
|
-
| 'zone_dir'
|
|
48
|
-
| 'dc_hc_dir'
|
|
49
|
-
| 'dc_net_dir'
|
|
50
|
-
| 'dc_ds_dir'
|
|
51
|
-
| 'dc_vmt_dir'
|
|
52
|
-
| 'dc_backup_dir'
|
|
53
|
-
| 'IdentityProviders'
|
|
54
|
-
| 'networks' // может быть это не нужный тип так как есть 'network' в UI_T_ProcuratorTypeNodes
|
|
55
|
-
| 'backup_storage'
|
|
56
|
-
| 'bucket'
|
|
57
|
-
| 'vmtemplate' // TODO думаю нужно добавить в UI_T_ProcuratorTypeNodes
|
|
58
|
-
|
|
59
|
-
export type UI_T_AllTypeNodes = UI_T_SphereTypeNodes
|
|
60
|
+
export type UI_T_SphereTypeNodes = UI_T_ProcuratorTypeNodes // TODO добавить осталиные типи те что исползуется в сфере
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
import type { UI_T_LanguageKey } from '~/lib/models/types'
|
|
2
3
|
|
|
3
4
|
const replaceProductNameRecursion = (
|
|
4
5
|
localization: UI_I_Localization,
|
|
5
6
|
productName: any
|
|
6
7
|
): UI_I_Localization => {
|
|
7
8
|
for (const key of Object.keys(localization)) {
|
|
8
|
-
let item = localization[key as
|
|
9
|
+
let item = localization[key as UI_T_LanguageKey]
|
|
9
10
|
|
|
10
11
|
for (const key2 of Object.keys(item)) {
|
|
11
12
|
item[key2] = item[key2].replaceAll('{productName}', productName)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bfg-common",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.775",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "nuxt build",
|
|
7
7
|
"dev": "nuxt dev --port=3002",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@vueuse/core": "10.1.2",
|
|
19
19
|
"@vueuse/nuxt": "10.1.2",
|
|
20
20
|
"bfg-nuxt-3-graph": "1.0.27",
|
|
21
|
-
"bfg-uikit": "1.0.
|
|
21
|
+
"bfg-uikit": "1.0.533",
|
|
22
22
|
"eslint-config-prettier": "^8.5.0",
|
|
23
23
|
"eslint-plugin-myrules": "file:./eslint",
|
|
24
24
|
"nuxt": "3.11.2",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"@nuxtjs/eslint-config-typescript": "^12.0.0",
|
|
39
39
|
"@vueuse/components": "^10.1.2",
|
|
40
40
|
"html2canvas": "^1.4.1",
|
|
41
|
-
"prettier-eslint": "^15.0.1"
|
|
41
|
+
"prettier-eslint": "^15.0.1",
|
|
42
|
+
"qrcode": "^1.5.4"
|
|
42
43
|
}
|
|
43
44
|
}
|
package/plugins/console.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineNuxtPlugin } from '#app'
|
|
2
|
-
import type { UI_T_CODEC } from '~/components/common/spiceConsole/lib/models/types'
|
|
3
|
-
|
|
4
|
-
export default defineNuxtPlugin(() => {
|
|
5
|
-
const console = function (): any {
|
|
6
|
-
const self: any = {
|
|
7
|
-
codec: ref<UI_T_CODEC>(1),
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
self.changeCodec = (codec: UI_T_CODEC): void => {
|
|
11
|
-
self.codec.value = codec
|
|
12
|
-
}
|
|
13
|
-
return self
|
|
14
|
-
}.call({})
|
|
15
|
-
|
|
16
|
-
return {
|
|
17
|
-
provide: {
|
|
18
|
-
console,
|
|
19
|
-
},
|
|
20
|
-
}
|
|
21
|
-
})
|
|
1
|
+
import { defineNuxtPlugin } from '#app'
|
|
2
|
+
import type { UI_T_CODEC } from '~/components/common/spiceConsole/lib/models/types'
|
|
3
|
+
|
|
4
|
+
export default defineNuxtPlugin(() => {
|
|
5
|
+
const console = function (): any {
|
|
6
|
+
const self: any = {
|
|
7
|
+
codec: ref<UI_T_CODEC>(1),
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
self.changeCodec = (codec: UI_T_CODEC): void => {
|
|
11
|
+
self.codec.value = codec
|
|
12
|
+
}
|
|
13
|
+
return self
|
|
14
|
+
}.call({})
|
|
15
|
+
|
|
16
|
+
return {
|
|
17
|
+
provide: {
|
|
18
|
+
console,
|
|
19
|
+
},
|
|
20
|
+
}
|
|
21
|
+
})
|
package/plugins/date.ts
CHANGED
|
@@ -135,7 +135,15 @@ export default defineNuxtPlugin(() => {
|
|
|
135
135
|
zh_CHS: 'yyyy-MM-dd',
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
|
|
138
|
+
const dateFormat = ref(dateFormats[currentLanguage])
|
|
139
|
+
|
|
140
|
+
window.addEventListener('timeFormatStorageChanged', function handler() {
|
|
141
|
+
dateFormat.value = dateFormats[lang || useLocalStorage('lang') || 'en_US'] // TODO нужно проверить когда будем работать без useLocalStorage
|
|
142
|
+
|
|
143
|
+
window.removeEventListener('timeFormatStorageChanged', handler)
|
|
144
|
+
})
|
|
145
|
+
|
|
146
|
+
return dateFormat.value
|
|
139
147
|
}
|
|
140
148
|
|
|
141
149
|
// Получаем формат времени
|
|
@@ -277,45 +285,60 @@ export default defineNuxtPlugin(() => {
|
|
|
277
285
|
|
|
278
286
|
const dateObj: Date = new Date(date)
|
|
279
287
|
|
|
280
|
-
const formatDateLocal =
|
|
288
|
+
const formatDateLocal = ref(
|
|
281
289
|
localOptions.formatDate || getDateFormat(localOptions.lang)
|
|
290
|
+
)
|
|
282
291
|
|
|
283
|
-
const formatTimeLocal =
|
|
292
|
+
const formatTimeLocal = ref(
|
|
284
293
|
localOptions.formatTime ||
|
|
285
|
-
|
|
294
|
+
getTimeFormat(localOptions.hasSeconds, localOptions.formatTime)
|
|
295
|
+
)
|
|
286
296
|
|
|
287
|
-
|
|
297
|
+
const formatDatetime = ref('')
|
|
288
298
|
|
|
289
299
|
if (localOptions.onlyDate) {
|
|
290
|
-
formatDatetime = formatDateLocal
|
|
300
|
+
formatDatetime.value = formatDateLocal.value
|
|
291
301
|
}
|
|
292
302
|
|
|
293
303
|
if (localOptions.onlyTime) {
|
|
294
|
-
formatDatetime = formatTimeLocal
|
|
304
|
+
formatDatetime.value = formatTimeLocal.value
|
|
295
305
|
}
|
|
296
306
|
|
|
297
307
|
if (!localOptions.onlyDate && !localOptions.onlyTime) {
|
|
298
|
-
formatDatetime =
|
|
299
|
-
formatDateLocal +
|
|
308
|
+
formatDatetime.value =
|
|
309
|
+
formatDateLocal.value +
|
|
300
310
|
(localOptions.separator ? localOptions.separator : ' ') +
|
|
301
|
-
formatTimeLocal
|
|
311
|
+
formatTimeLocal.value
|
|
302
312
|
}
|
|
303
313
|
|
|
314
|
+
window.addEventListener('timeFormatStorageChanged', function handler() {
|
|
315
|
+
formatDatetime.value =
|
|
316
|
+
formatDateLocal.value +
|
|
317
|
+
' ' +
|
|
318
|
+
getTimeFormat(localOptions.hasSeconds, localOptions.formatTime)
|
|
319
|
+
|
|
320
|
+
window.removeEventListener('timeFormatStorageChanged', handler)
|
|
321
|
+
})
|
|
322
|
+
|
|
304
323
|
if (!localOptions.onlyTime) {
|
|
305
|
-
formatDatetime = formattedDate(
|
|
324
|
+
formatDatetime.value = formattedDate(
|
|
325
|
+
dateObj,
|
|
326
|
+
formatDatetime.value,
|
|
327
|
+
localOptions.lang
|
|
328
|
+
)
|
|
306
329
|
}
|
|
307
330
|
|
|
308
331
|
if (!localOptions.onlyDate) {
|
|
309
|
-
formatDatetime = formattedTime(
|
|
332
|
+
formatDatetime.value = formattedTime(
|
|
310
333
|
dateObj,
|
|
311
|
-
formatDatetime,
|
|
334
|
+
formatDatetime.value,
|
|
312
335
|
localOptions.hasSeconds,
|
|
313
336
|
localOptions.formatTime,
|
|
314
337
|
localOptions.lang
|
|
315
338
|
)
|
|
316
339
|
}
|
|
317
340
|
|
|
318
|
-
return formatDatetime
|
|
341
|
+
return formatDatetime.value
|
|
319
342
|
}
|
|
320
343
|
|
|
321
344
|
const correctRuUnit = (value: number, type: string): string => {
|
package/plugins/mouse.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineNuxtPlugin } from '#app'
|
|
2
|
-
import type { UI_T_MouseMode } from '~/components/common/spiceConsole/lib/models/types'
|
|
3
|
-
|
|
4
|
-
export default defineNuxtPlugin(() => {
|
|
5
|
-
const mouse = function (): any {
|
|
6
|
-
const self: any = {
|
|
7
|
-
mode: ref<UI_T_MouseMode>(1),
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
self.changeMode = (mode: UI_T_MouseMode): void => {
|
|
11
|
-
self.mode.value = mode
|
|
12
|
-
}
|
|
13
|
-
return self
|
|
14
|
-
}.call({})
|
|
15
|
-
|
|
16
|
-
return {
|
|
17
|
-
provide: {
|
|
18
|
-
mouse,
|
|
19
|
-
},
|
|
20
|
-
}
|
|
21
|
-
})
|
|
1
|
+
import { defineNuxtPlugin } from '#app'
|
|
2
|
+
import type { UI_T_MouseMode } from '~/components/common/spiceConsole/lib/models/types'
|
|
3
|
+
|
|
4
|
+
export default defineNuxtPlugin(() => {
|
|
5
|
+
const mouse = function (): any {
|
|
6
|
+
const self: any = {
|
|
7
|
+
mode: ref<UI_T_MouseMode>(1),
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
self.changeMode = (mode: UI_T_MouseMode): void => {
|
|
11
|
+
self.mode.value = mode
|
|
12
|
+
}
|
|
13
|
+
return self
|
|
14
|
+
}.call({})
|
|
15
|
+
|
|
16
|
+
return {
|
|
17
|
+
provide: {
|
|
18
|
+
mouse,
|
|
19
|
+
},
|
|
20
|
+
}
|
|
21
|
+
})
|
package/plugins/panelStates.ts
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import { defineNuxtPlugin } from '#app'
|
|
2
|
-
import type { UI_I_PanelOptions } from '~/lib/models/plugins/panelStates/interfaces'
|
|
3
|
-
|
|
4
|
-
export default defineNuxtPlugin(() => {
|
|
5
|
-
const panelStates = function (): any {
|
|
6
|
-
const self: any = {}
|
|
7
|
-
let options: UI_I_PanelOptions = {
|
|
8
|
-
leftPanelWidth: 20,
|
|
9
|
-
topPanelHeight: 80,
|
|
10
|
-
isBottomPanelCollapsed: false,
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
self.setLeftPanelWidth = function (width: number): void {
|
|
14
|
-
options.leftPanelWidth = width
|
|
15
|
-
|
|
16
|
-
self.setPanelStatesInStorage()
|
|
17
|
-
}
|
|
18
|
-
self.setTopPanelHeight = function (height: number): void {
|
|
19
|
-
options.topPanelHeight = height
|
|
20
|
-
|
|
21
|
-
self.setPanelStatesInStorage()
|
|
22
|
-
}
|
|
23
|
-
self.bottomPanelCollapse = function (collapse: boolean): void {
|
|
24
|
-
options.isBottomPanelCollapsed = collapse
|
|
25
|
-
|
|
26
|
-
self.setPanelStatesInStorage()
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
self.setPanelStatesInStorage = function (): void {
|
|
30
|
-
useLocalStorage('panelStates', options)
|
|
31
|
-
self.emitChanges()
|
|
32
|
-
}
|
|
33
|
-
self.getPanelStatesOfStorage = function (): UI_I_PanelOptions {
|
|
34
|
-
let panelStates = useLocalStorage('panelStates')
|
|
35
|
-
|
|
36
|
-
if (!panelStates) {
|
|
37
|
-
// const parent = document.getElementById('default-layout-outer')
|
|
38
|
-
const parent = document.body
|
|
39
|
-
const parentHeight = parent?.clientHeight || 0
|
|
40
|
-
const onePercent = parentHeight / 100
|
|
41
|
-
const defaultRecentTasksHeight = 250
|
|
42
|
-
|
|
43
|
-
options.topPanelHeight =
|
|
44
|
-
(parentHeight - defaultRecentTasksHeight - 1.5) / onePercent
|
|
45
|
-
|
|
46
|
-
panelStates = options
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
options = panelStates
|
|
50
|
-
|
|
51
|
-
return panelStates
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
self.cb = (): void => {}
|
|
55
|
-
self.on = function (cb: () => any | void): void {
|
|
56
|
-
self.cb = cb
|
|
57
|
-
}
|
|
58
|
-
self.emitChanges = function (): void {
|
|
59
|
-
self.cb(options)
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
return self
|
|
63
|
-
}.call({})
|
|
64
|
-
|
|
65
|
-
return {
|
|
66
|
-
provide: {
|
|
67
|
-
panelStates,
|
|
68
|
-
},
|
|
69
|
-
}
|
|
70
|
-
})
|
|
1
|
+
import { defineNuxtPlugin } from '#app'
|
|
2
|
+
import type { UI_I_PanelOptions } from '~/lib/models/plugins/panelStates/interfaces'
|
|
3
|
+
|
|
4
|
+
export default defineNuxtPlugin(() => {
|
|
5
|
+
const panelStates = function (): any {
|
|
6
|
+
const self: any = {}
|
|
7
|
+
let options: UI_I_PanelOptions = {
|
|
8
|
+
leftPanelWidth: 20,
|
|
9
|
+
topPanelHeight: 80,
|
|
10
|
+
isBottomPanelCollapsed: false,
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
self.setLeftPanelWidth = function (width: number): void {
|
|
14
|
+
options.leftPanelWidth = width
|
|
15
|
+
|
|
16
|
+
self.setPanelStatesInStorage()
|
|
17
|
+
}
|
|
18
|
+
self.setTopPanelHeight = function (height: number): void {
|
|
19
|
+
options.topPanelHeight = height
|
|
20
|
+
|
|
21
|
+
self.setPanelStatesInStorage()
|
|
22
|
+
}
|
|
23
|
+
self.bottomPanelCollapse = function (collapse: boolean): void {
|
|
24
|
+
options.isBottomPanelCollapsed = collapse
|
|
25
|
+
|
|
26
|
+
self.setPanelStatesInStorage()
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
self.setPanelStatesInStorage = function (): void {
|
|
30
|
+
useLocalStorage('panelStates', options)
|
|
31
|
+
self.emitChanges()
|
|
32
|
+
}
|
|
33
|
+
self.getPanelStatesOfStorage = function (): UI_I_PanelOptions {
|
|
34
|
+
let panelStates = useLocalStorage('panelStates')
|
|
35
|
+
|
|
36
|
+
if (!panelStates) {
|
|
37
|
+
// const parent = document.getElementById('default-layout-outer')
|
|
38
|
+
const parent = document.body
|
|
39
|
+
const parentHeight = parent?.clientHeight || 0
|
|
40
|
+
const onePercent = parentHeight / 100
|
|
41
|
+
const defaultRecentTasksHeight = 250
|
|
42
|
+
|
|
43
|
+
options.topPanelHeight =
|
|
44
|
+
(parentHeight - defaultRecentTasksHeight - 1.5) / onePercent
|
|
45
|
+
|
|
46
|
+
panelStates = options
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
options = panelStates
|
|
50
|
+
|
|
51
|
+
return panelStates
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
self.cb = (): void => {}
|
|
55
|
+
self.on = function (cb: () => any | void): void {
|
|
56
|
+
self.cb = cb
|
|
57
|
+
}
|
|
58
|
+
self.emitChanges = function (): void {
|
|
59
|
+
self.cb(options)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return self
|
|
63
|
+
}.call({})
|
|
64
|
+
|
|
65
|
+
return {
|
|
66
|
+
provide: {
|
|
67
|
+
panelStates,
|
|
68
|
+
},
|
|
69
|
+
}
|
|
70
|
+
})
|