mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 19:48:08 +00:00
chore: Adds the ability to automatically initialize the RTL direction (#6531)
This commit is contained in:
@@ -104,6 +104,7 @@ export default {
|
|||||||
} = this.getAccount(this.currentAccountId);
|
} = this.getAccount(this.currentAccountId);
|
||||||
const { pubsub_token: pubsubToken } = this.currentUser || {};
|
const { pubsub_token: pubsubToken } = this.currentUser || {};
|
||||||
this.setLocale(locale);
|
this.setLocale(locale);
|
||||||
|
this.updateRTLDirectionView(locale);
|
||||||
this.latestChatwootVersion = latestChatwootVersion;
|
this.latestChatwootVersion = latestChatwootVersion;
|
||||||
vueActionCable.init(pubsubToken);
|
vueActionCable.init(pubsubToken);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import uiSettingsMixin from 'dashboard/mixins/uiSettings';
|
import uiSettingsMixin from 'dashboard/mixins/uiSettings';
|
||||||
|
import { getLanguageDirection } from 'dashboard/components/widgets/conversation/advancedFilterItems/languages';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [uiSettingsMixin],
|
mixins: [uiSettingsMixin],
|
||||||
@@ -8,4 +9,12 @@ export default {
|
|||||||
return isRTLView;
|
return isRTLView;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
updateRTLDirectionView(locale) {
|
||||||
|
const isRTLSupported = getLanguageDirection(locale);
|
||||||
|
this.updateUISettings({
|
||||||
|
rtl_view: isRTLSupported,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user