aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar Vijay A <vraravam@users.noreply.github.com>2022-07-02 05:13:38 +0530
committerLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2022-07-02 06:19:03 +0530
commitd16cc1f2c59818e53f28b4d6b4d27250331f15d7 (patch)
tree57bf4d149ec2be88dd0d351142998ce96db0d659 /src
parentchore: correctly export/import ui elements (diff)
downloadferdium-app-d16cc1f2c59818e53f28b4d6b4d27250331f15d7.tar.gz
ferdium-app-d16cc1f2c59818e53f28b4d6b4d27250331f15d7.tar.zst
ferdium-app-d16cc1f2c59818e53f28b4d6b4d27250331f15d7.zip
Use default exports instead of named exports
Diffstat (limited to 'src')
-rw-r--r--src/I18n.tsx2
-rw-r--r--src/api/apiBase.ts4
-rw-r--r--src/api/server/ServerApi.ts2
-rw-r--r--src/components/auth/Welcome.js2
-rw-r--r--src/components/ui/AppLoader/index.tsx2
-rw-r--r--src/components/ui/Link.js2
-rw-r--r--src/containers/auth/SetupAssistantScreen.tsx2
-rw-r--r--src/electron/windowUtils.ts2
-rw-r--r--src/enforce-macos-app-location.ts2
-rw-r--r--src/features/communityRecipes/store.ts2
-rw-r--r--src/features/todos/store.js2
-rw-r--r--src/features/utils/FeatureStore.js2
-rw-r--r--src/features/workspaces/actions.ts6
-rw-r--r--src/features/workspaces/components/WorkspaceDrawer.js2
-rw-r--r--src/features/workspaces/store.js4
-rw-r--r--src/helpers/array-helpers.ts11
-rw-r--r--src/helpers/async-helpers.ts2
-rw-r--r--src/helpers/routing-helpers.ts5
-rw-r--r--src/i18n/translations.ts2
-rw-r--r--src/index.ts4
-rw-r--r--src/lib/Menu.js2
-rw-r--r--src/stores/AppStore.ts4
-rw-r--r--src/stores/RecipesStore.ts2
-rw-r--r--src/stores/ServicesStore.ts2
-rw-r--r--src/themes/IStyleTypes.ts2
-rw-r--r--src/themes/default/index.ts2
-rw-r--r--src/webview/badge.ts2
-rw-r--r--src/webview/dialogTitle.ts2
-rw-r--r--src/webview/recipe.js6
-rw-r--r--src/webview/sessionHandler.ts2
30 files changed, 43 insertions, 45 deletions
diff --git a/src/I18n.tsx b/src/I18n.tsx
index b486758c3..5f725eebc 100644
--- a/src/I18n.tsx
+++ b/src/I18n.tsx
@@ -2,7 +2,7 @@ import { Component, ReactNode } from 'react';
2import { inject, observer } from 'mobx-react'; 2import { inject, observer } from 'mobx-react';
3import { IntlProvider } from 'react-intl'; 3import { IntlProvider } from 'react-intl';
4 4
5import { generatedTranslations } from './i18n/translations'; 5import generatedTranslations from './i18n/translations';
6import UserStore from './stores/UserStore'; 6import UserStore from './stores/UserStore';
7import AppStore from './stores/AppStore'; 7import AppStore from './stores/AppStore';
8 8
diff --git a/src/api/apiBase.ts b/src/api/apiBase.ts
index d7cc9b810..c6e3c0ed8 100644
--- a/src/api/apiBase.ts
+++ b/src/api/apiBase.ts
@@ -13,7 +13,7 @@ import {
13import { fixUrl } from '../helpers/url-helpers'; 13import { fixUrl } from '../helpers/url-helpers';
14 14
15// Note: This cannot be used from the internal-server since we are not running within the context of a browser window 15// Note: This cannot be used from the internal-server since we are not running within the context of a browser window
16const apiBase = (withVersion = true) => { 16export default function apiBase(withVersion = true) {
17 if ( 17 if (
18 !(window as any).ferdium || 18 !(window as any).ferdium ||
19 !(window as any).ferdium.stores.settings || 19 !(window as any).ferdium.stores.settings ||
@@ -33,8 +33,6 @@ const apiBase = (withVersion = true) => {
33 return fixUrl(withVersion ? `${url}/${API_VERSION}` : url); 33 return fixUrl(withVersion ? `${url}/${API_VERSION}` : url);
34}; 34};
35 35
36export default apiBase;
37
38export function serverBase() { 36export function serverBase() {
39 37
40 const serverType = (window as any).ferdium.stores.settings.all.app.server; 38 const serverType = (window as any).ferdium.stores.settings.all.app.server;
diff --git a/src/api/server/ServerApi.ts b/src/api/server/ServerApi.ts
index 935d7de3d..a636f3e0d 100644
--- a/src/api/server/ServerApi.ts
+++ b/src/api/server/ServerApi.ts
@@ -19,7 +19,7 @@ import RecipePreviewModel from '../../models/RecipePreview';
19import RecipeModel from '../../models/Recipe'; 19import RecipeModel from '../../models/Recipe';
20import UserModel from '../../models/User'; 20import UserModel from '../../models/User';
21 21
22import { sleep } from '../../helpers/async-helpers'; 22import sleep from '../../helpers/async-helpers';
23 23
24import { SERVER_NOT_LOADED } from '../../config'; 24import { SERVER_NOT_LOADED } from '../../config';
25import { userDataRecipesPath, userDataPath } from '../../environment-remote'; 25import { userDataRecipesPath, userDataPath } from '../../environment-remote';
diff --git a/src/components/auth/Welcome.js b/src/components/auth/Welcome.js
index 18b506eba..830501ac3 100644
--- a/src/components/auth/Welcome.js
+++ b/src/components/auth/Welcome.js
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
4import { observer, PropTypes as MobxPropTypes, inject } from 'mobx-react'; 4import { observer, PropTypes as MobxPropTypes, inject } from 'mobx-react';
5import { defineMessages, injectIntl } from 'react-intl'; 5import { defineMessages, injectIntl } from 'react-intl';
6import serverlessLogin from '../../helpers/serverless-helpers'; 6import serverlessLogin from '../../helpers/serverless-helpers';
7import { shuffleArray } from '../../helpers/array-helpers'; 7import shuffleArray from '../../helpers/array-helpers';
8import { serverName } from '../../api/apiBase'; 8import { serverName } from '../../api/apiBase';
9 9
10import Link from '../ui/Link'; 10import Link from '../ui/Link';
diff --git a/src/components/ui/AppLoader/index.tsx b/src/components/ui/AppLoader/index.tsx
index e80371e47..caa7e381d 100644
--- a/src/components/ui/AppLoader/index.tsx
+++ b/src/components/ui/AppLoader/index.tsx
@@ -3,7 +3,7 @@ import classnames from 'classnames';
3 3
4import injectStyle from 'react-jss'; 4import injectStyle from 'react-jss';
5import FullscreenLoader from '../FullscreenLoader'; 5import FullscreenLoader from '../FullscreenLoader';
6import { shuffleArray } from '../../../helpers/array-helpers'; 6import shuffleArray from '../../../helpers/array-helpers';
7 7
8import styles from './styles'; 8import styles from './styles';
9 9
diff --git a/src/components/ui/Link.js b/src/components/ui/Link.js
index 05d511a81..5ab19bf74 100644
--- a/src/components/ui/Link.js
+++ b/src/components/ui/Link.js
@@ -5,7 +5,7 @@ import { RouterStore } from 'mobx-react-router';
5import classnames from 'classnames'; 5import classnames from 'classnames';
6 6
7import { oneOrManyChildElements } from '../../prop-types'; 7import { oneOrManyChildElements } from '../../prop-types';
8import { matchRoute } from '../../helpers/routing-helpers'; 8import matchRoute from '../../helpers/routing-helpers';
9import { openExternalUrl } from '../../helpers/url-helpers'; 9import { openExternalUrl } from '../../helpers/url-helpers';
10 10
11// Should this file be converted into the coding style similar to './toggle/index.tsx'? 11// Should this file be converted into the coding style similar to './toggle/index.tsx'?
diff --git a/src/containers/auth/SetupAssistantScreen.tsx b/src/containers/auth/SetupAssistantScreen.tsx
index f7a353f26..b286d7cac 100644
--- a/src/containers/auth/SetupAssistantScreen.tsx
+++ b/src/containers/auth/SetupAssistantScreen.tsx
@@ -3,7 +3,7 @@ import { Component, ReactElement } from 'react';
3import { inject, observer } from 'mobx-react'; 3import { inject, observer } from 'mobx-react';
4 4
5import { StoresProps } from 'src/@types/ferdium-components.types'; 5import { StoresProps } from 'src/@types/ferdium-components.types';
6import { sleep } from '../../helpers/async-helpers'; 6import sleep from '../../helpers/async-helpers';
7import SetupAssistant from '../../components/auth/SetupAssistant'; 7import SetupAssistant from '../../components/auth/SetupAssistant';
8 8
9class SetupAssistantScreen extends Component<StoresProps> { 9class SetupAssistantScreen extends Component<StoresProps> {
diff --git a/src/electron/windowUtils.ts b/src/electron/windowUtils.ts
index 9c9fd1b77..3621beb2f 100644
--- a/src/electron/windowUtils.ts
+++ b/src/electron/windowUtils.ts
@@ -1,6 +1,6 @@
1import { screen } from 'electron'; 1import { screen } from 'electron';
2 2
3export function isPositionValid(position: { x: number; y: number }): boolean { 3export default function isPositionValid(position: { x: number; y: number }): boolean {
4 const displays = screen.getAllDisplays(); 4 const displays = screen.getAllDisplays();
5 const { x, y } = position; 5 const { x, y } = position;
6 return displays.some( 6 return displays.some(
diff --git a/src/enforce-macos-app-location.ts b/src/enforce-macos-app-location.ts
index 3661d08a5..222127acf 100644
--- a/src/enforce-macos-app-location.ts
+++ b/src/enforce-macos-app-location.ts
@@ -4,7 +4,7 @@ import { isMac } from './environment';
4import { isDevMode } from './environment-remote'; 4import { isDevMode } from './environment-remote';
5import { api } from './electron-util'; 5import { api } from './electron-util';
6 6
7export function enforceMacOSAppLocation(): void { 7export default function enforceMacOSAppLocation(): void {
8 if (isDevMode || !isMac || api.app.isInApplicationsFolder()) { 8 if (isDevMode || !isMac || api.app.isInApplicationsFolder()) {
9 return; 9 return;
10 } 10 }
diff --git a/src/features/communityRecipes/store.ts b/src/features/communityRecipes/store.ts
index 73eaae8b4..34e6cd92c 100644
--- a/src/features/communityRecipes/store.ts
+++ b/src/features/communityRecipes/store.ts
@@ -1,5 +1,5 @@
1import { computed } from 'mobx'; 1import { computed } from 'mobx';
2import { FeatureStore } from '../utils/FeatureStore'; 2import FeatureStore from '../utils/FeatureStore';
3 3
4const debug = require('../../preload-safe-debug')('Ferdium:feature:communityRecipes:store'); 4const debug = require('../../preload-safe-debug')('Ferdium:feature:communityRecipes:store');
5 5
diff --git a/src/features/todos/store.js b/src/features/todos/store.js
index b5228191c..1a3d6c1e7 100644
--- a/src/features/todos/store.js
+++ b/src/features/todos/store.js
@@ -12,7 +12,7 @@ import {
12 DEFAULT_IS_TODO_FEATURE_ENABLED_BY_USER, 12 DEFAULT_IS_TODO_FEATURE_ENABLED_BY_USER,
13} from '../../config'; 13} from '../../config';
14import { isValidExternalURL } from '../../helpers/url-helpers'; 14import { isValidExternalURL } from '../../helpers/url-helpers';
15import { FeatureStore } from '../utils/FeatureStore'; 15import FeatureStore from '../utils/FeatureStore';
16import { createReactions } from '../../stores/lib/Reaction'; 16import { createReactions } from '../../stores/lib/Reaction';
17import { createActionBindings } from '../utils/ActionBinding'; 17import { createActionBindings } from '../utils/ActionBinding';
18import { IPC, TODOS_ROUTES } from './constants'; 18import { IPC, TODOS_ROUTES } from './constants';
diff --git a/src/features/utils/FeatureStore.js b/src/features/utils/FeatureStore.js
index afe726294..eada332d7 100644
--- a/src/features/utils/FeatureStore.js
+++ b/src/features/utils/FeatureStore.js
@@ -1,4 +1,4 @@
1export class FeatureStore { 1export default class FeatureStore {
2 _actions = []; 2 _actions = [];
3 3
4 _reactions = []; 4 _reactions = [];
diff --git a/src/features/workspaces/actions.ts b/src/features/workspaces/actions.ts
index 5e7e6e721..b7f8b6b90 100644
--- a/src/features/workspaces/actions.ts
+++ b/src/features/workspaces/actions.ts
@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
2import Workspace from './models/Workspace'; 2import Workspace from './models/Workspace';
3import { createActionsFromDefinitions } from '../../actions/lib/actions'; 3import { createActionsFromDefinitions } from '../../actions/lib/actions';
4 4
5export const workspaceActions = createActionsFromDefinitions( 5export default createActionsFromDefinitions(
6 { 6 {
7 edit: { 7 edit: {
8 workspace: PropTypes.instanceOf(Workspace).isRequired, 8 workspace: PropTypes.instanceOf(Workspace).isRequired,
@@ -24,7 +24,5 @@ export const workspaceActions = createActionsFromDefinitions(
24 openWorkspaceSettings: {}, 24 openWorkspaceSettings: {},
25 toggleKeepAllWorkspacesLoadedSetting: {}, 25 toggleKeepAllWorkspacesLoadedSetting: {},
26 }, 26 },
27 PropTypes.checkPropTypes, 27 PropTypes.checkPropTypes
28); 28);
29
30export default workspaceActions;
diff --git a/src/features/workspaces/components/WorkspaceDrawer.js b/src/features/workspaces/components/WorkspaceDrawer.js
index d56945296..3454fdbe9 100644
--- a/src/features/workspaces/components/WorkspaceDrawer.js
+++ b/src/features/workspaces/components/WorkspaceDrawer.js
@@ -10,7 +10,7 @@ import { mdiPlusBox, mdiCog } from '@mdi/js';
10import { H1 } from '../../../components/ui/headline'; 10import { H1 } from '../../../components/ui/headline';
11import Icon from '../../../components/ui/icon'; 11import Icon from '../../../components/ui/icon';
12import WorkspaceDrawerItem from './WorkspaceDrawerItem'; 12import WorkspaceDrawerItem from './WorkspaceDrawerItem';
13import { workspaceActions } from '../actions'; 13import workspaceActions from '../actions';
14import { workspaceStore } from '../index'; 14import { workspaceStore } from '../index';
15import { 15import {
16 getUserWorkspacesRequest, 16 getUserWorkspacesRequest,
diff --git a/src/features/workspaces/store.js b/src/features/workspaces/store.js
index 20d32df67..4fdb3dd15 100644
--- a/src/features/workspaces/store.js
+++ b/src/features/workspaces/store.js
@@ -1,8 +1,8 @@
1import { computed, observable, action } from 'mobx'; 1import { computed, observable, action } from 'mobx';
2import localStorage from 'mobx-localstorage'; 2import localStorage from 'mobx-localstorage';
3import { matchRoute } from '../../helpers/routing-helpers'; 3import { matchRoute } from '../../helpers/routing-helpers';
4import { workspaceActions } from './actions'; 4import workspaceActions from './actions';
5import { FeatureStore } from '../utils/FeatureStore'; 5import FeatureStore from '../utils/FeatureStore';
6import { 6import {
7 createWorkspaceRequest, 7 createWorkspaceRequest,
8 deleteWorkspaceRequest, 8 deleteWorkspaceRequest,
diff --git a/src/helpers/array-helpers.ts b/src/helpers/array-helpers.ts
index 45ff932ba..5d28af433 100644
--- a/src/helpers/array-helpers.ts
+++ b/src/helpers/array-helpers.ts
@@ -1,5 +1,6 @@
1export const shuffleArray = (arr: any[]): any[] => 1export default function shuffleArray(arr: any[]): any[] {
2 arr 2 return arr
3 .map(a => [Math.random(), a]) 3 .map(a => [ Math.random(), a ])
4 .sort((a, b) => a[0] - b[0]) 4 .sort((a, b) => a[ 0 ] - b[ 0 ])
5 .map(a => a[1]); 5 .map(a => a[ 1 ])
6};
diff --git a/src/helpers/async-helpers.ts b/src/helpers/async-helpers.ts
index 6556a0141..de20ea080 100644
--- a/src/helpers/async-helpers.ts
+++ b/src/helpers/async-helpers.ts
@@ -1,4 +1,4 @@
1export function sleep(ms: number = 0): Promise<void> { 1export default function sleep(ms: number = 0): Promise<void> {
2 // eslint-disable-next-line no-promise-executor-return 2 // eslint-disable-next-line no-promise-executor-return
3 return new Promise(r => setTimeout(r, ms)); 3 return new Promise(r => setTimeout(r, ms));
4} 4}
diff --git a/src/helpers/routing-helpers.ts b/src/helpers/routing-helpers.ts
index 46895aa6b..0b9a83df6 100644
--- a/src/helpers/routing-helpers.ts
+++ b/src/helpers/routing-helpers.ts
@@ -1,4 +1,5 @@
1import RouteParser from 'route-parser'; 1import RouteParser from 'route-parser';
2 2
3export const matchRoute = (pattern: string, path: string) => 3export default function matchRoute(pattern: string, path: string) {
4 new RouteParser(pattern).match(path); 4 return new RouteParser(pattern).match(path);
5}
diff --git a/src/i18n/translations.ts b/src/i18n/translations.ts
index 9b23497e1..99c6e1e80 100644
--- a/src/i18n/translations.ts
+++ b/src/i18n/translations.ts
@@ -1,7 +1,7 @@
1/* eslint-disable global-require */ 1/* eslint-disable global-require */
2import { APP_LOCALES } from './languages'; 2import { APP_LOCALES } from './languages';
3 3
4export const generatedTranslations = () => { 4export default function generatedTranslations() {
5 const translations = []; 5 const translations = [];
6 for (const key of Object.keys(APP_LOCALES)) { 6 for (const key of Object.keys(APP_LOCALES)) {
7 try { 7 try {
diff --git a/src/index.ts b/src/index.ts
index 786b95a69..7ca364a2e 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -17,7 +17,7 @@ import minimist from 'minimist';
17import ms from 'ms'; 17import ms from 'ms';
18import { EventEmitter } from 'events'; 18import { EventEmitter } from 'events';
19import { enableWebContents, initializeRemote } from './electron-util'; 19import { enableWebContents, initializeRemote } from './electron-util';
20import { enforceMacOSAppLocation } from './enforce-macos-app-location'; 20import enforceMacOSAppLocation from './enforce-macos-app-location';
21 21
22initializeRemote(); 22initializeRemote();
23 23
@@ -37,7 +37,7 @@ import Tray from './lib/Tray';
37import DBus from './lib/DBus'; 37import DBus from './lib/DBus';
38import Settings from './electron/Settings'; 38import Settings from './electron/Settings';
39import handleDeepLink from './electron/deepLinking'; 39import handleDeepLink from './electron/deepLinking';
40import { isPositionValid } from './electron/windowUtils'; 40import isPositionValid from './electron/windowUtils';
41// @ts-expect-error Cannot find module './package.json' or its corresponding type declarations. 41// @ts-expect-error Cannot find module './package.json' or its corresponding type declarations.
42import { appId } from './package.json'; 42import { appId } from './package.json';
43import './electron/exception'; 43import './electron/exception';
diff --git a/src/lib/Menu.js b/src/lib/Menu.js
index 7b048d3fa..49041e43e 100644
--- a/src/lib/Menu.js
+++ b/src/lib/Menu.js
@@ -35,7 +35,7 @@ import {
35} from '../environment'; 35} from '../environment';
36import { ferdiumVersion } from '../environment-remote'; 36import { ferdiumVersion } from '../environment-remote';
37import { todoActions } from '../features/todos/actions'; 37import { todoActions } from '../features/todos/actions';
38import { workspaceActions } from '../features/workspaces/actions'; 38import workspaceActions from '../features/workspaces/actions';
39import { workspaceStore } from '../features/workspaces/index'; 39import { workspaceStore } from '../features/workspaces/index';
40import apiBase, { serverBase } from '../api/apiBase'; 40import apiBase, { serverBase } from '../api/apiBase';
41import { openExternalUrl } from '../helpers/url-helpers'; 41import { openExternalUrl } from '../helpers/url-helpers';
diff --git a/src/stores/AppStore.ts b/src/stores/AppStore.ts
index 8c8454116..b2adb0f02 100644
--- a/src/stores/AppStore.ts
+++ b/src/stores/AppStore.ts
@@ -27,7 +27,7 @@ import {
27 userDataPath, 27 userDataPath,
28 ferdiumLocale, 28 ferdiumLocale,
29} from '../environment-remote'; 29} from '../environment-remote';
30import { generatedTranslations } from '../i18n/translations'; 30import generatedTranslations from '../i18n/translations';
31import { getLocale } from '../helpers/i18n-helpers'; 31import { getLocale } from '../helpers/i18n-helpers';
32 32
33import { 33import {
@@ -35,7 +35,7 @@ import {
35 removeServicePartitionDirectory, 35 removeServicePartitionDirectory,
36} from '../helpers/service-helpers'; 36} from '../helpers/service-helpers';
37import { openExternalUrl } from '../helpers/url-helpers'; 37import { openExternalUrl } from '../helpers/url-helpers';
38import { sleep } from '../helpers/async-helpers'; 38import sleep from '../helpers/async-helpers';
39 39
40const debug = require('../preload-safe-debug')('Ferdium:AppStore'); 40const debug = require('../preload-safe-debug')('Ferdium:AppStore');
41 41
diff --git a/src/stores/RecipesStore.ts b/src/stores/RecipesStore.ts
index 00a2bb737..6bd4ab382 100644
--- a/src/stores/RecipesStore.ts
+++ b/src/stores/RecipesStore.ts
@@ -8,7 +8,7 @@ import { Actions } from 'src/actions/lib/actions';
8import Recipe from 'src/models/Recipe'; 8import Recipe from 'src/models/Recipe';
9import CachedRequest from './lib/CachedRequest'; 9import CachedRequest from './lib/CachedRequest';
10import Request from './lib/Request'; 10import Request from './lib/Request';
11import { matchRoute } from '../helpers/routing-helpers'; 11import matchRoute from '../helpers/routing-helpers';
12import { asarRecipesPath } from '../helpers/asar-helpers'; 12import { asarRecipesPath } from '../helpers/asar-helpers';
13import TypedStore from './lib/TypedStore'; 13import TypedStore from './lib/TypedStore';
14 14
diff --git a/src/stores/ServicesStore.ts b/src/stores/ServicesStore.ts
index 0164d092a..e690b3791 100644
--- a/src/stores/ServicesStore.ts
+++ b/src/stores/ServicesStore.ts
@@ -10,7 +10,7 @@ import { ApiInterface } from 'src/api';
10import { Actions } from 'src/actions/lib/actions'; 10import { Actions } from 'src/actions/lib/actions';
11import Request from './lib/Request'; 11import Request from './lib/Request';
12import CachedRequest from './lib/CachedRequest'; 12import CachedRequest from './lib/CachedRequest';
13import { matchRoute } from '../helpers/routing-helpers'; 13import matchRoute from '../helpers/routing-helpers';
14import { isInTimeframe } from '../helpers/schedule-helpers'; 14import { isInTimeframe } from '../helpers/schedule-helpers';
15import { 15import {
16 getRecipeDirectory, 16 getRecipeDirectory,
diff --git a/src/themes/IStyleTypes.ts b/src/themes/IStyleTypes.ts
index 48f52daf2..cf8bdea33 100644
--- a/src/themes/IStyleTypes.ts
+++ b/src/themes/IStyleTypes.ts
@@ -1,4 +1,4 @@
1export interface IStyleTypes { 1export default interface IStyleTypes {
2 [index: string]: { 2 [index: string]: {
3 accent: string; 3 accent: string;
4 contrast: string; 4 contrast: string;
diff --git a/src/themes/default/index.ts b/src/themes/default/index.ts
index 9e442f60e..2e18e1307 100644
--- a/src/themes/default/index.ts
+++ b/src/themes/default/index.ts
@@ -2,7 +2,7 @@ import color from 'color';
2import { cloneDeep } from 'lodash'; 2import { cloneDeep } from 'lodash';
3 3
4import * as legacyStyles from '../legacy'; 4import * as legacyStyles from '../legacy';
5import type { IStyleTypes } from '../IStyleTypes'; 5import type IStyleTypes from '../IStyleTypes';
6 6
7export default (brandPrimary: string) => { 7export default (brandPrimary: string) => {
8 if (!brandPrimary) { 8 if (!brandPrimary) {
diff --git a/src/webview/badge.ts b/src/webview/badge.ts
index 898f8cdcf..afecd22d4 100644
--- a/src/webview/badge.ts
+++ b/src/webview/badge.ts
@@ -2,7 +2,7 @@ import { ipcRenderer } from 'electron';
2 2
3const debug = require('../preload-safe-debug')('Ferdium:Plugin:BadgeHandler'); 3const debug = require('../preload-safe-debug')('Ferdium:Plugin:BadgeHandler');
4 4
5export class BadgeHandler { 5export default class BadgeHandler {
6 // TODO: Need to extract this into a utility class and reuse outside of the recipes 6 // TODO: Need to extract this into a utility class and reuse outside of the recipes
7 safeParseInt(text: string | number | undefined | null) { 7 safeParseInt(text: string | number | undefined | null) {
8 if (text === undefined || text === null) { 8 if (text === undefined || text === null) {
diff --git a/src/webview/dialogTitle.ts b/src/webview/dialogTitle.ts
index 12e007e26..67b4e5b6b 100644
--- a/src/webview/dialogTitle.ts
+++ b/src/webview/dialogTitle.ts
@@ -2,7 +2,7 @@ import { ipcRenderer } from 'electron';
2 2
3const debug = require('../preload-safe-debug')('Ferdium:Plugin:DialogTitleHandler'); 3const debug = require('../preload-safe-debug')('Ferdium:Plugin:DialogTitleHandler');
4 4
5export class DialogTitleHandler { 5export default class DialogTitleHandler {
6 titleCache: { title: string }; 6 titleCache: { title: string };
7 7
8 constructor() { 8 constructor() {
diff --git a/src/webview/recipe.js b/src/webview/recipe.js
index 9d5a97767..3c8a5326f 100644
--- a/src/webview/recipe.js
+++ b/src/webview/recipe.js
@@ -23,9 +23,9 @@ import customDarkModeCss from './darkmode/custom';
23import RecipeWebview from './lib/RecipeWebview'; 23import RecipeWebview from './lib/RecipeWebview';
24import Userscript from './lib/Userscript'; 24import Userscript from './lib/Userscript';
25 25
26import { BadgeHandler } from './badge'; 26import BadgeHandler from './badge';
27import { DialogTitleHandler } from './dialogTitle'; 27import DialogTitleHandler from './dialogTitle';
28import { SessionHandler } from './sessionHandler'; 28import SessionHandler from './sessionHandler';
29import contextMenu from './contextMenu'; 29import contextMenu from './contextMenu';
30import { 30import {
31 darkModeStyleExists, 31 darkModeStyleExists,
diff --git a/src/webview/sessionHandler.ts b/src/webview/sessionHandler.ts
index 00eacdf50..8949f5d2d 100644
--- a/src/webview/sessionHandler.ts
+++ b/src/webview/sessionHandler.ts
@@ -1,6 +1,6 @@
1const debug = require('../preload-safe-debug')('Ferdium:Plugin:SessionHandler'); 1const debug = require('../preload-safe-debug')('Ferdium:Plugin:SessionHandler');
2 2
3export class SessionHandler { 3export default class SessionHandler {
4 async releaseServiceWorkers() { 4 async releaseServiceWorkers() {
5 try { 5 try {
6 const registrations = 6 const registrations =