@live-change/frontend-base 0.9.33 → 0.9.35
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/UpdateBanner.vue +2 -2
- package/package.json +18 -18
- package/server-entry.js +23 -13
package/UpdateBanner.vue
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
<div class="items-center hidden md:flex">
|
|
6
6
|
<span class="leading-normal">{{ t("app.newVersions") }}</span>
|
|
7
7
|
</div>
|
|
8
|
-
<
|
|
8
|
+
<div class="flex items-center ml-2 mr-20">
|
|
9
9
|
<a class="text-gray-900" href="#" @click="update">
|
|
10
10
|
<span class="underline font-bold">{{ t("app.reload") }}</span>
|
|
11
11
|
</a>
|
|
12
|
-
</
|
|
12
|
+
</div>
|
|
13
13
|
<a v-ripple class="flex align-items-center no-underline justify-content-center border-circle text-gray-900
|
|
14
14
|
hover:bg-bluegray-700 cursor-pointer transition-colors transition-duration-150 p-ripple"
|
|
15
15
|
style="width:2rem; height: 2rem" @click="hideUpdateBanner">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/frontend-base",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.35",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"memDev": "node server/start.js memDev --enableSessions --initScript ./init.js --templatePath ../../base-frontend/index.html",
|
|
6
6
|
"localDevInit": "rm tmp.db; lcli localDev --enableSessions --initScript ./init.js",
|
|
@@ -35,21 +35,21 @@
|
|
|
35
35
|
"@lezer/rust": "=1.0.1",
|
|
36
36
|
"@lezer/sass": "=1.0.3",
|
|
37
37
|
"@lezer/xml": "=1.0.2",
|
|
38
|
-
"@live-change/cli": "^0.9.
|
|
39
|
-
"@live-change/dao": "^0.9.
|
|
40
|
-
"@live-change/dao-message": "^0.9.
|
|
41
|
-
"@live-change/dao-sockjs": "^0.9.
|
|
42
|
-
"@live-change/dao-vue3": "^0.9.
|
|
43
|
-
"@live-change/dao-websocket": "^0.9.
|
|
44
|
-
"@live-change/email-service": "^0.9.
|
|
45
|
-
"@live-change/password-authentication-service": "^0.9.
|
|
46
|
-
"@live-change/secret-code-service": "^0.9.
|
|
47
|
-
"@live-change/secret-link-service": "^0.9.
|
|
48
|
-
"@live-change/security-frontend": "^0.9.
|
|
49
|
-
"@live-change/session-service": "^0.9.
|
|
50
|
-
"@live-change/user-service": "^0.9.
|
|
51
|
-
"@live-change/vue3-components": "^0.9.
|
|
52
|
-
"@live-change/vue3-ssr": "^0.9.
|
|
38
|
+
"@live-change/cli": "^0.9.35",
|
|
39
|
+
"@live-change/dao": "^0.9.35",
|
|
40
|
+
"@live-change/dao-message": "^0.9.35",
|
|
41
|
+
"@live-change/dao-sockjs": "^0.9.35",
|
|
42
|
+
"@live-change/dao-vue3": "^0.9.35",
|
|
43
|
+
"@live-change/dao-websocket": "^0.9.35",
|
|
44
|
+
"@live-change/email-service": "^0.9.35",
|
|
45
|
+
"@live-change/password-authentication-service": "^0.9.35",
|
|
46
|
+
"@live-change/secret-code-service": "^0.9.35",
|
|
47
|
+
"@live-change/secret-link-service": "^0.9.35",
|
|
48
|
+
"@live-change/security-frontend": "^0.9.35",
|
|
49
|
+
"@live-change/session-service": "^0.9.35",
|
|
50
|
+
"@live-change/user-service": "^0.9.35",
|
|
51
|
+
"@live-change/vue3-components": "^0.9.35",
|
|
52
|
+
"@live-change/vue3-ssr": "^0.9.35",
|
|
53
53
|
"@primevue/themes": "^4.2.5",
|
|
54
54
|
"@tailwindcss/vite": "4.0.6",
|
|
55
55
|
"@unhead/ssr": "^1.6.2",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"vue3-scroll-border": "0.1.6"
|
|
106
106
|
},
|
|
107
107
|
"devDependencies": {
|
|
108
|
-
"@live-change/codeceptjs-helper": "^0.9.
|
|
108
|
+
"@live-change/codeceptjs-helper": "^0.9.35",
|
|
109
109
|
"codeceptjs": "^3.6.10",
|
|
110
110
|
"generate-password": "1.7.1",
|
|
111
111
|
"playwright": "1.49.1",
|
|
@@ -119,5 +119,5 @@
|
|
|
119
119
|
"author": "Michał Łaszczewski <michal@laszczewski.pl>",
|
|
120
120
|
"license": "BSD-3-Clause",
|
|
121
121
|
"description": "",
|
|
122
|
-
"gitHead": "
|
|
122
|
+
"gitHead": "abe67aa58ccf8246b8b9fde832287b5305480b91"
|
|
123
123
|
}
|
package/server-entry.js
CHANGED
|
@@ -6,6 +6,8 @@ import { createApp } from "./main.js"
|
|
|
6
6
|
import { setTime } from "./time.js"
|
|
7
7
|
|
|
8
8
|
import { renderHeadToString } from "@vueuse/head"
|
|
9
|
+
import { Theme } from '@primeuix/styled'
|
|
10
|
+
import { Base, BaseStyle } from '@primevue/core'
|
|
9
11
|
|
|
10
12
|
function escapeHtml(unsafe) {
|
|
11
13
|
return (''+unsafe)
|
|
@@ -51,25 +53,33 @@ export function serverEntry(App, createRouter, config = {}) {
|
|
|
51
53
|
...(config.prefetch ?? []).map(fn => fn(app, router, head)),
|
|
52
54
|
api.preFetchRoute(router.currentRoute, router)
|
|
53
55
|
])
|
|
54
|
-
|
|
55
|
-
// @vitejs/plugin-vue injects code into a component's setup() that registers
|
|
56
|
-
// itself on ctx.modules. After the render, ctx.modules would contain all the
|
|
57
|
-
// components that have been instantiated during this render call.
|
|
56
|
+
|
|
58
57
|
const ctx = {}
|
|
59
|
-
const html = await renderToString(app, ctx)
|
|
60
58
|
|
|
59
|
+
let usedStyles = new Set()
|
|
60
|
+
Base.setLoadedStyleName = async (name) => usedStyles.add(name)
|
|
61
|
+
|
|
62
|
+
const html = await renderToString(app, ctx)
|
|
63
|
+
// get the prerender cache data
|
|
61
64
|
const data = api.prerenderCache.cacheData()
|
|
62
65
|
|
|
63
|
-
|
|
64
|
-
// which we can then use to determine what files need to be preloaded for this
|
|
65
|
-
// request.
|
|
66
|
+
const renderedHead = await renderHeadToString(head)
|
|
66
67
|
|
|
67
|
-
const renderedHead = await renderHeadToString(head)
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
const styleSheets = []
|
|
70
|
+
styleSheets.push(`<style type="text/css" data-primevue-style-id="layer-order">${
|
|
71
|
+
BaseStyle.getLayerOrderThemeCSS()}</style>`)
|
|
72
|
+
BaseStyle.getLayerOrderThemeCSS()
|
|
73
|
+
|
|
74
|
+
styleSheets.push(Theme.getCommonStyleSheet())
|
|
75
|
+
for(const name of usedStyles) {
|
|
76
|
+
styleSheets.push(Theme.getStyleSheet(name))
|
|
77
|
+
const styleObject = await import(/* @vite-ignore */`primevue/${name}/style`)
|
|
78
|
+
styleSheets.push(styleObject.default.getThemeStyleSheet())
|
|
79
|
+
}
|
|
80
|
+
styleSheets.push(BaseStyle.getThemeStyleSheet())
|
|
81
|
+
|
|
82
|
+
renderedHead.headTags += styleSheets.join('\n')
|
|
73
83
|
|
|
74
84
|
return { html, data, meta: renderedHead, modules: ctx.modules, response }
|
|
75
85
|
}
|