@mptw/skylens-ui 1.4.66 → 1.4.68
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/.env.local +1 -0
- package/.env.stage +1 -0
- package/components/SLCard.vue +5 -0
- package/nuxt.config.ts +1 -0
- package/package.json +1 -1
- package/utils/index.ts +3 -7
package/.env.local
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
NUXT_PUBLIC_ICO_URL=https://skylens-mng-dev-1087511617183.asia-east1.run.app
|
package/.env.stage
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
NUXT_PUBLIC_ICO_URL=https://skylens-mng-dev-1087511617183.asia-east1.run.app
|
package/components/SLCard.vue
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
2
|
.card
|
|
3
|
+
.card-prepend(v-if='$slots.prepend')
|
|
4
|
+
slot(name='prepend')
|
|
3
5
|
.card-header(
|
|
4
6
|
v-if='title !== "" || $slots.header || $slots.title || $slots["title-container"] || desc !== "" || $slots.desc || $slots["header-left"] || $slots["header-right"]'
|
|
5
7
|
)
|
|
@@ -75,6 +77,9 @@ export default defineComponent({
|
|
|
75
77
|
.card
|
|
76
78
|
@apply p-4 border border-primary-600 rounded bg-white shadow
|
|
77
79
|
|
|
80
|
+
.card-prepend
|
|
81
|
+
@apply mb-4
|
|
82
|
+
|
|
78
83
|
.card-header
|
|
79
84
|
@apply flex justify-between mb-4
|
|
80
85
|
|
package/nuxt.config.ts
CHANGED
package/package.json
CHANGED
package/utils/index.ts
CHANGED
|
@@ -486,11 +486,10 @@ export const ga4ev = ({ category, action, label, value, cb }: {
|
|
|
486
486
|
};
|
|
487
487
|
|
|
488
488
|
export const getWebsiteFavico = (domain: string): Promise<{ domain: string; icoUrl: string; }> => {
|
|
489
|
+
const runtimeConfig = useRuntimeConfig();
|
|
490
|
+
|
|
489
491
|
return new Promise((resolve) => {
|
|
490
|
-
const icoUrl =
|
|
491
|
-
'.',
|
|
492
|
-
'_'
|
|
493
|
-
)}.ico`;
|
|
492
|
+
const icoUrl = `${runtimeConfig.public.icoUrl}/api/4.0/domain_ico?domain=${domain}`;
|
|
494
493
|
const canvas = document.createElement('canvas');
|
|
495
494
|
canvas.width = 26;
|
|
496
495
|
canvas.height = 26;
|
|
@@ -513,9 +512,6 @@ export const getWebsiteFavico = (domain: string): Promise<{ domain: string; icoU
|
|
|
513
512
|
|
|
514
513
|
resolve({ domain, icoUrl: canvas.toDataURL('image/png', 1.0) });
|
|
515
514
|
};
|
|
516
|
-
image.onerror = () => {
|
|
517
|
-
image.src = `${window.location.protocol}//${window.location.host}/assets/images/commons/default-favico.png`;
|
|
518
|
-
};
|
|
519
515
|
image.src = icoUrl;
|
|
520
516
|
});
|
|
521
517
|
};
|