@niyamulahsan/create-deskapp 1.2.5 → 1.2.6
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/package.json +1 -1
- package/template/.env.example +20 -13
- package/template/AGENTS.md +699 -0
- package/template/package.json +3 -0
- package/template/src/config/app.ts +26 -24
- package/template/src/config/winsetup.ts +93 -91
- package/template/src/core/api/binding-error.ts +57 -0
- package/template/src/core/api/bindings.generated.ts +2 -0
- package/template/src/core/api/generate.manifest.ts +84 -80
- package/template/src/core/api/registry.ts +58 -48
- package/template/src/core/config.ts +101 -99
- package/template/src/core/database/aggregate.ts +89 -85
- package/template/src/core/database/config.ts +50 -48
- package/template/src/core/database/connection.ts +116 -114
- package/template/src/core/database/migrate-hooks.ts +86 -84
- package/template/src/core/database/paginate.ts +226 -224
- package/template/src/core/database/reset.ts +21 -19
- package/template/src/core/database/seed.ts +169 -167
- package/template/src/core/database/status.ts +37 -35
- package/template/src/core/env.ts +108 -106
- package/template/src/core/facade.ts +63 -61
- package/template/src/core/maker/db/fresh.ts +10 -8
- package/template/src/core/maker/db/generate.ts +13 -11
- package/template/src/core/maker/db/helpers.ts +92 -96
- package/template/src/core/maker/db/migrate.ts +37 -35
- package/template/src/core/maker/db/mod.ts +93 -91
- package/template/src/core/maker/db/module-migrate.ts +56 -54
- package/template/src/core/maker/db/push.ts +23 -21
- package/template/src/core/maker/db/reset.ts +8 -6
- package/template/src/core/maker/db/seed.ts +9 -7
- package/template/src/core/maker/db/status.ts +8 -6
- package/template/src/core/maker/help.ts +59 -57
- package/template/src/core/maker/make/controller.ts +25 -22
- package/template/src/core/maker/make/helpers.ts +97 -91
- package/template/src/core/maker/make/mod.ts +69 -67
- package/template/src/core/maker/make/model.ts +16 -14
- package/template/src/core/maker/make/module.ts +53 -39
- package/template/src/core/maker/make/seeder.ts +23 -21
- package/template/src/core/maker/make/test.ts +33 -30
- package/template/src/core/maker/mod.ts +85 -83
- package/template/src/core/maker/run/mod.ts +134 -132
- package/template/src/core/maker/stub.ts +26 -24
- package/template/src/core/maker/stubs/controller/controller.controller.stub +57 -55
- package/template/src/core/maker/stubs/controller/controller.schema.stub +18 -13
- package/template/src/core/maker/stubs/facade/facade.stub +21 -0
- package/template/src/core/maker/stubs/model/model.stub +10 -8
- package/template/src/core/maker/stubs/seeder/seeder.stub +18 -16
- package/template/src/core/maker/stubs/test/test.stub +9 -7
- package/template/src/core/maker/sync-config.ts +93 -94
- package/template/src/core/utils/password.ts +29 -27
- package/template/src/core/utils/playwright.ts +123 -121
- package/template/src/core/utils/queue.ts +68 -66
- package/template/src/core/utils/scheduler.ts +62 -60
- package/template/src/core/utils/storage.ts +3 -1
- package/template/src/core/utils/validation.ts +37 -35
- package/template/src/database/schema.ts +2 -0
- package/template/src/main.ts +120 -118
- package/template/src/modules/app/__tests__/demo.controller.test.ts +75 -0
- package/template/src/modules/app/__tests__/net.controller.test.ts +65 -0
- package/template/src/modules/app/__tests__/playwright.controller.test.ts +50 -0
- package/template/src/modules/app/__tests__/storage.controller.test.ts +114 -0
- package/template/src/modules/app/__tests__/window.controller.test.ts +98 -0
- package/template/src/modules/app/controllers/demo.controller.ts +120 -118
- package/template/src/modules/app/controllers/net.controller.ts +50 -48
- package/template/src/modules/app/controllers/playwright.controller.ts +142 -140
- package/template/src/modules/app/controllers/storage.controller.ts +231 -229
- package/template/src/modules/app/controllers/window.controller.ts +2 -0
- package/template/src/modules/app/facade.ts +21 -0
- package/template/src/preload.ts +25 -2
- package/template/src/ui/src/App.vue +4 -2
- package/template/src/ui/src/app.ts +38 -23
- package/template/src/ui/src/bindings.d.ts +18 -16
- package/template/src/ui/src/components/Button.vue +34 -32
- package/template/src/ui/src/components/Checkbox.vue +26 -29
- package/template/src/ui/src/components/Input.vue +221 -227
- package/template/src/ui/src/components/InputGroup.vue +141 -0
- package/template/src/ui/src/components/InputPasswordToggle.vue +204 -0
- package/template/src/ui/src/components/Modal.vue +65 -55
- package/template/src/ui/src/components/Spinner.vue +44 -42
- package/template/src/ui/src/components/Switch.vue +62 -65
- package/template/src/ui/src/components/TextArea.vue +108 -121
- package/template/src/ui/src/components/Toast.vue +55 -56
- package/template/src/ui/src/components/datatable/DataTableSkeleton.vue +100 -98
- package/template/src/ui/src/components/datatable/Pagination.vue +153 -125
- package/template/src/ui/src/components/datatable/SelectOpption.vue +36 -35
- package/template/src/ui/src/components/datatable/index.vue +336 -258
- package/template/src/ui/src/env.d.ts +16 -13
- package/template/src/ui/src/global.d.ts +21 -2
- package/template/src/ui/src/helpers/nformatter.ts +12 -10
- package/template/src/ui/src/pages/dashboard/index.vue +690 -687
- package/template/src/ui/src/plugins/browserDetect.ts +57 -0
- package/template/src/ui/src/plugins/gum.ts +576 -549
- package/template/src/ui/src/plugins/pulse.ts +2 -0
- package/template/src/ui/src/plugins/routeProgress.ts +89 -0
- package/template/src/ui/src/router/index.ts +44 -25
- package/template/src/ui/src/stores/example.ts +2 -0
- package/template/src/ui/vite.config.ts +40 -38
- package/template/src/window/app-menu.ts +89 -87
- package/template/src/window/config.ts +14 -12
- package/template/src/window/context-menu.ts +23 -21
- package/template/src/window/dialogs.ts +92 -90
- package/template/src/window/manager.ts +2 -0
- package/template/src/window/native.ts +47 -45
- package/template/src/window/tray.ts +132 -130
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// ./src/ui/src/plugins/browserDetect.ts
|
|
2
|
+
|
|
3
|
+
import type { App, ComputedRef } from "vue";
|
|
4
|
+
import { computed } from "vue";
|
|
5
|
+
|
|
6
|
+
export type BrowserDetectResult = {
|
|
7
|
+
userAgent: string;
|
|
8
|
+
isFirefox: ComputedRef<boolean>;
|
|
9
|
+
isChrome: ComputedRef<boolean>;
|
|
10
|
+
isSafari: ComputedRef<boolean>;
|
|
11
|
+
isEdge: ComputedRef<boolean>;
|
|
12
|
+
isOpera: ComputedRef<boolean>;
|
|
13
|
+
isBrave: ComputedRef<boolean>;
|
|
14
|
+
isAndroid: ComputedRef<boolean>;
|
|
15
|
+
isIOS: ComputedRef<boolean>;
|
|
16
|
+
isWindows: ComputedRef<boolean>;
|
|
17
|
+
isMac: ComputedRef<boolean>;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const userAgent = typeof navigator !== "undefined" ? navigator.userAgent.toLowerCase() : "";
|
|
21
|
+
|
|
22
|
+
const isFirefoxRaw = userAgent.includes("firefox");
|
|
23
|
+
const isEdgeRaw = userAgent.includes("edg");
|
|
24
|
+
const isOperaRaw = userAgent.includes("opr") || userAgent.includes("opera");
|
|
25
|
+
const isBraveRaw = userAgent.includes("brave");
|
|
26
|
+
const isChromeRaw = userAgent.includes("chrome") && !isEdgeRaw && !isOperaRaw && !isBraveRaw;
|
|
27
|
+
const isAndroidRaw = userAgent.includes("android");
|
|
28
|
+
const isSafariRaw = userAgent.includes("safari") && !isChromeRaw && !isAndroidRaw;
|
|
29
|
+
const isIOSRaw = /iphone|ipad|ipod/.test(userAgent);
|
|
30
|
+
const isWindowsRaw = userAgent.includes("windows");
|
|
31
|
+
const isMacRaw = userAgent.includes("macintosh");
|
|
32
|
+
|
|
33
|
+
export const browserDetect: BrowserDetectResult = {
|
|
34
|
+
userAgent,
|
|
35
|
+
isFirefox: computed(() => isFirefoxRaw),
|
|
36
|
+
isChrome: computed(() => isChromeRaw),
|
|
37
|
+
isSafari: computed(() => isSafariRaw),
|
|
38
|
+
isEdge: computed(() => isEdgeRaw),
|
|
39
|
+
isOpera: computed(() => isOperaRaw),
|
|
40
|
+
isBrave: computed(() => isBraveRaw),
|
|
41
|
+
isAndroid: computed(() => isAndroidRaw),
|
|
42
|
+
isIOS: computed(() => isIOSRaw),
|
|
43
|
+
isWindows: computed(() => isWindowsRaw),
|
|
44
|
+
isMac: computed(() => isMacRaw)
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const BrowserDetectPlugin = {
|
|
48
|
+
install(app: App) {
|
|
49
|
+
app.config.globalProperties.$browserDetect = browserDetect;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
declare module "vue" {
|
|
54
|
+
interface ComponentCustomProperties {
|
|
55
|
+
$browserDetect: BrowserDetectResult;
|
|
56
|
+
}
|
|
57
|
+
}
|