aboutsummaryrefslogtreecommitdiffstats
path: root/src/config.js
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2021-05-12 18:48:40 +0200
committerLibravatar GitHub <noreply@github.com>2021-05-12 18:48:40 +0200
commit2a2f6fe945b87f50c95a31efb7c47c664e58a8bf (patch)
treef38165789e3a68b83a91b6882d75885c47579371 /src/config.js
parentUpdated the documentation (#1394) (diff)
downloadferdium-app-2a2f6fe945b87f50c95a31efb7c47c664e58a8bf.tar.gz
ferdium-app-2a2f6fe945b87f50c95a31efb7c47c664e58a8bf.tar.zst
ferdium-app-2a2f6fe945b87f50c95a31efb7c47c664e58a8bf.zip
Fix some appearance issues (#1398)
* Fix property spelling in Sidebar component * Fix typo in todos partition name * Use the FerdiDev setting.json in dev mode The app.setPath calls are still a mess and need to be fixed, but this at least allows me to experiment locally. * Make @meetfranz/theme follow the accent color We inject the value of the accent color into the themes, so the buttons show the appropriate color. This allows removing some existing css hacks. In order to do this, the themes had to be turned into functions that take the brand color (accent color) as an argument instead of hard-coding it. The css-based accent color for legacy components is left unchanged. * Remove superfluous scrollbars While overflow: scroll doesn't look ugly on macs, because the system hides scrollbars by default (except on hower), on Linux and Windows, the disabled scrollbars appearing by default look ugly. We set overflow-y: auto instead to display a scrollbar only when needed. * Simplify theme generation in @meetfranz/themes * Remove default accent color code duplication * Apply accent color to styles not in themeInfo.json Some colors are darkened/lightened versions of the primary brand color, so they are not caught by build-theme-info. We create these styles with `color` manually. * Inset shadow on sidebar This creates a more flat look that projecting a shadow over the service, and avoid compositing a shadow over the webview. * Apply accent color to vertical style tab bar * Workspace drawer styling in vertical mode * Fix sidebar layout In vertical mode, the top of the service was clipped by the sidebar Also removes unnecessary whitespace in sidebar * Fix 1px wide line on right when todos are hidden * Fix window menu When building the menu bar, the File / app menu is added later, so we must be careful about indexing the menu bar. * Update locale files * Report the default accent color accurately * Fix inverted button with dark theme * Fix crash with invalid accent color Fall back to the default accent color instead * Darker secondary buttons in dark mode * Vertical workspace drawer style outside debug mode In order to reliably apply the style, we need to add a class name to the drawer manually, as component names only appear in class names in debug mode.
Diffstat (limited to 'src/config.js')
-rw-r--r--src/config.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/config.js b/src/config.js
index e6bd83e06..b6a052de7 100644
--- a/src/config.js
+++ b/src/config.js
@@ -1,6 +1,8 @@
1import electron from 'electron'; 1import electron from 'electron';
2import isDevMode from 'electron-is-dev';
2import ms from 'ms'; 3import ms from 'ms';
3import path from 'path'; 4import path from 'path';
5import { DEFAULT_ACCENT_COLOR } from '@meetfranz/theme';
4import { asarPath } from './helpers/asar-helpers'; 6import { asarPath } from './helpers/asar-helpers';
5 7
6const app = process.type === 'renderer' ? electron.remote.app : electron.app; 8const app = process.type === 'renderer' ? electron.remote.app : electron.app;
@@ -127,7 +129,7 @@ export const DEFAULT_APP_SETTINGS = {
127 showServiceNavigationBar: false, 129 showServiceNavigationBar: false,
128 universalDarkMode: true, 130 universalDarkMode: true,
129 adaptableDarkMode: true, 131 adaptableDarkMode: true,
130 accentColor: '#7266F0', 132 accentColor: DEFAULT_ACCENT_COLOR,
131 serviceRibbonWidth: 68, 133 serviceRibbonWidth: 68,
132 iconSize: iconSizeBias, 134 iconSize: iconSizeBias,
133 sentry: false, 135 sentry: false,
@@ -184,6 +186,10 @@ if (process.env.FERDI_APPDATA_DIR != null) {
184 app.setPath('userData', path.join(app.getPath('appData'), app.name)); 186 app.setPath('userData', path.join(app.getPath('appData'), app.name));
185} 187}
186 188
189if (isDevMode) {
190 app.setPath('userData', path.join(app.getPath('appData'), `${app.name}Dev`));
191}
192
187export const SETTINGS_PATH = path.join(app.getPath('userData'), 'config'); 193export const SETTINGS_PATH = path.join(app.getPath('userData'), 'config');
188 194
189// Replacing app.asar is not beautiful but unfortunately necessary 195// Replacing app.asar is not beautiful but unfortunately necessary