@owdproject/core 3.1.2 → 3.1.4-beta.0

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 (50) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +9 -10
  3. package/bin/owd.js +14 -14
  4. package/index.ts +5 -2
  5. package/module.ts +64 -55
  6. package/package.json +19 -17
  7. package/project.json +4 -0
  8. package/runtime/components/Core/Application/CoreApplicationRender.vue +6 -5
  9. package/runtime/components/Core/Application/CoreApplicationWindowsRender.vue +8 -8
  10. package/runtime/components/Core/Background/CoreBackground.vue +1 -1
  11. package/runtime/components/Core/Desktop/CoreDesktop.vue +23 -20
  12. package/runtime/components/Core/Explorer/CoreExplorerFile.vue +47 -38
  13. package/runtime/components/Core/Explorer/CoreExplorerFolder.vue +0 -1
  14. package/runtime/components/Core/Time/CoreTime.vue +10 -7
  15. package/runtime/components/Core/Window/CoreWindow.vue +46 -34
  16. package/runtime/components/Core/Window/CoreWindowContent.vue +3 -5
  17. package/runtime/components/Core/Window/CoreWindowNav.vue +12 -7
  18. package/runtime/composables/useApplicationEntries.ts +51 -0
  19. package/runtime/composables/useApplicationManager.ts +3 -3
  20. package/runtime/composables/useClipboardFs.ts +11 -11
  21. package/runtime/composables/useDesktopManager.ts +2 -2
  22. package/runtime/composables/useTerminalManager.ts +3 -3
  23. package/runtime/core/controllers/ApplicationController.ts +211 -200
  24. package/runtime/core/controllers/WindowController.ts +349 -312
  25. package/runtime/core/managers/ApplicationManager.ts +240 -196
  26. package/runtime/core/managers/DesktopManager.ts +35 -25
  27. package/runtime/core/managers/TerminalManager.ts +36 -32
  28. package/runtime/plugins/resize.client.ts +4 -4
  29. package/runtime/stores/storeApplication.ts +235 -0
  30. package/runtime/stores/storeApplicationMeta.ts +12 -8
  31. package/runtime/stores/storeApplicationWindows.ts +16 -12
  32. package/runtime/stores/storeDesktop.ts +33 -29
  33. package/runtime/stores/storeDesktopVolume.ts +12 -12
  34. package/runtime/stores/storeDesktopWindow.ts +13 -13
  35. package/runtime/stores/storeDesktopWorkspace.ts +35 -31
  36. package/runtime/utils/utilApp.ts +27 -22
  37. package/runtime/utils/utilCommon.ts +43 -43
  38. package/runtime/utils/utilDebug.ts +17 -17
  39. package/runtime/utils/utilDesktop.ts +4 -4
  40. package/runtime/utils/utilTerminal.ts +6 -5
  41. package/runtime/utils/utilWindow.ts +11 -11
  42. package/test/fixtures/basic/app.vue +1 -2
  43. package/test/fixtures/basic/nuxt.config.ts +1 -3
  44. package/tsconfig.app.json +1 -1
  45. package/tsconfig.json +1 -1
  46. package/types/index.d.ts +235 -207
  47. package/vitest.config.ts +3 -3
  48. package/.editorconfig +0 -12
  49. package/eslint.config.mjs +0 -30
  50. package/runtime/composables/useAppEntries.ts +0 -36
