chore: RTL configuration (#6521)

* chore: RTL configuration

* Adds scss file
This commit is contained in:
Sivin Varghese
2023-02-23 17:50:44 +05:30
committed by GitHub
parent 87aabfbb9a
commit 409466bbd5
8 changed files with 511 additions and 3 deletions

View File

@@ -125,9 +125,11 @@ import configMixin from 'shared/mixins/configMixin';
import accountMixin from '../../../../mixins/account';
import { FEATURE_FLAGS } from '../../../../featureFlags';
const semver = require('semver');
import uiSettingsMixin from 'dashboard/mixins/uiSettings';
import { getLanguageDirection } from 'dashboard/components/widgets/conversation/advancedFilterItems/languages';
export default {
mixins: [accountMixin, alertMixin, configMixin],
mixins: [accountMixin, alertMixin, configMixin, uiSettingsMixin],
data() {
return {
id: '',
@@ -249,11 +251,20 @@ export default {
auto_resolve_duration: this.autoResolveDuration,
});
this.$root.$i18n.locale = this.locale;
this.getAccount(this.id).locale = this.locale;
this.updateDirectionView(this.locale);
this.showAlert(this.$t('GENERAL_SETTINGS.UPDATE.SUCCESS'));
} catch (error) {
this.showAlert(this.$t('GENERAL_SETTINGS.UPDATE.ERROR'));
}
},
updateDirectionView(locale) {
const isRTLSupported = getLanguageDirection(locale);
this.updateUISettings({
rtl_view: isRTLSupported,
});
},
},
};
</script>