@live-change/url-frontend 0.8.148 → 0.9.0
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.
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
//.with(url => p.url.targetOwnedCanonical({ targetType, target: url.target }).bind('canonical'))
|
|
65
65
|
.with(url => url.type.$switch({
|
|
66
66
|
'canonical': null,
|
|
67
|
-
'redirect': p.url.
|
|
67
|
+
'redirect': p.url.canonical({ targetType, target: url.target })
|
|
68
68
|
}).$bind('canonical'))
|
|
69
69
|
.with(url => p.accessControl.myAccessTo({ objectType: targetType, object: url.target }).bind('access'))
|
|
70
70
|
for (let fetch of more) {
|
|
@@ -98,8 +98,8 @@
|
|
|
98
98
|
import { path, live, actions, serviceDefinition } from '@live-change/vue3-ssr'
|
|
99
99
|
const urlsApi = actions().url
|
|
100
100
|
|
|
101
|
-
const isAccessible = serviceDefinition('url').views.
|
|
102
|
-
const isEditable = serviceDefinition('url').views.
|
|
101
|
+
const isAccessible = serviceDefinition('url').views.canonical
|
|
102
|
+
const isEditable = serviceDefinition('url').views.resetCanonical
|
|
103
103
|
|
|
104
104
|
const editCanonicalDialogVisible = ref(false)
|
|
105
105
|
const createRedirectDialogVisible = ref(false)
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
icon: 'pi pi-info-circle',
|
|
121
121
|
acceptClass: 'p-button-danger',
|
|
122
122
|
accept: async () => {
|
|
123
|
-
await urlsApi.
|
|
123
|
+
await urlsApi.resetCanonical({ target, targetType })
|
|
124
124
|
toast.add({ severity:'info', summary: 'Canonical url deleted', life: 1500 })
|
|
125
125
|
},
|
|
126
126
|
reject: () => {
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
icon: 'pi pi-info-circle',
|
|
137
137
|
acceptClass: 'p-button-danger',
|
|
138
138
|
accept: async () => {
|
|
139
|
-
await urlsApi.
|
|
139
|
+
await urlsApi.deleteRedirect({ redirect: redirect.to, target, targetType })
|
|
140
140
|
toast.add({ severity:'info', summary: 'Redirect deleted', life: 1500 })
|
|
141
141
|
},
|
|
142
142
|
reject: () => {
|
|
@@ -152,10 +152,10 @@
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
const [ canonical, redirects ] = isAccessible ? (await Promise.all([
|
|
155
|
-
live(path().url.
|
|
155
|
+
live(path().url.canonical({ target, targetType })),
|
|
156
156
|
live(path().url.targetOwnedRedirects({ target, targetType })
|
|
157
157
|
.action('delete', ({ to, target, targetType }) =>
|
|
158
|
-
path().url.
|
|
158
|
+
path().url.deleteRedirect({ redirect: to, target, targetType })
|
|
159
159
|
)
|
|
160
160
|
)
|
|
161
161
|
])) : [null, []]
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
import { path, live } from '@live-change/vue3-ssr'
|
|
39
39
|
const p = path()
|
|
40
40
|
const canonicalLivePath = computed(
|
|
41
|
-
() => p.url.
|
|
41
|
+
() => p.url.canonical({ targetType: props.targetType, target: props.target })
|
|
42
42
|
)
|
|
43
43
|
const redirectsLivePath = computed(
|
|
44
|
-
() => p.url.
|
|
44
|
+
() => p.url.redirects({ targetType: props.targetType, target: props.target })
|
|
45
45
|
)
|
|
46
46
|
const [canonical, redirects] = await Promise.all([
|
|
47
47
|
live(canonicalLivePath),
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
const urlPathFunction = computed(() => (range, p) => urlPathBaseFunction.value(range, p)
|
|
88
88
|
.with(url => url.type.$switch({
|
|
89
89
|
'canonical': null,
|
|
90
|
-
'redirect': p.url.
|
|
90
|
+
'redirect': p.url.canonical({ targetType: targetType.value, target: url.target })
|
|
91
91
|
}).$bind('canonical'))
|
|
92
92
|
//.with(url => p.accessControl.myAccessTo({ objectType: targetType, object: url.target }).bind('access'))
|
|
93
93
|
)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/url-frontend",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"memDev": "node server/start.js memDev --enableSessions --initScript ./init.js --dbAccess",
|
|
6
6
|
"localDevInit": "rm tmp.db; lcli localDev --enableSessions --initScript ./init.js",
|
|
@@ -22,18 +22,18 @@
|
|
|
22
22
|
"type": "module",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@fortawesome/fontawesome-free": "^6.5.2",
|
|
25
|
-
"@live-change/cli": "^0.
|
|
26
|
-
"@live-change/dao": "^0.
|
|
27
|
-
"@live-change/dao-vue3": "^0.
|
|
28
|
-
"@live-change/dao-websocket": "^0.
|
|
29
|
-
"@live-change/framework": "^0.
|
|
30
|
-
"@live-change/password-authentication-service": "^0.
|
|
31
|
-
"@live-change/prosemirror-service": "^0.
|
|
32
|
-
"@live-change/secret-code-service": "^0.
|
|
33
|
-
"@live-change/secret-link-service": "^0.
|
|
34
|
-
"@live-change/session-service": "^0.
|
|
35
|
-
"@live-change/vue3-components": "^0.
|
|
36
|
-
"@live-change/vue3-ssr": "^0.
|
|
25
|
+
"@live-change/cli": "^0.9.0",
|
|
26
|
+
"@live-change/dao": "^0.9.0",
|
|
27
|
+
"@live-change/dao-vue3": "^0.9.0",
|
|
28
|
+
"@live-change/dao-websocket": "^0.9.0",
|
|
29
|
+
"@live-change/framework": "^0.9.0",
|
|
30
|
+
"@live-change/password-authentication-service": "^0.9.0",
|
|
31
|
+
"@live-change/prosemirror-service": "^0.9.0",
|
|
32
|
+
"@live-change/secret-code-service": "^0.9.0",
|
|
33
|
+
"@live-change/secret-link-service": "^0.9.0",
|
|
34
|
+
"@live-change/session-service": "^0.9.0",
|
|
35
|
+
"@live-change/vue3-components": "^0.9.0",
|
|
36
|
+
"@live-change/vue3-ssr": "^0.9.0",
|
|
37
37
|
"@vueuse/core": "^10.11.0",
|
|
38
38
|
"codeceptjs-assert": "^0.0.5",
|
|
39
39
|
"compression": "^1.7.4",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"vue3-scroll-border": "0.1.6"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@live-change/codeceptjs-helper": "^0.
|
|
54
|
+
"@live-change/codeceptjs-helper": "^0.9.0",
|
|
55
55
|
"codeceptjs": "^3.6.5",
|
|
56
56
|
"generate-password": "1.7.1",
|
|
57
57
|
"playwright": "^1.41.2",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"author": "Michał Łaszczewski <michal@laszczewski.pl>",
|
|
63
63
|
"license": "ISC",
|
|
64
64
|
"description": "",
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "b82513f5b400afcc4b8cc3ae1f9dfe4ac3a2a6eb"
|
|
66
66
|
}
|