devextreme-cli 1.7.1 → 1.8.0-beta.0
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/package.json +2 -2
- package/src/applications/application.angular.js +4 -8
- package/src/applications/application.react.js +2 -0
- package/src/applications/application.vue.js +2 -0
- package/src/commands.json +3 -6
- package/src/templates/react/application/devextreme.json +28 -0
- package/src/templates/react/application/src/App.tsx +11 -7
- package/src/templates/react/application/src/components/change-password-form/ChangePasswordForm.tsx +86 -86
- package/src/templates/react/application/src/components/create-account-form/CreateAccountForm.scss +3 -3
- package/src/templates/react/application/src/components/create-account-form/CreateAccountForm.tsx +107 -107
- package/src/templates/react/application/src/components/footer/Footer.scss +7 -4
- package/src/templates/react/application/src/components/header/Header.scss +4 -5
- package/src/templates/react/application/src/components/header/Header.tsx +8 -12
- package/src/templates/react/application/src/components/login-form/LoginForm.scss +1 -1
- package/src/templates/react/application/src/components/reset-password-form/ResetPasswordForm.scss +1 -1
- package/src/templates/react/application/src/components/side-navigation-menu/SideNavigationMenu.scss +49 -68
- package/src/templates/react/application/src/components/side-navigation-menu/SideNavigationMenu.tsx +5 -3
- package/src/templates/react/application/src/components/theme-switcher/ThemeSwitcher.tsx +20 -0
- package/src/templates/react/application/src/components/user-panel/UserPanel.scss +41 -53
- package/src/templates/react/application/src/components/user-panel/UserPanel.tsx +22 -25
- package/src/templates/react/application/src/dx-styles.scss +63 -67
- package/src/templates/react/application/src/layouts/side-nav-inner-toolbar/side-nav-inner-toolbar.scss +1 -6
- package/src/templates/react/application/src/layouts/side-nav-outer-toolbar/side-nav-outer-toolbar.scss +3 -3
- package/src/templates/react/application/src/layouts/side-nav-outer-toolbar/side-nav-outer-toolbar.tsx +2 -2
- package/src/templates/react/application/src/layouts/single-card/single-card.scss +4 -2
- package/src/templates/react/application/src/theme.tsx +51 -0
- package/src/templates/react/application/src/themes/metadata.additional.dark.json +11 -0
- package/src/templates/react/application/src/themes/metadata.additional.json +1 -1
- package/src/templates/react/application/src/themes/metadata.base.dark.json +8 -0
- package/src/templates/react/application/src/themes/metadata.base.json +1 -1
- package/src/templates/react/application/src/variables.scss +37 -0
- package/src/templates/react/page/page.tsx +1 -1
- package/src/templates/react/sample-pages/home/home.scss +20 -15
- package/src/templates/react/sample-pages/home/home.tsx +50 -4
- package/src/templates/react/sample-pages/profile/profile.tsx +1 -1
- package/src/templates/react/sample-pages/tasks/tasks.scss +3 -0
- package/src/templates/react/sample-pages/tasks/tasks.tsx +3 -2
- package/src/templates/vue-v3/application/devextreme.json +28 -0
- package/src/templates/vue-v3/application/src/App.vue +1 -5
- package/src/templates/vue-v3/application/src/components/app-footer.vue +7 -4
- package/src/templates/vue-v3/application/src/components/header-toolbar.vue +23 -30
- package/src/templates/vue-v3/application/src/components/side-nav-menu.vue +63 -73
- package/src/templates/vue-v3/application/src/components/theme-switcher.vue +19 -0
- package/src/templates/vue-v3/application/src/components/user-panel.vue +61 -81
- package/src/templates/vue-v3/application/src/dx-styles.scss +66 -51
- package/src/templates/vue-v3/application/src/layouts/side-nav-inner-toolbar.vue +4 -7
- package/src/templates/vue-v3/application/src/layouts/side-nav-outer-toolbar.vue +4 -2
- package/src/templates/vue-v3/application/src/layouts/single-card.vue +2 -4
- package/src/templates/vue-v3/application/src/theme-service.js +40 -0
- package/src/templates/vue-v3/application/src/themes/metadata.additional.dark.json +11 -0
- package/src/templates/vue-v3/application/src/themes/metadata.additional.json +1 -1
- package/src/templates/vue-v3/application/src/themes/metadata.base.dark.json +8 -0
- package/src/templates/vue-v3/application/src/themes/metadata.base.json +1 -1
- package/src/templates/vue-v3/application/src/variables.scss +37 -0
- package/src/templates/vue-v3/application/src/views/create-account-form.vue +5 -7
- package/src/templates/vue-v3/application/src/views/login-form.vue +1 -3
- package/src/templates/vue-v3/application/src/views/reset-password-form.vue +2 -4
- package/src/templates/vue-v3/page/page.vue +1 -1
- package/src/templates/vue-v3/sample-pages/home-page.vue +86 -45
- package/src/templates/vue-v3/sample-pages/profile-page.vue +1 -1
- package/src/templates/vue-v3/sample-pages/tasks-page.vue +7 -2
- package/src/utility/latest-versions.js +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="
|
|
3
|
+
:class="[swatchClassName, 'side-navigation-menu']"
|
|
4
4
|
@click="forwardClick"
|
|
5
5
|
>
|
|
6
6
|
<slot />
|
|
@@ -25,6 +25,7 @@ import { sizes } from '../utils/media-query';
|
|
|
25
25
|
import navigation from '../app-navigation';
|
|
26
26
|
import { onMounted, ref, watch } from 'vue';
|
|
27
27
|
import { useRoute, useRouter } from 'vue-router';
|
|
28
|
+
import { themeService } from '../theme-service';
|
|
28
29
|
|
|
29
30
|
export default {
|
|
30
31
|
props: {
|
|
@@ -43,6 +44,7 @@ export default {
|
|
|
43
44
|
});
|
|
44
45
|
|
|
45
46
|
const treeViewRef = ref(null);
|
|
47
|
+
const swatchClassName = ref('');
|
|
46
48
|
|
|
47
49
|
function forwardClick (...args) {
|
|
48
50
|
context.emit("click", args);
|
|
@@ -82,6 +84,14 @@ export default {
|
|
|
82
84
|
}
|
|
83
85
|
);
|
|
84
86
|
|
|
87
|
+
watch(
|
|
88
|
+
() => themeService.isDark,
|
|
89
|
+
() => {
|
|
90
|
+
swatchClassName.value = themeService.isDark.value ? 'dx-swatch-additional-dark' : 'dx-swatch-additional';
|
|
91
|
+
},
|
|
92
|
+
{ immediate: true }
|
|
93
|
+
);
|
|
94
|
+
|
|
85
95
|
watch(
|
|
86
96
|
() => props.compactMode,
|
|
87
97
|
() => {
|
|
@@ -98,7 +108,8 @@ export default {
|
|
|
98
108
|
items,
|
|
99
109
|
forwardClick,
|
|
100
110
|
handleItemClick,
|
|
101
|
-
updateSelection
|
|
111
|
+
updateSelection,
|
|
112
|
+
swatchClassName,
|
|
102
113
|
};
|
|
103
114
|
},
|
|
104
115
|
components: {
|
|
@@ -108,97 +119,76 @@ export default {
|
|
|
108
119
|
</script>
|
|
109
120
|
|
|
110
121
|
<style lang="scss">
|
|
122
|
+
@import "../variables.scss";
|
|
111
123
|
@import "../dx-styles.scss";
|
|
112
|
-
@import "../themes/generated/variables.additional.scss";
|
|
113
|
-
|
|
114
|
-
.side-navigation-menu {
|
|
115
|
-
display: flex;
|
|
116
|
-
flex-direction: column;
|
|
117
|
-
min-height: 100%;
|
|
118
|
-
height: 100%;
|
|
119
|
-
width: 250px !important;
|
|
120
124
|
|
|
121
|
-
|
|
122
|
-
|
|
125
|
+
.dx-swatch-additional, .dx-swatch-additional-dark {
|
|
126
|
+
&.side-navigation-menu {
|
|
123
127
|
display: flex;
|
|
124
|
-
flex:
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
flex-direction: column;
|
|
129
|
+
min-height: 100%;
|
|
130
|
+
height: 100%;
|
|
131
|
+
width: 250px !important;
|
|
132
|
+
background-color: var(--base-bg);
|
|
133
|
+
|
|
134
|
+
.menu-container {
|
|
135
|
+
min-height: 100%;
|
|
136
|
+
display: flex;
|
|
137
|
+
flex: 1;
|
|
138
|
+
|
|
139
|
+
.dx-treeview {
|
|
140
|
+
// ## Long text positioning
|
|
141
|
+
white-space: nowrap;
|
|
142
|
+
// ##
|
|
143
|
+
|
|
144
|
+
.dx-treeview-node-container:empty {
|
|
145
|
+
display: none;
|
|
146
|
+
}
|
|
130
147
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
148
|
+
// ## Icon width customization
|
|
149
|
+
.dx-treeview-item {
|
|
150
|
+
padding-left: 0;
|
|
151
|
+
border-radius: 0;
|
|
152
|
+
flex-direction: row-reverse;
|
|
135
153
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
154
|
+
.dx-icon {
|
|
155
|
+
width: $side-panel-min-width !important;
|
|
156
|
+
margin: 0 !important;
|
|
157
|
+
}
|
|
139
158
|
}
|
|
140
|
-
}
|
|
141
|
-
// ##
|
|
142
|
-
|
|
143
|
-
// ## Arrow customization
|
|
144
|
-
.dx-treeview-node {
|
|
145
|
-
padding: 0 0 !important;
|
|
146
|
-
}
|
|
147
159
|
|
|
148
|
-
|
|
149
|
-
right: 10px;
|
|
150
|
-
left: auto;
|
|
151
|
-
}
|
|
160
|
+
// ##
|
|
152
161
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
// ##
|
|
162
|
+
// ## Arrow customization
|
|
163
|
+
.dx-treeview-node {
|
|
164
|
+
padding: 0 0 !important;
|
|
165
|
+
}
|
|
158
166
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
font-weight: bold;
|
|
163
|
-
border-bottom: 1px solid $base-border-color;
|
|
167
|
+
.dx-treeview-toggle-item-visibility {
|
|
168
|
+
right: 10px;
|
|
169
|
+
left: auto;
|
|
164
170
|
}
|
|
165
171
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
172
|
+
.dx-rtl .dx-treeview-toggle-item-visibility {
|
|
173
|
+
left: 10px;
|
|
174
|
+
right: auto;
|
|
169
175
|
}
|
|
170
|
-
|
|
171
|
-
// ##
|
|
172
|
-
}
|
|
176
|
+
// ##
|
|
173
177
|
|
|
174
|
-
|
|
175
|
-
.dx-treeview {
|
|
176
|
-
.dx-treeview-node-container {
|
|
178
|
+
// ## Item levels customization
|
|
177
179
|
.dx-treeview-node {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
&.dx-state-selected > .dx-treeview-item * {
|
|
183
|
-
color: $base-accent;
|
|
180
|
+
&[aria-level="1"] {
|
|
181
|
+
font-weight: bold;
|
|
184
182
|
}
|
|
185
183
|
|
|
186
|
-
|
|
187
|
-
|
|
184
|
+
&[aria-level="2"] .dx-treeview-item-content {
|
|
185
|
+
font-weight: normal;
|
|
186
|
+
padding: 0 $side-panel-min-width;
|
|
188
187
|
}
|
|
189
188
|
}
|
|
189
|
+
// ##
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
-
|
|
193
|
-
.dx-theme-generic .dx-treeview {
|
|
194
|
-
.dx-treeview-node-container
|
|
195
|
-
.dx-treeview-node.dx-state-selected.dx-state-focused
|
|
196
|
-
> .dx-treeview-item
|
|
197
|
-
* {
|
|
198
|
-
color: inherit;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
// ##
|
|
202
192
|
}
|
|
203
193
|
}
|
|
204
194
|
</style>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<dx-button
|
|
3
|
+
class="theme-button"
|
|
4
|
+
styling-mode="text"
|
|
5
|
+
:icon="currentTheme === 'dark' ? 'sun' : 'moon'"
|
|
6
|
+
@click="onClickButton"
|
|
7
|
+
/>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script setup>
|
|
11
|
+
import { DxButton } from 'devextreme-vue/button';
|
|
12
|
+
import { themeService } from '../theme-service';
|
|
13
|
+
|
|
14
|
+
const currentTheme = themeService.currentTheme;
|
|
15
|
+
|
|
16
|
+
function onClickButton() {
|
|
17
|
+
themeService.switchAppTheme();
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
@@ -1,114 +1,94 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="user-panel">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
</div>
|
|
9
|
-
|
|
10
|
-
<dx-context-menu
|
|
11
|
-
v-if="menuMode === 'context'"
|
|
12
|
-
target=".user-button"
|
|
3
|
+
<dx-drop-down-button
|
|
4
|
+
v-if="menuMode !== 'list'"
|
|
5
|
+
stylingMode="text"
|
|
6
|
+
:icon="'https://js.devexpress.com/Demos/WidgetsGallery/JSDemos/images/employees/06.png'"
|
|
7
|
+
:showArrowIcon="false"
|
|
13
8
|
:items="menuItems"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
displayExpr="text"
|
|
10
|
+
keyExpr="id"
|
|
11
|
+
:elementAttr="{
|
|
12
|
+
class: 'user-button'
|
|
13
|
+
}"
|
|
14
|
+
:dropDownOptions="{
|
|
15
|
+
width: '150px'
|
|
16
|
+
}"
|
|
17
|
+
/>
|
|
21
18
|
<dx-list
|
|
22
19
|
v-if="menuMode === 'list'"
|
|
23
|
-
class="dx-toolbar-menu-action"
|
|
24
20
|
:items="menuItems"
|
|
21
|
+
displayExpr="text"
|
|
22
|
+
keyExpr="id"
|
|
23
|
+
width="130"
|
|
25
24
|
/>
|
|
26
25
|
</div>
|
|
27
26
|
</template>
|
|
28
27
|
|
|
29
28
|
<script>
|
|
30
|
-
import
|
|
31
|
-
import DxList from "devextreme-vue/list";
|
|
29
|
+
import { DxDropDownButton, DxList } from 'devextreme-vue';
|
|
32
30
|
|
|
33
31
|
export default {
|
|
34
32
|
props: {
|
|
35
|
-
menuMode: String,
|
|
36
33
|
menuItems: Array,
|
|
37
|
-
|
|
34
|
+
menuMode: String,
|
|
38
35
|
},
|
|
39
36
|
components: {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
DxList
|
|
37
|
+
DxDropDownButton,
|
|
38
|
+
DxList,
|
|
43
39
|
}
|
|
44
40
|
};
|
|
45
41
|
</script>
|
|
46
|
-
|
|
47
42
|
<style lang="scss">
|
|
48
|
-
|
|
43
|
+
.app .header-toolbar .user-panel .user-button.dx-dropdownbutton img.dx-icon {
|
|
44
|
+
height: 100%;
|
|
45
|
+
width: auto;
|
|
49
46
|
|
|
50
|
-
.
|
|
51
|
-
|
|
52
|
-
align-items: center;
|
|
53
|
-
|
|
54
|
-
.dx-toolbar-menu-section & {
|
|
55
|
-
padding: 10px 6px;
|
|
56
|
-
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
47
|
+
.dx-theme-generic & {
|
|
48
|
+
max-height: 32px;
|
|
57
49
|
}
|
|
50
|
+
}
|
|
58
51
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
margin:
|
|
65
|
-
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
66
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
|
|
52
|
+
.user-panel {
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
|
|
56
|
+
.user-button.dx-dropdownbutton {
|
|
57
|
+
margin-left: 5px;
|
|
67
58
|
|
|
68
|
-
.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
59
|
+
img.dx-icon {
|
|
60
|
+
border-radius: 50%;
|
|
61
|
+
margin: 0;
|
|
62
|
+
width: auto;
|
|
63
|
+
aspect-ratio: 1 / 1;
|
|
64
|
+
box-sizing: border-box;
|
|
65
|
+
border: 1px solid var(--dx-color-border);
|
|
66
|
+
object-fit: cover;
|
|
67
|
+
object-position: top;
|
|
68
|
+
background: rgb(255, 255, 255);
|
|
69
|
+
background-clip: padding-box;
|
|
74
70
|
}
|
|
75
|
-
}
|
|
76
71
|
|
|
77
|
-
.user-name {
|
|
78
|
-
font-size: 14px;
|
|
79
|
-
color: $base-text-color;
|
|
80
|
-
margin: 0 9px;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
72
|
|
|
84
|
-
.user-panel {
|
|
85
|
-
.dx-list-item .dx-icon {
|
|
86
|
-
vertical-align: middle;
|
|
87
|
-
color: $base-text-color;
|
|
88
|
-
margin-right: 16px;
|
|
89
|
-
}
|
|
90
|
-
.dx-rtl .dx-list-item .dx-icon {
|
|
91
|
-
margin-right: 0;
|
|
92
|
-
margin-left: 16px;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
73
|
|
|
96
|
-
.dx-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
74
|
+
.dx-buttongroup {
|
|
75
|
+
vertical-align: middle;
|
|
76
|
+
|
|
77
|
+
.dx-button.dx-button-has-icon:not(.dx-button-has-text) {
|
|
78
|
+
.dx-button-content {
|
|
79
|
+
padding: 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&.dx-state-hover,
|
|
83
|
+
&.dx-state-focused {
|
|
84
|
+
background-color: transparent;
|
|
85
|
+
|
|
86
|
+
img.dx-icon {
|
|
87
|
+
border-color: var(--dx-color-primary);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
100
91
|
}
|
|
101
92
|
}
|
|
102
|
-
.dx-submenu .dx-menu-items-container .dx-icon {
|
|
103
|
-
margin-right: 16px;
|
|
104
|
-
}
|
|
105
|
-
.dx-menu-item .dx-menu-item-content {
|
|
106
|
-
padding: 3px 15px 4px;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.dx-theme-generic .user-menu .dx-menu-item-content .dx-menu-item-text {
|
|
111
|
-
padding-left: 4px;
|
|
112
|
-
padding-right: 4px;
|
|
113
93
|
}
|
|
114
94
|
</style>
|
|
@@ -1,69 +1,84 @@
|
|
|
1
|
-
|
|
2
|
-
line-height: 1.5;
|
|
3
|
-
flex-grow: 1;
|
|
1
|
+
$side-panel-min-width: 60px;
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
margin-bottom: 20px;
|
|
3
|
+
.dx-viewport {
|
|
4
|
+
.dx-popup-wrapper {
|
|
5
|
+
z-index: 1510 !important;
|
|
9
6
|
}
|
|
10
|
-
}
|
|
11
7
|
|
|
12
|
-
.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
8
|
+
.content {
|
|
9
|
+
line-height: 1.5;
|
|
10
|
+
flex-grow: 1;
|
|
11
|
+
padding: 20px 40px;
|
|
17
12
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
h2 {
|
|
14
|
+
font-size: 32px;
|
|
15
|
+
margin: 0;
|
|
16
|
+
line-height: 40px;
|
|
17
|
+
}
|
|
22
18
|
|
|
23
|
-
.
|
|
24
|
-
|
|
25
|
-
}
|
|
19
|
+
.screen-x-small & {
|
|
20
|
+
padding: 20px;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
26
23
|
|
|
27
|
-
.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
.container {
|
|
25
|
+
height: 100%;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
display: flex;
|
|
28
|
+
}
|
|
31
29
|
|
|
32
|
-
.
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
.layout-body {
|
|
31
|
+
flex: 1;
|
|
32
|
+
min-height: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.side-nav-outer-toolbar .dx-drawer {
|
|
36
|
+
height: calc(100% - 56px)
|
|
35
37
|
}
|
|
36
|
-
}
|
|
37
38
|
|
|
38
|
-
.
|
|
39
|
-
|
|
39
|
+
.content-block {
|
|
40
|
+
margin-top: 20px;
|
|
41
|
+
}
|
|
40
42
|
|
|
41
|
-
.
|
|
42
|
-
padding:
|
|
43
|
+
.responsive-paddings {
|
|
44
|
+
padding: 20px;
|
|
45
|
+
|
|
46
|
+
.screen-large & {
|
|
47
|
+
padding: 40px;
|
|
48
|
+
}
|
|
43
49
|
}
|
|
44
|
-
}
|
|
45
50
|
|
|
46
|
-
.dx-card.wide-card {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
51
|
+
.dx-card.wide-card {
|
|
52
|
+
border-radius: 0;
|
|
53
|
+
margin-left: 0;
|
|
54
|
+
margin-right: 0;
|
|
55
|
+
border-right: 0;
|
|
56
|
+
border-left: 0;
|
|
57
|
+
}
|
|
53
58
|
|
|
54
|
-
.with-footer > .dx-scrollable-wrapper >
|
|
55
|
-
.dx-scrollable-container > .dx-scrollable-content {
|
|
56
|
-
|
|
59
|
+
.with-footer > .dx-scrollable-wrapper >
|
|
60
|
+
.dx-scrollable-container > .dx-scrollable-content {
|
|
61
|
+
height: 100%;
|
|
57
62
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
63
|
+
& > .dx-scrollview-content {
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
min-height: 100%;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
#app {
|
|
71
|
+
background-color: var(--base-bg-darken-5);
|
|
72
|
+
height: 100%;
|
|
62
73
|
}
|
|
63
74
|
}
|
|
64
75
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
76
|
+
.dx-theme-fluent {
|
|
77
|
+
.dx-drawer-wrapper {
|
|
78
|
+
.dx-drawer-panel-content,
|
|
79
|
+
.dx-overlay-content {
|
|
80
|
+
box-shadow: 0 4px 4px 0 var(--shadow-color-first), 0 1px 2px 0 var(--shadow-color-second);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
68
84
|
|
|
69
|
-
$side-panel-min-width: 60px;
|
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
:toggle-menu-func="toggleMenu"
|
|
19
19
|
/>
|
|
20
20
|
<dx-scroll-view ref="scrollViewRef" class="layout-body with-footer">
|
|
21
|
-
<
|
|
21
|
+
<div class="content">
|
|
22
|
+
<slot />
|
|
23
|
+
</div>
|
|
22
24
|
<slot name="footer" />
|
|
23
25
|
</dx-scroll-view>
|
|
24
26
|
</div>
|
|
@@ -157,13 +159,8 @@ export default {
|
|
|
157
159
|
}
|
|
158
160
|
|
|
159
161
|
#navigation-header {
|
|
160
|
-
@import "../themes/generated/variables.additional.scss";
|
|
161
|
-
background-color: $base-accent;
|
|
162
162
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
|
|
163
|
-
|
|
164
|
-
.menu-button .dx-icon {
|
|
165
|
-
color: $base-text-color;
|
|
166
|
-
}
|
|
163
|
+
background-color: var(--base-bg);
|
|
167
164
|
|
|
168
165
|
.screen-x-small & {
|
|
169
166
|
padding-left: 20px;
|
|
@@ -19,7 +19,9 @@
|
|
|
19
19
|
:close-on-outside-click="drawerOptions.closeOnOutsideClick"
|
|
20
20
|
>
|
|
21
21
|
<dx-scroll-view ref="scrollViewRef" class="with-footer">
|
|
22
|
-
<
|
|
22
|
+
<div class="content">
|
|
23
|
+
<slot />
|
|
24
|
+
</div>
|
|
23
25
|
<slot name="footer" />
|
|
24
26
|
</dx-scroll-view>
|
|
25
27
|
<template #menuTemplate>
|
|
@@ -130,6 +132,6 @@ export default {
|
|
|
130
132
|
}
|
|
131
133
|
|
|
132
134
|
.layout-header {
|
|
133
|
-
z-index:
|
|
135
|
+
z-index: 1505;
|
|
134
136
|
}
|
|
135
137
|
</style>
|
|
@@ -41,8 +41,6 @@ export default {
|
|
|
41
41
|
</script>
|
|
42
42
|
|
|
43
43
|
<style lang="scss">
|
|
44
|
-
@import "../themes/generated/variables.base.scss";
|
|
45
|
-
|
|
46
44
|
.single-card {
|
|
47
45
|
width: 100%;
|
|
48
46
|
height: 100%;
|
|
@@ -67,14 +65,14 @@ export default {
|
|
|
67
65
|
margin-bottom: 30px;
|
|
68
66
|
|
|
69
67
|
.title {
|
|
70
|
-
color:
|
|
68
|
+
color: var(--base-text-color);
|
|
71
69
|
line-height: 28px;
|
|
72
70
|
font-weight: 500;
|
|
73
71
|
font-size: 24px;
|
|
74
72
|
}
|
|
75
73
|
|
|
76
74
|
.description {
|
|
77
|
-
color:
|
|
75
|
+
color: var(--base-text-color-alpha-7);
|
|
78
76
|
line-height: 18px;
|
|
79
77
|
}
|
|
80
78
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ref } from 'vue';
|
|
2
|
+
|
|
3
|
+
class ThemeService {
|
|
4
|
+
themes = ['light', 'dark']
|
|
5
|
+
themeClassNamePrefix = 'dx-swatch-';
|
|
6
|
+
currentTheme = ref('');
|
|
7
|
+
isDark = ref(false);
|
|
8
|
+
|
|
9
|
+
constructor() {
|
|
10
|
+
if (!document.body.className.includes(this.themeClassNamePrefix)) {
|
|
11
|
+
this.currentTheme.value = this.themes[0];
|
|
12
|
+
|
|
13
|
+
document.body.classList.add(this.themeClassNamePrefix + this.currentTheme.value);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
switchAppTheme() {
|
|
18
|
+
const prevTheme = this.currentTheme.value;
|
|
19
|
+
const isCurrentThemeDark = prevTheme === 'dark';
|
|
20
|
+
|
|
21
|
+
this.currentTheme.value = this.themes[prevTheme === this.themes[0] ? 1 : 0];
|
|
22
|
+
|
|
23
|
+
document.body.classList.replace(
|
|
24
|
+
this.themeClassNamePrefix + prevTheme,
|
|
25
|
+
this.themeClassNamePrefix + this.currentTheme.value
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
const additionalClassNamePrefix = this.themeClassNamePrefix + 'additional';
|
|
29
|
+
const additionalClassNamePostfix = isCurrentThemeDark ? '-' + prevTheme : '';
|
|
30
|
+
const additionalClassName = `${additionalClassNamePrefix}${additionalClassNamePostfix}`
|
|
31
|
+
|
|
32
|
+
document.body
|
|
33
|
+
.querySelector(`.${additionalClassName}`)?.classList
|
|
34
|
+
.replace(additionalClassName, additionalClassNamePrefix + (isCurrentThemeDark ? '' : '-dark'));
|
|
35
|
+
|
|
36
|
+
this.isDark.value = this.currentTheme.value === 'dark';
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const themeService = new ThemeService();
|