@opendesign-plus/components 0.0.1-rc.10
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/dist/chunk-OElCookieNotice.cjs.js +1 -0
- package/dist/chunk-OElCookieNotice.es.js +833 -0
- package/dist/components/OBanner.vue.d.ts +11 -0
- package/dist/components/OCookieNotice.vue.d.ts +17 -0
- package/dist/components/OFooter.vue.d.ts +46 -0
- package/dist/components/OHeaderSearch.vue.d.ts +692 -0
- package/dist/components/OHeaderUser.vue.d.ts +38 -0
- package/dist/components/OPlusConfigProvider.vue.d.ts +23 -0
- package/dist/components/OSection.vue.d.ts +37 -0
- package/dist/components/OSourceCode.vue.d.ts +20 -0
- package/dist/components/OThemeSwitcher.vue.d.ts +28 -0
- package/dist/components/activity/OActivityApproval.vue.d.ts +277 -0
- package/dist/components/activity/OActivityForm.vue.d.ts +140 -0
- package/dist/components/activity/OMyActivityCalendar.vue.d.ts +578 -0
- package/dist/components/activity/config.d.ts +15 -0
- package/dist/components/activity/index.d.ts +623 -0
- package/dist/components/activity/types.d.ts +81 -0
- package/dist/components/element-plus/OElCookieNotice.vue.d.ts +34 -0
- package/dist/components/element-plus/index.d.ts +2 -0
- package/dist/components/events/OEventsApply.vue.d.ts +16 -0
- package/dist/components/events/OEventsCalendar.vue.d.ts +5 -0
- package/dist/components/events/OEventsList.vue.d.ts +26 -0
- package/dist/components/events/config.d.ts +27 -0
- package/dist/components/events/index.d.ts +78 -0
- package/dist/components/events/types.d.ts +66 -0
- package/dist/components/events/utils.d.ts +7 -0
- package/dist/components/header/OHeader.vue.d.ts +24 -0
- package/dist/components/header/OHeaderMoblie.vue.d.ts +33 -0
- package/dist/components/header/components/HeaderContent.vue.d.ts +6 -0
- package/dist/components/header/components/HeaderNav.vue.d.ts +7 -0
- package/dist/components/header/components/HeaderNavMoblie.vue.d.ts +17 -0
- package/dist/components/header/components/HeaderUbmcNav.vue.d.ts +2 -0
- package/dist/components/header/index.d.ts +22 -0
- package/dist/components/meeting/OMeetingCalendar.vue.d.ts +298 -0
- package/dist/components/meeting/OMeetingForm.vue.d.ts +145 -0
- package/dist/components/meeting/OMyMeetingCalendar.vue.d.ts +586 -0
- package/dist/components/meeting/OSigMeetingCalendar.vue.d.ts +24 -0
- package/dist/components/meeting/components/OMeetingCalendarList.vue.d.ts +28 -0
- package/dist/components/meeting/components/OMeetingCalendarSelector.vue.d.ts +664 -0
- package/dist/components/meeting/components/OMeetingDetail.vue.d.ts +12 -0
- package/dist/components/meeting/components/OMeetingPlaybackSubtitles.vue.d.ts +5 -0
- package/dist/components/meeting/components/OMeetingPlaybackVideo.vue.d.ts +17 -0
- package/dist/components/meeting/components/OSigMeetingAside.vue.d.ts +16 -0
- package/dist/components/meeting/config.d.ts +27 -0
- package/dist/components/meeting/types.d.ts +166 -0
- package/dist/components/meeting/utils.d.ts +22 -0
- package/dist/components.cjs.js +224 -0
- package/dist/components.css +1 -0
- package/dist/components.element.cjs.js +1 -0
- package/dist/components.element.es.js +4 -0
- package/dist/components.es.js +45054 -0
- package/dist/index.d.ts +19 -0
- package/docs/design.md +27 -0
- package/docs/design_banner.md +41 -0
- package/docs/design_section.md +27 -0
- package/package.json +56 -0
- package/scripts/generate-components-index.js +104 -0
- package/src/assets/events/svg-icons/icon-checked.svg +3 -0
- package/src/assets/events/svg-icons/icon-competition.svg +7 -0
- package/src/assets/events/svg-icons/icon-events.svg +4 -0
- package/src/assets/events/svg-icons/icon-release.svg +4 -0
- package/src/assets/events/svg-icons/icon-summit.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-all.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-backward.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-calendar.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-cancel.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-captions.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-close-captions.svg +6 -0
- package/src/assets/meeting/svg-icons/icon-close-fullscreen.svg +6 -0
- package/src/assets/meeting/svg-icons/icon-copy.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-create.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-delete.svg +7 -0
- package/src/assets/meeting/svg-icons/icon-empty.svg +31 -0
- package/src/assets/meeting/svg-icons/icon-empty_dark.svg +49 -0
- package/src/assets/meeting/svg-icons/icon-event.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-export.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-forward.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-fullscreen.svg +6 -0
- package/src/assets/meeting/svg-icons/icon-help.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-important.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-info.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-meet.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-meeting-message.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-meeting.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-play.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-playing-tip.svg +7 -0
- package/src/assets/meeting/svg-icons/icon-playing.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-question.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-sound.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-speaker.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-summit.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-telligent.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-tip.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-todo.svg +4 -0
- package/src/assets/meeting/transparent.png +0 -0
- package/src/assets/svg-icons/icon-arrow-left.svg +3 -0
- package/src/assets/svg-icons/icon-avatar-line.svg +3 -0
- package/src/assets/svg-icons/icon-caret-left.svg +3 -0
- package/src/assets/svg-icons/icon-caret-right.svg +3 -0
- package/src/assets/svg-icons/icon-chevron-down.svg +3 -0
- package/src/assets/svg-icons/icon-chevron-right.svg +3 -0
- package/src/assets/svg-icons/icon-chevron-up.svg +3 -0
- package/src/assets/svg-icons/icon-close.svg +3 -0
- package/src/assets/svg-icons/icon-delete.svg +3 -0
- package/src/assets/svg-icons/icon-filter.svg +3 -0
- package/src/assets/svg-icons/icon-header-back.svg +3 -0
- package/src/assets/svg-icons/icon-header-delete.svg +3 -0
- package/src/assets/svg-icons/icon-header-menu.svg +3 -0
- package/src/assets/svg-icons/icon-header-person.svg +3 -0
- package/src/assets/svg-icons/icon-header-search.svg +4 -0
- package/src/assets/svg-icons/icon-loading.svg +4 -0
- package/src/assets/svg-icons/icon-locale.svg +3 -0
- package/src/assets/svg-icons/icon-log-off.svg +3 -0
- package/src/assets/svg-icons/icon-message.svg +3 -0
- package/src/assets/svg-icons/icon-moon.svg +3 -0
- package/src/assets/svg-icons/icon-outlink.svg +3 -0
- package/src/assets/svg-icons/icon-overview.svg +3 -0
- package/src/assets/svg-icons/icon-search.svg +3 -0
- package/src/assets/svg-icons/icon-setting.svg +3 -0
- package/src/assets/svg-icons/icon-sun.svg +3 -0
- package/src/assets/svg-icons/icon-tips.svg +3 -0
- package/src/components/OBanner.vue +398 -0
- package/src/components/OCookieNotice.vue +575 -0
- package/src/components/OFooter.vue +576 -0
- package/src/components/OHeaderSearch.vue +601 -0
- package/src/components/OHeaderUser.vue +237 -0
- package/src/components/OPlusConfigProvider.vue +32 -0
- package/src/components/OSection.vue +178 -0
- package/src/components/OSourceCode.vue +153 -0
- package/src/components/OThemeSwitcher.vue +108 -0
- package/src/components/activity/OActivityApproval.vue +871 -0
- package/src/components/activity/OActivityForm.vue +548 -0
- package/src/components/activity/OMyActivityCalendar.vue +1501 -0
- package/src/components/activity/config.ts +141 -0
- package/src/components/activity/index.ts +24 -0
- package/src/components/activity/types.ts +88 -0
- package/src/components/common/AppAvatar.vue +83 -0
- package/src/components/common/ClientOnlyWrapper.ts +21 -0
- package/src/components/common/ContentWrapper.vue +85 -0
- package/src/components/common/MoreText.vue +124 -0
- package/src/components/common/ThFilter.vue +330 -0
- package/src/components/element-plus/OElCookieNotice.vue +603 -0
- package/src/components/element-plus/index.ts +3 -0
- package/src/components/events/OEventsApply.vue +419 -0
- package/src/components/events/OEventsCalendar.vue +588 -0
- package/src/components/events/OEventsList.vue +354 -0
- package/src/components/events/config.ts +35 -0
- package/src/components/events/index.ts +24 -0
- package/src/components/events/types.ts +80 -0
- package/src/components/events/utils.ts +9 -0
- package/src/components/header/OHeader.vue +175 -0
- package/src/components/header/OHeaderMoblie.vue +152 -0
- package/src/components/header/components/HeaderContent.vue +942 -0
- package/src/components/header/components/HeaderNav.vue +280 -0
- package/src/components/header/components/HeaderNavMoblie.vue +346 -0
- package/src/components/header/components/HeaderUbmcNav.vue +540 -0
- package/src/components/header/index.ts +16 -0
- package/src/components/meeting/OMeetingCalendar.vue +900 -0
- package/src/components/meeting/OMeetingForm.vue +1041 -0
- package/src/components/meeting/OMeetingPlayback.vue +439 -0
- package/src/components/meeting/OMyMeetingCalendar.vue +1502 -0
- package/src/components/meeting/OSigMeetingCalendar.vue +411 -0
- package/src/components/meeting/components/OMeetingCalendarList.vue +505 -0
- package/src/components/meeting/components/OMeetingCalendarSelector.vue +206 -0
- package/src/components/meeting/components/OMeetingDetail.vue +227 -0
- package/src/components/meeting/components/OMeetingPlaybackSubtitles.vue +611 -0
- package/src/components/meeting/components/OMeetingPlaybackVideo.vue +741 -0
- package/src/components/meeting/components/OSigMeetingAside.vue +197 -0
- package/src/components/meeting/config.ts +121 -0
- package/src/components/meeting/index.ts +45 -0
- package/src/components/meeting/types.ts +193 -0
- package/src/components/meeting/utils.ts +123 -0
- package/src/draft/Banner.vue +265 -0
- package/src/draft/ButtonCards.vue +106 -0
- package/src/draft/Feature.vue +134 -0
- package/src/draft/Footer.vue +512 -0
- package/src/draft/HorizontalAnchor.vue +165 -0
- package/src/draft/ItemSwiper.vue +133 -0
- package/src/draft/Logo.vue +141 -0
- package/src/draft/LogoCard.vue +75 -0
- package/src/draft/LogoV2.vue +19 -0
- package/src/draft/MainCard.vue +38 -0
- package/src/draft/MultiCard.vue +95 -0
- package/src/draft/MultiIconCard.vue +74 -0
- package/src/draft/OInfoCard.vue +176 -0
- package/src/draft/Process.vue +81 -0
- package/src/draft/Section.vue +167 -0
- package/src/draft/SingleTabCard.vue +85 -0
- package/src/draft/SliderCard.vue +110 -0
- package/src/env.d.ts +16 -0
- package/src/i18n/en.ts +261 -0
- package/src/i18n/index.ts +56 -0
- package/src/i18n/zh.ts +250 -0
- package/src/index.ts +45 -0
- package/src/shared/provide.ts +6 -0
- package/src/shims-vue-dompurify-html.d.ts +17 -0
- package/src/vue.d.ts +10 -0
- package/tsconfig.json +37 -0
- package/vite.config.ts +118 -0
|
@@ -0,0 +1,603 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { ref, onMounted, computed, nextTick, watch } from 'vue';
|
|
3
|
+
import ClientOnly from '../common/ClientOnlyWrapper';
|
|
4
|
+
import { useScreen } from '@opendesign-plus/composables';
|
|
5
|
+
import { useI18n } from '@/i18n';
|
|
6
|
+
import { ElButton, ElDialog, ElSwitch, ElIcon, ElDivider } from 'element-plus';
|
|
7
|
+
import { useVModel } from '@vueuse/core';
|
|
8
|
+
|
|
9
|
+
const NOT_SIGNED = '0';
|
|
10
|
+
const ALL_AGREED = '1';
|
|
11
|
+
const NECCESSARY_AGREED = '2';
|
|
12
|
+
const NOT_SHOW_BUT_AGREED = '3';
|
|
13
|
+
const COOKIE_KEY_ZH = 'agreed-cookiepolicy-zh';
|
|
14
|
+
const COOKIE_KEY_EN = 'agreed-cookiepolicy-en';
|
|
15
|
+
|
|
16
|
+
const props = defineProps<{
|
|
17
|
+
visible?: boolean;
|
|
18
|
+
community: string;
|
|
19
|
+
detailUrl: string;
|
|
20
|
+
wrapper?: string | HTMLElement;
|
|
21
|
+
cookieDomain: string;
|
|
22
|
+
}>();
|
|
23
|
+
|
|
24
|
+
const emits = defineEmits<{
|
|
25
|
+
(e: 'update:visible', value: boolean): void;
|
|
26
|
+
}>();
|
|
27
|
+
|
|
28
|
+
const { lePadV, isPhone } = useScreen();
|
|
29
|
+
const { locale, t } = useI18n();
|
|
30
|
+
const isZh = computed(() => locale.value === 'zh');
|
|
31
|
+
|
|
32
|
+
const cookieNoticeRef = ref<HTMLDivElement>();
|
|
33
|
+
const enableGrid = computed(() => {
|
|
34
|
+
if (cookieNoticeRef.value) {
|
|
35
|
+
return !!getComputedStyle(cookieNoticeRef.value!).getPropertyValue('--grid-content-width');
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
const cookieKey = computed(() => (isZh.value ? COOKIE_KEY_ZH : COOKIE_KEY_EN));
|
|
41
|
+
|
|
42
|
+
// 是否允许分析cookie
|
|
43
|
+
const analysisAllowed = ref(false);
|
|
44
|
+
const visibleVmodel = useVModel(props, 'visible', emits, { defaultValue: false });
|
|
45
|
+
|
|
46
|
+
const getCookie = (key: string) => {
|
|
47
|
+
const cookie = document.cookie.split(';').find((row) => row.split('=')[0].trim() === encodeURIComponent(key));
|
|
48
|
+
if (!cookie) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
return decodeURIComponent(cookie.split('=')[1]);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const setCookie = (key: string, value: string, days: number, domain: string) => {
|
|
55
|
+
const maxAge = days ? `; max-age=${days * 24 * 60 * 60}` : '';
|
|
56
|
+
document.cookie = `${encodeURIComponent(key)}=${encodeURIComponent(value)}${maxAge}; path=/; domain=${domain}`;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
// 显示/隐藏cookie提示
|
|
60
|
+
const toggleNoticeVisible = (val?: boolean) => {
|
|
61
|
+
if (typeof val === 'boolean') {
|
|
62
|
+
visibleVmodel.value = val;
|
|
63
|
+
} else {
|
|
64
|
+
visibleVmodel.value = !visibleVmodel.value;
|
|
65
|
+
}
|
|
66
|
+
nextTick(() => {
|
|
67
|
+
if (!visibleVmodel.value && isZh.value && getCookie(cookieKey.value) !== NOT_SHOW_BUT_AGREED) {
|
|
68
|
+
setCookie(cookieKey.value, NOT_SHOW_BUT_AGREED, 180, props.cookieDomain ?? location.hostname);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// 弹出框是否显示
|
|
74
|
+
const isDlgVisible = ref(false);
|
|
75
|
+
|
|
76
|
+
// 显示/隐藏弹出框
|
|
77
|
+
const toggleDlgVisible = (val?: boolean) => {
|
|
78
|
+
if (typeof val === 'boolean') {
|
|
79
|
+
isDlgVisible.value = val;
|
|
80
|
+
} else {
|
|
81
|
+
isDlgVisible.value = !isDlgVisible.value;
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
// 是否未签署
|
|
86
|
+
const isNotSigned = () => {
|
|
87
|
+
if (isZh.value) {
|
|
88
|
+
return getCookie(cookieKey.value) !== NOT_SHOW_BUT_AGREED;
|
|
89
|
+
}
|
|
90
|
+
return (getCookie(cookieKey.value) ?? '0') === NOT_SIGNED;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
// 是否全部同意
|
|
94
|
+
const isAllAgreed = () => {
|
|
95
|
+
if (isZh.value) {
|
|
96
|
+
return getCookie(cookieKey.value) === NOT_SHOW_BUT_AGREED;
|
|
97
|
+
}
|
|
98
|
+
return getCookie(cookieKey.value) === ALL_AGREED;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
onMounted(() => {
|
|
102
|
+
// 未签署,展示cookie notice
|
|
103
|
+
if (isNotSigned()) {
|
|
104
|
+
toggleNoticeVisible(true);
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
watch(locale, () => {
|
|
109
|
+
toggleNoticeVisible(isNotSigned());
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
// 用户同意所有cookie
|
|
113
|
+
const acceptAll = () => {
|
|
114
|
+
analysisAllowed.value = true;
|
|
115
|
+
setCookie(cookieKey.value, ALL_AGREED, 180, props.cookieDomain ?? location.hostname);
|
|
116
|
+
toggleNoticeVisible(false);
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
// 用户拒绝所有cookie,即仅同意必要cookie
|
|
120
|
+
const rejectAll = () => {
|
|
121
|
+
analysisAllowed.value = false;
|
|
122
|
+
setCookie(cookieKey.value, NECCESSARY_AGREED, 180, props.cookieDomain ?? location.hostname);
|
|
123
|
+
toggleNoticeVisible(false);
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const handleSave = () => {
|
|
127
|
+
if (analysisAllowed.value) {
|
|
128
|
+
acceptAll();
|
|
129
|
+
} else {
|
|
130
|
+
rejectAll();
|
|
131
|
+
}
|
|
132
|
+
toggleDlgVisible(false);
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
const handleAllowAll = () => {
|
|
136
|
+
analysisAllowed.value = true;
|
|
137
|
+
acceptAll();
|
|
138
|
+
toggleDlgVisible(false);
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const onDlgOpening = () => {
|
|
142
|
+
analysisAllowed.value = isAllAgreed();
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
defineExpose({
|
|
146
|
+
check() {
|
|
147
|
+
const agreed = isAllAgreed();
|
|
148
|
+
if (agreed === visibleVmodel.value) {
|
|
149
|
+
toggleNoticeVisible();
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
});
|
|
153
|
+
</script>
|
|
154
|
+
|
|
155
|
+
<template>
|
|
156
|
+
<ClientOnly>
|
|
157
|
+
<Teleport :to="wrapper || '#app'">
|
|
158
|
+
<div ref="cookieNoticeRef" v-if="visibleVmodel" class="cookie-notice">
|
|
159
|
+
<div class="cookie-notice-content">
|
|
160
|
+
<div :type="locale" :class="{ 'cookie-notice-wrap-grid': enableGrid, 'cookie-notice-wrap': !enableGrid }">
|
|
161
|
+
<div class="cookie-title">
|
|
162
|
+
<template v-if="isZh">
|
|
163
|
+
<el-icon style="transform: rotate(180deg); font-size: 24px; margin-right: 4px">
|
|
164
|
+
<svg style="width: 1em; height: 1em" xmlns="http://www.w3.org/2000/svg" version="1.1" width="24" height="24" viewBox="0 0 24 24">
|
|
165
|
+
<path fill="#002fa7" d="M21 12c0 4.971-4.029 9-9 9s-9-4.029-9-9c0-4.971 4.029-9 9-9s9 4.029 9 9z" />
|
|
166
|
+
<path
|
|
167
|
+
fill="#fff"
|
|
168
|
+
d="M12 9.4c0.552 0 1-0.448 1-1s-0.448-1-1-1c-0.552 0-1 0.448-1 1s0.448 1 1 1zM12.492 10.943c-0.042-0.233-0.246-0.41-0.492-0.41-0.276 0-0.5 0.224-0.5 0.5v5.5l0.008 0.090c0.042 0.233 0.246 0.41 0.492 0.41 0.276 0 0.5-0.224 0.5-0.5v-5.5l-0.008-0.090z"
|
|
169
|
+
/>
|
|
170
|
+
</svg>
|
|
171
|
+
</el-icon>
|
|
172
|
+
<p class="cookie-zh-title" style="margin-top: 0">
|
|
173
|
+
{{ t('cookie.desc') }}
|
|
174
|
+
<a :href="detailUrl" target="_blank" rel="noopener noreferrer">
|
|
175
|
+
{{ t('cookie.about') }}
|
|
176
|
+
</a>
|
|
177
|
+
</p>
|
|
178
|
+
</template>
|
|
179
|
+
<p v-else class="cookie-en-title">{{ t('cookie.title', [community]) }}</p>
|
|
180
|
+
<el-icon class="cookie-notice-close" @click="toggleNoticeVisible(false)">
|
|
181
|
+
<slot name="close-icon">
|
|
182
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
183
|
+
<path
|
|
184
|
+
fill="currentColor"
|
|
185
|
+
d="M18.528 5.472a.7.7 0 0 1 .074.903l-.074.087L12.988 12l.006.006-.989.989-.006-.006-5.538 5.54a.7.7 0 0 1-1.064-.903l.074-.087L11.009 12 5.471 6.462l-.074-.087a.7.7 0 0 1 .977-.977l.087.074 5.538 5.539 5.539-5.539a.7.7 0 0 1 .99 0m-3.977 8.089 3.978 3.978.074.087a.7.7 0 0 1-.977.977l-.087-.074-3.978-3.978a.7.7 0 0 1 .99-.99"
|
|
186
|
+
/>
|
|
187
|
+
</svg>
|
|
188
|
+
</slot>
|
|
189
|
+
</el-icon>
|
|
190
|
+
</div>
|
|
191
|
+
<div v-if="!isZh" class="cookie-en-content">
|
|
192
|
+
<p class="cookie-en-desc">
|
|
193
|
+
{{ t('cookie.desc') }}
|
|
194
|
+
<a :href="detailUrl" target="_blank" rel="noopener noreferrer">{{ t('cookie.about') }} </a>.
|
|
195
|
+
</p>
|
|
196
|
+
<div class="cookie-notice-right">
|
|
197
|
+
<el-button round type="primary" @click="acceptAll">{{ t('cookie.acceptAll') }}</el-button>
|
|
198
|
+
<el-button round type="primary" @click="rejectAll">{{ t('cookie.rejectAll') }}</el-button>
|
|
199
|
+
<el-button round type="primary" @click="toggleDlgVisible(true)">{{ t('cookie.manage') }}</el-button>
|
|
200
|
+
</div>
|
|
201
|
+
</div>
|
|
202
|
+
</div>
|
|
203
|
+
</div>
|
|
204
|
+
<el-dialog
|
|
205
|
+
:show-close="false"
|
|
206
|
+
:class="{ 'cookie-dlg-bottom': lePadV, 'grid-width-dlg': enableGrid }"
|
|
207
|
+
v-model="isDlgVisible"
|
|
208
|
+
destroy-on-close
|
|
209
|
+
@open="onDlgOpening"
|
|
210
|
+
>
|
|
211
|
+
<template #header>
|
|
212
|
+
<div v-if="!lePadV" class="dlg-close-icon" @click="isDlgVisible = false">
|
|
213
|
+
<svg viewBox="0 0 24 24" class="o-icon-close">
|
|
214
|
+
<path
|
|
215
|
+
fill="currentColor"
|
|
216
|
+
d="M18.528 5.472a.7.7 0 0 1 .074.903l-.074.087L12.988 12l.006.006-.989.989-.006-.006-5.538 5.54a.7.7 0 0 1-1.064-.903l.074-.087L11.009 12 5.471 6.462l-.074-.087a.7.7 0 0 1 .977-.977l.087.074 5.538 5.539 5.539-5.539a.7.7 0 0 1 .99 0m-3.977 8.089 3.978 3.978.074.087a.7.7 0 0 1-.977.977l-.087-.074-3.978-3.978a.7.7 0 0 1 .99-.99"
|
|
217
|
+
/>
|
|
218
|
+
</svg>
|
|
219
|
+
</div>
|
|
220
|
+
<span class="dlg-title">{{ t('cookie.manage') }}</span>
|
|
221
|
+
</template>
|
|
222
|
+
<div class="cookie-dlg-content">
|
|
223
|
+
<div class="content-item">
|
|
224
|
+
<div class="item-header">
|
|
225
|
+
<span class="item-title">{{ t('cookie.necessaryCookie') }}</span>
|
|
226
|
+
<span class="item-extra">{{ t('cookie.alwaysOn') }}</span>
|
|
227
|
+
</div>
|
|
228
|
+
<div class="item-detail">
|
|
229
|
+
{{ t('cookie.necessaryCookieDetail') }}
|
|
230
|
+
</div>
|
|
231
|
+
</div>
|
|
232
|
+
<div class="content-item">
|
|
233
|
+
<div class="item-header">
|
|
234
|
+
<span class="item-title">{{ t('cookie.analyticalCookie') }}</span>
|
|
235
|
+
<span class="item-extra">
|
|
236
|
+
<el-switch v-model="analysisAllowed" />
|
|
237
|
+
</span>
|
|
238
|
+
</div>
|
|
239
|
+
<div class="item-detail">
|
|
240
|
+
{{ t('cookie.analyticalCookieDetail') }}
|
|
241
|
+
</div>
|
|
242
|
+
</div>
|
|
243
|
+
</div>
|
|
244
|
+
<template #footer>
|
|
245
|
+
<template v-if="lePadV">
|
|
246
|
+
<el-button type="text" @click="handleSave">{{ t('cookie.saveSetting') }}</el-button>
|
|
247
|
+
<el-divider direction="vertical" style="margin: 0 24px" />
|
|
248
|
+
<el-button type="text" @click="handleAllowAll">{{ t('cookie.acceptAll') }}</el-button>
|
|
249
|
+
</template>
|
|
250
|
+
<template v-else>
|
|
251
|
+
<el-button round type="primary" @click="handleSave">{{ t('cookie.saveSetting') }}</el-button>
|
|
252
|
+
<el-button round type="primary" @click="handleAllowAll">{{ t('cookie.acceptAll') }}</el-button>
|
|
253
|
+
</template>
|
|
254
|
+
</template>
|
|
255
|
+
</el-dialog>
|
|
256
|
+
</div>
|
|
257
|
+
</Teleport>
|
|
258
|
+
</ClientOnly>
|
|
259
|
+
</template>
|
|
260
|
+
|
|
261
|
+
<style lang="scss">
|
|
262
|
+
.cookie-dlg-bottom {
|
|
263
|
+
margin: 0;
|
|
264
|
+
position: absolute;
|
|
265
|
+
bottom: 0;
|
|
266
|
+
left: 50%;
|
|
267
|
+
transform: translateX(-50%);
|
|
268
|
+
}
|
|
269
|
+
</style>
|
|
270
|
+
<style lang="scss" scoped>
|
|
271
|
+
.el-button {
|
|
272
|
+
--el-button-bg-color: transparent;
|
|
273
|
+
--el-button-hover-bg-color: transparent;
|
|
274
|
+
--el-button-active-bg-color: transparent;
|
|
275
|
+
|
|
276
|
+
--el-button-text-color: var(--o-color-primary1);
|
|
277
|
+
--el-button-hover-text-color: var(--o-color-primary2);
|
|
278
|
+
--el-button-active-text-color: var(--o-color-primary3);
|
|
279
|
+
|
|
280
|
+
--el-button-border-color: var(--o-color-primary1);
|
|
281
|
+
--el-button-hover-border-color: var(--o-color-primary2);
|
|
282
|
+
--el-button-active-border-color: var(--o-color-primary3);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.cookie-notice {
|
|
286
|
+
position: fixed;
|
|
287
|
+
bottom: 0;
|
|
288
|
+
z-index: 999;
|
|
289
|
+
width: 100%;
|
|
290
|
+
--el-color-primary: var(--o-color-primary1);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.cookie-notice-content {
|
|
294
|
+
background-color: rgba(var(--o-mixedgray-1), 0.9);
|
|
295
|
+
backdrop-filter: blur(5px);
|
|
296
|
+
box-shadow: var(--o-shadow-1);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.cookie-notice-wrap {
|
|
300
|
+
position: relative;
|
|
301
|
+
margin: 0 auto;
|
|
302
|
+
padding: 16px var(--layout-content-padding);
|
|
303
|
+
max-width: var(--layout-content-max-width);
|
|
304
|
+
@media (1680px >= width >= 1201px) {
|
|
305
|
+
padding: 12px var(--layout-content-padding);
|
|
306
|
+
}
|
|
307
|
+
@include respond-to('pad_h') {
|
|
308
|
+
padding: 8px var(--layout-content-padding);
|
|
309
|
+
}
|
|
310
|
+
@media (max-width: 840px) {
|
|
311
|
+
padding: 16px var(--layout-content-padding);
|
|
312
|
+
}
|
|
313
|
+
@include respond-to('phone') {
|
|
314
|
+
padding: 16px var(--layout-content-padding);
|
|
315
|
+
}
|
|
316
|
+
&:not([type='zh']) {
|
|
317
|
+
@media (max-width: 840px) {
|
|
318
|
+
flex-direction: column;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.cookie-notice-wrap-grid {
|
|
324
|
+
width: var(--grid-content-width);
|
|
325
|
+
padding: 16px 0;
|
|
326
|
+
margin: 0 auto;
|
|
327
|
+
@media (1680px >= width >= 1201px) {
|
|
328
|
+
padding: 12px 0;
|
|
329
|
+
}
|
|
330
|
+
@include respond-to('pad_h') {
|
|
331
|
+
padding: 8px 0;
|
|
332
|
+
}
|
|
333
|
+
@media (max-width: 840px) {
|
|
334
|
+
padding: 16px 0;
|
|
335
|
+
}
|
|
336
|
+
@include respond-to('phone') {
|
|
337
|
+
padding: 16px 0;
|
|
338
|
+
}
|
|
339
|
+
&:not([type='zh']) {
|
|
340
|
+
@media (max-width: 840px) {
|
|
341
|
+
padding: 16px 0;
|
|
342
|
+
flex-direction: column;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.cookie-title {
|
|
348
|
+
display: flex;
|
|
349
|
+
font-size: 16px;
|
|
350
|
+
line-height: calc(1em + 8px);
|
|
351
|
+
color: var(--o-color-info1);
|
|
352
|
+
font-weight: 500;
|
|
353
|
+
@media (max-width: 1680px) {
|
|
354
|
+
font-size: 14px;
|
|
355
|
+
}
|
|
356
|
+
@include respond-to('<=pad_v') {
|
|
357
|
+
text-align: center;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.cookie-en-title {
|
|
362
|
+
@include respond-to('<=pad_v') {
|
|
363
|
+
margin-left: auto;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.cookie-zh-title {
|
|
368
|
+
font-size: 14px;
|
|
369
|
+
line-height: 22px;
|
|
370
|
+
margin-right: 8px;
|
|
371
|
+
text-align: start;
|
|
372
|
+
@include respond-to('<=pad_v') {
|
|
373
|
+
font-size: 12px;
|
|
374
|
+
line-height: 18px;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.cookie-en-content {
|
|
379
|
+
display: flex;
|
|
380
|
+
width: 100%;
|
|
381
|
+
margin-top: 8px;
|
|
382
|
+
@include respond-to('<=pad_v') {
|
|
383
|
+
flex-direction: column;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
.cookie-en-desc {
|
|
388
|
+
font-size: 12px;
|
|
389
|
+
line-height: 18px;
|
|
390
|
+
color: var(--o-color-info2);
|
|
391
|
+
@media (min-width: 1681px) {
|
|
392
|
+
margin-right: 48px;
|
|
393
|
+
}
|
|
394
|
+
@media (1680px >= width >= 1201px) {
|
|
395
|
+
margin-right: 40px;
|
|
396
|
+
}
|
|
397
|
+
@include respond-to('pad') {
|
|
398
|
+
margin-right: 24px;
|
|
399
|
+
}
|
|
400
|
+
@include respond-to('<=pad_v') {
|
|
401
|
+
margin: 0;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.cookie-notice-right {
|
|
406
|
+
display: flex;
|
|
407
|
+
margin-left: auto;
|
|
408
|
+
|
|
409
|
+
.el-button:not(:first-child) {
|
|
410
|
+
margin-left: 16px;
|
|
411
|
+
@media (1680px >= width >= 1201px) {
|
|
412
|
+
margin-left: 12px;
|
|
413
|
+
}
|
|
414
|
+
@include respond-to('pad_h') {
|
|
415
|
+
margin-left: 8px;
|
|
416
|
+
}
|
|
417
|
+
@media (min-width: 841px) {
|
|
418
|
+
margin-left: 12px;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
@include respond-to('<=pad_v') {
|
|
423
|
+
margin-top: 16px;
|
|
424
|
+
width: 100%;
|
|
425
|
+
display: grid;
|
|
426
|
+
grid-template-columns: 1fr 1fr;
|
|
427
|
+
grid-template-rows: auto auto;
|
|
428
|
+
gap: 12px;
|
|
429
|
+
|
|
430
|
+
.el-button {
|
|
431
|
+
margin: 0;
|
|
432
|
+
&:nth-child(1) {
|
|
433
|
+
grid-column: 1;
|
|
434
|
+
grid-row: 1;
|
|
435
|
+
}
|
|
436
|
+
&:nth-child(2) {
|
|
437
|
+
grid-column: 2;
|
|
438
|
+
grid-row: 1;
|
|
439
|
+
}
|
|
440
|
+
&:nth-child(3) {
|
|
441
|
+
grid-column: 1 / span 2;
|
|
442
|
+
grid-row: 2;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.cookie-notice-close {
|
|
449
|
+
display: block;
|
|
450
|
+
overflow: visible !important;
|
|
451
|
+
margin-left: auto;
|
|
452
|
+
cursor: pointer;
|
|
453
|
+
color: var(--o-color-info1);
|
|
454
|
+
font-size: 24px;
|
|
455
|
+
&:hover {
|
|
456
|
+
color: var(--o-color-primary2);
|
|
457
|
+
}
|
|
458
|
+
@include x-svg-hover;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.cookie-dlg-content {
|
|
462
|
+
.content-item {
|
|
463
|
+
margin-top: 24px;
|
|
464
|
+
@media (1680px >= width >= 1201px) {
|
|
465
|
+
margin-top: 16px;
|
|
466
|
+
}
|
|
467
|
+
@include respond-to('<=pad') {
|
|
468
|
+
margin-top: 12px;
|
|
469
|
+
}
|
|
470
|
+
&:nth-child(2) {
|
|
471
|
+
.item-detail {
|
|
472
|
+
font-size: 16px !important;
|
|
473
|
+
line-height: calc(1em + 8px);
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
.item-header {
|
|
477
|
+
display: flex;
|
|
478
|
+
align-items: center;
|
|
479
|
+
justify-content: space-between;
|
|
480
|
+
.item-title {
|
|
481
|
+
font-size: 20px;
|
|
482
|
+
line-height: calc(1em + 8px);
|
|
483
|
+
color: var(--o-color-info1);
|
|
484
|
+
font-weight: 500;
|
|
485
|
+
@media (1680px >= width >= 1201px) {
|
|
486
|
+
font-size: 18px;
|
|
487
|
+
}
|
|
488
|
+
@include respond-to('<=pad') {
|
|
489
|
+
font-size: 16px;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.item-extra {
|
|
494
|
+
font-size: 14px;
|
|
495
|
+
color: var(--o-color-info3);
|
|
496
|
+
margin-left: 24px;
|
|
497
|
+
@include respond-to('<=pad') {
|
|
498
|
+
font-size: 12px;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
.item-detail {
|
|
503
|
+
font-size: 16px;
|
|
504
|
+
line-height: calc(1em + 8px);
|
|
505
|
+
color: var(--o-color-info2);
|
|
506
|
+
margin-top: 16px;
|
|
507
|
+
@media (max-width: 1680px) {
|
|
508
|
+
margin-top: 12px;
|
|
509
|
+
font-size: 14px;
|
|
510
|
+
}
|
|
511
|
+
@include respond-to('<=pad') {
|
|
512
|
+
margin-top: 8px;
|
|
513
|
+
}
|
|
514
|
+
@media (max-width: 840px) {
|
|
515
|
+
margin-top: 8px;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
.dlg-title {
|
|
522
|
+
font-size: 24px;
|
|
523
|
+
line-height: calc(1em + 8px);
|
|
524
|
+
@media (1680px >= width >= 1201px) {
|
|
525
|
+
font-size: 20px;
|
|
526
|
+
}
|
|
527
|
+
@include respond-to('<=pad') {
|
|
528
|
+
font-size: 18px;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
.dlg-close-icon {
|
|
533
|
+
font-size: 24px;
|
|
534
|
+
position: absolute;
|
|
535
|
+
top: 8px;
|
|
536
|
+
right: 8px;
|
|
537
|
+
color: var(--o-color-info1);
|
|
538
|
+
cursor: pointer;
|
|
539
|
+
.o-icon-close {
|
|
540
|
+
width: 1em;
|
|
541
|
+
height: 1em;
|
|
542
|
+
transition: all var(--o-duration-m1) var(--o-easing-standard-in);
|
|
543
|
+
}
|
|
544
|
+
@include hover {
|
|
545
|
+
color: var(--o-color-primary2);
|
|
546
|
+
.o-icon-close {
|
|
547
|
+
transform: rotate(180deg);
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
:deep(.el-dialog) {
|
|
553
|
+
@include respond-to('<=pad_v') {
|
|
554
|
+
--el-dialog-width: 100vw;
|
|
555
|
+
}
|
|
556
|
+
&.grid-width-dlg {
|
|
557
|
+
@include respond-to('>pad') {
|
|
558
|
+
--el-dialog-width: var(--grid-14);
|
|
559
|
+
}
|
|
560
|
+
@include respond-to('pad_h') {
|
|
561
|
+
--el-dialog-width: var(--grid-8);
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
:deep(.el-dialog) {
|
|
567
|
+
--el-bg-color: var(--o-color-control-light);
|
|
568
|
+
--el-dialog-padding-primary: 32px;
|
|
569
|
+
@include respond-to('laptop') {
|
|
570
|
+
--el-dialog-padding-primary: 24px;
|
|
571
|
+
}
|
|
572
|
+
@include respond-to('pad_h') {
|
|
573
|
+
--el-dialog-padding-primary: 16px;
|
|
574
|
+
}
|
|
575
|
+
@include respond-to('phone') {
|
|
576
|
+
--el-dialog-padding-primary: 16px 24px;
|
|
577
|
+
}
|
|
578
|
+
.el-dialog__header {
|
|
579
|
+
text-align: center;
|
|
580
|
+
padding: 0;
|
|
581
|
+
}
|
|
582
|
+
.el-dialog__footer {
|
|
583
|
+
text-align: center;
|
|
584
|
+
padding-top: 0;
|
|
585
|
+
margin-top: 24px;
|
|
586
|
+
@media (1680px >= width >= 1201px) {
|
|
587
|
+
margin-top: 16px;
|
|
588
|
+
}
|
|
589
|
+
@include respond-to('<=pad_h') {
|
|
590
|
+
margin-top: 12px;
|
|
591
|
+
}
|
|
592
|
+
.el-button+.el-button {
|
|
593
|
+
margin-left: 16px;
|
|
594
|
+
@media (1680px >= width >= 1201px) {
|
|
595
|
+
margin-left: 12px;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
.el-button--text {
|
|
599
|
+
color: var(--o-color-info1);
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
</style>
|