mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
fix: don't show domina mode on snap and for firefox #2977
This commit is contained in:
parent
eb2cfbff93
commit
2e30b8bc74
4 changed files with 8 additions and 6 deletions
4
electron/electronAPI.d.ts
vendored
4
electron/electronAPI.d.ts
vendored
|
|
@ -1,4 +1,4 @@
|
|||
import { IpcRendererEvent, OpenExternalOptions } from 'electron';
|
||||
import { IpcRendererEvent } from 'electron';
|
||||
import {
|
||||
GlobalConfigState,
|
||||
TakeABreakConfig,
|
||||
|
|
@ -50,6 +50,8 @@ export interface ElectronAPI {
|
|||
|
||||
isMacOS(): boolean;
|
||||
|
||||
isSnap(): boolean;
|
||||
|
||||
// SEND
|
||||
// ----
|
||||
reloadMainWin(): void;
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ const ea: ElectronAPI = {
|
|||
},
|
||||
getZoomFactor: () => webFrame.getZoomFactor(),
|
||||
isMacOS: () => process.platform === 'darwin',
|
||||
isSnap: () => process && process.env && !!process.env.SNAP,
|
||||
|
||||
// SEND
|
||||
// ----
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ import { IS_ELECTRON } from '../../app.constants';
|
|||
import { IS_ANDROID_WEB_VIEW } from '../../util/is-android-web-view';
|
||||
import { TIMELINE_FORM_CFG } from './form-cfgs/timeline-form.const';
|
||||
import { DOMINA_MODE_FORM } from './form-cfgs/domina-mode-form.const';
|
||||
import { isSnap } from '../../util/is-snap';
|
||||
import { FOCUS_MODE_FORM_CFG } from './form-cfgs/focus-mode-form.const';
|
||||
import { IS_FIREFOX } from '../../util/is-firefox';
|
||||
|
||||
export const GLOBAL_CONFIG_FORM_CONFIG: ConfigFormConfig = [
|
||||
LANGUAGE_SELECTION_FORM_FORM as GenericConfigFormSection,
|
||||
|
|
@ -40,5 +40,7 @@ export const GLOBAL_PRODUCTIVITY_FORM_CONFIG: ConfigFormConfig = [
|
|||
POMODORO_FORM_CFG as GenericConfigFormSection,
|
||||
EVALUATION_SETTINGS_FORM_CFG as GenericConfigFormSection,
|
||||
SIMPLE_COUNTER_FORM as GenericConfigFormSection,
|
||||
...(!IS_ELECTRON || !isSnap() ? [DOMINA_MODE_FORM as GenericConfigFormSection] : []),
|
||||
...(!window.ea?.isSnap() && !IS_FIREFOX
|
||||
? [DOMINA_MODE_FORM as GenericConfigFormSection]
|
||||
: []),
|
||||
].filter((cfg) => IS_ELECTRON || !cfg.isElectronOnly);
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
export const isSnap = (): boolean => {
|
||||
return window && window.process && window.process.env && !!window.process.env.SNAP;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue