@opencor/opencor 0.20250826.0 → 0.20250827.1

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.
Files changed (57) hide show
  1. package/README.md +1 -1
  2. package/dist/opencor.es.js +1 -1
  3. package/package.json +5 -6
  4. package/src/App.vue +0 -7
  5. package/src/ContainerApp.vue +0 -21
  6. package/src/assets/app.css +0 -14
  7. package/src/assets/base.css +0 -31
  8. package/src/assets/logo.svg +0 -17
  9. package/src/common/common.ts +0 -86
  10. package/src/common/constants.ts +0 -12
  11. package/src/common/electron.ts +0 -23
  12. package/src/common/electronApi.ts +0 -63
  13. package/src/common/locCommon.ts +0 -170
  14. package/src/common/settings.ts +0 -95
  15. package/src/common/vueCommon.ts +0 -69
  16. package/src/components/BackgroundComponent.vue +0 -26
  17. package/src/components/BlockingMessageComponent.vue +0 -34
  18. package/src/components/ContentsComponent.vue +0 -277
  19. package/src/components/DragNDropComponent.vue +0 -35
  20. package/src/components/MainMenu.vue +0 -225
  21. package/src/components/OpenCOR.vue +0 -624
  22. package/src/components/dialogs/AboutDialog.vue +0 -51
  23. package/src/components/dialogs/BaseDialog.vue +0 -58
  24. package/src/components/dialogs/OpenRemoteDialog.vue +0 -37
  25. package/src/components/dialogs/ResetAllDialog.vue +0 -13
  26. package/src/components/dialogs/SettingsDialog.vue +0 -42
  27. package/src/components/dialogs/UpdateAvailableDialog.vue +0 -16
  28. package/src/components/dialogs/UpdateDownloadProgressDialog.vue +0 -11
  29. package/src/components/dialogs/UpdateErrorDialog.vue +0 -18
  30. package/src/components/dialogs/UpdateNotAvailableDialog.vue +0 -12
  31. package/src/components/propertyEditors/GraphsPropertyEditor.vue +0 -3
  32. package/src/components/propertyEditors/ParametersPropertyEditor.vue +0 -3
  33. package/src/components/propertyEditors/PropertyEditor.vue +0 -60
  34. package/src/components/propertyEditors/SimulationPropertyEditor.vue +0 -45
  35. package/src/components/propertyEditors/SolversPropertyEditor.vue +0 -3
  36. package/src/components/views/IssuesView.vue +0 -50
  37. package/src/components/views/SimulationExperimentUiView.vue +0 -154
  38. package/src/components/views/SimulationExperimentView.vue +0 -218
  39. package/src/components/widgets/GraphPanelWidget.vue +0 -140
  40. package/src/components/widgets/InputWidget.vue +0 -128
  41. package/src/libopencor/locApi.ts +0 -167
  42. package/src/libopencor/locFileApi.ts +0 -263
  43. package/src/libopencor/locLoggerApi.ts +0 -36
  44. package/src/libopencor/locSedApi.ts +0 -486
  45. package/src/libopencor/locUiJsonApi.ts +0 -485
  46. package/src/libopencor/locVersionApi.ts +0 -17
  47. package/src/libopencor/src/common.cpp +0 -67
  48. package/src/libopencor/src/common.h +0 -27
  49. package/src/libopencor/src/file.cpp +0 -72
  50. package/src/libopencor/src/file.h +0 -15
  51. package/src/libopencor/src/main.cpp +0 -78
  52. package/src/libopencor/src/sed.cpp +0 -348
  53. package/src/libopencor/src/sed.h +0 -53
  54. package/src/libopencor/src/version.cpp +0 -8
  55. package/src/libopencor/src/version.h +0 -5
  56. package/src/main.ts +0 -6
  57. package/src/types/types.d.ts +0 -9
