@live-change/frontend-template 0.8.2 → 0.8.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.
@@ -1,16 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const fs = require("fs/promises")
3
+ import fs from "fs/promises"
4
4
 
5
- ;(async () => {
5
+ const packageData = JSON.parse(await fs.readFile(process.argv[2] || "package.json"))
6
6
 
7
- const packageData = JSON.parse(await fs.readFile(process.argv[2] || "package.json"))
7
+ const { dependencies, devDependencies } = packageData
8
8
 
9
- const { dependencies, devDependencies } = packageData
10
-
11
- console.log(JSON.stringify({
12
- dependencies,
13
- devDependencies
14
- }, null, 2))
15
-
16
- })()
9
+ console.log(JSON.stringify({
10
+ dependencies,
11
+ devDependencies
12
+ }, null, 2))
package/front/index.html CHANGED
@@ -9,5 +9,57 @@
9
9
  <!--app-data-->
10
10
  <!--body-tags-->
11
11
  <script type="module" src="/src/entry-client.js"></script>
12
+
13
+ <div>
14
+ <div id="not-supported" style="display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
15
+ z-index: 1000; background-color: black; color: white; font-size: 20px; font-family: sans-serif;
16
+ align-items: center; justify-content: center; overflow-y: auto">
17
+ <div style=" padding: 2em;">
18
+ <h1 style="margin-bottom: 1.23em">Your browser is not supported.</h1>
19
+ <p>We apologize for the inconvenience, but it seems that your current web browser version does not support our web application.</p>
20
+ <p>In order to use our service, you would need to upgrade to, or install, one of the following browsers:</p>
21
+ <ul>
22
+ <li>Microsoft Edge 88 or later</li>
23
+ <li>Mozilla Firefox 78 or later</li>
24
+ <li>Google Chrome 87 or later</li>
25
+ <li>Apple Safari 14 or later</li>
26
+ </ul>
27
+ <p>Please note that our application does not function with older browser versions. We've optimized our service for the above-mentioned browsers to ensure robust functionality and a smooth user experience.</p>
28
+ <p>If you need assistance with updating your browser or installing a new one, please consult your browser's help documentation or contact your IT support.</p>
29
+ <p>Thank you for your understanding and cooperation. We're eager to deliver a great experience with our web application.</p>
30
+ </div>
31
+ </div>
32
+ </div>
33
+ <script>
34
+ const oses = ['Windows', 'Android', 'Linux', 'iPhone', 'iPad', 'iPod', 'Mac OS']
35
+ const browsers = ['Edg', 'Edge', 'CriOS', 'OPR', 'Chrome', 'SamsungBrowser', 'Firefox', 'Opera', 'Safari']
36
+ const ua = window.navigator.userAgent
37
+ const detected = {}
38
+ for(const browser of browsers) {
39
+ const match = ua.match(new RegExp(`(${browser})/([^ ;)]*)`,'i'))
40
+ if(match) {
41
+ detected.browser = match[1]
42
+ detected.browserVersion = match[2]
43
+ break
44
+ }
45
+ }
46
+ for(const os of oses) {
47
+ const match = ua.match(new RegExp(`(${os}) ?([^;)]*)`,'i'))
48
+ if(match) {
49
+ detected.os = match[1]
50
+ detected.osVersion = match[2]
51
+ break
52
+ }
53
+ }
54
+ document.body.classList.add('on-browser-' + detected.browser.toLowerCase())
55
+ document.body.classList.add('on-os-' + detected.os.replace(' ','-').toLowerCase())
56
+ window.onload = function() { setTimeout(function() {
57
+ if(!window.appStarted) {
58
+ document.getElementById('not-supported').style.display = 'flex'
59
+ console.error("App not started")
60
+ }
61
+ }, 1000) }
62
+ </script>
63
+
12
64
  </body>
13
65
  </html>
@@ -2,14 +2,12 @@
2
2
  <div>
3
3
  <h1>Hello world!</h1>
4
4
  <p>{{ currentTime }}</p>
5
+ <Clock :time="currentTime" />
5
6
  </div>
6
7
  </template>
7
8
 
8
9
  <script setup>
9
10
  import { currentTime } from "@live-change/frontend-base";
10
- import { useTimestamp } from "@vueuse/core";
11
-
12
- const now = useTimestamp({ interval: 500 })
13
11
 
14
12
  </script>
15
13
 
