Skip to content

Commit

Permalink
Merge pull request #565 from webitel/refactor/colors
Browse files Browse the repository at this point in the history
refactor: colors in progress [WTEL-3902]
  • Loading branch information
dlohvinov authored Dec 6, 2023
2 parents 58f79a0 + bb55115 commit b1b3445
Show file tree
Hide file tree
Showing 24 changed files with 73 additions and 24 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@vuelidate/validators": "^2.0.0",
"@vueuse/core": "^10.3.0",
"@webitel/flow-ui-sdk": "^0.1.14",
"@webitel/ui-sdk": "^23.12.51",
"@webitel/ui-sdk": "^23.12.91",
"axios": "^0.27.1",
"clipboard-copy": "^4.0.1",
"cron-validator": "^1.3.1",
Expand Down
2 changes: 2 additions & 0 deletions src/app/components/utils/code-editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ export default {
}
});
editor.setTheme('vs-dark');
// eslint-disable-next-line no-unused-vars
this.editor.onDidChangeModelDecorations((event) => {
this.checkSyntaxError();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ export default {
</script>

<style lang="scss" scoped>
.nameLink {
color: var(--text-main-color);
}
.wt-chip {
margin-left: var(--spacing-sm);
}
Expand Down
2 changes: 2 additions & 0 deletions src/app/css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@

//disables scrollbar on 100vh auth on small laptops
body {
@extend %wt-scrollbar;
@extend %typo-body-1;
display: flex;
min-width: 100%;
min-height: 100%;
color: var(--text-main-color);
}

#app {
Expand Down
2 changes: 2 additions & 0 deletions src/app/store/store.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { createStore } from 'vuex';
import appearance from '../../modules/appearance/store/appearance';
import ccenter from '../../modules/contact-center/store/ccenter';
import directory from '../../modules/directory/store/directory';
import integrations from '../../modules/integrations/store/integrations';
Expand All @@ -19,5 +20,6 @@ export default createStore({
integrations,
permissions,
system,
appearance,
},
});
11 changes: 10 additions & 1 deletion src/modules/_reusable/app-header/components/app-header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
:current-app="currentApp"
:nav="nav"
/>
<wt-dark-mode-switcher />
<wt-app-navigator
:apps="apps"
:current-app="currentApp"
Expand All @@ -19,13 +20,17 @@

<script>
import WebitelApplications from '@webitel/ui-sdk/src/enums/WebitelApplications/WebitelApplications.enum';
import WtDarkModeSwitcher from '@webitel/ui-sdk/src/modules/Appearance/components/wt-dark-mode-switcher.vue';
import authAPI from '@webitel/ui-sdk/src/modules/Userinfo/api/auth';
import { mapGetters, mapState } from 'vuex';
import navMixin from '../../../../app/mixins/navMixin';
import router from '../../../../app/router/router';
export default {
name: 'AppHeader',
components: {
WtDarkModeSwitcher,
},
mixins: [navMixin],
inject: ['$config'],
data: () => ({
Expand Down Expand Up @@ -87,12 +92,16 @@ export default {
// and throw user to auth page
return router.replace('/auth');
},
toggleDarkTheme() {
document.documentElement.classList.toggle('theme--dark');
},
},
};
</script>
<style lang="scss" scoped>
.wt-navigation-bar {
.wt-dark-mode-switcher {
margin-right: auto;
}
</style>
2 changes: 1 addition & 1 deletion src/modules/_shared/object-wrap/the-object-wrap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default {
flex-grow: 1;
max-width: 100%;
min-height: 100%;
background: var(--page-bg-color);
background: var(--wt-page-wrapper-background-color);
}
.object-content-wrap {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/_shared/upload-csv-popup/css/upload-popup.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
.upload-popup-form__error-stack-trace {
margin-top: var(--spacing-sm);
padding: var(--spacing-sm);
color: var(--false-color);
color: var(--error-color);
border-radius: var(--border-radius);
background: var(--secondary-color);
}
Expand Down
4 changes: 4 additions & 0 deletions src/modules/appearance/store/appearance.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import AppearanceStoreModule
from '@webitel/ui-sdk/src/modules/Appearance/store/AppearanceStoreModule';

export default new AppearanceStoreModule().getModule();
2 changes: 1 addition & 1 deletion src/modules/application-hub/components/application-hub.vue
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ $transition: 0.4s;
// title text
.application-link__title {
@extend %typo-body-1;
color: var(--main-color);
color: var(--text-main-color);
}
// specific @hover toggled styles (hovered)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,10 @@ export default {

<style lang="scss" scoped>
.all-licenses {
--license--valid: rgba(255, 234, 0, 0.3);
--license--90: rgba(255, 234, 0, 0.3);
--license--30: rgba(255, 68, 68, 0.3);
--license--0: rgba(0, 0, 0, 0.1);
--license--valid: var(--success-color);
--license--90: var(--success-color);
--license--30: var(--warning-color);
--license--0: var(--error-color);
}
.all-licenses__product-cell {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,6 @@ export default {
.hint-link__link {
@extend %typo-subtitle-2;
text-decoration: underline;
color: var(--info-color);
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,6 @@ export default {
justify-content: space-between;
padding: var(--spacing-xs) var(--spacing-sm);
border-radius: var(--border-radius);
background: var(--secondary-color-50);
background: var(--secondary-color);
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,9 @@ export default {
.wt-button {
margin-top: var(--spacing-sm);
}
:deep(.vc-chrome-body) {
background: var(--content-wrapper-color);
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
@click="copyCode"
>
{{ text }}
<wt-hint v-show="!isCopied">
<wt-hint
v-show="!isCopied"
:icon-color="`on-${color}`"
>
{{ $t('objects.routing.chatGateways.webchat.copyCodeHint') }}
</wt-hint>
</wt-button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ export default {
.colorpicker {
width: 100%;
//:deep(.vc-chrome-body) {
// background: var(--content-wrapper-color);
//}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ $pic-height: 136px;
overflow: hidden;
text-align: center;
text-overflow: ellipsis;
color: var(--text-main-color);
grid-column-start: 2;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export default {
bottom: 0;
left: 0;
pointer-events: none;
background: var(--page-bg-color);
background: var(--wt-page-wrapper-background-color);
.wt-loader {
position: absolute;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
@click="select(category)"
>
<wt-icon
:color="selected.value === category.value ? 'on-primary' : 'default'"
:icon="category.value"
icon-prefix="adm"
/>
Expand Down Expand Up @@ -50,9 +51,13 @@ export default {
.start-nav__category-option--lvl-1 {
background: var(--lvl-1-bg);
&.start-nav__category-option--selected,
&:hover {
background: var(--lvl-1-bg--hover);
}
&.start-nav__category-option--selected {
color: var(--lvl-1-text--selected);
background: var(--lvl-1-bg--selected);
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,15 @@ export default {
content: '';
transform: translate(-50%, -50%);
border-radius: 50%;
background: var(--contrast-color);
background: var(--text-main-color);
}
}
}
.start-nav__link {
color: var(--text-main-color);
}
.start-nav__link:hover, .start-nav__link:active {
text-decoration: underline;
}
Expand Down
8 changes: 5 additions & 3 deletions src/modules/start-page/components/the-start-page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ export default {
+ var(--spacing-2xs) * 6
);
--lvl-1-bg: hsla(var(--_secondary-color), var(--_opacity--default));
--lvl-1-bg--hover: hsla(var(--_accent-color), var(--_opacity--default));
--lvl-1-bg: var(--dp-18-surface-color);
--lvl-1-bg--hover: var(--dp-20-surface-color);
--lvl-1-bg--selected: var(--primary-color);
--lvl-1-text--selected: var(--primary-on-color);
@media (#{$media} and #{$media-width-sm}) {
--wrapper-width: 80%;
Expand Down Expand Up @@ -100,7 +102,7 @@ export default {
margin: auto;
padding: var(--spacing-sm);
border-radius: var(--border-radius);
background: var(--main-color);
background: var(--dp-20-surface-color);
grid-template-columns: repeat(2, 1fr);
grid-gap: var(--spacing-sm);
Expand Down
1 change: 1 addition & 0 deletions src/modules/start-page/css/_start-category.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
padding: 18px 20px;
transition: var(--transition);
text-align: left;
color: var(--text-main-color);
border-radius: var(--border-radius);

.wt-icon {
Expand Down
1 change: 1 addition & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default ({ mode }) => {
.replaceAll('VITE_', 'VUE_APP_')),
},
server: {
host: true,
port: 8080,
},
css: {
Expand Down

0 comments on commit b1b3445

Please sign in to comment.