@owdproject/core 3.0.0-alpha.3 → 3.0.0-alpha.4
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/LICENSE +3 -3
- package/README.md +4 -5
- package/index.ts +24 -6
- package/package.json +1 -1
- package/runtime/components/Core/Desktop/CoreDesktop.vue +2 -5
- package/runtime/core/controllers/ApplicationController.ts +1 -1
- package/runtime/core/managers/ApplicationManager.ts +0 -11
- package/runtime/core/managers/DesktopManager.ts +0 -5
- package/runtime/utils/utilsDesktop.ts +1 -0
- package/types/owd.d.ts +3 -4
package/LICENSE
CHANGED
|
@@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively
|
|
|
631
631
|
state the exclusion of warranty; and each file should have at least
|
|
632
632
|
the "copyright" line and a pointer to where the full notice is found.
|
|
633
633
|
|
|
634
|
-
Open Web Desktop -
|
|
635
|
-
Copyright (C) 2025
|
|
634
|
+
Open Web Desktop - Build Your Web OS
|
|
635
|
+
Copyright (C) 2025 github.com/owdproject
|
|
636
636
|
|
|
637
637
|
This program is free software: you can redistribute it and/or modify
|
|
638
638
|
it under the terms of the GNU General Public License as published by
|
|
@@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
|
|
|
652
652
|
If the program does terminal interaction, make it output a short
|
|
653
653
|
notice like this when it starts in an interactive mode:
|
|
654
654
|
|
|
655
|
-
Open Web Desktop Copyright (C) 2025 Open Web Desktop Team
|
|
655
|
+
Open Web Desktop ~ Copyright (C) 2025 ~ Open Web Desktop Team
|
|
656
656
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
|
657
657
|
This is free software, and you are welcome to redistribute it
|
|
658
658
|
under certain conditions; type `show c' for details.
|
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img width="160" height="160" alt="
|
|
2
|
+
<img width="160" height="160" alt="Open Web Desktop logo" src="https://avatars.githubusercontent.com/u/65117737?s=160&v=4" />
|
|
3
3
|
</p>
|
|
4
4
|
<h1 align="center">Open Web Desktop</h1>
|
|
5
5
|
<h3 align="center">
|
|
6
|
-
A framework for building web-based desktop experiences
|
|
6
|
+
A framework for building web-based desktop experiences
|
|
7
7
|
</h3>
|
|
8
8
|
|
|
9
9
|
## Overview
|
|
@@ -106,8 +106,7 @@ If you'd like to contribute, here's how to set up your local development environ
|
|
|
106
106
|
|
|
107
107
|
**Cloning the Repository:**
|
|
108
108
|
|
|
109
|
-
To contribute, start by forking the Open Web Desktop client repository on GitHub.
|
|
110
|
-
|
|
109
|
+
To contribute, start by forking the Open Web Desktop client repository on GitHub.
|
|
111
110
|
Then, clone your fork using HTTPS or SSH:
|
|
112
111
|
|
|
113
112
|
```bash
|
|
@@ -137,4 +136,4 @@ Open Web Desktop is a vast project. The code has been totally rewritten and is n
|
|
|
137
136
|
|
|
138
137
|
### License
|
|
139
138
|
|
|
140
|
-
Open Web Desktop is
|
|
139
|
+
Open Web Desktop is released under the [GNU General Public License v3](LICENSE).
|
package/index.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import {defineNuxtModule, createResolver, addComponentsDir, addImportsDir, installModule} from '@nuxt/kit'
|
|
2
|
-
import
|
|
2
|
+
import {useDesktopManager} from './runtime/composables/useDesktopManager'
|
|
3
|
+
import pkg from './package.json'
|
|
3
4
|
|
|
4
5
|
export default defineNuxtModule({
|
|
5
6
|
meta: {
|
|
6
7
|
name: 'owd-core',
|
|
7
8
|
},
|
|
8
9
|
async setup(options, nuxt) {
|
|
9
|
-
const {resolve} = createResolver(import.meta.url)
|
|
10
|
+
const {resolve} = createResolver(import.meta.url)
|
|
11
|
+
const desktopManager = useDesktopManager()
|
|
12
|
+
|
|
13
|
+
await import(nuxt.options.rootDir + '/owd.config.ts')
|
|
10
14
|
|
|
11
15
|
// set core version to runtime variables
|
|
12
16
|
|
|
@@ -18,11 +22,22 @@ export default defineNuxtModule({
|
|
|
18
22
|
nuxt.options.primevue.options = nuxt.options.primevue.options || {};
|
|
19
23
|
nuxt.options.primevue.options.theme = nuxt.options.primevue.options.theme || {};
|
|
20
24
|
|
|
25
|
+
{
|
|
26
|
+
|
|
27
|
+
// install open web desktop apps
|
|
28
|
+
|
|
29
|
+
if (desktopManager.config.apps) {
|
|
30
|
+
for (const appPath of desktopManager.config.apps) {
|
|
31
|
+
await installModule(appPath)
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
}
|
|
36
|
+
|
|
21
37
|
{
|
|
22
38
|
|
|
23
39
|
// install tailwind
|
|
24
40
|
|
|
25
|
-
nuxt.options.modules.push('@nuxtjs/tailwindcss')
|
|
26
41
|
await installModule("@nuxtjs/tailwindcss", {
|
|
27
42
|
viewer: false,
|
|
28
43
|
})
|
|
@@ -112,7 +127,7 @@ export default defineNuxtModule({
|
|
|
112
127
|
|
|
113
128
|
{
|
|
114
129
|
|
|
115
|
-
// add
|
|
130
|
+
// add components
|
|
116
131
|
|
|
117
132
|
addComponentsDir({
|
|
118
133
|
path: resolve("./runtime/components"),
|
|
@@ -124,6 +139,8 @@ export default defineNuxtModule({
|
|
|
124
139
|
|
|
125
140
|
{
|
|
126
141
|
|
|
142
|
+
// install plugins
|
|
143
|
+
|
|
127
144
|
nuxt.options.plugins.push(
|
|
128
145
|
resolve('./runtime/plugins/resize.client.ts'),
|
|
129
146
|
)
|
|
@@ -134,10 +151,10 @@ export default defineNuxtModule({
|
|
|
134
151
|
addImportsDir(resolve('./runtime/utils'))
|
|
135
152
|
|
|
136
153
|
}
|
|
137
|
-
|
|
138
154
|
}
|
|
139
155
|
})
|
|
140
156
|
|
|
157
|
+
/*
|
|
141
158
|
export * from './runtime/composables/useAppEntries'
|
|
142
159
|
export * from './runtime/composables/useApplicationManager'
|
|
143
160
|
export * from './runtime/composables/useApplicationState'
|
|
@@ -152,4 +169,5 @@ export * from './runtime/utils/utilsWindow'
|
|
|
152
169
|
export * from './runtime/stores/storeDesktop'
|
|
153
170
|
export * from './runtime/stores/storeDesktopVolume'
|
|
154
171
|
export * from './runtime/stores/storeDesktopWindow'
|
|
155
|
-
export * from './runtime/stores/storeDesktopWorkspace'
|
|
172
|
+
export * from './runtime/stores/storeDesktopWorkspace'
|
|
173
|
+
*/
|
package/package.json
CHANGED
|
@@ -34,15 +34,12 @@ if (desktopStore.$persistedState) {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
// override desktop configurations
|
|
37
|
-
desktopManager.
|
|
37
|
+
desktopManager.setConfig({
|
|
38
38
|
windows: toRaw(props.windows),
|
|
39
|
-
systemBar: toRaw(props.systemBar),
|
|
39
|
+
systemBar: toRaw( props.systemBar),
|
|
40
40
|
dockBar: toRaw(props.dockBar),
|
|
41
41
|
})
|
|
42
42
|
|
|
43
|
-
// define apps and restore statuses
|
|
44
|
-
applicationManager.importApps()
|
|
45
|
-
|
|
46
43
|
// desktop resize
|
|
47
44
|
// todo move to composable
|
|
48
45
|
|
|
@@ -44,7 +44,7 @@ export class ApplicationController implements IApplicationController {
|
|
|
44
44
|
this.config.entries[this.config.provides.entry] as ApplicationEntry
|
|
45
45
|
)
|
|
46
46
|
|
|
47
|
-
debugLog(`${this.config.title} has been set as predefined app for "${this.config.provides}"`)
|
|
47
|
+
debugLog(`${this.config.title} has been set as predefined app for "${this.config.provides.name}"`)
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -12,17 +12,6 @@ export class ApplicationManager implements IApplicationManager {
|
|
|
12
12
|
constructor() {
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
/**
|
|
16
|
-
* Import applications on nuxt start
|
|
17
|
-
*/
|
|
18
|
-
public async importApps() {
|
|
19
|
-
const {owdConfig} = await import(`~~/owd.config`)
|
|
20
|
-
|
|
21
|
-
if (owdConfig && typeof owdConfig.loader === 'function') {
|
|
22
|
-
await owdConfig.loader()
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
15
|
/**
|
|
27
16
|
* Define new application
|
|
28
17
|
*
|
|
@@ -13,11 +13,6 @@ export class DesktopManager {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
public setConfig(config: DesktopConfig) {
|
|
16
|
-
this.config = config
|
|
17
|
-
this.loadDefaultAppsFromConfig()
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
public overrideConfig(config: Partial<DesktopConfig>) {
|
|
21
16
|
this.config = deepMerge(this.config, config) as DesktopConfig
|
|
22
17
|
this.loadDefaultAppsFromConfig()
|
|
23
18
|
}
|
package/types/owd.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
interface IApplicationManager {
|
|
2
2
|
apps: Map<string, IApplicationController>
|
|
3
3
|
|
|
4
|
-
importApps()
|
|
5
|
-
|
|
6
4
|
get appsEntries(): Reactive<ApplicationEntry[]>
|
|
7
5
|
|
|
8
6
|
get appsRunning(): Reactive<IApplicationController[]>
|
|
@@ -288,8 +286,9 @@ interface IDesktopManager {
|
|
|
288
286
|
}
|
|
289
287
|
|
|
290
288
|
interface DesktopConfig {
|
|
291
|
-
name
|
|
292
|
-
compatibility
|
|
289
|
+
name?: string
|
|
290
|
+
compatibility?: string
|
|
291
|
+
apps?: string[]
|
|
293
292
|
defaultApps?: DefaultAppsConfig
|
|
294
293
|
features?: string[]
|
|
295
294
|
systemBar?: DesktopSystemBarConfig
|