@@ -0,0 +1,22 @@
1
+
2
+ <template>
3
+ <div class="surface-card p-3 shadow-2 border-round">
4
+ {{ d(new Date(), 'long') }}
5
+ </div>
6
+ </template>
7
+
8
+ <script setup lang="ts">
9
+ import { defineProps, toRefs } from 'vue'
10
+ import { useI18n } from 'vue-i18n'
11
+ const { t, d, n } = useI18n()
12
+
13
+ const props = defineProps<{
14
+ time: number
15
+ }>()
16
+
17
+ const { time } = toRefs(props)
18
+ </script>
19
+
20
+ <style scoped>
21
+
22
+ </style>
@@ -4,3 +4,5 @@ import { createRouter } from './router'
4
4
  import config from './config.js'
5
5
 
6
6
  clientEntry(App, createRouter, config)
7
+
8
+ window.appStarted = true
@@ -12,6 +12,8 @@ import { dbAdminRoutes } from "@live-change/db-admin"
12
12
  import { userRoutes } from "@live-change/user-frontend"
13
13
  import { catchAllPagesRoute, contentEditRoutes, pagesSitemap } from "@live-change/content-frontend"
14
14
 
15
+ import pagesRoutes from '~pages'
16
+
15
17
  export function routes(config = {}) {
16
18
  const { prefix = '/', route = (r) => r } = config
17
19
  return [
@@ -22,6 +24,8 @@ export function routes(config = {}) {
22
24
  component: () => import("./Index.vue")
23
25
  }),
24
26
 
27
+ ...pagesRoutes,
28
+
25
29
  ...contentEditRoutes({ ...config }),
26
30
 
27
31
  ...dbAdminRoutes({ prefix: '/_db', route: r => ({ ...r, meta: { ...r.meta, raw: true }}) }),
@@ -0,0 +1,26 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "useDefineForClassFields": true,
5
+ "module": "ESNext",
6
+ "lib": ["ES2020", "DOM", "DOM.Iterable"],
7
+ "skipLibCheck": true,
8
+
9
+ /* Bundler mode */
10
+ "moduleResolution": "bundler",
11
+ "allowImportingTsExtensions": true,
12
+ "resolveJsonModule": true,
13
+ "isolatedModules": true,
14
+ "noEmit": true,
15
+ "jsx": "preserve",
16
+
17
+ /* Linting */
18
+ "strict": true,
19
+ "noUnusedLocals": true,
20
+ "noUnusedParameters": true,
21
+ "noFallthroughCasesInSwitch": true
22
+ },
23
+ "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"],
24
+ "references": [{ "path": "./tsconfig.node.json" }]
25
+ }
26
+
@@ -0,0 +1,11 @@
1
+ {
2
+ "compilerOptions": {
3
+ "composite": true,
4
+ "skipLibCheck": true,
5
+ "module": "ESNext",
6
+ "moduleResolution": "bundler",
7
+ "allowSyntheticDefaultImports": true,
8
+ "strict": true
9
+ },
10
+ "include": ["vite.config.ts"]
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/frontend-template",
3
- "version": "0.8.2",
3
+ "version": "0.8.4",
4
4
  "scripts": {
5
5
  "memDev": "node server/start.js memDev --enableSessions --initScript ./init.js --dbAccess",
6
6
  "localDevInit": "rm tmp.db; node server/start.js localDev --enableSessions --initScript ./init.js",
@@ -32,37 +32,37 @@
32
32
  "dependencies": {
33
33
  "@codemirror/language": "6.10.1",
34
34
  "@fortawesome/fontawesome-free": "^6.4.2",
35
- "@live-change/access-control-frontend": "0.4.5",
36
- "@live-change/access-control-service": "^0.8.2",
37
- "@live-change/backup-server": "0.4.4",
38
- "@live-change/blog-frontend": "0.4.5",
39
- "@live-change/blog-service": "^0.8.2",
40
- "@live-change/cli": "^0.8.2",
41
- "@live-change/content-frontend": "0.4.5",
42
- "@live-change/content-service": "^0.8.2",
43
- "@live-change/dao": "0.6.0",
44
- "@live-change/dao-vue3": "^0.8.2",
45
- "@live-change/dao-websocket": "^0.8.2",
46
- "@live-change/db-client": "^0.8.2",
47
- "@live-change/email-service": "^0.8.2",
48
- "@live-change/framework": "^0.8.2",
49
- "@live-change/frontend-auto-form": "0.4.5",
50
- "@live-change/frontend-base": "0.4.5",
51
- "@live-change/image-frontend": "0.4.5",
52
- "@live-change/password-authentication-service": "^0.8.2",
53
- "@live-change/prosemirror-service": "^0.8.2",
54
- "@live-change/secret-code-service": "^0.8.2",
55
- "@live-change/secret-link-service": "^0.8.2",
56
- "@live-change/session-service": "^0.8.2",
57
- "@live-change/upload-frontend": "0.4.5",
58
- "@live-change/url-frontend": "0.4.5",
59
- "@live-change/url-service": "^0.8.2",
60
- "@live-change/user-frontend": "0.4.5",
61
- "@live-change/user-identification-service": "^0.8.2",
62
- "@live-change/user-service": "^0.8.2",
63
- "@live-change/vue3-components": "^0.8.2",
64
- "@live-change/vue3-ssr": "^0.8.2",
65
- "@live-change/wysiwyg-frontend": "0.4.5",
35
+ "@live-change/access-control-frontend": "^0.8.4",
36
+ "@live-change/access-control-service": "0.8.2",
37
+ "@live-change/backup-service": "0.4.4",
38
+ "@live-change/blog-frontend": "^0.8.4",
39
+ "@live-change/blog-service": "0.8.2",
40
+ "@live-change/cli": "^0.8.4",
41
+ "@live-change/content-frontend": "^0.8.4",
42
+ "@live-change/content-service": "0.8.2",
43
+ "@live-change/dao": "^0.8.4",
44
+ "@live-change/dao-vue3": "0.8.2",
45
+ "@live-change/dao-websocket": "0.8.2",
46
+ "@live-change/db-client": "0.8.2",
47
+ "@live-change/email-service": "0.8.2",
48
+ "@live-change/framework": "0.8.2",
49
+ "@live-change/frontend-auto-form": "^0.8.4",
50
+ "@live-change/frontend-base": "^0.8.4",
51
+ "@live-change/image-frontend": "^0.8.4",
52
+ "@live-change/password-authentication-service": "0.8.2",
53
+ "@live-change/prosemirror-service": "0.8.2",
54
+ "@live-change/secret-code-service": "0.8.2",
55
+ "@live-change/secret-link-service": "0.8.2",
56
+ "@live-change/session-service": "0.8.2",
57
+ "@live-change/upload-frontend": "^0.8.4",
58
+ "@live-change/url-frontend": "^0.8.4",
59
+ "@live-change/url-service": "0.8.2",
60
+ "@live-change/user-frontend": "^0.8.4",
61
+ "@live-change/user-identification-service": "0.8.2",
62
+ "@live-change/user-service": "0.8.2",
63
+ "@live-change/vue3-components": "0.8.2",
64
+ "@live-change/vue3-ssr": "0.8.2",
65
+ "@live-change/wysiwyg-frontend": "^0.8.4",
66
66
  "@vueuse/core": "^10.7.2",
67
67
  "codeceptjs-assert": "^0.0.5",
68
68
  "compression": "^1.7.4",
@@ -72,17 +72,19 @@
72
72
  "pretty-bytes": "^6.1.1",
73
73
  "primeflex": "^3.3.1",
74
74
  "primeicons": "^6.0.1",
75
- "primevue": "^3.48.1",
75
+ "primevue": "^3.49.1",
76
76
  "rollup-plugin-node-builtins": "^2.1.2",
77
77
  "rollup-plugin-visualizer": "5.12.0",
78
78
  "serialize-javascript": "^6.0.2",
79
79
  "serve-static": "^1.15.0",
80
80
  "v-shared-element": "3.1.1",
81
+ "vue": "^3.4.19",
82
+ "vue-i18n": "^9.10.1",
81
83
  "vue-router": "^4.2.5",
82
84
  "vue3-scroll-border": "0.1.6"
83
85
  },
84
86
  "devDependencies": {
85
- "@live-change/codeceptjs-helper": "^0.8.2",
87
+ "@live-change/codeceptjs-helper": "0.8.2",
86
88
  "codeceptjs": "^3.5.12",
87
89
  "generate-password": "1.7.1",
88
90
  "playwright": "^1.41.2",
@@ -93,5 +95,5 @@
93
95
  "author": "",
94
96
  "license": "ISC",
95
97
  "description": "",
96
- "gitHead": "53b8efc8ec7f5c1c4af33077d8fb4a8a5580f1d9"
98
+ "gitHead": "cdc66924576866cd3b476e5a0e8956de54c6d8d9"
97
99
  }
@@ -16,7 +16,7 @@ import messageAuthentication from '@live-change/message-authentication-service'
16
16
  import url from '@live-change/url-service'
17
17
  import prosemirror from '@live-change/prosemirror-service'
18
18
  import content from '@live-change/content-service'
19
- import backup from '@live-change/backup-server'
19
+ import backup from '@live-change/backup-service'
20
20
  import init from './init.js'
21
21
 
22
22
  export {
File without changes