diff --git a/src/index.ejs b/src/index.ejs index fe6dc257..d544ce03 100644 --- a/src/index.ejs +++ b/src/index.ejs @@ -6,7 +6,7 @@ <% if (htmlWebpackPlugin.options.nodeModules) { %> <% } %> @@ -14,7 +14,7 @@
diff --git a/src/main/preload.js b/src/main/preload.js index 0b913b3c..f03fb36b 100644 --- a/src/main/preload.js +++ b/src/main/preload.js @@ -1,5 +1,11 @@ const electron = require('electron') +const path = require('path') +const mod = require('module') global.ipcRenderer = electron.ipcRenderer global.shell = electron.shell global.clipboard = electron.clipboard -global.process = process +global.node_env = process.env.NODE_ENV +global.platform = process.platform +global.path = path +global.mod = mod +global.static_path = path.join(__dirname, '/static').replace(/\\/g, '\\\\') diff --git a/src/renderer/router/index.ts b/src/renderer/router/index.ts index b0e66b8a..ac82a23d 100644 --- a/src/renderer/router/index.ts +++ b/src/renderer/router/index.ts @@ -9,6 +9,7 @@ import PreferencesAppearance from '@/components/Preferences/Appearance.vue' import PreferencesNotification from '@/components/Preferences/Notification.vue' import PreferencesAccount from '@/components/Preferences/Account.vue' import PreferencesLanguage from '@/components/Preferences/Language.vue' +import PreferencesNetwork from '@/components/Preferences/Network.vue' import GlobalHeader from '@/components/GlobalHeader.vue' import Settings from '@/components/Settings.vue' import SettingsGeneral from '@/components/Settings/General.vue' @@ -28,6 +29,7 @@ import TimelineSpaceContentsDirectMessages from '@/components/TimelineSpace/Cont import TimelineSpaceContentsListsIndex from '@/components/TimelineSpace/Contents/Lists/Index.vue' import TimelineSpaceContentsListsEdit from '@/components/TimelineSpace/Contents/Lists/Edit.vue' import TimelineSpaceContentsListsShow from '@/components/TimelineSpace/Contents/Lists/Show.vue' +import TimelineSpaceContentsFollowRequests from '@/components/TimelineSpace/Contents/FollowRequests.vue' Vue.use(Router) @@ -72,7 +74,7 @@ const router = new Router({ { path: 'network', name: 'network', - component: require('@/components/Preferences/Network').default + component: PreferencesNetwork }, { path: 'language', @@ -123,7 +125,7 @@ const router = new Router({ { path: 'follow-requests', name: 'follow-requests', - component: require('@/components/TimelineSpace/Contents/FollowRequests').default + component: TimelineSpaceContentsFollowRequests }, { path: 'favourites', diff --git a/src/renderer/store/Preferences/General.ts b/src/renderer/store/Preferences/General.ts index 26d7ce66..398bcbb1 100644 --- a/src/renderer/store/Preferences/General.ts +++ b/src/renderer/store/Preferences/General.ts @@ -4,6 +4,9 @@ import { RootState } from '@/store' import { Sound } from '~/src/types/sound' import { Timeline } from '~/src/types/timeline' import { BaseConfig, General, Other } from '~/src/types/preference' +import { MyWindow } from '~/src/types/global' + +const win = window as MyWindow export type GeneralState = { general: General @@ -141,7 +144,7 @@ const actions: ActionTree