mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 12:08:01 +00:00
Fixes https://github.com/chatwoot/chatwoot/issues/8436 Fixes https://github.com/chatwoot/chatwoot/issues/9767 Fixes https://github.com/chatwoot/chatwoot/issues/10156 Fixes https://github.com/chatwoot/chatwoot/issues/6031 Fixes https://github.com/chatwoot/chatwoot/issues/5696 Fixes https://github.com/chatwoot/chatwoot/issues/9250 Fixes https://github.com/chatwoot/chatwoot/issues/9762 --------- Co-authored-by: Pranav <pranavrajs@gmail.com> Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
85 lines
1.8 KiB
Vue
85 lines
1.8 KiB
Vue
<script>
|
|
import SnackbarContainer from './components/SnackBar/Container.vue';
|
|
|
|
export default {
|
|
components: { SnackbarContainer },
|
|
data() {
|
|
return { theme: 'light' };
|
|
},
|
|
mounted() {
|
|
this.setColorTheme();
|
|
this.listenToThemeChanges();
|
|
this.setLocale(window.chatwootConfig.selectedLocale);
|
|
},
|
|
methods: {
|
|
setColorTheme() {
|
|
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
|
this.theme = 'dark';
|
|
} else {
|
|
this.theme = 'light ';
|
|
}
|
|
},
|
|
listenToThemeChanges() {
|
|
const mql = window.matchMedia('(prefers-color-scheme: dark)');
|
|
|
|
mql.onchange = e => {
|
|
if (e.matches) {
|
|
this.theme = 'dark';
|
|
} else {
|
|
this.theme = 'light';
|
|
}
|
|
};
|
|
},
|
|
setLocale(locale) {
|
|
this.$root.$i18n.locale = locale;
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<template>
|
|
<div class="h-full min-h-screen w-full antialiased" :class="theme">
|
|
<router-view />
|
|
<SnackbarContainer />
|
|
</div>
|
|
</template>
|
|
|
|
<style lang="scss">
|
|
@tailwind base;
|
|
@tailwind components;
|
|
@tailwind utilities;
|
|
|
|
@import 'shared/assets/stylesheets/colors';
|
|
@import 'shared/assets/stylesheets/spacing';
|
|
@import 'shared/assets/stylesheets/font-size';
|
|
@import 'shared/assets/stylesheets/border-radius';
|
|
|
|
html,
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
|
|
@apply h-full w-full;
|
|
|
|
input,
|
|
select {
|
|
outline: none;
|
|
}
|
|
}
|
|
|
|
.text-link {
|
|
@apply text-woot-500 font-medium hover:text-woot-600;
|
|
}
|
|
|
|
.v-popper--theme-tooltip .v-popper__inner {
|
|
background: black !important;
|
|
font-size: 0.75rem;
|
|
padding: 4px 8px !important;
|
|
border-radius: 6px;
|
|
font-weight: 400;
|
|
}
|
|
|
|
.v-popper--theme-tooltip .v-popper__arrow-container {
|
|
display: none;
|
|
}
|
|
</style>
|