@@ -1,69 +0,0 @@
1
- import * as vue from 'vue'
2
-
3
- import type { Theme } from '../../index.js'
4
-
5
- // Some constants to know whether the operating system uses light mode or dark mode.
6
-
7
- const _prefersColorScheme = window.matchMedia('(prefers-color-scheme: light)')
8
- const _isLightMode = vue.ref(_prefersColorScheme.matches)
9
- const _isDarkMode = vue.ref(!_prefersColorScheme.matches)
10
- let _theme: Theme = 'system'
11
-
12
- _prefersColorScheme.addEventListener('change', (event) => {
13
- if (_theme === 'system') {
14
- _isLightMode.value = event.matches
15
- _isDarkMode.value = !event.matches
16
- }
17
- })
18
-
19
- export function setTheme(theme: Theme) {
20
- _theme = theme
21
-
22
- if (theme === 'light') {
23
- _isLightMode.value = true
24
- _isDarkMode.value = false
25
- } else if (theme === 'dark') {
26
- _isLightMode.value = false
27
- _isDarkMode.value = true
28
- }
29
- }
30
-
31
- export function useLightMode(): boolean {
32
- return _isLightMode.value
33
- }
34
-
35
- export function useDarkMode(): boolean {
36
- return _isDarkMode.value
37
- }
38
-
39
- // A method to track the height of a given element.
40
-
41
- export function trackElementHeight(id: string): void {
42
- vue.onMounted(() => {
43
- const element = document.getElementById(id)
44
-
45
- if (element !== null) {
46
- const observer = new ResizeObserver(() => {
47
- let elementHeight = window.getComputedStyle(element).height
48
-
49
- if (elementHeight === '' || elementHeight === 'auto') {
50
- elementHeight = '0px'
51
- }
52
-
53
- const cssVariableName =
54
- '--' + (id.split('_')[0] ?? '').replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase() + '-height'
55
- const oldElementHeight = window.getComputedStyle(document.documentElement).getPropertyValue(cssVariableName)
56
-
57
- if (oldElementHeight === '' || (elementHeight !== '0px' && oldElementHeight !== elementHeight)) {
58
- document.documentElement.style.setProperty(cssVariableName, elementHeight)
59
- }
60
- })
61
-
62
- observer.observe(element)
63
-
64
- vue.onUnmounted(() => {
65
- observer.disconnect()
66
- })
67
- }
68
- })
69
- }
@@ -1,26 +0,0 @@
1
- <template>
2
- <img class="logo" src="../assets/logo.svg" />
3
- </template>
4
-
5
- <style scoped>
6
- .logo {
7
- /* Original dimensions:
8
- * - Width: 828.12px; and
9
- * - Height: 704.92px.
10
- * Final dimensions:
11
- * - Width: 303px + 8px = 311px; and
12
- * - Height: 257.92px + 8px = ~266px
13
- */
14
-
15
- max-width: 311px;
16
- max-height: 266px;
17
- border-radius: 1rem;
18
- padding: 0.5rem;
19
- box-shadow: 0 0 0.75rem 0.375rem var(--p-content-border-color);
20
- position: absolute;
21
- top: 50%;
22
- left: 50%;
23
- transform: translate(-50%, -50%);
24
- z-index: -1;
25
- }
26
- </style>
@@ -1,34 +0,0 @@
1
- <template>
2
- <Message class="message" severity="secondary">
3
- <i class="message-icon pi pi-spin pi-cog" />
4
- <br />
5
- <span class="message-text">{{ message }}</span>
6
- </Message>
7
- </template>
8
-
9
- <script setup lang="ts">
10
- defineProps<{
11
- message: string
12
- }>()
13
- </script>
14
-
15
- <style scoped>
16
- .message {
17
- position: absolute;
18
- top: 50%;
19
- left: 50%;
20
- transform: translate(-50%, -50%);
21
- padding: 1.5rem 1rem 0.75rem;
22
- z-index: 99999;
23
- }
24
-
25
- .message-icon {
26
- text-align: center;
27
- display: block;
28
- font-size: 3rem;
29
- }
30
-
31
- .message-text {
32
- font-size: 1.5rem;
33
- }
34
- </style>
@@ -1,277 +0,0 @@
1
- <template>
2
- <div v-if="simulationOnly" class="h-full">
3
- <div v-for="(fileTab, index) in fileTabs" :key="`tabPanel_${fileTab.file.path()}`" :value="fileTab.file.path()">
4
- <IssuesView
5
- v-if="fileTab.file.issues().length !== 0"
6
- :issues="fileTab.file.issues()"
7
- :simulationOnly="simulationOnly"
8
- />
9
- <SimulationExperimentView
10
- v-else-if="fileTab.uiJson === undefined"
11
- :file="fileTabs[index]?.file"
12
- :isActiveFile="fileTab.file.path() === activeFile"
13
- :simulationOnly="true"
14
- />
15
- <SimulationExperimentUiView
16
- v-else
17
- :file="fileTabs[index]?.file"
18
- :simulationOnly="true"
19
- :uiJson="fileTabs[index]?.uiJson"
20
- />
21
- </div>
22
- </div>
23
- <div v-else class="h-full">
24
- <Tabs
25
- v-show="fileTabs.length !== 0"
26
- id="fileTabs"
27
- v-model:value="activeFile"
28
- :scrollable="true"
29
- :selectOnFocus="true"
30
- >
31
- <TabList id="fileTablist" class="file-tablist">
32
- <Tab
33
- v-for="fileTab in fileTabs"
34
- :id="`tab_${fileTab.file.path()}`"
35
- :key="`tab_${fileTab.file.path()}`"
36
- :value="fileTab.file.path()"
37
- >
38
- <div class="flex gap-2 items-center">
39
- <div>
40
- {{
41
- fileTab.file
42
- .path()
43
- .split(/(\\|\/)/g)
44
- .pop()
45
- }}
46
- </div>
47
- <div class="pi pi-times remove-button" @mousedown.prevent @click.stop="closeFile(fileTab.file.path())" />
48
- </div>
49
- </Tab>
50
- </TabList>
51
- <TabPanels class="p-0!">
52
- <TabPanel
53
- v-for="(fileTab, index) in fileTabs"
54
- :key="`tabPanel_${fileTab.file.path()}`"
55
- :value="fileTab.file.path()"
56
- >
57
- <IssuesView v-if="fileTab.file.issues().length !== 0" :issues="fileTab.file.issues()" />
58
- <SimulationExperimentView
59
- v-else-if="fileTab.uiJson === undefined"
60
- :uiEnabled="uiEnabled"
61
- :file="fileTabs[index]?.file"
62
- :isActiveFile="fileTab.file.path() === activeFile"
63
- />
64
- <SimulationExperimentUiView v-else :file="fileTabs[index]?.file" :uiJson="fileTabs[index]?.uiJson" />
65
- </TabPanel>
66
- </TabPanels>
67
- </Tabs>
68
- </div>
69
- </template>
70
-
71
- <script setup lang="ts">
72
- import * as vueusecore from '@vueuse/core'
73
-
74
- import * as vue from 'vue'
75
-
76
- import * as common from '../common/common'
77
- import { electronApi } from '../common/electronApi'
78
- import * as vueCommon from '../common/vueCommon'
79
- import * as locApi from '../libopencor/locApi'
80
-
81
- export interface IFileTab {
82
- file: locApi.File
83
- uiJson?: locApi.IUiJson
84
- }
85
-
86
- const props = defineProps<{
87
- uiEnabled: boolean
88
- simulationOnly?: boolean
89
- }>()
90
- defineExpose({ openFile, closeCurrentFile, closeAllFiles, hasFile, hasFiles, selectFile })
91
-
92
- export interface IContentsComponent {
93
- openFile(file: locApi.File): void
94
- closeCurrentFile(): void
95
- closeAllFiles(): void
96
- hasFile(filePath: string): boolean
97
- hasFiles(): boolean
98
- selectFile(filePath: string): void
99
- }
100
-
101
- const fileTabs = vue.ref<IFileTab[]>([])
102
- const activeFile = vue.ref<string>('')
103
-
104
- const filePaths = vue.computed(() => {
105
- const res: string[] = []
106
-
107
- for (const fileTab of fileTabs.value) {
108
- res.push(fileTab.file.path())
109
- }
110
-
111
- return res
112
- })
113
-
114
- vue.watch(filePaths, (filePaths) => {
115
- electronApi?.filesOpened(filePaths)
116
- })
117
-
118
- vue.watch(activeFile, (filePath) => {
119
- // Note: activeFile can get updated by clicking on a tab or by calling selectFile(), hence we need to watch it to let
120
- // people know that a file has been selected.
121
-
122
- electronApi?.fileSelected(filePath)
123
- })
124
-
125
- function openFile(file: locApi.File): void {
126
- const filePath = file.path()
127
- const prevActiveFile = activeFile.value
128
-
129
- selectFile(filePath)
130
-
131
- fileTabs.value.splice(fileTabs.value.findIndex((fileTab) => fileTab.file.path() === prevActiveFile) + 1, 0, {
132
- file: file,
133
- uiJson: file.uiJson()
134
- })
135
-
136
- electronApi?.fileOpened(filePath)
137
- }
138
-
139
- function hasFile(filePath: string): boolean {
140
- return fileTabs.value.find((fileTab) => fileTab.file.path() === filePath) !== undefined
141
- }
142
-
143
- function hasFiles(): boolean {
144
- return fileTabs.value.length > 0
145
- }
146
-
147
- function selectFile(filePath: string): void {
148
- activeFile.value = filePath
149
- }
150
-
151
- function selectNextFile(): void {
152
- const activeFileIndex = fileTabs.value.findIndex((fileTab) => fileTab.file.path() === activeFile.value)
153
- const nextFileIndex = (activeFileIndex + 1) % fileTabs.value.length
154
- const nextFileTab = fileTabs.value[nextFileIndex]
155
-
156
- if (nextFileTab !== undefined) {
157
- selectFile(nextFileTab.file.path())
158
- }
159
- }
160
-
161
- function selectPreviousFile(): void {
162
- const activeFileIndex = fileTabs.value.findIndex((fileTab) => fileTab.file.path() === activeFile.value)
163
- const nextFileIndex = (activeFileIndex - 1 + fileTabs.value.length) % fileTabs.value.length
164
- const nextFileTab = fileTabs.value[nextFileIndex]
165
-
166
- if (nextFileTab !== undefined) {
167
- selectFile(nextFileTab.file.path())
168
- }
169
- }
170
-
171
- function closeFile(filePath: string): void {
172
- locApi.fileManager.unmanage(filePath)
173
-
174
- const activeFileIndex = fileTabs.value.findIndex((fileTab) => fileTab.file.path() === filePath)
175
-
176
- fileTabs.value.splice(activeFileIndex, 1)
177
-
178
- if (activeFile.value === filePath && fileTabs.value.length > 0) {
179
- const nextFileTab = fileTabs.value[Math.min(activeFileIndex, fileTabs.value.length - 1)]
180
-
181
- if (nextFileTab !== undefined) {
182
- selectFile(nextFileTab.file.path())
183
- }
184
- }
185
-
186
- electronApi?.fileClosed(filePath)
187
- }
188
-
189
- function closeCurrentFile(): void {
190
- closeFile(activeFile.value)
191
- }
192
-
193
- function closeAllFiles(): void {
194
- while (fileTabs.value.length > 0) {
195
- closeCurrentFile()
196
- }
197
- }
198
-
199
- // Track the height of our file tablist.
200
-
201
- vueCommon.trackElementHeight('fileTablist')
202
-
203
- // Keyboard shortcuts.
204
-
205
- if (!common.isMobile()) {
206
- vueusecore.onKeyStroke((event: KeyboardEvent) => {
207
- if (!props.uiEnabled || fileTabs.value.length === 0) {
208
- return
209
- }
210
-
211
- if (event.ctrlKey && !event.shiftKey && event.code === 'Tab') {
212
- event.preventDefault()
213
-
214
- selectNextFile()
215
- } else if (event.ctrlKey && event.shiftKey && event.code === 'Tab') {
216
- event.preventDefault()
217
-
218
- selectPreviousFile()
219
- }
220
- })
221
- }
222
- </script>
223
-
224
- <style scoped>
225
- .file-tablist {
226
- border-bottom: 1px solid var(--p-primary-color);
227
- }
228
-
229
- .p-tab {
230
- padding: 0.25rem 0.5rem;
231
- border-right: 1px solid var(--p-content-border-color);
232
- }
233
-
234
- .p-tab:first-of-type {
235
- border-left: 1px solid var(--p-content-border-color);
236
- }
237
-
238
- .p-tab:hover {
239
- background-color: var(--p-content-hover-background) !important;
240
- }
241
-
242
- .p-tab .remove-button {
243
- visibility: hidden;
244
- }
245
-
246
- .p-tab:hover .remove-button,
247
- .p-tab-active .remove-button {
248
- visibility: visible;
249
- }
250
-
251
- .p-tab-active,
252
- .p-tab-active:hover {
253
- background-color: var(--p-primary-color) !important;
254
- color: var(--p-primary-contrast-color);
255
- }
256
-
257
- :deep(.p-tablist-active-bar) {
258
- display: none;
259
- }
260
-
261
- .remove-button {
262
- padding: 0.15rem;
263
- font-size: 0.75rem;
264
- }
265
-
266
- .remove-button:hover {
267
- border-radius: var(--p-border-radius-sm);
268
- background-color: var(--p-red-500);
269
- color: var(--p-red-50);
270
- }
271
-
272
- @media (prefers-color-scheme: dark) {
273
- .remove-button:hover {
274
- background-color: var(--p-red-400);
275
- }
276
- }
277
- </style>
@@ -1,35 +0,0 @@
1
- <template>
2
- <div class="drop-area">
3
- <div class="message">
4
- CellML files, SED-ML files, and COMBINE archives<br />
5
- can be dropped here.
6
- </div>
7
- </div>
8
- </template>
9
-
10
- <style scoped>
11
- .drop-area {
12
- position: absolute;
13
- width: 100%;
14
- height: 100%;
15
- border: 0.375rem dashed;
16
- border-color: var(--p-primary-color);
17
- z-index: 99999;
18
- }
19
-
20
- .message {
21
- font-size: 1.5rem;
22
- line-height: 1.25;
23
- text-align: center;
24
- border-radius: 1rem;
25
- padding: 0.5rem 1rem;
26
- background-color: var(--p-primary-color);
27
- color: var(--p-primary-contrast-color);
28
- box-shadow: 0 0 0.75rem 0.375rem var(--p-content-border-color);
29
- position: absolute;
30
- top: 50%;
31
- left: 50%;
32
- transform: translate(-50%, -50%);
33
- white-space: nowrap;
34
- }
35
- </style>
@@ -1,225 +0,0 @@
1
- <template>
2
- <Menubar id="mainMenu" :model="items">
3
- <template #item="{ item, props }">
4
- <a v-bind="props.action">
5
- <div class="p-menubar-item-label">{{ item.label }}</div>
6
- <svg
7
- v-if="item.items !== undefined"
8
- width="14"
9
- height="14"
10
- viewBox="0 0 14 14"
11
- class="ml-auto p-icon p-menubar-submenu-icon"
12
- >
13
- <path
14
- d="M5.25 11.1728C5.14929 11.1694 5.05033 11.1455 4.9592 11.1025C4.86806 11.0595 4.78666 10.9984 4.72 10.9228C4.57955 10.7822 4.50066 10.5916 4.50066 10.3928C4.50066 10.1941 4.57955 10.0035 4.72 9.86283L7.72 6.86283L4.72 3.86283C4.66067 3.71882 4.64765 3.55991 4.68275 3.40816C4.71785 3.25642 4.79932 3.11936 4.91585 3.01602C5.03238 2.91268 5.17819 2.84819 5.33305 2.83149C5.4879 2.81479 5.64411 2.84671 5.78 2.92283L9.28 6.42283C9.42045 6.56346 9.49934 6.75408 9.49934 6.95283C9.49934 7.15158 9.42045 7.34221 9.28 7.48283L5.78 10.9228C5.71333 10.9984 5.63193 11.0595 5.5408 11.1025C5.44966 11.1455 5.35071 11.1694 5.25 11.1728Z"
15
- fill="currentColor"
16
- />
17
- </svg>
18
- <div v-if="item.shortcut !== undefined" class="ml-auto border border-surface rounded bg-emphasis text-xs/3">
19
- {{ item.shortcut }}
20
- </div>
21
- </a>
22
- </template>
23
- </Menubar>
24
- </template>
25
-
26
- <script setup lang="ts">
27
- import * as vueusecore from '@vueuse/core'
28
-
29
- import * as vue from 'vue'
30
-
31
- import * as common from '../common/common'
32
-
33
- const props = defineProps<{
34
- uiEnabled: boolean
35
- hasFiles: boolean
36
- }>()
37
-
38
- const emit = defineEmits([
39
- 'about',
40
- 'close',
41
- 'closeAll',
42
- 'open',
43
- 'openRemote',
44
- 'openSampleLorenz',
45
- 'openSampleInteractiveLorenz',
46
- 'settings'
47
- ])
48
- const isWindowsOrLinux = common.isWindows() || common.isLinux()
49
- const isMacOs = common.isMacOs()
50
-
51
- const items = [
52
- {
53
- label: 'File',
54
- items: [
55
- {
56
- label: 'Open...',
57
- shortcut: isWindowsOrLinux ? 'Ctrl+Alt+O' : isMacOs ? '⌘⌥O' : undefined,
58
- command: () => {
59
- emit('open')
60
- }
61
- },
62
- {
63
- label: 'Open Remote...',
64
- shortcut: isWindowsOrLinux ? 'Ctrl+Shift+Alt+O' : isMacOs ? '⇧⌘⌥O' : undefined,
65
- command: () => {
66
- emit('openRemote')
67
- }
68
- },
69
- {
70
- label: 'Open Sample',
71
- items: [
72
- {
73
- label: 'Lorenz',
74
- command: () => {
75
- emit('openSampleLorenz')
76
- }
77
- },
78
- {
79
- label: 'Interactive Lorenz',
80
- command: () => {
81
- emit('openSampleInteractiveLorenz')
82
- }
83
- }
84
- ]
85
- },
86
- { separator: true },
87
- {
88
- label: 'Close',
89
- shortcut: isWindowsOrLinux ? 'Ctrl+Alt+W' : isMacOs ? '⌘⌥W' : undefined,
90
- command: () => {
91
- emit('close')
92
- },
93
- disabled: () => !props.hasFiles
94
- },
95
- {
96
- label: 'Close All',
97
- command: () => {
98
- emit('closeAll')
99
- },
100
- disabled: () => !props.hasFiles
101
- }
102
- ]
103
- },
104
- /*---OPENCOR--- Enable the settings menu once we have settings for OpenCOR's Web app.
105
- {
106
- label: 'Tools',
107
- items: [
108
- {
109
- label: 'Settings...',
110
- shortcut: isWindowsOrLinux ? 'Ctrl+Alt+,' : isMacOs ? '⌘⌥,' : undefined,
111
- command: () => {
112
- emit('settings')
113
- }
114
- }
115
- ]
116
- },
117
- */
118
- {
119
- label: 'Help',
120
- items: [
121
- {
122
- label: 'Home Page',
123
- command: () => {
124
- window.open('https://opencor.ws/')
125
- }
126
- },
127
- { separator: true },
128
- {
129
- label: 'Report Issue',
130
- command: () => {
131
- window.open('https://github.com/opencor/webapp/issues/new')
132
- }
133
- },
134
- { separator: true },
135
- {
136
- label: 'About OpenCOR',
137
- command: () => {
138
- emit('about')
139
- }
140
- }
141
- ]
142
- }
143
- ]
144
-
145
- // Never display our menu as a hamburger menu.
146
-
147
- vue.onMounted(() => {
148
- const mainMenu = document.getElementById('mainMenu')
149
-
150
- if (mainMenu !== null) {
151
- const observer = new MutationObserver(() => {
152
- if (mainMenu.className.includes('p-menubar-mobile')) {
153
- mainMenu.classList.remove('p-menubar-mobile')
154
- }
155
- })
156
-
157
- observer.observe(mainMenu, { attributes: true })
158
- }
159
- })
160
-
161
- // Keyboard shortcuts.
162
-
163
- if (!common.isMobile()) {
164
- vueusecore.onKeyStroke((event: KeyboardEvent) => {
165
- if (!props.uiEnabled) {
166
- return
167
- }
168
-
169
- if (common.isCtrlOrCmd(event) && !event.shiftKey && event.code === 'KeyO') {
170
- event.preventDefault()
171
-
172
- emit('open')
173
- } else if (common.isCtrlOrCmd(event) && event.shiftKey && event.code === 'KeyO') {
174
- event.preventDefault()
175
-
176
- emit('openRemote')
177
- } else if (props.hasFiles && common.isCtrlOrCmd(event) && !event.shiftKey && event.code === 'KeyW') {
178
- event.preventDefault()
179
-
180
- emit('close')
181
- } else if (common.isCtrlOrCmd(event) && !event.shiftKey && event.code === 'Comma') {
182
- event.preventDefault()
183
-
184
- emit('settings')
185
- }
186
- })
187
- }
188
- </script>
189
-
190
- <style scoped>
191
- .p-menubar {
192
- padding: 0.1rem;
193
- border: none;
194
- border-radius: 0;
195
- border-bottom: 1px solid var(--border-color);
196
- }
197
-
198
- .p-menubar
199
- > .p-menubar-root-list
200
- > .p-menubar-item
201
- > .p-menubar-item-content
202
- > .p-menubar-item-link
203
- .p-menubar-submenu-icon {
204
- display: none;
205
- }
206
-
207
- .p-menubar-item-link {
208
- padding: 0.25rem 0.5rem !important;
209
- }
210
-
211
- :deep(.p-menubar-root-list) {
212
- gap: 0.1rem;
213
- }
214
-
215
- :deep(.p-menubar-submenu) {
216
- padding: 0.1rem;
217
- z-index: 10;
218
- }
219
-
220
- .shortcut {
221
- border-color: var(--p-content-border-color);
222
- background: var(--p-content-hover-background);
223
- color: var(--p-text-muted-color);
224
- }
225
- </style>