@live-change/vue3-ssr 0.8.86 → 0.8.87
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/index.js +9 -0
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -88,6 +88,15 @@ function useUid(context) {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
function useTimeSynchronization(context, onUnmountedCb) {
|
|
91
|
+
if(typeof window === 'undefined') return { // on server we use current server time
|
|
92
|
+
waitForSynchronized: () => Promise.resolve(),
|
|
93
|
+
diff: ref(0),
|
|
94
|
+
synchronized: ref(true),
|
|
95
|
+
serverToLocal: (ts) => ts,
|
|
96
|
+
localToServer: (ts) => ts,
|
|
97
|
+
serverToLocalComputed: (ts) => ts,
|
|
98
|
+
localToServerComputed: (ts) => ts,
|
|
99
|
+
}
|
|
91
100
|
const api = useApi(context)
|
|
92
101
|
const timeSynchronization = api.settings.timeSynchronization
|
|
93
102
|
if(!timeSynchronization) throw new Error("Time synchronization not configured")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/vue3-ssr",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.87",
|
|
4
4
|
"description": "Live Change Framework - vue components",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
},
|
|
22
22
|
"homepage": "https://github.com/live-change/live-change-stack",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@live-change/dao-vue3": "^0.8.
|
|
25
|
-
"@live-change/uid": "^0.8.
|
|
24
|
+
"@live-change/dao-vue3": "^0.8.87",
|
|
25
|
+
"@live-change/uid": "^0.8.87",
|
|
26
26
|
"@vueuse/core": "^10.11.0",
|
|
27
27
|
"debug": "^4.3.4"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "133e0785e028c37eb6f903d7355e5470b2cc65d3"
|
|
30
30
|
}
|