@live-change/url-frontend 0.2.15 → 0.2.16

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.
@@ -5,8 +5,9 @@
5
5
  <pre>{{ JSON.stringify(url, null, " ") }}</pre>
6
6
  </div>
7
7
  </slot>
8
- <slot v-else-if="url">
9
- <NotAuthorized></NotAuthorized>
8
+ <slot v-else-if="url" name="notAuthorized" :path="urlPath" :class="clazz" :style="style"
9
+ :target="url.target" :access="url.access">
10
+ <NotAuthorized />
10
11
  </slot>
11
12
  <slot v-else name="notFound" :path="urlPath" :class="clazz" :style="style">
12
13
  <NotFound />
@@ -79,17 +80,17 @@
79
80
  () => liveUrlPath(targetType.value, '', urlPath.value, fetchMore.value)
80
81
  )
81
82
 
82
- const [/*domainUrls,*/ globalUrls] = await Promise.all([
83
- // live(livePathWithDomain),
83
+ const [domainUrls, globalUrls] = await Promise.all([
84
+ live(livePathWithDomain),
84
85
  live(livePathWithoutDomain)
85
86
  ])
86
- const domainUrls = ref([])
87
87
  console.log("OK!", domainUrls.value, globalUrls.value)
88
88
  const url = computed(() => {
89
89
  if(domainUrls.value.length > 0) return domainUrls.value[0]
90
90
  if(globalUrls.value.length > 0) return globalUrls.value[0]
91
91
  return null
92
92
  })
93
+ console.log("RESOLVED", url.value)
93
94
  const accessible = computed(() => {
94
95
  if(!(requiredRoles?.value?.length)) return true
95
96
  if(!url.value) return undefined
package/index.js CHANGED
@@ -16,5 +16,8 @@ export { ResolveUrl }
16
16
  import NotFound from "./front/src/components/NotFound.vue"
17
17
  export { NotFound }
18
18
 
19
+ import NotAuthorized from "./front/src/components/NotAuthorized.vue"
20
+ export { NotAuthorized }
21
+
19
22
  import sitemap from "./front/src/sitemap.js"
20
23
  export { sitemap }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/url-frontend",
3
- "version": "0.2.15",
3
+ "version": "0.2.16",
4
4
  "scripts": {
5
5
  "memDev": "lcli memDev --enableSessions --initScript ./init.js --dbAccess",
6
6
  "localDevInit": "rm tmp.db; lcli localDev --enableSessions --initScript ./init.js",
@@ -63,5 +63,5 @@
63
63
  "author": "",
64
64
  "license": "ISC",
65
65
  "description": "",
66
- "gitHead": "c3a1b57517db93829f3a733379a82496651c1039"
66
+ "gitHead": "6faf9721eb991a0d08289aa9a7914479afb893fb"
67
67
  }