@vc-shell/framework 1.0.289 → 1.0.291
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/CHANGELOG.md +18 -0
- package/core/composables/index.ts +1 -0
- package/core/composables/useTheme/index.ts +60 -0
- package/core/directives/loading/styles.css +6 -1
- package/dist/core/composables/index.d.ts +1 -0
- package/dist/core/composables/index.d.ts.map +1 -1
- package/dist/core/composables/useTheme/index.d.ts +11 -0
- package/dist/core/composables/useTheme/index.d.ts.map +1 -0
- package/dist/framework.js +27889 -27362
- package/dist/index.css +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/locales/en.json +6 -0
- package/dist/shared/components/app-bar-button/app-bar-button.vue.d.ts +56 -0
- package/dist/shared/components/app-bar-button/app-bar-button.vue.d.ts.map +1 -0
- package/dist/shared/components/app-bar-button/index.d.ts +2 -0
- package/dist/shared/components/app-bar-button/index.d.ts.map +1 -0
- package/dist/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/composables/useBladeNavigation/index.d.ts.map +1 -1
- package/dist/shared/components/index.d.ts +3 -0
- package/dist/shared/components/index.d.ts.map +1 -1
- package/dist/shared/components/language-selector/language-selector.vue.d.ts.map +1 -1
- package/dist/shared/components/notification-dropdown/notification-dropdown.vue.d.ts.map +1 -1
- package/dist/shared/components/notification-template/notification-template.vue.d.ts.map +1 -1
- package/dist/shared/components/sidebar/index.d.ts +2 -0
- package/dist/shared/components/sidebar/index.d.ts.map +1 -0
- package/dist/shared/components/sidebar/sidebar.vue.d.ts +49 -0
- package/dist/shared/components/sidebar/sidebar.vue.d.ts.map +1 -0
- package/dist/shared/components/theme-selector/index.d.ts +2 -0
- package/dist/shared/components/theme-selector/index.d.ts.map +1 -0
- package/dist/shared/components/theme-selector/theme-selector.vue.d.ts +3 -0
- package/dist/shared/components/theme-selector/theme-selector.vue.d.ts.map +1 -0
- package/dist/shared/components/user-dropdown-button/index.d.ts +6 -0
- package/dist/shared/components/user-dropdown-button/index.d.ts.map +1 -1
- package/dist/shared/components/user-dropdown-button/user-dropdown-button.vue.d.ts +1 -0
- package/dist/shared/components/user-dropdown-button/user-dropdown-button.vue.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/types/index.d.ts +3 -0
- package/dist/shared/modules/dynamic/types/index.d.ts.map +1 -1
- package/dist/shared/pages/ChangePasswordPage/components/change-password/ChangePassword.vue.d.ts +16 -3
- package/dist/shared/pages/ChangePasswordPage/components/change-password/ChangePassword.vue.d.ts.map +1 -1
- package/dist/shared/pages/ChangePasswordPage/components/change-password/index.d.ts +7 -7
- package/dist/shared/pages/ChangePasswordPage/components/change-password/index.d.ts.map +1 -1
- package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts +24 -3
- package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts.map +1 -1
- package/dist/shared/pages/InvitePage/components/invite/index.d.ts +24 -1
- package/dist/shared/pages/InvitePage/components/invite/index.d.ts.map +1 -1
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts +24 -3
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts.map +1 -1
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/index.d.ts +24 -1
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/index.d.ts.map +1 -1
- package/dist/tailwind.config.d.ts +42 -15
- package/dist/tailwind.config.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-link/vc-link.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-status/vc-status.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-tooltip/vc-tooltip.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-video/vc-video.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-checkbox/vc-checkbox.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-field/_internal/vc-field-type/vc-field-type.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-field/vc-field.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-slider/vc-slider.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.stories.d.ts +26 -0
- package/dist/ui/components/organisms/vc-app/vc-app.stories.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts +26 -0
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-add-new/vc-table-add-new.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-base-header/vc-table-base-header.vue.d.ts +1 -0
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-base-header/vc-table-base-header.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-empty/vc-table-empty.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts +1 -0
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/vc-table.stories.d.ts +15 -0
- package/dist/ui/components/organisms/vc-table/vc-table.stories.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts +3 -0
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
- package/package.json +4 -4
- package/shared/components/app-bar-button/app-bar-button.vue +169 -0
- package/shared/components/app-bar-button/index.ts +1 -0
- package/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue +138 -38
- package/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue +10 -1
- package/shared/components/blade-navigation/composables/useBladeNavigation/index.ts +55 -30
- package/shared/components/change-password/change-password.vue +7 -1
- package/shared/components/common/popup/vc-popup-error.vue +1 -1
- package/shared/components/common/popup/vc-popup-warning.vue +1 -1
- package/shared/components/index.ts +3 -0
- package/shared/components/language-selector/language-selector.vue +55 -39
- package/shared/components/notification-dropdown/_internal/notification/notification.vue +7 -1
- package/shared/components/notification-dropdown/notification-dropdown.vue +96 -83
- package/shared/components/notification-template/notification-template.vue +66 -22
- package/shared/components/notifications/styles/index.scss +1 -0
- package/shared/components/sidebar/index.ts +1 -0
- package/shared/components/sidebar/sidebar.vue +96 -0
- package/shared/components/theme-selector/index.ts +1 -0
- package/shared/components/theme-selector/theme-selector.vue +95 -0
- package/shared/components/user-dropdown-button/user-dropdown-button.vue +155 -86
- package/shared/modules/assets/components/assets-details/assets-details.vue +9 -2
- package/shared/modules/assets-manager/components/assets-manager/assets-manager.vue +16 -6
- package/shared/modules/dynamic/composables/useFilterBuilder/index.ts +1 -1
- package/shared/modules/dynamic/helpers/nodeBuilder.ts +1 -1
- package/shared/modules/dynamic/pages/dynamic-blade-form.vue +6 -2
- package/shared/modules/dynamic/pages/dynamic-blade-list.vue +16 -2
- package/shared/modules/dynamic/types/index.ts +3 -0
- package/shared/pages/ChangePasswordPage/components/change-password/ChangePassword.vue +14 -9
- package/shared/pages/InvitePage/components/invite/Invite.vue +59 -15
- package/shared/pages/LoginPage/components/login/Login.vue +78 -22
- package/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue +67 -15
- package/tailwind.config.ts +281 -15
- package/ui/components/atoms/vc-badge/vc-badge.vue +38 -23
- package/ui/components/atoms/vc-button/vc-button.vue +37 -34
- package/ui/components/atoms/vc-card/vc-card.vue +17 -11
- package/ui/components/atoms/vc-col/vc-col.vue +4 -6
- package/ui/components/atoms/vc-container/vc-container.vue +26 -8
- package/ui/components/atoms/vc-hint/vc-hint.vue +8 -2
- package/ui/components/atoms/vc-icon/vc-icon.vue +3 -3
- package/ui/components/atoms/vc-image/vc-image.vue +33 -9
- package/ui/components/atoms/vc-label/vc-label.vue +38 -9
- package/ui/components/atoms/vc-link/vc-link.vue +15 -8
- package/ui/components/atoms/vc-loading/vc-loading.vue +37 -8
- package/ui/components/atoms/vc-progress/vc-progress.vue +29 -21
- package/ui/components/atoms/vc-row/vc-row.vue +4 -2
- package/ui/components/atoms/vc-status/vc-status.vue +29 -20
- package/ui/components/atoms/vc-status-icon/vc-status-icon.vue +20 -3
- package/ui/components/atoms/vc-switch/vc-switch.vue +41 -17
- package/ui/components/atoms/vc-tooltip/vc-tooltip.vue +35 -9
- package/ui/components/atoms/vc-video/vc-video.vue +28 -6
- package/ui/components/atoms/vc-widget/vc-widget.vue +59 -28
- package/ui/components/molecules/vc-breadcrumbs/_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue +29 -27
- package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue +34 -11
- package/ui/components/molecules/vc-checkbox/vc-checkbox.vue +43 -21
- package/ui/components/molecules/vc-editor/vc-editor.vue +70 -32
- package/ui/components/molecules/vc-field/_internal/vc-field-type/vc-field-type.vue +32 -16
- package/ui/components/molecules/vc-field/vc-field.vue +36 -13
- package/ui/components/molecules/vc-file-upload/vc-file-upload.vue +75 -25
- package/ui/components/molecules/vc-input/vc-input.vue +279 -218
- package/ui/components/molecules/vc-input-currency/vc-input-currency.vue +24 -2
- package/ui/components/molecules/vc-multivalue/vc-multivalue.vue +102 -64
- package/ui/components/molecules/vc-notification/vc-notification.vue +40 -15
- package/ui/components/molecules/vc-pagination/vc-pagination.vue +19 -15
- package/ui/components/molecules/vc-radio-button/vc-radio-button.vue +18 -23
- package/ui/components/molecules/vc-rating/vc-rating.vue +9 -5
- package/ui/components/molecules/vc-select/vc-select.vue +211 -65
- package/ui/components/molecules/vc-slider/vc-slider.vue +32 -13
- package/ui/components/molecules/vc-textarea/vc-textarea.vue +17 -12
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +68 -14
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +112 -122
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +213 -96
- package/ui/components/organisms/vc-app/vc-app.vue +41 -15
- package/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue +78 -30
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue +81 -59
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue +27 -13
- package/ui/components/organisms/vc-blade/vc-blade.vue +177 -46
- package/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue +40 -11
- package/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue +52 -18
- package/ui/components/organisms/vc-gallery/vc-gallery.vue +38 -6
- package/ui/components/organisms/vc-login-form/vc-login-form.vue +40 -14
- package/ui/components/organisms/vc-popup/vc-popup.vue +186 -44
- package/ui/components/organisms/vc-table/_internal/vc-table-add-new/vc-table-add-new.vue +25 -6
- package/ui/components/organisms/vc-table/_internal/vc-table-base-header/vc-table-base-header.vue +48 -12
- package/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue +130 -60
- package/ui/components/organisms/vc-table/_internal/vc-table-column-switcher/vc-table-column-switcher.vue +55 -7
- package/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue +17 -5
- package/ui/components/organisms/vc-table/_internal/vc-table-empty/vc-table-empty.vue +38 -6
- package/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue +111 -62
- package/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue +139 -46
- package/ui/components/organisms/vc-table/vc-table.vue +370 -128
|
@@ -1,30 +1,33 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="
|
|
3
|
-
<div class="
|
|
4
|
-
<div
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<VcIcon
|
|
9
|
-
:icon="icon"
|
|
10
|
-
size="l"
|
|
11
|
-
></VcIcon>
|
|
12
|
-
</div>
|
|
13
|
-
<div>
|
|
14
|
-
<p
|
|
15
|
-
class="tw-text-[color:var(--basic-black-color)] tw-text-xl tw-leading-[19px] tw-font-bold tw-m-0 tw-mb-1 [word-break:break-word]"
|
|
16
|
-
:class="{ 'tw-mr-4': $isDesktop.value }"
|
|
2
|
+
<div class="vc-notification-template">
|
|
3
|
+
<div class="vc-notification-template__container">
|
|
4
|
+
<div class="vc-notification-template__left">
|
|
5
|
+
<div
|
|
6
|
+
class="vc-notification-template__icon-container"
|
|
7
|
+
:style="{ 'background-color': color }"
|
|
17
8
|
>
|
|
18
|
-
|
|
9
|
+
<VcIcon
|
|
10
|
+
:icon="icon"
|
|
11
|
+
size="l"
|
|
12
|
+
aria-label="Notification Icon"
|
|
13
|
+
></VcIcon>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="vc-notification-template__content">
|
|
16
|
+
<p
|
|
17
|
+
class="vc-notification-template__title"
|
|
18
|
+
:class="{ 'vc-notification-template__title--desktop': $isDesktop.value }"
|
|
19
|
+
>
|
|
20
|
+
{{ title }}
|
|
21
|
+
</p>
|
|
22
|
+
<slot></slot>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="vc-notification-template__right">
|
|
26
|
+
<p class="vc-notification-template__time">
|
|
27
|
+
{{ pushTime }}
|
|
19
28
|
</p>
|
|
20
|
-
<slot></slot>
|
|
21
29
|
</div>
|
|
22
30
|
</div>
|
|
23
|
-
<div class="tw-flex tw-shrink-0">
|
|
24
|
-
<p class="tw-text-s tw-leading-[18px] tw-text-[#8e8e8e] tw-m-0">
|
|
25
|
-
{{ pushTime }}
|
|
26
|
-
</p>
|
|
27
|
-
</div>
|
|
28
31
|
</div>
|
|
29
32
|
</template>
|
|
30
33
|
|
|
@@ -49,3 +52,44 @@ const pushTime = computed(() => {
|
|
|
49
52
|
return moment(props.notification.created).locale(locale).format("L LT");
|
|
50
53
|
});
|
|
51
54
|
</script>
|
|
55
|
+
|
|
56
|
+
<style lang="scss">
|
|
57
|
+
:root {
|
|
58
|
+
--notification-template-icon-color: var(--additional-50);
|
|
59
|
+
--notification-template-text-color: var(--additional-950);
|
|
60
|
+
--notification-template-time-color: var(--neutrals-600);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.vc-notification-template {
|
|
64
|
+
&__container {
|
|
65
|
+
@apply tw-flex tw-flex-row tw-justify-between tw-grow tw-basis-0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&__left {
|
|
69
|
+
@apply tw-flex tw-items-center;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&__icon-container {
|
|
73
|
+
@apply tw-w-[41px] tw-h-[41px] tw-rounded-full tw-text-[color:var(--notification-template-icon-color)]
|
|
74
|
+
tw-mr-4 tw-flex tw-items-center tw-justify-center tw-shrink-0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&__title {
|
|
78
|
+
@apply tw-text-[color:var(--notification-template-text-color)] tw-text-lg tw-leading-[19px]
|
|
79
|
+
tw-font-bold tw-m-0 tw-mb-1;
|
|
80
|
+
word-break: break-word;
|
|
81
|
+
|
|
82
|
+
&--desktop {
|
|
83
|
+
@apply tw-mr-4;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&__right {
|
|
88
|
+
@apply tw-flex tw-shrink-0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&__time {
|
|
92
|
+
@apply tw-text-sm tw-text-[color:var(--notification-template-time-color)] tw-m-0;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Sidebar } from "./sidebar.vue";
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<template v-if="isExpanded">
|
|
3
|
+
<div
|
|
4
|
+
v-if="isExpanded"
|
|
5
|
+
class="sidebar__overlay"
|
|
6
|
+
@click.stop="$emit('close')"
|
|
7
|
+
></div>
|
|
8
|
+
|
|
9
|
+
<div
|
|
10
|
+
v-if="isExpanded"
|
|
11
|
+
:class="[
|
|
12
|
+
'sidebar__dropdown',
|
|
13
|
+
{
|
|
14
|
+
'sidebar__dropdown--mobile': $isMobile.value && render === 'mobile',
|
|
15
|
+
'sidebar__dropdown--desktop': $isDesktop.value && render === 'desktop',
|
|
16
|
+
'sidebar__dropdown--always': render === 'always',
|
|
17
|
+
'sidebar__dropdown--left': position === 'left',
|
|
18
|
+
'sidebar__dropdown--right': position === 'right',
|
|
19
|
+
},
|
|
20
|
+
]"
|
|
21
|
+
>
|
|
22
|
+
<slot name="header">
|
|
23
|
+
<div class="sidebar__header">
|
|
24
|
+
<VcIcon
|
|
25
|
+
icon="fas fa-times"
|
|
26
|
+
size="xl"
|
|
27
|
+
@click.stop="$emit('close')"
|
|
28
|
+
></VcIcon>
|
|
29
|
+
</div>
|
|
30
|
+
</slot>
|
|
31
|
+
|
|
32
|
+
<slot name="content"></slot>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
35
|
+
<template v-else>
|
|
36
|
+
<slot name="content"></slot>
|
|
37
|
+
</template>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<script lang="ts" setup>
|
|
41
|
+
export interface Props {
|
|
42
|
+
position: "left" | "right";
|
|
43
|
+
render: "always" | "mobile" | "desktop";
|
|
44
|
+
isExpanded: boolean;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface Emits {
|
|
48
|
+
(event: "close"): void;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
defineEmits<Emits>();
|
|
52
|
+
|
|
53
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
54
|
+
position: "right",
|
|
55
|
+
render: "always",
|
|
56
|
+
});
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
<style lang="scss">
|
|
60
|
+
:root {
|
|
61
|
+
--sidebar-mobile-bg-color: var(--neutral-500);
|
|
62
|
+
--sidebar-dropdown-mobile-icon-color: var(--primary-500);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.sidebar {
|
|
66
|
+
@apply tw-relative;
|
|
67
|
+
|
|
68
|
+
&__overlay {
|
|
69
|
+
@apply tw-fixed tw-left-0 tw-top-0 tw-right-0 tw-bottom-0 tw-z-[10000]
|
|
70
|
+
tw-bg-[--sidebar-mobile-bg-color] tw-backdrop-blur-[3px];
|
|
71
|
+
}
|
|
72
|
+
&__header {
|
|
73
|
+
@apply tw-text-[color:var(--sidebar-dropdown-mobile-icon-color)] tw-flex tw-justify-end tw-items-center tw-p-4 tw-cursor-pointer;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&__dropdown {
|
|
77
|
+
@apply tw-absolute tw-top-[var(--app-bar-button-height)] tw-bg-[color:var(--app-bar-button-bg-color)] tw-z-[10000] tw-flex tw-flex-col;
|
|
78
|
+
box-shadow: var(--app-bar-button-shadow);
|
|
79
|
+
|
|
80
|
+
&--mobile,
|
|
81
|
+
&--always,
|
|
82
|
+
&--desktop {
|
|
83
|
+
@apply tw-hidden tw-fixed tw-top-0 tw-max-h-full tw-max-w-[300px] tw-w-full tw-bottom-0 tw-z-[10000] tw-border-0;
|
|
84
|
+
display: flex !important;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&--left {
|
|
88
|
+
@apply tw-left-0 tw-right-auto;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&--right {
|
|
92
|
+
@apply tw-right-0 tw-left-auto;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ThemeSelector } from "./theme-selector.vue";
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<AppBarButtonTemplate
|
|
3
|
+
icon="fas fa-palette"
|
|
4
|
+
:title="themeText(current)"
|
|
5
|
+
>
|
|
6
|
+
<template #dropdown-content="{ opened, toggle }">
|
|
7
|
+
<Sidebar
|
|
8
|
+
:is-expanded="$isMobile.value ? opened : false"
|
|
9
|
+
position="right"
|
|
10
|
+
render="mobile"
|
|
11
|
+
@close="toggle"
|
|
12
|
+
>
|
|
13
|
+
<template #content>
|
|
14
|
+
<div
|
|
15
|
+
v-if="opened"
|
|
16
|
+
class="vc-theme-selector__dropdown"
|
|
17
|
+
>
|
|
18
|
+
<div
|
|
19
|
+
v-for="(theme, i) in themes"
|
|
20
|
+
:key="i"
|
|
21
|
+
class="vc-theme-selector__item"
|
|
22
|
+
:class="{ 'vc-theme-selector__item--active': theme === current }"
|
|
23
|
+
@click="
|
|
24
|
+
() => {
|
|
25
|
+
setTheme(theme);
|
|
26
|
+
toggle();
|
|
27
|
+
}
|
|
28
|
+
"
|
|
29
|
+
>
|
|
30
|
+
{{ themeText(theme) }}
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
</Sidebar>
|
|
35
|
+
</template>
|
|
36
|
+
</AppBarButtonTemplate>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<script lang="ts" setup>
|
|
40
|
+
import { AppBarButtonTemplate } from "./../app-bar-button";
|
|
41
|
+
import { Sidebar } from "./../sidebar";
|
|
42
|
+
import { useTheme } from "./../../../core/composables/useTheme";
|
|
43
|
+
import { watch, computed } from "vue";
|
|
44
|
+
import { notification } from "./../";
|
|
45
|
+
import * as _ from "lodash-es";
|
|
46
|
+
import { useI18n } from "vue-i18n";
|
|
47
|
+
import { createUnrefFn } from "@vueuse/core";
|
|
48
|
+
|
|
49
|
+
const { current, themes, setTheme } = useTheme();
|
|
50
|
+
const { t } = useI18n({ useScope: "global" });
|
|
51
|
+
|
|
52
|
+
watch(
|
|
53
|
+
() => current,
|
|
54
|
+
(newVal) => {
|
|
55
|
+
notification(themeText.value(newVal));
|
|
56
|
+
},
|
|
57
|
+
{ deep: true },
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
const themeText = computed(() => {
|
|
61
|
+
return createUnrefFn((theme: string) => {
|
|
62
|
+
return _.capitalize(theme) + t("COMPONENTS.THEME_SELECTOR.THEME_CHANGED");
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
</script>
|
|
66
|
+
|
|
67
|
+
<style lang="scss">
|
|
68
|
+
:root {
|
|
69
|
+
--theme-selector-bg-color: var(--additional-50);
|
|
70
|
+
--theme-selector-text-color: var(--base-text-color, var(--neutrals-950));
|
|
71
|
+
--theme-selector-border-color: var(--app-bar-divider-color);
|
|
72
|
+
--theme-selector-hover-bg-color: var(--primary-50);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.vc-theme-selector {
|
|
76
|
+
&__dropdown {
|
|
77
|
+
@apply tw-bg-[color:var(--theme-selector-bg-color)] tw-w-full;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&__item {
|
|
81
|
+
@apply tw-p-3 tw-text-sm tw-text-[color:var(--theme-selector-text-color)]
|
|
82
|
+
tw-border-l tw-border-solid tw-border-l-[var(--theme-selector-border-color)]
|
|
83
|
+
tw-border-b tw-border-b-[var(--theme-selector-border-color)] tw-w-full tw-cursor-pointer;
|
|
84
|
+
transition: background-color 0.2s;
|
|
85
|
+
|
|
86
|
+
&:hover {
|
|
87
|
+
background-color: var(--theme-selector-hover-bg-color);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&--active {
|
|
91
|
+
@apply tw-bg-[color:var(--theme-selector-hover-bg-color)];
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
</style>
|
|
@@ -1,72 +1,83 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
:class="{
|
|
6
|
-
'user-dropdown-button_active': accountMenuVisible,
|
|
7
|
-
'tw-w-auto': disabled,
|
|
8
|
-
}"
|
|
9
|
-
@click.stop="toggleAccountMenuVisible"
|
|
2
|
+
<AppBarButtonTemplate
|
|
3
|
+
position="bottom-start"
|
|
4
|
+
:before-open="beforeOpen"
|
|
10
5
|
>
|
|
11
|
-
<
|
|
6
|
+
<template #button="{ opened }">
|
|
12
7
|
<div
|
|
13
|
-
|
|
14
|
-
class="
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
v-else
|
|
19
|
-
icon="fas fa-user-circle"
|
|
20
|
-
size="xxl"
|
|
21
|
-
class="tw-text-[color:var(--app-bar-button-color)]"
|
|
22
|
-
/>
|
|
23
|
-
<div class="tw-grow tw-basis-0 tw-ml-3 tw-overflow-hidden">
|
|
24
|
-
<div class="user-dropdown-button__name tw-truncate">
|
|
25
|
-
{{ name || user?.userName }}
|
|
26
|
-
</div>
|
|
27
|
-
<div class="user-dropdown-button__role">
|
|
28
|
-
{{
|
|
29
|
-
(role && $t(`SHELL.USER.ROLE.${role}`)) ||
|
|
30
|
-
(user?.isAdministrator ? $t("SHELL.USER.ROLE.ADMINISTRATOR") : "")
|
|
31
|
-
}}
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
<div
|
|
35
|
-
v-if="!disabled && menu && menu.length"
|
|
36
|
-
class="user-dropdown-button__chevron"
|
|
8
|
+
class="vc-user-dropdown-button"
|
|
9
|
+
:class="{
|
|
10
|
+
'vc-user-dropdown-button--active': opened,
|
|
11
|
+
'vc-user-dropdown-button--auto-width': disabled,
|
|
12
|
+
}"
|
|
37
13
|
>
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
14
|
+
<div
|
|
15
|
+
class="vc-user-dropdown-button__wrap"
|
|
16
|
+
:class="{
|
|
17
|
+
'vc-user-dropdown-button__wrap--active': opened,
|
|
18
|
+
}"
|
|
19
|
+
>
|
|
20
|
+
<div
|
|
21
|
+
v-if="avatarUrl"
|
|
22
|
+
class="vc-user-dropdown-button__avatar"
|
|
23
|
+
:style="imageHandler"
|
|
24
|
+
></div>
|
|
25
|
+
<VcIcon
|
|
26
|
+
v-else
|
|
27
|
+
icon="fas fa-user-circle"
|
|
28
|
+
size="xxl"
|
|
29
|
+
class="vc-user-dropdown-button__icon"
|
|
30
|
+
/>
|
|
31
|
+
<div class="vc-user-dropdown-button__info">
|
|
32
|
+
<div class="vc-user-dropdown-button__name">
|
|
33
|
+
{{ name || user?.userName }}
|
|
34
|
+
</div>
|
|
35
|
+
<div class="vc-user-dropdown-button__role">
|
|
36
|
+
{{
|
|
37
|
+
(role && $t(`SHELL.USER.ROLE.${role}`)) ||
|
|
38
|
+
(user?.isAdministrator ? $t("SHELL.USER.ROLE.ADMINISTRATOR") : "")
|
|
39
|
+
}}
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
<div
|
|
43
|
+
v-if="!disabled && menu && menu.length"
|
|
44
|
+
class="vc-user-dropdown-button__chevron"
|
|
45
|
+
>
|
|
46
|
+
<VcIcon
|
|
47
|
+
icon="fas fa-chevron-down"
|
|
48
|
+
size="xl"
|
|
49
|
+
></VcIcon>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
42
52
|
</div>
|
|
43
|
-
</
|
|
44
|
-
<
|
|
45
|
-
v-if="menu && accountMenuVisible"
|
|
46
|
-
class="user-dropdown-button__menu"
|
|
47
|
-
@click.stop="accountMenuVisible = false"
|
|
48
|
-
>
|
|
53
|
+
</template>
|
|
54
|
+
<template #dropdown-content="{ opened, toggle }">
|
|
49
55
|
<div
|
|
50
|
-
v-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
@click="item.hasOwnProperty('clickHandler') ? item.clickHandler?.() : null"
|
|
56
|
+
v-if="menu && opened"
|
|
57
|
+
class="vc-user-dropdown-button__menu"
|
|
58
|
+
@click.stop="toggle"
|
|
54
59
|
>
|
|
55
|
-
<
|
|
56
|
-
v-
|
|
57
|
-
:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
<div
|
|
61
|
+
v-for="(item, i) in menu"
|
|
62
|
+
:key="`menu_item_${i}`"
|
|
63
|
+
class="vc-user-dropdown-button__menu-item"
|
|
64
|
+
@click="item.hasOwnProperty('clickHandler') ? item.clickHandler?.() : null"
|
|
65
|
+
>
|
|
66
|
+
<VcIcon
|
|
67
|
+
v-if="item.icon"
|
|
68
|
+
:icon="item.icon"
|
|
69
|
+
size="l"
|
|
70
|
+
class="vc-user-dropdown-button__menu-icon"
|
|
71
|
+
></VcIcon>
|
|
72
|
+
<p>{{ item.title }}</p>
|
|
73
|
+
</div>
|
|
62
74
|
</div>
|
|
63
|
-
</
|
|
64
|
-
</
|
|
75
|
+
</template>
|
|
76
|
+
</AppBarButtonTemplate>
|
|
65
77
|
</template>
|
|
66
78
|
|
|
67
79
|
<script lang="ts" setup>
|
|
68
80
|
import { computed, ref } from "vue";
|
|
69
|
-
import { vOnClickOutside } from "@vueuse/components";
|
|
70
81
|
import { useUser } from "../../../core/composables";
|
|
71
82
|
import { useRouter } from "vue-router";
|
|
72
83
|
import { useI18n } from "vue-i18n";
|
|
@@ -75,12 +86,14 @@ import { BladeMenu } from "../../../core/types";
|
|
|
75
86
|
import { usePopup } from "../popup-handler/composables/usePopup";
|
|
76
87
|
import { ChangePassword } from "../change-password";
|
|
77
88
|
import { useBladeNavigation } from "..";
|
|
89
|
+
import { AppBarButtonTemplate } from "./../app-bar-button";
|
|
78
90
|
|
|
79
91
|
export interface Props {
|
|
80
92
|
avatarUrl?: string | undefined;
|
|
81
93
|
name?: string | undefined;
|
|
82
94
|
role?: string | undefined;
|
|
83
95
|
menuItems?: BladeMenu[];
|
|
96
|
+
baseMenuItemsHandler?: (defaultMenuItems: BladeMenu[]) => BladeMenu[];
|
|
84
97
|
disabled?: boolean;
|
|
85
98
|
}
|
|
86
99
|
const props = withDefaults(defineProps<Props>(), {
|
|
@@ -95,9 +108,8 @@ const { open } = usePopup({
|
|
|
95
108
|
component: ChangePassword,
|
|
96
109
|
});
|
|
97
110
|
const { closeBlade } = useBladeNavigation();
|
|
98
|
-
|
|
99
|
-
const
|
|
100
|
-
...props.menuItems,
|
|
111
|
+
|
|
112
|
+
const defaultMenuItems = ref([
|
|
101
113
|
{
|
|
102
114
|
title: t("SHELL.ACCOUNT.CHANGE_PASSWORD"),
|
|
103
115
|
icon: "fas fa-key",
|
|
@@ -119,15 +131,25 @@ const menu = computed(() => [
|
|
|
119
131
|
},
|
|
120
132
|
]);
|
|
121
133
|
|
|
122
|
-
const
|
|
123
|
-
|
|
124
|
-
|
|
134
|
+
const menu = computed(() => {
|
|
135
|
+
const defaultItems = handleDefaultMenuItems();
|
|
136
|
+
|
|
137
|
+
if (defaultItems?.length) {
|
|
138
|
+
return [...props.menuItems, ...defaultItems];
|
|
139
|
+
}
|
|
140
|
+
return [...props.menuItems];
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
function handleDefaultMenuItems() {
|
|
144
|
+
if (props.baseMenuItemsHandler && typeof props.baseMenuItemsHandler === "function") {
|
|
145
|
+
return props.baseMenuItemsHandler(defaultMenuItems.value);
|
|
125
146
|
}
|
|
126
|
-
|
|
147
|
+
return defaultMenuItems.value;
|
|
148
|
+
}
|
|
127
149
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
150
|
+
function beforeOpen() {
|
|
151
|
+
return !props.disabled && menu.value?.length > 0;
|
|
152
|
+
}
|
|
131
153
|
|
|
132
154
|
const imageHandler = computed(() => {
|
|
133
155
|
if (props.avatarUrl) {
|
|
@@ -138,53 +160,96 @@ const imageHandler = computed(() => {
|
|
|
138
160
|
</script>
|
|
139
161
|
|
|
140
162
|
<style lang="scss">
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
163
|
+
:root {
|
|
164
|
+
--user-dropdown-account-info-name-color: var(--base-text-color, var(--neutrals-950));
|
|
165
|
+
--user-dropdown-account-info-role-color: var(--secondary-600);
|
|
166
|
+
--user-dropdown-divider-color: var(--base-border-color, var(--neutrals-200));
|
|
167
|
+
--user-dropdown-border-color: var(--app-bar-divider-color);
|
|
168
|
+
--user-dropdown-button-color: var(--primary-500);
|
|
169
|
+
--user-dropdown-button-color-hover: var(--primary-700);
|
|
170
|
+
--user-dropdown-menu-item-bg-hover: var(--primary-50);
|
|
171
|
+
--user-dropdown-menu-item-bg: var(--additional-50);
|
|
172
|
+
--user-dropdown-menu-text-color: var(--additional-950);
|
|
173
|
+
--user-dropdown-chevron-color: var(--secondary-600);
|
|
174
|
+
--user-dropdown-chevron-color-hover: var(--secondary-700);
|
|
175
|
+
--user-dropdown-wrap-bg: var(--additional-50);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.vc-user-dropdown-button {
|
|
179
|
+
@apply tw-w-[240px] tw-border-l tw-border-solid tw-border-l-[color:var(--user-dropdown-border-color)] tw-cursor-pointer
|
|
180
|
+
tw-relative tw-flex tw-h-full tw-flex-col tw-select-none;
|
|
181
|
+
|
|
182
|
+
.vc-app_mobile & {
|
|
183
|
+
@apply tw-w-full #{!important};
|
|
184
|
+
}
|
|
144
185
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
186
|
+
&--auto-width {
|
|
187
|
+
@apply tw-w-auto;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&__wrap {
|
|
191
|
+
@apply tw-flex tw-justify-between tw-items-center tw-flex-auto tw-px-4 tw-bg-[--user-dropdown-wrap-bg];
|
|
148
192
|
}
|
|
149
193
|
|
|
150
194
|
&__avatar {
|
|
151
|
-
@apply tw-rounded-full tw-overflow-hidden tw-w-[34px] tw-h-[34px] tw-bg-[color:var(--
|
|
152
|
-
|
|
195
|
+
@apply tw-rounded-full tw-overflow-hidden tw-w-[34px] tw-h-[34px] tw-bg-[color:var(--user-dropdown-account-info-role-color)]
|
|
196
|
+
tw-bg-cover tw-bg-center tw-shrink-0;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
&__icon {
|
|
200
|
+
@apply tw-text-[color:var(--user-dropdown-button-color)];
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
&__info {
|
|
204
|
+
@apply tw-grow tw-basis-0 tw-ml-3 tw-overflow-hidden;
|
|
153
205
|
}
|
|
154
206
|
|
|
155
207
|
&__name {
|
|
156
|
-
@apply tw-text-
|
|
208
|
+
@apply tw-text-sm tw-text-[color:var(--user-dropdown-account-info-name-color)] tw-truncate;
|
|
157
209
|
}
|
|
158
210
|
|
|
159
211
|
&__role {
|
|
160
|
-
@apply tw-text-
|
|
212
|
+
@apply tw-text-sm tw-text-[color:var(--user-dropdown-account-info-role-color)];
|
|
161
213
|
}
|
|
162
214
|
|
|
163
215
|
&__chevron {
|
|
164
|
-
@apply tw-text-[
|
|
216
|
+
@apply tw-text-[color:var(--user-dropdown-chevron-color)] tw-transition-colors tw-duration-200;
|
|
165
217
|
}
|
|
166
218
|
|
|
167
219
|
&:hover &__chevron {
|
|
168
|
-
@apply tw-text-[color
|
|
220
|
+
@apply tw-text-[color:var(--user-dropdown-chevron-color-hover)];
|
|
169
221
|
}
|
|
170
222
|
|
|
171
|
-
|
|
223
|
+
&--active &__chevron {
|
|
172
224
|
@apply -tw-scale-y-100;
|
|
173
225
|
}
|
|
174
226
|
|
|
175
227
|
&__menu {
|
|
176
|
-
@apply tw-
|
|
228
|
+
@apply tw-w-full;
|
|
177
229
|
|
|
178
230
|
&-item {
|
|
179
|
-
@apply tw-p-3 tw-text-
|
|
231
|
+
@apply tw-p-3 tw-text-sm tw-text-[color:var(--user-dropdown-menu-text-color)] tw-border-solid tw-border-b tw-border-b-[color:var(--user-dropdown-divider-color)] tw-bg-[color:var(--user-dropdown-menu-item-bg)] tw-flex tw-flex-row tw-items-center tw-cursor-pointer;
|
|
232
|
+
transition: background-color 0.2s;
|
|
233
|
+
|
|
234
|
+
&:hover {
|
|
235
|
+
@apply tw-bg-[color:var(--user-dropdown-menu-item-bg-hover)];
|
|
236
|
+
|
|
237
|
+
.vc-user-dropdown-button__menu-icon {
|
|
238
|
+
@apply tw-text-[color:var(--user-dropdown-button-color-hover)];
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
&:last-of-type {
|
|
243
|
+
@apply tw-border-b-0;
|
|
244
|
+
}
|
|
180
245
|
}
|
|
181
246
|
}
|
|
182
247
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}
|
|
248
|
+
&__menu-icon {
|
|
249
|
+
@apply tw-mr-3 tw-text-[color:var(--user-dropdown-button-color)];
|
|
250
|
+
}
|
|
187
251
|
|
|
252
|
+
.vc-app_mobile & {
|
|
188
253
|
&__menu {
|
|
189
254
|
@apply tw-static tw-shadow-none #{!important};
|
|
190
255
|
}
|
|
@@ -192,6 +257,10 @@ const imageHandler = computed(() => {
|
|
|
192
257
|
&__menu-item {
|
|
193
258
|
@apply tw-border-none #{!important};
|
|
194
259
|
}
|
|
260
|
+
|
|
261
|
+
&__wrap--active {
|
|
262
|
+
@apply tw-shadow-none;
|
|
263
|
+
}
|
|
195
264
|
}
|
|
196
265
|
}
|
|
197
266
|
</style>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
@collapse="$emit('collapse:blade')"
|
|
11
11
|
>
|
|
12
12
|
<!-- Blade contents -->
|
|
13
|
-
<div class="tw-flex tw-grow-1 tw-border-t tw-border-solid tw-border-t-[
|
|
13
|
+
<div class="tw-flex tw-grow-1 tw-border-t tw-border-solid tw-border-t-[--assets-details-border]">
|
|
14
14
|
<div class="assets-details__content tw-grow tw-basis-0 tw-w-full">
|
|
15
15
|
<VcContainer :no-padding="true">
|
|
16
16
|
<div class="tw-p-4">
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<template v-else>
|
|
28
28
|
<VcIcon
|
|
29
29
|
:icon="getFileThumbnail(defaultAsset.name)"
|
|
30
|
-
class="tw-text-[
|
|
30
|
+
class="tw-text-[color:var(--assets-details-thumbnail-color)] tw-text-[128px] tw-shrink-0"
|
|
31
31
|
></VcIcon>
|
|
32
32
|
</template>
|
|
33
33
|
<VcCol class="tw-ml-6">
|
|
@@ -217,3 +217,10 @@ function openLink(link: string | undefined) {
|
|
|
217
217
|
location.href = link;
|
|
218
218
|
}
|
|
219
219
|
</script>
|
|
220
|
+
|
|
221
|
+
<style lang="scss">
|
|
222
|
+
:root {
|
|
223
|
+
--assets-details-border: var(--base-border-color, var(--neutrals-200));
|
|
224
|
+
--assets-details-thumbnail-color: var(--secondary-500);
|
|
225
|
+
}
|
|
226
|
+
</style>
|