Files
mattermostest/src/common/config/defaultPreferences.ts
Devin Binnie 1b3d0eac8f 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
2021-06-28 09:51:23 -04:00

44 lines
1.2 KiB
TypeScript

// 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;