Skip to content

Commit

Permalink
fix: colors fixes [WTEL-3902]
Browse files Browse the repository at this point in the history
  • Loading branch information
dlohvinov committed Dec 6, 2023
1 parent b1b3445 commit 070ccdc
Show file tree
Hide file tree
Showing 12 changed files with 113 additions and 308 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.91",
"@webitel/ui-sdk": "^23.12.92",
"axios": "^0.27.1",
"clipboard-copy": "^4.0.1",
"cron-validator": "^1.3.1",
Expand Down
15 changes: 12 additions & 3 deletions src/app/components/utils/code-editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<script>
import { editor, languages } from 'monaco-editor';
import { markRaw } from 'vue';
import { mapState } from 'vuex';
// https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.ieditorconstructionoptions.html
Expand All @@ -40,7 +41,6 @@ const fullscreenSizeConfig = {
const config = {
...defaultSizeConfig,
language: 'json',
theme: 'vs',
wordWrap: 'off',
autoClosingQuotes: true,
autoClosingBrackets: true,
Expand Down Expand Up @@ -81,6 +81,9 @@ export default {
isFullscreen: false,
}),
computed: {
...mapState('appearance', {
theme: (state) => state.theme,
}),
fullscreenIcon() {
return this.isFullscreen ? 'collapse' : 'expand';
},
Expand All @@ -101,6 +104,14 @@ export default {
}
}
},
theme: {
handler() {
this.theme === 'dark'
? editor.setTheme('vs-dark')
: editor.setTheme('vs');
},
immediate: true,
},
},
mounted() {
this.initEditor();
Expand All @@ -122,8 +133,6 @@ export default {
}
});
editor.setTheme('vs-dark');
// eslint-disable-next-line no-unused-vars
this.editor.onDidChangeModelDecorations((event) => {
this.checkSyntaxError();
Expand Down
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(--text-main-color);
color: var(--white);
}
// specific @hover toggled styles (hovered)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@

<template #status="{ item }">
<wt-chip
:class="statusClass(item.notAfter)"
:color="statusColor(item.notAfter)"
class="license-status"
>
{{ statusText(item.notAfter) }}
Expand Down Expand Up @@ -160,25 +160,18 @@ export default {
return daysLeft + this.$t('objects.directory.license.daysToExpire.days');
},
statusClass(endDate) {
statusColor(endDate) {
const daysLeft = Math.ceil((endDate - Date.now()) / 1000 / 60 / 60 / 24);
if (daysLeft <= 0) return 'days0';
if (daysLeft < 30) return 'days30';
if (daysLeft < 90) return 'days90';
return 'valid';
if (daysLeft <= 0) return 'error';
if (daysLeft < 30) return 'warning';
if (daysLeft < 90) return 'success';
return 'success';
},
},
};
</script>

<style lang="scss" scoped>
.all-licenses {
--license--valid: var(--success-color);
--license--90: var(--success-color);
--license--30: var(--warning-color);
--license--0: var(--error-color);
}
.all-licenses__product-cell {
display: flex;
align-items: center;
Expand All @@ -196,21 +189,5 @@ export default {
align-self: flex-end;
width: 93px;
text-align: center;
&.valid {
background: var(--license--valid);
}
&.days90 {
background: var(--license--90);
}
&.days30 {
background: var(--license--30);
}
&.days0 {
background: var(--license--0);
}
}
</style>
15 changes: 15 additions & 0 deletions src/modules/routing/modules/flow/assets/code-section-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions src/modules/routing/modules/flow/assets/code-section-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 070ccdc

Please sign in to comment.