package/CHANGELOG.md ADDED
@@ -0,0 +1,25 @@
1
+ ## 3.1.4 (2025-05-22)
2
+
3
+ ### 🚀 Features
4
+
5
+ - Allow apps to have a menu ([4bfea74](https://github.com/owdproject/client/commit/4bfea74))
6
+ - Add methods to better handle window changes ([54d1346](https://github.com/owdproject/client/commit/54d1346))
7
+ - Check if owd.config.ts is available and valid ([4920302](https://github.com/owdproject/client/commit/4920302))
8
+ - Add fit-parent to CoreWindow.vue ([59e068c](https://github.com/owdproject/client/commit/59e068c))
9
+ - Add focus() to WindowController and set methods as public (deprecate actions) ([710f7be](https://github.com/owdproject/client/commit/710f7be))
10
+ - Add owd global command ([f98c74c](https://github.com/owdproject/client/commit/f98c74c))
11
+ - Add useClipboardFs.ts composable ([cf934f4](https://github.com/owdproject/client/commit/cf934f4))
12
+ - Add window utils in ApplicationController.ts ([ffc97d0](https://github.com/owdproject/client/commit/ffc97d0))
13
+ - Export most used functions from core ([6635af7](https://github.com/owdproject/client/commit/6635af7))
14
+ - Merge owd.config.ts with nuxt.config.ts in module.ts ([069243c](https://github.com/owdproject/client/commit/069243c))
15
+ - Implement basic owd.config.ts ([d052552](https://github.com/owdproject/client/commit/d052552))
16
+ - Rewrite project ([cbbd45d](https://github.com/owdproject/client/commit/cbbd45d))
17
+
18
+ ### 🩹 Fixes
19
+
20
+ - Add key on CoreApplicationWindowsRender v-for ([d2e8e3c](https://github.com/owdproject/client/commit/d2e8e3c))
21
+ - Check if entries property is set before normalizing in utilApp.ts ([6092c33](https://github.com/owdproject/client/commit/6092c33))
22
+ - Add missing min-width ([aa0c1b5](https://github.com/owdproject/client/commit/aa0c1b5))
23
+ - Minor improvements ([7f79208](https://github.com/owdproject/client/commit/7f79208))
24
+ - Fix imports ([44740cd](https://github.com/owdproject/client/commit/44740cd))
25
+ - Set window starting positionZ to 0 ([b99352e](https://github.com/owdproject/client/commit/b99352e))
package/README.md CHANGED
@@ -14,7 +14,6 @@ Open Web Desktop (OWD) is a framework designed to provide a simple environment f
14
14
 
15
15
  ## Features
16
16
 
17
- - Open-source web desktop environment built with Nuxt.js
18
17
  - Fully extendable through themes, apps, and modules
19
18
  - Bundled with popular Vue.js libraries like Pinia and VueUse
20
19
  - Designed to make the most of the Nuxt.js ecosystem
@@ -48,37 +47,37 @@ Thanks to Tailwind and PrimeVue, you can create custom themes from scratch and e
48
47
 
49
48
  [Applications](https://github.com/topics/owd-apps) · [Modules](https://github.com/topics/owd-modules) · [Themes](https://github.com/topics/owd-themes)
50
49
 
51
- ### 🧩 Install an application
50
+ ### 🧩 Install an app
52
51
 
53
- You can discover new apps by searching for the [owd-apps](https://github.com/topics/owd-apps) tag on GitHub.
52
+ Discover apps by searching the [owd-apps](https://github.com/topics/owd-apps) tag on GitHub.
54
53
 
55
54
  For example, to install the To-do app:
56
55
 
57
56
  ```bash
58
- nx run desktop:install-app --name=@owdproject/app-todo
57
+ owd install-app @owdproject/app-todo
59
58
  ```
60
59
 
61
60
  This will install the package and automatically register it in your desktop configuration.
62
61
 
63
62
  ### 🧩 Install a module
64
63
 
65
- You can discover new modules by searching for the [owd-modules](https://github.com/topics/owd-modules) tag on GitHub.
64
+ Discover modules by searching the [owd-modules](https://github.com/topics/owd-modules) tag on GitHub.
66
65
 
67
66
  For example, to install the session persistence module:
68
67
 
69
68
  ```bash
70
- nx run desktop:install-module --name=@owdproject/module-pinia-localforage
69
+ owd install-module @owdproject/module-pinia-localforage
71
70
  ```
72
71
 
73
- ### 🖥️ Themes
72
+ ### 🖥️ Install a theme
74
73
 
75
- Themes are full desktop environments that style all UI components independently using [PrimeVue](https://primevue.org/).
74
+ Themes are full desktop environments that style all UI components independently, using [PrimeVue](https://primevue.org/).
76
75
  Each theme provides a unique look and feel while maintaining consistent functionality across all applications.
77
76
 
78
- You can discover new themes by searching for the [owd-themes](https://github.com/topics/owd-themes) tag on GitHub.
77
+ Discover themes by searching the [owd-themes](https://github.com/topics/owd-themes) tag on GitHub.
79
78
 
80
79
  ```bash
81
- nx run desktop:install-theme --name=@owdproject/theme-gnome
80
+ owd install-theme @owdproject/theme-gnome
82
81
  ```
83
82
 
84
83
  ## Sponsors
package/bin/owd.js CHANGED
@@ -1,28 +1,28 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { spawn } from 'child_process';
3
+ import { spawn } from 'child_process'
4
4
 
5
- const [, , cmd, pkgName, ...rest] = process.argv;
5
+ const [, , cmd, pkgName, ...rest] = process.argv
6
6
 
7
7
  const commandMap = {
8
- "install-app": "desktop:install-app",
9
- "install-module": "desktop:install-module",
10
- "install-theme": "desktop:install-theme",
11
- };
8
+ 'install-app': 'desktop:install-app',
9
+ 'install-module': 'desktop:install-module',
10
+ 'install-theme': 'desktop:install-theme',
11
+ }
12
12
 
13
13
  if (!commandMap[cmd]) {
14
- console.error(`Unknown command: ${cmd}`);
15
- process.exit(1);
14
+ console.error(`Unknown command: ${cmd}`)
15
+ process.exit(1)
16
16
  }
17
17
 
18
18
  if (!pkgName) {
19
- console.error("Missing package name (e.g., @owdproject/package)");
20
- process.exit(1);
19
+ console.error('Missing package name (e.g., @owdproject/package)')
20
+ process.exit(1)
21
21
  }
22
22
 
23
- const nxArgs = ["run", commandMap[cmd], `--name=${pkgName}`, ...rest];
23
+ const nxArgs = ['run', commandMap[cmd], `--name=${pkgName}`, ...rest]
24
24
 
25
- const child = spawn("pnpm", ["nx", ...nxArgs], {
26
- stdio: "inherit",
25
+ const child = spawn('pnpm', ['nx', ...nxArgs], {
26
+ stdio: 'inherit',
27
27
  shell: true,
28
- });
28
+ })
package/index.ts CHANGED
@@ -1,2 +1,5 @@
1
- export { defineDesktopApp, defineDesktopConfig } from "./runtime/utils/utilDesktop"
2
- export { registerTailwindPath } from "./runtime/utils/utilApp"
1
+ export {
2
+ defineDesktopApp,
3
+ defineDesktopConfig,
4
+ } from './runtime/utils/utilDesktop'
5
+ export { registerTailwindPath } from './runtime/utils/utilApp'
package/module.ts CHANGED
@@ -1,23 +1,53 @@
1
- import {defineNuxtModule, createResolver, addComponentsDir, addImportsDir, installModule, addPlugin} from '@nuxt/kit'
2
- import {deepMerge} from './runtime/utils/utilCommon'
1
+ import {
2
+ defineNuxtModule,
3
+ createResolver,
4
+ addComponentsDir,
5
+ addImportsDir,
6
+ installModule,
7
+ addPlugin
8
+ } from '@nuxt/kit'
9
+ import { deepMerge } from './runtime/utils/utilCommon'
3
10
  import pkg from './package.json'
4
11
 
5
12
  export default defineNuxtModule({
6
13
  meta: {
7
14
  name: 'owd-core',
15
+ configKey: 'owd'
16
+ },
17
+ defaults: {
18
+ theme: '@owdproject/theme-win95',
19
+ apps: [],
20
+ modules: [],
8
21
  },
9
22
  async setup(_options, _nuxt) {
10
- const {resolve} = createResolver(import.meta.url)
23
+ const { resolve } = createResolver(import.meta.url)
24
+
25
+ _nuxt.options.runtimeConfig.public.desktop = {}
11
26
 
12
27
  // get open web desktop config
13
28
 
14
- const desktopConfig = (await import(_nuxt.options.rootDir + '/owd.config.ts')).default
29
+ let clientConfig
30
+
31
+ try {
32
+
33
+ clientConfig = (
34
+ await import(_nuxt.options.rootDir + '/owd.config.ts')
35
+ ).default
36
+
37
+ } catch (e) {
38
+ console.error('/desktop/owd.config.ts not found or invalid')
39
+ return
40
+ }
41
+
42
+ if (!clientConfig.theme) {
43
+ clientConfig.theme = '@owdproject/theme-win95'
44
+ }
15
45
 
16
46
  // extend nuxt.config.ts with owd.config.ts
17
47
 
18
48
  _nuxt.options = {
19
49
  ..._nuxt.options,
20
- ...desktopConfig,
50
+ ...clientConfig
21
51
  }
22
52
 
23
53
  // set core version to runtime config
@@ -25,25 +55,24 @@ export default defineNuxtModule({
25
55
  _nuxt.options.runtimeConfig.public.coreVersion = pkg.version
26
56
 
27
57
  {
28
-
29
58
  // install open web desktop theme
30
59
 
31
- if (desktopConfig.theme) {
32
- await installModule(desktopConfig.theme)
60
+ if (clientConfig.theme) {
61
+ await installModule(clientConfig.theme)
33
62
  }
34
63
 
35
64
  // install open web desktop modules
36
65
 
37
- if (desktopConfig.modules) {
38
- for (const modulePath of desktopConfig.modules) {
66
+ if (clientConfig.modules && Array.isArray(clientConfig.modules)) {
67
+ for (const modulePath of clientConfig.modules) {
39
68
  await installModule(modulePath)
40
69
  }
41
70
  }
42
71
 
43
72
  // install open web desktop apps
44
73
 
45
- if (desktopConfig.apps) {
46
- for (const appPath of desktopConfig.apps) {
74
+ if (clientConfig.apps && Array.isArray(clientConfig.apps)) {
75
+ for (const appPath of clientConfig.apps) {
47
76
  await installModule(appPath)
48
77
  }
49
78
  }
@@ -51,29 +80,27 @@ export default defineNuxtModule({
51
80
  // assign open web desktop config to runtime config
52
81
  _nuxt.options.runtimeConfig.public.desktop = deepMerge(
53
82
  _nuxt.options.runtimeConfig.public.desktop,
54
- desktopConfig
83
+ clientConfig
55
84
  )
56
-
57
85
  }
58
86
 
59
87
  {
60
-
61
88
  // install primevue
62
89
 
63
- _nuxt.options.primevue = _nuxt.options.primevue || {};
64
- _nuxt.options.primevue.options = _nuxt.options.primevue.options || {};
65
- _nuxt.options.primevue.options.theme = _nuxt.options.primevue.options.theme || {};
66
-
67
- await installModule("@primevue/nuxt-module")
90
+ _nuxt.options.primevue = _nuxt.options.primevue || {}
91
+ _nuxt.options.primevue.options = _nuxt.options.primevue.options || {}
92
+ _nuxt.options.primevue.options.theme =
93
+ _nuxt.options.primevue.options.theme || {}
68
94
 
95
+ await installModule('@primevue/nuxt-module')
69
96
  }
70
97
 
71
98
  {
72
-
73
99
  // install tailwind
74
100
 
75
- const tailwindPaths = _nuxt.options.runtimeConfig.app.owd?.tailwindPaths || []
76
- tailwindPaths.push('./runtime/components/**/*.{vue,mjs,ts}') // Aggiungi sempre questo al core
101
+ const tailwindPaths =
102
+ _nuxt.options.runtimeConfig.app.owd?.tailwindPaths || []
103
+ tailwindPaths.push('./runtime/components/**/*.{vue,mjs,ts}') // Aggiungi sempre questo al core
77
104
 
78
105
  _nuxt.options.tailwindcss = _nuxt.options.tailwindcss || {}
79
106
  _nuxt.options.tailwindcss.config = _nuxt.options.tailwindcss.config || {}
@@ -81,92 +108,75 @@ export default defineNuxtModule({
81
108
  _nuxt.options.tailwindcss.config.content = tailwindPaths
82
109
 
83
110
  await installModule('@nuxtjs/tailwindcss', {
84
- viewer: false,
111
+ viewer: false
85
112
  })
86
-
87
113
  }
88
114
 
89
115
  {
90
-
91
116
  // install pinia
92
117
 
93
- await installModule("@pinia/nuxt")
94
-
118
+ await installModule('@pinia/nuxt')
95
119
  }
96
120
 
97
121
  {
98
-
99
122
  // install @nuxt/fonts
100
123
 
101
- await installModule("@nuxt/fonts")
102
-
124
+ await installModule('@nuxt/fonts')
103
125
  }
104
126
 
105
127
  {
106
-
107
128
  // install @nuxt/icon
108
129
 
109
- await installModule("@nuxt/icon", {
130
+ await installModule('@nuxt/icon', {
110
131
  clientBundle: {
111
132
  scan: true,
112
- sizeLimitKb: 256,
113
- },
133
+ sizeLimitKb: 256
134
+ }
114
135
  })
115
-
116
136
  }
117
137
 
118
138
  {
119
-
120
139
  // install @vueuse/nuxt
121
140
 
122
- await installModule("@vueuse/nuxt")
123
-
141
+ await installModule('@vueuse/nuxt')
124
142
  }
125
143
 
126
144
  {
127
-
128
145
  // install @nuxtjs/i18n
129
146
 
130
- await installModule("@nuxtjs/i18n")
131
-
147
+ await installModule('@nuxtjs/i18n')
132
148
  }
133
149
 
134
150
  {
135
-
136
151
  // configure scss for vite
137
152
 
138
153
  _nuxt.hook('vite:extendConfig', (viteConfig) => {
139
154
  viteConfig.css = viteConfig.css || {}
140
- viteConfig.css.preprocessorOptions = viteConfig.css.preprocessorOptions || {}
155
+ viteConfig.css.preprocessorOptions =
156
+ viteConfig.css.preprocessorOptions || {}
141
157
  viteConfig.css.preprocessorOptions.scss = {
142
- api: 'modern-compiler',
158
+ api: 'modern-compiler'
143
159
  }
144
160
  })
145
-
146
161
  }
147
162
 
148
163
  {
149
-
150
164
  // add css
151
165
 
152
166
  _nuxt.options.css.push('sanitize.css')
153
-
154
167
  }
155
168
 
156
169
  {
157
-
158
170
  // add components
159
171
 
160
172
  addComponentsDir({
161
- path: resolve("./runtime/components"),
162
- prefix: "",
163
- global: true,
173
+ path: resolve('./runtime/components'),
174
+ prefix: '',
175
+ global: true
164
176
  })
165
-
166
177
  }
167
178
 
168
179
  {
169
-
170
180
  addPlugin(resolve('./runtime/plugins/resize.client.ts'))
171
181
 
172
182
  // add other files
@@ -175,7 +185,6 @@ export default defineNuxtModule({
175
185
  addImportsDir(resolve('./runtime/core'))
176
186
  addImportsDir(resolve('./runtime/stores'))
177
187
  addImportsDir(resolve('./runtime/utils'))
178
-
179
188
  }
180
189
  }
181
190
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owdproject/core",
3
- "version": "3.1.2",
3
+ "version": "3.1.4-beta.0",
4
4
  "keywords": [
5
5
  "web",
6
6
  "desktop",
@@ -25,27 +25,29 @@
25
25
  "type": "module",
26
26
  "types": "types/index.d.ts",
27
27
  "bin": {
28
- "owd": "./bin/owd.js"
28
+ "owd": "bin/owd.js"
29
29
  },
30
30
  "dependencies": {
31
- "@nuxt/kit": "^3.17.2",
32
- "@nuxt/fonts": "^0.11.3",
33
- "@nuxt/icon": "^1.12.0",
34
- "@nuxtjs/i18n": "^9.5.4",
31
+ "@nuxt/fonts": "^0.11.4",
32
+ "@nuxt/icon": "^1.14.0",
33
+ "@nuxt/kit": "^3.17.5",
34
+ "@nuxtjs/i18n": "^9.5.5",
35
35
  "@nuxtjs/tailwindcss": "^6.14.0",
36
- "@pinia/nuxt": "^0.11.0",
37
- "@primeuix/themes": "^1.1.1",
38
- "@primevue/forms": "^4.3.4",
39
- "@primevue/nuxt-module": "^4.3.4",
40
- "@vueuse/components": "^13.1.0",
41
- "@vueuse/core": "^13.1.0",
42
- "@vueuse/nuxt": "^13.1.0",
36
+ "@pinia/nuxt": "^0.11.1",
37
+ "@primeuix/themes": "^1.1.2",
38
+ "@primevue/forms": "^4.3.5",
39
+ "@primevue/nuxt-module": "^4.3.5",
40
+ "@vueuse/components": "^13.4.0",
41
+ "@vueuse/core": "^13.4.0",
42
+ "@vueuse/nuxt": "^13.4.0",
43
43
  "mitt": "^3.0.1",
44
44
  "nanoid": "^5.1.5",
45
- "nuxt": "^3.17.2",
46
- "pinia": "^3.0.2",
45
+ "nuxt": "^3.17.5",
46
+ "pinia": "^3.0.3",
47
47
  "sanitize.css": "^13.0.0",
48
- "sass": "^1.88.0",
49
- "vue-resizable": "^2.1.7"
48
+ "sass": "^1.89.2",
49
+ "shellwords": "^1.0.1",
50
+ "vue-resizable": "^2.1.7",
51
+ "yargs-parser": "^22.0.0"
50
52
  }
51
53
  }
package/project.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "name": "core",
3
+ "version": "3.1.3"
4
+ }
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import {useApplicationManager} from "../../../composables/useApplicationManager"
2
+ import { useApplicationManager } from '../../../composables/useApplicationManager'
3
3
 
4
4
  defineProps<{
5
5
  workspaceFilter?: string
@@ -10,8 +10,9 @@ const applicationManager = useApplicationManager()
10
10
 
11
11
  <template>
12
12
  <CoreApplicationWindowsRender
13
- v-for="app of applicationManager.appsRunning"
14
- :workspace-filter="workspaceFilter"
15
- :windows="app.windowsOpened"
13
+ v-for="app of applicationManager.appsRunning"
14
+ :key="app.id"
15
+ :workspace-filter="workspaceFilter"
16
+ :windows="app.windowsOpened"
16
17
  />
17
- </template>
18
+ </template>
@@ -6,14 +6,14 @@ defineProps<{
6
6
  </script>
7
7
 
8
8
  <template>
9
- <template
10
- v-for="[windowId, window] in windows"
11
- :key="windowId"
12
- >
9
+ <template v-for="[windowId, window] in windows" :key="windowId">
13
10
  <component
14
- v-if="!workspaceFilter || (workspaceFilter && window.state.workspace === workspaceFilter)"
15
- :window="window"
16
- :is="window.config.component"
11
+ v-if="
12
+ !workspaceFilter ||
13
+ (workspaceFilter && window.state.workspace === workspaceFilter)
14
+ "
15
+ :window="window"
16
+ :is="window.config.component"
17
17
  />
18
18
  </template>
19
- </template>
19
+ </template>
@@ -13,4 +13,4 @@
13
13
  bottom: 0;
14
14
  background-color: var(--owd-background-color);
15
15
  }
16
- </style>
16
+ </style>
@@ -1,25 +1,28 @@
1
1
  <script setup lang="ts">
2
- import {onMounted, onUnmounted} from "vue"
3
- import {useRuntimeConfig} from "nuxt/app"
4
- import {computed, toRaw} from "@vue/reactivity"
5
- import {useDesktopManager} from "../../../composables/useDesktopManager"
6
- import {useApplicationManager} from "../../../composables/useApplicationManager"
7
- import {useDesktopStore} from "../../../stores/storeDesktop"
8
- import {useDesktopWorkspaceStore} from "../../../stores/storeDesktopWorkspace"
2
+ import { onMounted, onUnmounted } from 'vue'
3
+ import { useRuntimeConfig } from 'nuxt/app'
4
+ import { computed, toRaw } from '@vue/reactivity'
5
+ import { useDesktopManager } from '../../../composables/useDesktopManager'
6
+ import { useApplicationManager } from '../../../composables/useApplicationManager'
7
+ import { useDesktopStore } from '../../../stores/storeDesktop'
8
+ import { useDesktopWorkspaceStore } from '../../../stores/storeDesktopWorkspace'
9
9
 
10
- const props = withDefaults(defineProps<{
11
- windows?: DesktopWindowsConfig
12
- systemBar?: DesktopSystemBarConfig
13
- dockBar?: DesktopDockBarConfig
14
- workspaces?: DesktopWorkspacesConfig
15
- }>(), {
16
- windows: {
17
- position: 'fixed',
10
+ const props = withDefaults(
11
+ defineProps<{
12
+ windows?: DesktopWindowsConfig
13
+ systemBar?: DesktopSystemBarConfig
14
+ dockBar?: DesktopDockBarConfig
15
+ workspaces?: DesktopWorkspacesConfig
16
+ }>(),
17
+ {
18
+ windows: {
19
+ position: 'fixed',
20
+ },
21
+ systemBar: {},
22
+ dockBar: {},
23
+ workspaces: {},
18
24
  },
19
- systemBar: {},
20
- dockBar: {},
21
- workspaces: {},
22
- })
25
+ )
23
26
 
24
27
  // todo move to owd initialization
25
28
 
@@ -70,7 +73,7 @@ const classes = computed(() => {
70
73
 
71
74
  <template>
72
75
  <div :class="classes">
73
- <slot/>
76
+ <slot />
74
77
  </div>
75
78
  </template>
76
79
 
@@ -1,6 +1,16 @@
1
1
  <template>
2
- <li :class="['owd-explorer-file', { 'owd-explorer-file--inactive': props.inactive }]">
3
- <a :href="props.url" :target="props.target" :title="props.title" @click="props.fn">
2
+ <li
3
+ :class="[
4
+ 'owd-explorer-file',
5
+ { 'owd-explorer-file--inactive': props.inactive },
6
+ ]"
7
+ >
8
+ <a
9
+ :href="props.url"
10
+ :target="props.target"
11
+ :title="props.title"
12
+ @click="props.fn"
13
+ >
4
14
  <img :src="props.icon" :alt="props.title" />
5
15
  <div class="owd-explorer-file__name" v-html="props.name" />
6
16
  </a>
@@ -19,49 +29,48 @@ const props = defineProps<{
19
29
  </script>
20
30
 
21
31
  <style scoped lang="scss">
22
- li.file {
23
- width: 100px;
24
- margin: 0 5px 5px 0;
25
- text-align: center;
26
- float: left;
27
- border-radius: 2px;
28
- border: 1px solid rgba(0, 0, 0, 0);
32
+ li.file {
33
+ width: 100px;
34
+ margin: 0 5px 5px 0;
35
+ text-align: center;
36
+ float: left;
37
+ border-radius: 2px;
38
+ border: 1px solid rgba(0, 0, 0, 0);
29
39
 
30
- @media(max-width: 480px) {
31
- margin-right: 0;
32
- }
33
-
34
- @media(min-width: 480px) {
35
- &:not(.inactive):hover {
40
+ @media (max-width: 480px) {
41
+ margin-right: 0;
42
+ }
36
43
 
37
- }
44
+ @media (min-width: 480px) {
45
+ &:not(.inactive):hover {
38
46
  }
47
+ }
39
48
 
40
- &.inactive {
41
- filter: grayscale(100%);
42
- opacity: 0.2;
43
- }
49
+ &.inactive {
50
+ filter: grayscale(100%);
51
+ opacity: 0.2;
52
+ }
44
53
 
45
- a {
46
- display: block;
47
- color: #CCC;
48
- text-decoration: none;
49
- transition: color 0.15s ease-in-out;
50
- padding: 10px 0;
54
+ a {
55
+ display: block;
56
+ color: #ccc;
57
+ text-decoration: none;
58
+ transition: color 0.15s ease-in-out;
59
+ padding: 10px 0;
51
60
 
52
- img {
53
- vertical-align: middle;
54
- height: 32px;
55
- border-radius: 2px;
56
- }
61
+ img {
62
+ vertical-align: middle;
63
+ height: 32px;
64
+ border-radius: 2px;
65
+ }
57
66
 
58
- div.name {
59
- font-size: 12px;
60
- letter-spacing: -0.2px;
61
- line-height: 10px;
62
- margin-top: 10px;
63
- cursor: pointer;
64
- }
67
+ div.name {
68
+ font-size: 12px;
69
+ letter-spacing: -0.2px;
70
+ line-height: 10px;
71
+ margin-top: 10px;
72
+ cursor: pointer;
65
73
  }
66
74
  }
75
+ }
67
76
  </style>
@@ -6,6 +6,5 @@
6
6
 
7
7
  <style scoped lang="scss">
8
8
  .owd-explorer-folder {
9
-
10
9
  }
11
10
  </style>