itube-specs 0.0.515 → 0.0.516
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/components/page-components/s-expand-row.vue +8 -2
- package/components/page-components/s-footer-models.vue +1 -1
- package/components/page-components/s-report.vue +1 -1
- package/components/page-components/s-share.vue +13 -5
- package/components/playlist/s-playlist-private-toggle.vue +2 -2
- package/package.json +1 -1
|
@@ -98,7 +98,13 @@ onMounted(() => {
|
|
|
98
98
|
checkIsElementOverflow();
|
|
99
99
|
});
|
|
100
100
|
|
|
101
|
+
let checkTimer: ReturnType<typeof setTimeout> | null = null;
|
|
102
|
+
|
|
101
103
|
watch(() => useRoute().query, () => {
|
|
102
|
-
setTimeout(() => checkIsElementOverflow(), 100)
|
|
103
|
-
})
|
|
104
|
+
checkTimer = setTimeout(() => checkIsElementOverflow(), 100);
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
onBeforeUnmount(() => {
|
|
108
|
+
if (checkTimer) clearTimeout(checkTimer);
|
|
109
|
+
});
|
|
104
110
|
</script>
|
|
@@ -203,7 +203,7 @@ async function submit() {
|
|
|
203
203
|
if (!valid) return;
|
|
204
204
|
|
|
205
205
|
try {
|
|
206
|
-
const baseURL = window.location.origin;
|
|
206
|
+
const baseURL = process.client ? window.location.origin : '';
|
|
207
207
|
loading.value = true;
|
|
208
208
|
form.value.token = await getRecaptchaToken('contact_form');
|
|
209
209
|
form.value.url = `${baseURL}/videos/${reportedVideoCard.value.id}`;
|
|
@@ -55,13 +55,17 @@ const {isSharePopupOpen, closeSharePopup, sharedVideoCard} = useSharePopup();
|
|
|
55
55
|
const route = useRoute();
|
|
56
56
|
|
|
57
57
|
const isCopied = ref(false);
|
|
58
|
+
let copyTimeout: ReturnType<typeof setTimeout> | null = null;
|
|
58
59
|
|
|
59
|
-
const fullUrl = computed(() =>
|
|
60
|
+
const fullUrl = computed(() =>
|
|
61
|
+
(process.client ? window.location.origin : '') + route.fullPath
|
|
62
|
+
);
|
|
60
63
|
|
|
61
64
|
function copyUrl() {
|
|
65
|
+
if (!process.client) return;
|
|
62
66
|
navigator.clipboard.writeText(fullUrl.value).then(() => {
|
|
63
|
-
isCopied.value = true
|
|
64
|
-
})
|
|
67
|
+
isCopied.value = true;
|
|
68
|
+
});
|
|
65
69
|
}
|
|
66
70
|
|
|
67
71
|
const copyIcon = computed(() => isCopied.value ? 'check' : 'copy');
|
|
@@ -69,9 +73,13 @@ const inputText = computed(() => isCopied.value ? t('link_copied') : t('link'));
|
|
|
69
73
|
|
|
70
74
|
watch(() => isCopied.value, (value) => {
|
|
71
75
|
if (value) {
|
|
72
|
-
setTimeout(() => isCopied.value = false, 3000)
|
|
76
|
+
copyTimeout = setTimeout(() => isCopied.value = false, 3000);
|
|
73
77
|
}
|
|
74
|
-
})
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
onBeforeUnmount(() => {
|
|
81
|
+
if (copyTimeout) clearTimeout(copyTimeout);
|
|
82
|
+
});
|
|
75
83
|
|
|
76
84
|
const { t } = useI18n()
|
|
77
85
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<SToggle
|
|
4
4
|
class="s-playlist-private-toggle__toggler"
|
|
5
5
|
:model-value="modelValue"
|
|
6
|
-
@update:model-value="(
|
|
6
|
+
@update:model-value="(value: boolean) => emit('update:modelValue', value)"
|
|
7
7
|
/>
|
|
8
8
|
<p class="s-playlist-private-toggle__text">{{ $t('playlist.private_playlist')}}</p>
|
|
9
9
|
</div>
|
|
@@ -15,6 +15,6 @@ defineProps<{
|
|
|
15
15
|
}>()
|
|
16
16
|
|
|
17
17
|
const emit = defineEmits<{
|
|
18
|
-
(eventName: 'update:modelValue', value:
|
|
18
|
+
(eventName: 'update:modelValue', value: boolean): void
|
|
19
19
|
}>()
|
|
20
20
|
</script>
|