Skip to content

Commit

Permalink
Fix/corporate colors issues (epicmaxco#735)
Browse files Browse the repository at this point in the history
* epicmaxco#731 fix datepicker styles

* epicmaxco#731 fix title issue

* fix clear icons

* fix corporate theme colors
  • Loading branch information
ilearnjs authored Feb 3, 2020
1 parent fcdb16c commit db91deb
Show file tree
Hide file tree
Showing 10 changed files with 113 additions and 37 deletions.
13 changes: 12 additions & 1 deletion src/app/App.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div id="app" class="app" :class="{'inverted-color': contextConfig.invertedColor}">
<div id="app" class="app">
<router-view />
</div>
</template>
Expand All @@ -22,6 +22,17 @@ export default {
contextConfig: this.contextConfig,
}
},
watch: {
// Temporary colors fix for 2.1.
'contextConfig.invertedColor' (val) {
const invertedColorClass = 'va-inverted-color'
if (val) {
document.body.classList.add(invertedColorClass)
} else {
document.body.classList.remove(invertedColorClass)
}
},
},
}
</script>

Expand Down
3 changes: 1 addition & 2 deletions src/components/dashboard/DashboardTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:value="term"
:placeholder="$t('tables.searchByName')"
@input="search"
removable
>
<va-icon name="fa fa-search" slot="prepend" />
</va-input>
Expand Down Expand Up @@ -67,7 +68,6 @@ import debounce from 'lodash/debounce'
import data from '../markup-tables/data.json'
export default {
inject: ['contextConfig'],
data () {
return {
users: data.slice(),
Expand Down Expand Up @@ -177,7 +177,6 @@ export default {
icon: 'fa-check',
position: 'bottom-right',
duration: 1500,
containerClass: this.contextConfig.invertedColor ? 'inverted-color' : '',
})
}, 500)
},
Expand Down
5 changes: 1 addition & 4 deletions src/components/dashboard/dashboard-tabs/BankDetailsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
<script>
export default {
name: 'bank-details-tab',
inject: ['contextConfig'],
data () {
return {
form: {
Expand All @@ -54,9 +53,7 @@ export default {
},
methods: {
sendDetails () {
this.showToast('Saved!', {
containerClass: this.contextConfig.invertedColor ? 'inverted-color' : '',
})
this.showToast('Saved!')
},
},
}
Expand Down
2 changes: 2 additions & 0 deletions src/components/data-tables/scenarios/DataTableFilter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
:value="term"
:placeholder="$t('tables.searchByName')"
@input="search"
removable
>
<va-icon name="fa fa-search" slot="prepend" />
</va-input>
Expand All @@ -16,6 +17,7 @@
v-model="perPage"
:label="$t('tables.perPage')"
:options="perPageOptions"
noClear
/>
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion src/components/forms/form-elements/FormElements.vue
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ import CountriesList from '../../../data/CountriesList'
export default {
name: 'form-elements',
components: {},
data () {
return {
isMale: true,
Expand Down
2 changes: 0 additions & 2 deletions src/components/lists/Lists.vue
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@
import data from './data.json'
export default {
inject: ['contextConfig'],
data () {
return {
customers: data.slice(0, 5),
Expand All @@ -243,7 +242,6 @@ export default {
notify (name) {
this.showToast(`Clicked ${name}`, {
position: 'bottom-right',
containerClass: this.contextConfig.invertedColor ? 'inverted-color' : '',
})
},
toggleStar (customer) {
Expand Down
1 change: 1 addition & 0 deletions src/components/pages/404-pages/VaPageNotFoundSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
:style="{'align-items': 'flex-start'}"
v-model="inputValue"
class="va-page-not-found-search__input mb-4"
removable
/>
<div class="row va-page-not-found-search__links">
<ul
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ export default {
notify () {
this.showToast("The color's copied to your clipboard", {
position: 'bottom-right',
containerClass: this.contextConfig.invertedColor ? 'inverted-color' : '',
})
},
calcBackground () {
Expand Down
2 changes: 0 additions & 2 deletions src/components/ui/notifications/Notifications.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ import ToastPositionPicker from './ToastPositionPicker.vue'
export default {
name: 'notifications',
components: { ToastPositionPicker },
inject: ['contextConfig'],
data () {
return {
toastText: 'This toast is awesome!',
Expand All @@ -136,7 +135,6 @@ export default {
position: this.toastPosition,
duration: this.toastDuration,
fullWidth: this.isToastFullWidth,
containerClass: this.contextConfig.invertedColor ? 'inverted-color' : '',
},
)
},
Expand Down
120 changes: 96 additions & 24 deletions src/sass/main.scss
Original file line number Diff line number Diff line change
@@ -1,45 +1,92 @@
@import "../services/vuestic-ui/styles";
@import './icons/icons.scss';
@import "./icons/icons.scss";

// Temporary colors fix for 2.1.
$vue-purple: #6c7fee;
$purple-box-shadow: 0 4px 9.6px 0.4px rgba($vue-purple, 0.5);

body {
#app {
&.inverted-color {
::selection {
background-color: $vue-purple;
color: $white;
}
body.va-inverted-color {
::selection {
background-color: $vue-purple;
color: $white;
}

.link {
color: $vue-purple;
}
.link,
.title {
color: $vue-purple;
}

.va-data-table {
th.sortable {
.va-data-table {
th.sortable {
color: $vue-purple;
}
}

.va-dropdown {
.profile-dropdown,
.language-dropdown,
.message-dropdown,
.notification-dropdown {
&__item {
&.active,
&:hover {
color: $vue-purple;
}
}
}
}

.flatpickr-calendar {
::selection {
background-color: $vue-purple;
color: $white;
}

.flatpickr-days {
.dayContainer {
.flatpickr-day {
&.selected,
&.selected:hover,
&.startRange,
&.endRange,
&:hover,
&.inRange:hover {
background: $vue-purple;
color: white;
}

.va-dropdown {
.profile-dropdown,
.language-dropdown,
.message-dropdown,
.notification-dropdown {
&__item {
&.active,
&:hover {
color: $vue-purple;
}
&.inRange {
color: $vue-purple;
}
}
}
}

.numInputWrapper span {
border: none;

&.arrowUp,
&.arrowDown {
&:hover {
background: none;
}
}

&.arrowUp::after {
border-style: solid;
border-width: 0 0.25rem 0.25rem 0.25rem;
border-color: transparent transparent $vue-purple transparent;
}

&.arrowDown::after {
border-style: solid;
border-width: 0.25rem 0.25rem 0 0.25rem;
border-color: $vue-purple transparent transparent transparent;
}
}
}

.toasted-container.inverted-color {
.toasted-container {
.toasted.vuestic-toast {
box-shadow: $purple-box-shadow;

Expand All @@ -49,4 +96,29 @@ body {
}
}
}

.medium-editor-toolbar,
.medium-editor-toolbar-form,
.medium-editor-toolbar-actions,
.medium-editor-toolbar-anchor-preview {
background-color: $vue-purple;
}

.medium-editor-toolbar {
.medium-editor-action {
background-color: $vue-purple;

&.medium-editor-button-active {
background-color: darken($vue-purple, 15%);
}
}
}

.medium-toolbar-arrow-under::after {
border-color: $vue-purple transparent transparent transparent;
}

.medium-toolbar-arrow-over::before {
border-color: transparent transparent $vue-purple transparent;
}
}

0 comments on commit db91deb

Please sign in to comment.