chore: Shows articles in dark mode for widget (#8115)
This commit is contained in:
committed by
GitHub
parent
b28721e10b
commit
28db18ebbd
@@ -39,6 +39,7 @@ import ArticleHero from 'widget/components/ArticleHero.vue';
|
||||
import ArticleCardSkeletonLoader from 'widget/components/ArticleCardSkeletonLoader.vue';
|
||||
|
||||
import { mapGetters } from 'vuex';
|
||||
import darkModeMixin from 'widget/mixins/darkModeMixin';
|
||||
import routerMixin from 'widget/mixins/routerMixin';
|
||||
import configMixin from 'widget/mixins/configMixin';
|
||||
|
||||
@@ -49,7 +50,7 @@ export default {
|
||||
TeamAvailability,
|
||||
ArticleCardSkeletonLoader,
|
||||
},
|
||||
mixins: [configMixin, routerMixin],
|
||||
mixins: [configMixin, routerMixin, darkModeMixin],
|
||||
props: {
|
||||
hasFetched: {
|
||||
type: Boolean,
|
||||
@@ -113,9 +114,14 @@ export default {
|
||||
return this.replaceRoute('messages');
|
||||
},
|
||||
openArticleInArticleViewer(link) {
|
||||
let linkToOpen = `${link}?show_plain_layout=true`;
|
||||
const isDark = this.prefersDarkMode;
|
||||
if (isDark) {
|
||||
linkToOpen = `${linkToOpen}&theme=dark`;
|
||||
}
|
||||
this.$router.push({
|
||||
name: 'article-viewer',
|
||||
params: { link: `${link}?show_plain_layout=true` },
|
||||
params: { link: linkToOpen },
|
||||
});
|
||||
},
|
||||
viewAllArticles() {
|
||||
|
||||
Reference in New Issue
Block a user