From 801903c2ff70cfba0d414c4f18edc0596a50346c Mon Sep 17 00:00:00 2001 From: AkiraFukushima Date: Thu, 20 Aug 2020 22:38:17 +0900 Subject: [PATCH 1/2] Fix options for new css-loader --- .electron-vue/webpack.renderer.config.js | 48 ++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/.electron-vue/webpack.renderer.config.js b/.electron-vue/webpack.renderer.config.js index b51c1a00..78039237 100644 --- a/.electron-vue/webpack.renderer.config.js +++ b/.electron-vue/webpack.renderer.config.js @@ -31,19 +31,59 @@ let rendererConfig = { }, { test: /\.scss$/, - use: ['vue-style-loader', 'css-loader', 'sass-loader'] + use: [ + 'vue-style-loader', + { + loader: 'css-loader', + options: { + modules: false, + esModule: false + } + }, + 'sass-loader' + ] }, { test: /\.sass$/, - use: ['vue-style-loader', 'css-loader', 'sass-loader?indentedSyntax'] + use: [ + 'vue-style-loader', + + { + loader: 'css-loader', + options: { + modules: false, + esModule: false + } + }, + 'sass-loader?indentedSyntax' + ] }, { test: /\.less$/, - use: ['vue-style-loader', 'css-loader', 'less-loader'] + use: [ + 'vue-style-loader', + { + loader: 'css-loader', + options: { + modules: false, + esModule: false + } + }, + 'less-loader' + ] }, { test: /\.css$/, - use: ['vue-style-loader', 'css-loader'] + use: [ + 'vue-style-loader', + { + loader: 'css-loader', + options: { + modules: false, + esModule: false + } + } + ] }, { test: /\.html$/, From 88ab922273fd0bbff09272c0a0ab1b5a06ac2d54 Mon Sep 17 00:00:00 2001 From: AkiraFukushima Date: Thu, 20 Aug 2020 22:38:30 +0900 Subject: [PATCH 2/2] Specify lang for imported style files --- .../TimelineSpace/Contents/DirectMessages.vue | 10 +++++----- .../TimelineSpace/Contents/Hashtag/Tag.vue | 12 ++++++------ .../components/TimelineSpace/Contents/Home.vue | 2 +- .../components/TimelineSpace/Contents/Lists/Show.vue | 12 ++++++------ .../components/TimelineSpace/Contents/Local.vue | 10 +++++----- .../components/TimelineSpace/Contents/Mentions.vue | 10 +++++----- .../TimelineSpace/Contents/Notifications.vue | 10 +++++----- .../components/TimelineSpace/Contents/Public.vue | 10 +++++----- 8 files changed, 38 insertions(+), 38 deletions(-) diff --git a/src/renderer/components/TimelineSpace/Contents/DirectMessages.vue b/src/renderer/components/TimelineSpace/Contents/DirectMessages.vue index 6abc4613..02668ec3 100644 --- a/src/renderer/components/TimelineSpace/Contents/DirectMessages.vue +++ b/src/renderer/components/TimelineSpace/Contents/DirectMessages.vue @@ -57,7 +57,7 @@ export default { unreadNotification: state => state.TimelineSpace.unreadNotification }), ...mapGetters('TimelineSpace/Modals', ['modalOpened']), - shortcutEnabled: function() { + shortcutEnabled: function () { if (this.modalOpened) { return false } @@ -83,7 +83,7 @@ export default { // If focusedId does not change, we have to refresh focusedId because Toot component watch change events. const previousFocusedId = this.focusedId this.focusedId = 0 - this.$nextTick(function() { + this.$nextTick(function () { this.focusedId = previousFocusedId }) }) @@ -113,14 +113,14 @@ export default { } }, watch: { - startReload: function(newState, oldState) { + startReload: function (newState, oldState) { if (!oldState && newState) { this.reload().finally(() => { this.$store.commit('TimelineSpace/HeaderMenu/changeReload', false) }) } }, - focusedId: function(newState, _oldState) { + focusedId: function (newState, _oldState) { if (newState && this.heading) { this.$store.commit('TimelineSpace/Contents/DirectMessages/changeHeading', false) } else if (newState === null && !this.heading) { @@ -253,4 +253,4 @@ export default { } } - + diff --git a/src/renderer/components/TimelineSpace/Contents/Hashtag/Tag.vue b/src/renderer/components/TimelineSpace/Contents/Hashtag/Tag.vue index 7b26a83c..c5be54f0 100644 --- a/src/renderer/components/TimelineSpace/Contents/Hashtag/Tag.vue +++ b/src/renderer/components/TimelineSpace/Contents/Hashtag/Tag.vue @@ -55,7 +55,7 @@ export default { filter: state => state.TimelineSpace.Contents.Hashtag.Tag.filter }), ...mapGetters('TimelineSpace/Modals', ['modalOpened']), - shortcutEnabled: function() { + shortcutEnabled: function () { if (this.modalOpened) { return false } @@ -78,27 +78,27 @@ export default { // If focusedId does not change, we have to refresh focusedId because Toot component watch change events. const previousFocusedId = this.focusedId this.focusedId = 0 - this.$nextTick(function() { + this.$nextTick(function () { this.focusedId = previousFocusedId }) }) }, watch: { - tag: function(newTag, _oldTag) { + tag: function (newTag, _oldTag) { this.$store.commit('TimelineSpace/Contents/changeLoading', true) this.reset() this.load(newTag).finally(() => { this.$store.commit('TimelineSpace/Contents/changeLoading', false) }) }, - startReload: function(newState, oldState) { + startReload: function (newState, oldState) { if (!oldState && newState) { this.reload().finally(() => { this.$store.commit('TimelineSpace/HeaderMenu/changeReload', false) }) } }, - focusedId: function(newState, _oldState) { + focusedId: function (newState, _oldState) { if (newState && this.heading) { this.$store.commit('TimelineSpace/Contents/Hashtag/Tag/changeHeading', false) } else if (newState === null && !this.heading) { @@ -257,4 +257,4 @@ export default { transition: all 0.5s; } - + diff --git a/src/renderer/components/TimelineSpace/Contents/Home.vue b/src/renderer/components/TimelineSpace/Contents/Home.vue index 23b18825..339d851b 100644 --- a/src/renderer/components/TimelineSpace/Contents/Home.vue +++ b/src/renderer/components/TimelineSpace/Contents/Home.vue @@ -234,4 +234,4 @@ export default { } } - + diff --git a/src/renderer/components/TimelineSpace/Contents/Lists/Show.vue b/src/renderer/components/TimelineSpace/Contents/Lists/Show.vue index 2f659907..584ce2ee 100644 --- a/src/renderer/components/TimelineSpace/Contents/Lists/Show.vue +++ b/src/renderer/components/TimelineSpace/Contents/Lists/Show.vue @@ -55,7 +55,7 @@ export default { filter: state => state.TimelineSpace.Contents.Lists.Show.filter }), ...mapGetters('TimelineSpace/Modals', ['modalOpened']), - shortcutEnabled: function() { + shortcutEnabled: function () { if (this.modalOpened) { return false } @@ -79,26 +79,26 @@ export default { // If focusedId does not change, we have to refresh focusedId because Toot component watch change events. const previousFocusedId = this.focusedId this.focusedId = 0 - this.$nextTick(function() { + this.$nextTick(function () { this.focusedId = previousFocusedId }) }) }, watch: { - list_id: function() { + list_id: function () { this.$store.commit('TimelineSpace/Contents/changeLoading', true) this.load().finally(() => { this.$store.commit('TimelineSpace/Contents/changeLoading', false) }) }, - startReload: function(newState, oldState) { + startReload: function (newState, oldState) { if (!oldState && newState) { this.reload().finally(() => { this.$store.commit('TimelineSpace/HeaderMenu/changeReload', false) }) } }, - focusedId: function(newState, _oldState) { + focusedId: function (newState, _oldState) { if (newState && this.heading) { this.$store.commit('TimelineSpace/Contents/Lists/Show/changeHeading', false) } else if (newState === null && !this.heading) { @@ -257,4 +257,4 @@ export default { transition: all 0.5s; } - + diff --git a/src/renderer/components/TimelineSpace/Contents/Local.vue b/src/renderer/components/TimelineSpace/Contents/Local.vue index 82534563..99eabde8 100644 --- a/src/renderer/components/TimelineSpace/Contents/Local.vue +++ b/src/renderer/components/TimelineSpace/Contents/Local.vue @@ -57,7 +57,7 @@ export default { unreadNotification: state => state.TimelineSpace.unreadNotification }), ...mapGetters('TimelineSpace/Modals', ['modalOpened']), - shortcutEnabled: function() { + shortcutEnabled: function () { if (this.modalOpened) { return false } @@ -83,7 +83,7 @@ export default { // If focusedId does not change, we have to refresh focusedId because Toot component watch change events. const previousFocusedId = this.focusedId this.focusedId = 0 - this.$nextTick(function() { + this.$nextTick(function () { this.focusedId = previousFocusedId }) }) @@ -113,14 +113,14 @@ export default { } }, watch: { - startReload: function(newState, oldState) { + startReload: function (newState, oldState) { if (!oldState && newState) { this.reload().finally(() => { this.$store.commit('TimelineSpace/HeaderMenu/changeReload', false) }) } }, - focusedId: function(newState, _oldState) { + focusedId: function (newState, _oldState) { if (newState && this.heading) { this.$store.commit('TimelineSpace/Contents/Local/changeHeading', false) } else if (newState === null && !this.heading) { @@ -246,4 +246,4 @@ export default { } } - + diff --git a/src/renderer/components/TimelineSpace/Contents/Mentions.vue b/src/renderer/components/TimelineSpace/Contents/Mentions.vue index 98a8686f..b6fd5306 100644 --- a/src/renderer/components/TimelineSpace/Contents/Mentions.vue +++ b/src/renderer/components/TimelineSpace/Contents/Mentions.vue @@ -59,7 +59,7 @@ export default { }), ...mapGetters('TimelineSpace/Modals', ['modalOpened']), ...mapGetters('TimelineSpace/Contents/Mentions', ['mentions']), - shortcutEnabled: function() { + shortcutEnabled: function () { if (this.modalOpened) { return false } @@ -78,7 +78,7 @@ export default { // If focusedId does not change, we have to refresh focusedId because Toot component watch change events. const previousFocusedId = this.focusedId this.focusedId = 0 - this.$nextTick(function() { + this.$nextTick(function () { this.focusedId = previousFocusedId }) }) @@ -101,14 +101,14 @@ export default { } }, watch: { - startReload: function(newState, oldState) { + startReload: function (newState, oldState) { if (!oldState && newState) { this.reload().finally(() => { this.$store.commit('TimelineSpace/HeaderMenu/changeReload', false) }) } }, - focusedId: function(newState, _oldState) { + focusedId: function (newState, _oldState) { if (newState && this.heading) { this.$store.commit('TimelineSpace/Contents/Mentions/changeHeading', false) } else if (newState === null && !this.heading) { @@ -225,4 +225,4 @@ export default { } } - + diff --git a/src/renderer/components/TimelineSpace/Contents/Notifications.vue b/src/renderer/components/TimelineSpace/Contents/Notifications.vue index 8fcade74..d1923666 100644 --- a/src/renderer/components/TimelineSpace/Contents/Notifications.vue +++ b/src/renderer/components/TimelineSpace/Contents/Notifications.vue @@ -53,7 +53,7 @@ export default { filter: state => state.TimelineSpace.Contents.Notifications.filter }), ...mapGetters('TimelineSpace/Modals', ['modalOpened']), - shortcutEnabled: function() { + shortcutEnabled: function () { if (this.modalOpened) { return false } @@ -74,7 +74,7 @@ export default { // If focusedId does not change, we have to refresh focusedId because Toot component watch change events. const previousFocusedId = this.focusedId this.focusedId = 0 - this.$nextTick(function() { + this.$nextTick(function () { this.focusedId = previousFocusedId }) }) @@ -97,14 +97,14 @@ export default { } }, watch: { - startReload: function(newState, oldState) { + startReload: function (newState, oldState) { if (!oldState && newState) { this.reload().finally(() => { this.$store.commit('TimelineSpace/HeaderMenu/changeReload', false) }) } }, - focusedId: function(newState, _oldState) { + focusedId: function (newState, _oldState) { if (newState >= 0 && this.heading) { this.$store.commit('TimelineSpace/Contents/Notifications/changeHeading', false) } else if (newState === null && !this.heading) { @@ -225,4 +225,4 @@ export default { } } - + diff --git a/src/renderer/components/TimelineSpace/Contents/Public.vue b/src/renderer/components/TimelineSpace/Contents/Public.vue index 2706133d..79db52f9 100644 --- a/src/renderer/components/TimelineSpace/Contents/Public.vue +++ b/src/renderer/components/TimelineSpace/Contents/Public.vue @@ -57,7 +57,7 @@ export default { unreadNotification: state => state.TimelineSpace.unreadNotification }), ...mapGetters('TimelineSpace/Modals', ['modalOpened']), - shortcutEnabled: function() { + shortcutEnabled: function () { if (this.modalOpened) { return false } @@ -83,7 +83,7 @@ export default { // If focusedId does not change, we have to refresh focusedId because Toot component watch change events. const previousFocusedId = this.focusedId this.focusedId = 0 - this.$nextTick(function() { + this.$nextTick(function () { this.focusedId = previousFocusedId }) }) @@ -113,14 +113,14 @@ export default { } }, watch: { - startReload: function(newState, oldState) { + startReload: function (newState, oldState) { if (!oldState && newState) { this.reload().finally(() => { this.$store.commit('TimelineSpace/HeaderMenu/changeReload', false) }) } }, - focusedId: function(newState, _oldState) { + focusedId: function (newState, _oldState) { if (newState && this.heading) { this.$store.commit('TimelineSpace/Contents/Public/changeHeading', false) } else if (newState === null && !this.heading) { @@ -246,4 +246,4 @@ export default { } } - +