Migrate app to TypeScript (#1637)
* Initial setup and migrated src/common * WIP * WIP * WIP * Main module basically finished * Renderer process migrated * Added CI step and some fixes * Fixed remainder of issues and added proper ESLint config * Fixed a couple issues * Progress! * Some more fixes * Fixed a test * Fix build step * PR feedback
This commit is contained in:
43
src/common/config/defaultPreferences.ts
Normal file
43
src/common/config/defaultPreferences.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
// Copyright (c) 2015-2016 Yuya Ochiai
|
||||
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
/**
|
||||
* Default user preferences. End-users can change these parameters by editing config.json
|
||||
* @param {number} version - Scheme version. (Not application version)
|
||||
*/
|
||||
|
||||
import {ConfigV2} from 'types/config';
|
||||
|
||||
export const getDefaultDownloadLocation = () => {
|
||||
switch (process.platform) {
|
||||
case 'darwin':
|
||||
return `/Users/${process.env.USER || process.env.USERNAME}/Downloads`;
|
||||
case 'win32':
|
||||
return `C:\\Users\\${process.env.USER || process.env.USERNAME}\\Downloads`;
|
||||
default:
|
||||
return `/home/${process.env.USER || process.env.USERNAME}/Downloads`;
|
||||
}
|
||||
};
|
||||
|
||||
const defaultPreferences: ConfigV2 = {
|
||||
version: 2,
|
||||
teams: [],
|
||||
showTrayIcon: true,
|
||||
trayIconTheme: 'light',
|
||||
minimizeToTray: true,
|
||||
notifications: {
|
||||
flashWindow: 2,
|
||||
bounceIcon: true,
|
||||
bounceIconType: 'informational',
|
||||
},
|
||||
showUnreadBadge: true,
|
||||
useSpellChecker: true,
|
||||
enableHardwareAcceleration: true,
|
||||
autostart: true,
|
||||
spellCheckerLocale: 'en-US',
|
||||
darkMode: false,
|
||||
downloadLocation: getDefaultDownloadLocation(),
|
||||
};
|
||||
|
||||
export default defaultPreferences;
|
Reference in New Issue
Block a user