diff options
author | Vijay A <vraravam@users.noreply.github.com> | 2024-03-22 02:33:33 +0530 |
---|---|---|
committer | Vijay Aravamudhan <vraravam@users.noreply.github.com> | 2024-03-21 21:24:35 +0000 |
commit | 2f3f2ae7f098376f535e5aa993c9eedc14e36f5d (patch) | |
tree | d919bda212744493a7b66c2e91a75455421d62cc /src | |
parent | Upgrade electron to '29.1.5' (diff) | |
download | ferdium-app-2f3f2ae7f098376f535e5aa993c9eedc14e36f5d.tar.gz ferdium-app-2f3f2ae7f098376f535e5aa993c9eedc14e36f5d.tar.zst ferdium-app-2f3f2ae7f098376f535e5aa993c9eedc14e36f5d.zip |
Upgrade node modules
Diffstat (limited to 'src')
199 files changed, 1150 insertions, 933 deletions
diff --git a/src/@types/ferdium-components.types.ts b/src/@types/ferdium-components.types.ts index 516ef9dd7..35c0da85f 100644 --- a/src/@types/ferdium-components.types.ts +++ b/src/@types/ferdium-components.types.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Actions } from '../actions/lib/actions'; | 1 | import type { Actions } from '../actions/lib/actions'; |
2 | import { RealStores } from '../stores'; | 2 | import type { RealStores } from '../stores'; |
3 | 3 | ||
4 | export interface StoresProps { | 4 | export interface StoresProps { |
5 | actions: Actions; | 5 | actions: Actions; |
diff --git a/src/@types/ferdium.types.ts b/src/@types/ferdium.types.ts index f54fb64ae..1120b73c8 100644 --- a/src/@types/ferdium.types.ts +++ b/src/@types/ferdium.types.ts | |||
@@ -21,4 +21,4 @@ declare global { | |||
21 | * Workaround to make TS recognize this file as a module. | 21 | * Workaround to make TS recognize this file as a module. |
22 | * https://fettblog.eu/typescript-augmenting-global-lib-dom/ | 22 | * https://fettblog.eu/typescript-augmenting-global-lib-dom/ |
23 | */ | 23 | */ |
24 | export {}; | 24 | export type {}; |
diff --git a/src/@types/mobx-form.types.ts b/src/@types/mobx-form.types.ts index aa274b9db..67b0aa3ec 100644 --- a/src/@types/mobx-form.types.ts +++ b/src/@types/mobx-form.types.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { ChangeEventHandler, FocusEventHandler } from 'react'; | 1 | import type { ChangeEventHandler, FocusEventHandler } from 'react'; |
2 | import { GlobalError } from './ferdium-components.types'; | 2 | import type { GlobalError } from './ferdium-components.types'; |
3 | 3 | ||
4 | interface SelectOptions { | 4 | interface SelectOptions { |
5 | disabled?: boolean; | 5 | disabled?: boolean; |
diff --git a/src/@types/stores.types.ts b/src/@types/stores.types.ts index c2d7bd78a..a2e935bf1 100644 --- a/src/@types/stores.types.ts +++ b/src/@types/stores.types.ts | |||
@@ -1,11 +1,11 @@ | |||
1 | /* eslint-disable no-use-before-define */ | 1 | /* eslint-disable no-use-before-define */ |
2 | import Workspace from '../features/workspaces/models/Workspace'; | 2 | import type Workspace from '../features/workspaces/models/Workspace'; |
3 | import Recipe from '../models/Recipe'; | 3 | import type Recipe from '../models/Recipe'; |
4 | import Service from '../models/Service'; | 4 | import type Service from '../models/Service'; |
5 | import User from '../models/User'; | 5 | import type User from '../models/User'; |
6 | import Request from '../stores/lib/Request'; | 6 | import type CachedRequest from '../stores/lib/CachedRequest'; |
7 | import CachedRequest from '../stores/lib/CachedRequest'; | 7 | import type Reaction from '../stores/lib/Reaction'; |
8 | import Reaction from '../stores/lib/Reaction'; | 8 | import type Request from '../stores/lib/Request'; |
9 | 9 | ||
10 | // TODO: This file will be removed in the future when all stores are | 10 | // TODO: This file will be removed in the future when all stores are |
11 | // correctly typed and the use of these interfaces are obsolete. | 11 | // correctly typed and the use of these interfaces are obsolete. |
diff --git a/src/I18n.tsx b/src/I18n.tsx index 1a69ed1a2..2085f3e98 100644 --- a/src/I18n.tsx +++ b/src/I18n.tsx | |||
@@ -1,10 +1,10 @@ | |||
1 | import { Component, ReactNode } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
2 | import { Component, type ReactNode } from 'react'; | ||
3 | import { IntlProvider } from 'react-intl'; | 3 | import { IntlProvider } from 'react-intl'; |
4 | 4 | ||
5 | import generatedTranslations from './i18n/translations'; | 5 | import generatedTranslations from './i18n/translations'; |
6 | import UserStore from './stores/UserStore'; | 6 | import type AppStore from './stores/AppStore'; |
7 | import AppStore from './stores/AppStore'; | 7 | import type UserStore from './stores/UserStore'; |
8 | 8 | ||
9 | const translations = generatedTranslations(); | 9 | const translations = generatedTranslations(); |
10 | 10 | ||
diff --git a/src/actions/app.ts b/src/actions/app.ts index 07cc47078..22324c055 100644 --- a/src/actions/app.ts +++ b/src/actions/app.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import PropTypes from 'prop-types'; | 1 | import PropTypes from 'prop-types'; |
2 | import { ActionDefinitions } from './lib/actions'; | 2 | import type { ActionDefinitions } from './lib/actions'; |
3 | 3 | ||
4 | export default <ActionDefinitions>{ | 4 | export default <ActionDefinitions>{ |
5 | setBadge: { | 5 | setBadge: { |
diff --git a/src/actions/index.ts b/src/actions/index.ts index 5297a7a7b..2368e98a5 100644 --- a/src/actions/index.ts +++ b/src/actions/index.ts | |||
@@ -1,16 +1,16 @@ | |||
1 | import PropTypes from 'prop-types'; | 1 | import PropTypes from 'prop-types'; |
2 | 2 | ||
3 | import { todoActions } from '../features/todos/actions'; | ||
4 | import workspaces from '../features/workspaces/actions'; | ||
5 | import app from './app'; | ||
3 | import defineActions from './lib/actions'; | 6 | import defineActions from './lib/actions'; |
4 | import service from './service'; | ||
5 | import recipe from './recipe'; | 7 | import recipe from './recipe'; |
6 | import recipePreview from './recipePreview'; | 8 | import recipePreview from './recipePreview'; |
9 | import requests from './requests'; | ||
10 | import service from './service'; | ||
11 | import settings from './settings'; | ||
7 | import ui from './ui'; | 12 | import ui from './ui'; |
8 | import app from './app'; | ||
9 | import user from './user'; | 13 | import user from './user'; |
10 | import settings from './settings'; | ||
11 | import requests from './requests'; | ||
12 | import workspaces from '../features/workspaces/actions'; | ||
13 | import { todoActions } from '../features/todos/actions'; | ||
14 | 14 | ||
15 | const actions = { | 15 | const actions = { |
16 | service, | 16 | service, |
diff --git a/src/actions/recipe.ts b/src/actions/recipe.ts index 0dd92737f..9a1210793 100644 --- a/src/actions/recipe.ts +++ b/src/actions/recipe.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import PropTypes from 'prop-types'; | 1 | import PropTypes from 'prop-types'; |
2 | import { ActionDefinitions } from './lib/actions'; | 2 | import type { ActionDefinitions } from './lib/actions'; |
3 | 3 | ||
4 | export default <ActionDefinitions>{ | 4 | export default <ActionDefinitions>{ |
5 | install: { | 5 | install: { |
diff --git a/src/actions/recipePreview.ts b/src/actions/recipePreview.ts index 053b363e9..6e4421d9e 100644 --- a/src/actions/recipePreview.ts +++ b/src/actions/recipePreview.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import PropTypes from 'prop-types'; | 1 | import PropTypes from 'prop-types'; |
2 | import { ActionDefinitions } from './lib/actions'; | 2 | import type { ActionDefinitions } from './lib/actions'; |
3 | 3 | ||
4 | export default <ActionDefinitions>{ | 4 | export default <ActionDefinitions>{ |
5 | search: { | 5 | search: { |
diff --git a/src/actions/requests.ts b/src/actions/requests.ts index 0b4c905ee..b487a3fa4 100644 --- a/src/actions/requests.ts +++ b/src/actions/requests.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { ActionDefinitions } from './lib/actions'; | 1 | import type { ActionDefinitions } from './lib/actions'; |
2 | 2 | ||
3 | export default <ActionDefinitions>{ | 3 | export default <ActionDefinitions>{ |
4 | retryRequiredRequests: {}, | 4 | retryRequiredRequests: {}, |
diff --git a/src/actions/service.ts b/src/actions/service.ts index 4b43fc2ca..c141f03ec 100644 --- a/src/actions/service.ts +++ b/src/actions/service.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import PropTypes from 'prop-types'; | 1 | import PropTypes from 'prop-types'; |
2 | import ServiceModel from '../models/Service'; | 2 | import ServiceModel from '../models/Service'; |
3 | import { ActionDefinitions } from './lib/actions'; | 3 | import type { ActionDefinitions } from './lib/actions'; |
4 | 4 | ||
5 | export default <ActionDefinitions>{ | 5 | export default <ActionDefinitions>{ |
6 | setActive: { | 6 | setActive: { |
diff --git a/src/actions/settings.ts b/src/actions/settings.ts index 4796f6a02..b99344a03 100644 --- a/src/actions/settings.ts +++ b/src/actions/settings.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import PropTypes from 'prop-types'; | 1 | import PropTypes from 'prop-types'; |
2 | import { ActionDefinitions } from './lib/actions'; | 2 | import type { ActionDefinitions } from './lib/actions'; |
3 | 3 | ||
4 | export default <ActionDefinitions>{ | 4 | export default <ActionDefinitions>{ |
5 | update: { | 5 | update: { |
diff --git a/src/actions/ui.ts b/src/actions/ui.ts index f496c5c07..b76a7e5bf 100644 --- a/src/actions/ui.ts +++ b/src/actions/ui.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import PropTypes from 'prop-types'; | 1 | import PropTypes from 'prop-types'; |
2 | import { ActionDefinitions } from './lib/actions'; | 2 | import type { ActionDefinitions } from './lib/actions'; |
3 | 3 | ||
4 | export default <ActionDefinitions>{ | 4 | export default <ActionDefinitions>{ |
5 | openSettings: { | 5 | openSettings: { |
diff --git a/src/actions/user.ts b/src/actions/user.ts index c0ede619e..90fefdbce 100644 --- a/src/actions/user.ts +++ b/src/actions/user.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import PropTypes from 'prop-types'; | 1 | import PropTypes from 'prop-types'; |
2 | import { ActionDefinitions } from './lib/actions'; | 2 | import type { ActionDefinitions } from './lib/actions'; |
3 | 3 | ||
4 | export default <ActionDefinitions>{ | 4 | export default <ActionDefinitions>{ |
5 | login: { | 5 | login: { |
diff --git a/src/api/UserApi.ts b/src/api/UserApi.ts index 38f489131..b70d3b345 100644 --- a/src/api/UserApi.ts +++ b/src/api/UserApi.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { BinaryLike } from 'node:crypto'; | 1 | import type { BinaryLike } from 'node:crypto'; |
2 | import { hash } from '../helpers/password-helpers'; | 2 | import { hash } from '../helpers/password-helpers'; |
3 | 3 | ||
4 | export default class UserApi { | 4 | export default class UserApi { |
diff --git a/src/api/apiBase.ts b/src/api/apiBase.ts index 649895fbc..522891fa0 100644 --- a/src/api/apiBase.ts +++ b/src/api/apiBase.ts | |||
@@ -1,15 +1,15 @@ | |||
1 | /** | ||
2 | * Get API base URL from store | ||
3 | */ | ||
4 | import { API_VERSION } from '../environment-remote'; | ||
5 | import { | 1 | import { |
6 | DEV_API_FRANZ_WEBSITE, | 2 | DEV_API_FRANZ_WEBSITE, |
7 | LIVE_FRANZ_API, | ||
8 | LIVE_FERDIUM_API, | 3 | LIVE_FERDIUM_API, |
4 | LIVE_FRANZ_API, | ||
9 | LOCAL_HOSTNAME, | 5 | LOCAL_HOSTNAME, |
10 | LOCAL_SERVER, | 6 | LOCAL_SERVER, |
11 | SERVER_NOT_LOADED, | 7 | SERVER_NOT_LOADED, |
12 | } from '../config'; | 8 | } from '../config'; |
9 | /** | ||
10 | * Get API base URL from store | ||
11 | */ | ||
12 | import { API_VERSION } from '../environment-remote'; | ||
13 | import { fixUrl } from '../helpers/url-helpers'; | 13 | import { 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 |
diff --git a/src/api/index.ts b/src/api/index.ts index 5ca6ba132..f0f396edc 100644 --- a/src/api/index.ts +++ b/src/api/index.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import AppApi from './AppApi'; | 1 | import AppApi from './AppApi'; |
2 | import ServicesApi from './ServicesApi'; | 2 | import FeaturesApi from './FeaturesApi'; |
3 | import LocalApi from './LocalApi'; | ||
3 | import RecipePreviewsApi from './RecipePreviewsApi'; | 4 | import RecipePreviewsApi from './RecipePreviewsApi'; |
4 | import RecipesApi from './RecipesApi'; | 5 | import RecipesApi from './RecipesApi'; |
6 | import ServicesApi from './ServicesApi'; | ||
5 | import UserApi from './UserApi'; | 7 | import UserApi from './UserApi'; |
6 | import LocalApi from './LocalApi'; | ||
7 | import FeaturesApi from './FeaturesApi'; | ||
8 | 8 | ||
9 | export interface ApiInterface { | 9 | export interface ApiInterface { |
10 | app: AppApi; | 10 | app: AppApi; |
diff --git a/src/api/server/LocalApi.ts b/src/api/server/LocalApi.ts index 6764816f9..56fa5cc8f 100644 --- a/src/api/server/LocalApi.ts +++ b/src/api/server/LocalApi.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { ExecException } from 'node:child_process'; | 1 | import type { ExecException } from 'node:child_process'; |
2 | import { ipcRenderer } from 'electron'; | 2 | import { ipcRenderer } from 'electron'; |
3 | import fastFolderSize from 'fast-folder-size'; | 3 | import fastFolderSize from 'fast-folder-size'; |
4 | 4 | ||
diff --git a/src/api/server/ServerApi.ts b/src/api/server/ServerApi.ts index 9e7582e1e..58c6845ac 100644 --- a/src/api/server/ServerApi.ts +++ b/src/api/server/ServerApi.ts | |||
@@ -1,22 +1,24 @@ | |||
1 | /* eslint-disable import/no-import-module-exports */ | 1 | /* eslint-disable import/no-import-module-exports */ |
2 | /* eslint-disable global-require */ | 2 | /* eslint-disable global-require */ |
3 | import { join } from 'node:path'; | 3 | import { join } from 'node:path'; |
4 | import tar from 'tar'; | ||
5 | import { | 4 | import { |
6 | readdirSync, | 5 | type PathOrFileDescriptor, |
7 | statSync, | ||
8 | writeFileSync, | ||
9 | copySync, | 6 | copySync, |
10 | ensureDirSync, | 7 | ensureDirSync, |
11 | pathExistsSync, | 8 | pathExistsSync, |
12 | readJsonSync, | 9 | readJsonSync, |
10 | readdirSync, | ||
13 | removeSync, | 11 | removeSync, |
14 | PathOrFileDescriptor, | 12 | statSync, |
13 | writeFileSync, | ||
15 | } from 'fs-extra'; | 14 | } from 'fs-extra'; |
15 | import tar from 'tar'; | ||
16 | 16 | ||
17 | import RecipeModel, { type IRecipe } from '../../models/Recipe'; | ||
18 | import RecipePreviewModel, { | ||
19 | type IRecipePreview, | ||
20 | } from '../../models/RecipePreview'; | ||
17 | import ServiceModel from '../../models/Service'; | 21 | import ServiceModel from '../../models/Service'; |
18 | import RecipePreviewModel, { IRecipePreview } from '../../models/RecipePreview'; | ||
19 | import RecipeModel, { IRecipe } from '../../models/Recipe'; | ||
20 | import UserModel from '../../models/User'; | 22 | import UserModel from '../../models/User'; |
21 | 23 | ||
22 | import sleep from '../../helpers/async-helpers'; | 24 | import sleep from '../../helpers/async-helpers'; |
@@ -32,8 +34,8 @@ import { | |||
32 | } from '../utils/auth'; | 34 | } from '../utils/auth'; |
33 | 35 | ||
34 | import { | 36 | import { |
35 | getRecipeDirectory, | ||
36 | getDevRecipeDirectory, | 37 | getDevRecipeDirectory, |
38 | getRecipeDirectory, | ||
37 | loadRecipeConfig, | 39 | loadRecipeConfig, |
38 | } from '../../helpers/recipe-helpers'; | 40 | } from '../../helpers/recipe-helpers'; |
39 | 41 | ||
diff --git a/src/api/utils/auth.ts b/src/api/utils/auth.ts index 1f694a781..ce30e0132 100644 --- a/src/api/utils/auth.ts +++ b/src/api/utils/auth.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import localStorage from 'mobx-localstorage'; | ||
2 | import { when } from 'mobx'; | 1 | import { when } from 'mobx'; |
3 | import { localServerToken, needsToken } from '../apiBase'; | 2 | import localStorage from 'mobx-localstorage'; |
4 | import { ferdiumLocale, ferdiumVersion } from '../../environment-remote'; | 3 | import { ferdiumLocale, ferdiumVersion } from '../../environment-remote'; |
4 | import { localServerToken, needsToken } from '../apiBase'; | ||
5 | 5 | ||
6 | export const prepareAuthRequest = ( | 6 | export const prepareAuthRequest = ( |
7 | // eslint-disable-next-line unicorn/no-object-as-default-parameter | 7 | // eslint-disable-next-line unicorn/no-object-as-default-parameter |
diff --git a/src/app.tsx b/src/app.tsx index 77ec27021..a894e6737 100644 --- a/src/app.tsx +++ b/src/app.tsx | |||
@@ -1,17 +1,17 @@ | |||
1 | import { webFrame } from 'electron'; | 1 | import { webFrame } from 'electron'; |
2 | 2 | ||
3 | import { createRoot } from 'react-dom/client'; | ||
4 | import { Provider } from 'mobx-react'; | ||
5 | import { RouterStore } from '@superwf/mobx-react-router'; | 3 | import { RouterStore } from '@superwf/mobx-react-router'; |
6 | import { createHashHistory } from 'history'; | 4 | import { createHashHistory } from 'history'; |
5 | import { Provider } from 'mobx-react'; | ||
6 | import { createRoot } from 'react-dom/client'; | ||
7 | 7 | ||
8 | import ServerApi from './api/server/ServerApi'; | ||
9 | import LocalApi from './api/server/LocalApi'; | ||
10 | import storeFactory from './stores'; | ||
11 | import apiFactory from './api'; | ||
12 | import actions from './actions'; | 8 | import actions from './actions'; |
9 | import apiFactory from './api'; | ||
10 | import LocalApi from './api/server/LocalApi'; | ||
11 | import ServerApi from './api/server/ServerApi'; | ||
13 | import MenuFactory from './lib/Menu'; | 12 | import MenuFactory from './lib/Menu'; |
14 | import TouchBarFactory from './lib/TouchBar'; | 13 | import TouchBarFactory from './lib/TouchBar'; |
14 | import storeFactory from './stores'; | ||
15 | 15 | ||
16 | import I18N from './I18n'; | 16 | import I18N from './I18n'; |
17 | import FerdiumRoutes from './routes'; | 17 | import FerdiumRoutes from './routes'; |
diff --git a/src/components/AppUpdateInfoBar.tsx b/src/components/AppUpdateInfoBar.tsx index 103bd2900..7bba8053a 100644 --- a/src/components/AppUpdateInfoBar.tsx +++ b/src/components/AppUpdateInfoBar.tsx | |||
@@ -1,12 +1,12 @@ | |||
1 | import { defineMessages, useIntl } from 'react-intl'; | 1 | import { defineMessages, useIntl } from 'react-intl'; |
2 | 2 | ||
3 | import { mdiInformation } from '@mdi/js'; | 3 | import { mdiInformation } from '@mdi/js'; |
4 | import { MouseEventHandler } from 'react'; | 4 | import type { MouseEventHandler } from 'react'; |
5 | import InfoBar from './ui/InfoBar'; | 5 | import InfoBar from './ui/InfoBar'; |
6 | import Icon from './ui/icon'; | 6 | import Icon from './ui/icon'; |
7 | 7 | ||
8 | import { onAuthGoToReleaseNotes } from '../helpers/update-helpers'; | ||
9 | import { isWinPortable } from '../environment'; | 8 | import { isWinPortable } from '../environment'; |
9 | import { onAuthGoToReleaseNotes } from '../helpers/update-helpers'; | ||
10 | 10 | ||
11 | const messages = defineMessages({ | 11 | const messages = defineMessages({ |
12 | updateAvailable: { | 12 | updateAvailable: { |
diff --git a/src/components/auth/AuthLayout.tsx b/src/components/auth/AuthLayout.tsx index eeb93b83b..67e898318 100644 --- a/src/components/auth/AuthLayout.tsx +++ b/src/components/auth/AuthLayout.tsx | |||
@@ -1,24 +1,24 @@ | |||
1 | import { mdiFlash } from '@mdi/js'; | ||
2 | import type { Response } from 'electron'; | ||
3 | import { TitleBar } from 'electron-react-titlebar/renderer'; | ||
4 | import { observer } from 'mobx-react'; | ||
1 | import { | 5 | import { |
2 | cloneElement, | ||
3 | Component, | 6 | Component, |
4 | MouseEventHandler, | 7 | type MouseEventHandler, |
5 | ReactElement, | 8 | type ReactElement, |
9 | cloneElement, | ||
6 | } from 'react'; | 10 | } from 'react'; |
7 | import { observer } from 'mobx-react'; | 11 | import { type WrappedComponentProps, injectIntl } from 'react-intl'; |
8 | import { TitleBar } from 'electron-react-titlebar/renderer'; | 12 | import { serverName } from '../../api/apiBase'; |
9 | import { injectIntl, WrappedComponentProps } from 'react-intl'; | 13 | import { GITHUB_FERDIUM_URL } from '../../config'; |
10 | import { mdiFlash } from '@mdi/js'; | 14 | import { isWindows } from '../../environment'; |
11 | import { Response } from 'electron'; | ||
12 | import Link from '../ui/Link'; | ||
13 | import InfoBar from '../ui/InfoBar'; | ||
14 | import { Component as PublishDebugInfo } from '../../features/publishDebugInfo'; | 15 | import { Component as PublishDebugInfo } from '../../features/publishDebugInfo'; |
15 | import { updateVersionParse } from '../../helpers/update-helpers'; | 16 | import { updateVersionParse } from '../../helpers/update-helpers'; |
16 | import globalMessages from '../../i18n/globalMessages'; | 17 | import globalMessages from '../../i18n/globalMessages'; |
17 | import { isWindows } from '../../environment'; | ||
18 | import AppUpdateInfoBar from '../AppUpdateInfoBar'; | 18 | import AppUpdateInfoBar from '../AppUpdateInfoBar'; |
19 | import { GITHUB_FERDIUM_URL } from '../../config'; | 19 | import InfoBar from '../ui/InfoBar'; |
20 | import Link from '../ui/Link'; | ||
20 | import Icon from '../ui/icon'; | 21 | import Icon from '../ui/icon'; |
21 | import { serverName } from '../../api/apiBase'; | ||
22 | 22 | ||
23 | export interface IProps extends WrappedComponentProps { | 23 | export interface IProps extends WrappedComponentProps { |
24 | children: ReactElement; | 24 | children: ReactElement; |
diff --git a/src/components/auth/ChangeServer.tsx b/src/components/auth/ChangeServer.tsx index c49e52673..665e8f6f9 100644 --- a/src/components/auth/ChangeServer.tsx +++ b/src/components/auth/ChangeServer.tsx | |||
@@ -1,19 +1,23 @@ | |||
1 | import { Component, FormEvent, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
4 | import { mdiArrowLeftCircle } from '@mdi/js'; | 1 | import { mdiArrowLeftCircle } from '@mdi/js'; |
5 | import { noop } from 'lodash'; | 2 | import { noop } from 'lodash'; |
3 | import { observer } from 'mobx-react'; | ||
4 | import { Component, type FormEvent, type ReactElement } from 'react'; | ||
5 | import { | ||
6 | type WrappedComponentProps, | ||
7 | defineMessages, | ||
8 | injectIntl, | ||
9 | } from 'react-intl'; | ||
10 | import { LIVE_FERDIUM_API, LIVE_FRANZ_API } from '../../config'; | ||
11 | import { url, required } from '../../helpers/validation-helpers'; | ||
12 | import globalMessages from '../../i18n/globalMessages'; | ||
6 | import Form from '../../lib/Form'; | 13 | import Form from '../../lib/Form'; |
7 | import Input from '../ui/input/index'; | 14 | import Infobox from '../ui/Infobox'; |
15 | import Link from '../ui/Link'; | ||
8 | import Select from '../ui/Select'; | 16 | import Select from '../ui/Select'; |
9 | import Button from '../ui/button'; | 17 | import Button from '../ui/button'; |
10 | import Link from '../ui/Link'; | ||
11 | import Infobox from '../ui/Infobox'; | ||
12 | import { url, required } from '../../helpers/validation-helpers'; | ||
13 | import { LIVE_FERDIUM_API, LIVE_FRANZ_API } from '../../config'; | ||
14 | import globalMessages from '../../i18n/globalMessages'; | ||
15 | import { H1 } from '../ui/headline'; | 18 | import { H1 } from '../ui/headline'; |
16 | import Icon from '../ui/icon'; | 19 | import Icon from '../ui/icon'; |
20 | import Input from '../ui/input/index'; | ||
17 | 21 | ||
18 | const messages = defineMessages({ | 22 | const messages = defineMessages({ |
19 | headline: { | 23 | headline: { |
diff --git a/src/components/auth/Invite.tsx b/src/components/auth/Invite.tsx index 0d39d861a..93441abe3 100644 --- a/src/components/auth/Invite.tsx +++ b/src/components/auth/Invite.tsx | |||
@@ -1,16 +1,20 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
4 | import { Link } from 'react-router-dom'; | ||
5 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
6 | import { noop } from 'lodash'; | 2 | import { noop } from 'lodash'; |
7 | import Infobox from '../ui/Infobox'; | 3 | import { observer } from 'mobx-react'; |
8 | import Appear from '../ui/effects/Appear'; | 4 | import { Component } from 'react'; |
9 | import Form from '../../lib/Form'; | 5 | import { |
6 | type WrappedComponentProps, | ||
7 | defineMessages, | ||
8 | injectIntl, | ||
9 | } from 'react-intl'; | ||
10 | import { Link } from 'react-router-dom'; | ||
10 | import { email, required } from '../../helpers/validation-helpers'; | 11 | import { email, required } from '../../helpers/validation-helpers'; |
11 | import Input from '../ui/input/index'; | 12 | import Form from '../../lib/Form'; |
13 | import Infobox from '../ui/Infobox'; | ||
12 | import Button from '../ui/button'; | 14 | import Button from '../ui/button'; |
15 | import Appear from '../ui/effects/Appear'; | ||
13 | import { H1 } from '../ui/headline'; | 16 | import { H1 } from '../ui/headline'; |
17 | import Input from '../ui/input/index'; | ||
14 | 18 | ||
15 | const messages = defineMessages({ | 19 | const messages = defineMessages({ |
16 | settingsHeadline: { | 20 | settingsHeadline: { |
diff --git a/src/components/auth/Locked.tsx b/src/components/auth/Locked.tsx index 34d010782..46ce24a2e 100644 --- a/src/components/auth/Locked.tsx +++ b/src/components/auth/Locked.tsx | |||
@@ -1,13 +1,17 @@ | |||
1 | import { systemPreferences } from '@electron/remote'; | 1 | import { systemPreferences } from '@electron/remote'; |
2 | import { Component } from 'react'; | ||
3 | import { observer } from 'mobx-react'; | ||
4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
5 | import { noop } from 'lodash'; | 2 | import { noop } from 'lodash'; |
3 | import { observer } from 'mobx-react'; | ||
4 | import { Component } from 'react'; | ||
5 | import { | ||
6 | type WrappedComponentProps, | ||
7 | defineMessages, | ||
8 | injectIntl, | ||
9 | } from 'react-intl'; | ||
10 | import { isMac } from '../../environment'; | ||
6 | import Form from '../../lib/Form'; | 11 | import Form from '../../lib/Form'; |
7 | import Input from '../ui/input/index'; | ||
8 | import Button from '../ui/button'; | 12 | import Button from '../ui/button'; |
9 | import { H1 } from '../ui/headline'; | 13 | import { H1 } from '../ui/headline'; |
10 | import { isMac } from '../../environment'; | 14 | import Input from '../ui/input/index'; |
11 | 15 | ||
12 | const messages = defineMessages({ | 16 | const messages = defineMessages({ |
13 | headline: { | 17 | headline: { |
diff --git a/src/components/auth/Login.tsx b/src/components/auth/Login.tsx index 9bad731c8..37ce595eb 100644 --- a/src/components/auth/Login.tsx +++ b/src/components/auth/Login.tsx | |||
@@ -1,19 +1,23 @@ | |||
1 | import { Component, FormEvent, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
4 | import { mdiArrowLeftCircle } from '@mdi/js'; | 1 | import { mdiArrowLeftCircle } from '@mdi/js'; |
5 | import { noop } from 'lodash'; | 2 | import { noop } from 'lodash'; |
6 | import Icon from '../ui/icon'; | 3 | import { observer } from 'mobx-react'; |
4 | import { Component, type FormEvent, type ReactElement } from 'react'; | ||
5 | import { | ||
6 | type WrappedComponentProps, | ||
7 | defineMessages, | ||
8 | injectIntl, | ||
9 | } from 'react-intl'; | ||
10 | import type { GlobalError } from '../../@types/ferdium-components.types'; | ||
11 | import { serverBase } from '../../api/apiBase'; // TODO: Remove this line after fixing password recovery in-app | ||
7 | import { LIVE_FRANZ_API } from '../../config'; | 12 | import { LIVE_FRANZ_API } from '../../config'; |
8 | import { API_VERSION } from '../../environment-remote'; | 13 | import { API_VERSION } from '../../environment-remote'; |
9 | import { serverBase } from '../../api/apiBase'; // TODO: Remove this line after fixing password recovery in-app | 14 | import { email, required } from '../../helpers/validation-helpers'; |
10 | import Form from '../../lib/Form'; | 15 | import Form from '../../lib/Form'; |
11 | import { required, email } from '../../helpers/validation-helpers'; | ||
12 | import Input from '../ui/input/index'; | ||
13 | import Button from '../ui/button'; | ||
14 | import Link from '../ui/Link'; | 16 | import Link from '../ui/Link'; |
17 | import Button from '../ui/button'; | ||
15 | import { H1 } from '../ui/headline'; | 18 | import { H1 } from '../ui/headline'; |
16 | import { GlobalError } from '../../@types/ferdium-components.types'; | 19 | import Icon from '../ui/icon'; |
20 | import Input from '../ui/input/index'; | ||
17 | 21 | ||
18 | const messages = defineMessages({ | 22 | const messages = defineMessages({ |
19 | headline: { | 23 | headline: { |
diff --git a/src/components/auth/Password.tsx b/src/components/auth/Password.tsx index 03adc3859..6f398c3fb 100644 --- a/src/components/auth/Password.tsx +++ b/src/components/auth/Password.tsx | |||
@@ -1,16 +1,20 @@ | |||
1 | import { Component, FormEvent } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | 1 | import { observer } from 'mobx-react'; |
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 2 | import { Component, type FormEvent } from 'react'; |
3 | import { | ||
4 | type WrappedComponentProps, | ||
5 | defineMessages, | ||
6 | injectIntl, | ||
7 | } from 'react-intl'; | ||
4 | 8 | ||
5 | import { noop } from 'lodash'; | 9 | import { noop } from 'lodash'; |
10 | import { email, required } from '../../helpers/validation-helpers'; | ||
11 | import globalMessages from '../../i18n/globalMessages'; | ||
6 | import Form from '../../lib/Form'; | 12 | import Form from '../../lib/Form'; |
7 | import { required, email } from '../../helpers/validation-helpers'; | ||
8 | import Input from '../ui/input/index'; | ||
9 | import Button from '../ui/button'; | ||
10 | import Link from '../ui/Link'; | ||
11 | import Infobox from '../ui/Infobox'; | 13 | import Infobox from '../ui/Infobox'; |
12 | import globalMessages from '../../i18n/globalMessages'; | 14 | import Link from '../ui/Link'; |
15 | import Button from '../ui/button'; | ||
13 | import { H1 } from '../ui/headline'; | 16 | import { H1 } from '../ui/headline'; |
17 | import Input from '../ui/input/index'; | ||
14 | 18 | ||
15 | const messages = defineMessages({ | 19 | const messages = defineMessages({ |
16 | headline: { | 20 | headline: { |
diff --git a/src/components/auth/SetupAssistant.tsx b/src/components/auth/SetupAssistant.tsx index c25495471..c1965dbb4 100644 --- a/src/components/auth/SetupAssistant.tsx +++ b/src/components/auth/SetupAssistant.tsx | |||
@@ -1,17 +1,21 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
4 | import withStyles, { WithStylesProps } from 'react-jss'; | ||
5 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
6 | import Input from '../ui/input/index'; | 2 | import { observer } from 'mobx-react'; |
7 | import Button from '../ui/button'; | 3 | import { Component } from 'react'; |
8 | import Badge from '../ui/badge'; | 4 | import { |
9 | import Modal from '../ui/Modal'; | 5 | type WrappedComponentProps, |
6 | defineMessages, | ||
7 | injectIntl, | ||
8 | } from 'react-intl'; | ||
9 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
10 | import { CDN_URL } from '../../config'; | ||
11 | import globalMessages from '../../i18n/globalMessages'; | ||
10 | import Infobox from '../ui/Infobox'; | 12 | import Infobox from '../ui/Infobox'; |
13 | import Modal from '../ui/Modal'; | ||
14 | import Badge from '../ui/badge'; | ||
15 | import Button from '../ui/button'; | ||
11 | import Appear from '../ui/effects/Appear'; | 16 | import Appear from '../ui/effects/Appear'; |
12 | import globalMessages from '../../i18n/globalMessages'; | ||
13 | import { CDN_URL } from '../../config'; | ||
14 | import { H1, H2 } from '../ui/headline'; | 17 | import { H1, H2 } from '../ui/headline'; |
18 | import Input from '../ui/input/index'; | ||
15 | 19 | ||
16 | const SLACK_ID = 'slack'; | 20 | const SLACK_ID = 'slack'; |
17 | 21 | ||
diff --git a/src/components/auth/Signup.tsx b/src/components/auth/Signup.tsx index 06a9774aa..84974fd07 100644 --- a/src/components/auth/Signup.tsx +++ b/src/components/auth/Signup.tsx | |||
@@ -1,18 +1,22 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { observer, inject } from 'mobx-react'; | ||
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
4 | import { mdiArrowLeftCircle } from '@mdi/js'; | 1 | import { mdiArrowLeftCircle } from '@mdi/js'; |
5 | import { noop } from 'lodash'; | 2 | import { noop } from 'lodash'; |
3 | import { inject, observer } from 'mobx-react'; | ||
4 | import { Component } from 'react'; | ||
5 | import { | ||
6 | type WrappedComponentProps, | ||
7 | defineMessages, | ||
8 | injectIntl, | ||
9 | } from 'react-intl'; | ||
10 | import type { GlobalError } from '../../@types/ferdium-components.types'; | ||
11 | import type { Actions } from '../../actions/lib/actions'; | ||
12 | import { serverBase } from '../../api/apiBase'; | ||
13 | import { email, minLength, required } from '../../helpers/validation-helpers'; | ||
6 | import Form from '../../lib/Form'; | 14 | import Form from '../../lib/Form'; |
7 | import { required, email, minLength } from '../../helpers/validation-helpers'; | ||
8 | import Input from '../ui/input/index'; | ||
9 | import Button from '../ui/button'; | ||
10 | import Link from '../ui/Link'; | 15 | import Link from '../ui/Link'; |
11 | import Icon from '../ui/icon'; | 16 | import Button from '../ui/button'; |
12 | import { serverBase } from '../../api/apiBase'; | ||
13 | import { H1 } from '../ui/headline'; | 17 | import { H1 } from '../ui/headline'; |
14 | import { GlobalError } from '../../@types/ferdium-components.types'; | 18 | import Icon from '../ui/icon'; |
15 | import { Actions } from '../../actions/lib/actions'; | 19 | import Input from '../ui/input/index'; |
16 | 20 | ||
17 | const messages = defineMessages({ | 21 | const messages = defineMessages({ |
18 | headline: { | 22 | headline: { |
diff --git a/src/components/auth/Welcome.tsx b/src/components/auth/Welcome.tsx index c1a2db386..ec1c167c0 100644 --- a/src/components/auth/Welcome.tsx +++ b/src/components/auth/Welcome.tsx | |||
@@ -1,14 +1,18 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { observer, inject } from 'mobx-react'; | ||
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
4 | import { noop } from 'lodash'; | 1 | import { noop } from 'lodash'; |
5 | import serverlessLogin from '../../helpers/serverless-helpers'; | 2 | import { inject, observer } from 'mobx-react'; |
6 | import shuffleArray from '../../helpers/array-helpers'; | 3 | import { Component, type ReactElement } from 'react'; |
4 | import { | ||
5 | type WrappedComponentProps, | ||
6 | defineMessages, | ||
7 | injectIntl, | ||
8 | } from 'react-intl'; | ||
9 | import type { StoresProps } from '../../@types/ferdium-components.types'; | ||
7 | import { serverName } from '../../api/apiBase'; | 10 | import { serverName } from '../../api/apiBase'; |
11 | import shuffleArray from '../../helpers/array-helpers'; | ||
12 | import serverlessLogin from '../../helpers/serverless-helpers'; | ||
13 | import type RecipePreview from '../../models/RecipePreview'; | ||
8 | import Link from '../ui/Link'; | 14 | import Link from '../ui/Link'; |
9 | import { H1 } from '../ui/headline'; | 15 | import { H1 } from '../ui/headline'; |
10 | import { StoresProps } from '../../@types/ferdium-components.types'; | ||
11 | import RecipePreview from '../../models/RecipePreview'; | ||
12 | 16 | ||
13 | const messages = defineMessages({ | 17 | const messages = defineMessages({ |
14 | signupButton: { | 18 | signupButton: { |
diff --git a/src/components/downloadManager/DownloadManagerDashboard.tsx b/src/components/downloadManager/DownloadManagerDashboard.tsx index 25e73d48f..490be269d 100644 --- a/src/components/downloadManager/DownloadManagerDashboard.tsx +++ b/src/components/downloadManager/DownloadManagerDashboard.tsx | |||
@@ -1,29 +1,29 @@ | |||
1 | import { Component } from 'react'; | 1 | import { mdiDownload } from '@mdi/js'; |
2 | import { observer } from 'mobx-react'; | 2 | import CancelIcon from '@mui/icons-material/Cancel'; |
3 | import { IntlShape, defineMessages, injectIntl } from 'react-intl'; | 3 | import ClearAllIcon from '@mui/icons-material/ClearAll'; |
4 | import { shell } from 'electron'; | 4 | import DeleteIcon from '@mui/icons-material/Delete'; |
5 | import prettyBytes from 'pretty-bytes'; | 5 | import FolderIcon from '@mui/icons-material/Folder'; |
6 | import PauseIcon from '@mui/icons-material/Pause'; | ||
7 | import PlayArrowIcon from '@mui/icons-material/PlayArrow'; | ||
6 | import { | 8 | import { |
7 | Typography, | 9 | Box, |
8 | Card, | 10 | Card, |
9 | CardContent, | 11 | CardContent, |
10 | LinearProgress, | ||
11 | Box, | ||
12 | IconButton, | 12 | IconButton, |
13 | LinearProgress, | ||
13 | ListItemButton, | 14 | ListItemButton, |
14 | ListItemIcon, | 15 | ListItemIcon, |
15 | ListItemText, | 16 | ListItemText, |
17 | Typography, | ||
16 | } from '@mui/material'; | 18 | } from '@mui/material'; |
17 | import { mdiDownload } from '@mdi/js'; | 19 | import { shell } from 'electron'; |
18 | import PlayArrowIcon from '@mui/icons-material/PlayArrow'; | ||
19 | import PauseIcon from '@mui/icons-material/Pause'; | ||
20 | import CancelIcon from '@mui/icons-material/Cancel'; | ||
21 | import FolderIcon from '@mui/icons-material/Folder'; | ||
22 | import DeleteIcon from '@mui/icons-material/Delete'; | ||
23 | import ClearAllIcon from '@mui/icons-material/ClearAll'; | ||
24 | import { round } from 'lodash'; | 20 | import { round } from 'lodash'; |
25 | import { RealStores } from '../../stores'; | 21 | import { observer } from 'mobx-react'; |
26 | import { Actions } from '../../actions/lib/actions'; | 22 | import prettyBytes from 'pretty-bytes'; |
23 | import { Component } from 'react'; | ||
24 | import { type IntlShape, defineMessages, injectIntl } from 'react-intl'; | ||
25 | import type { Actions } from '../../actions/lib/actions'; | ||
26 | import type { RealStores } from '../../stores'; | ||
27 | import Icon from '../ui/icon'; | 27 | import Icon from '../ui/icon'; |
28 | 28 | ||
29 | const messages = defineMessages({ | 29 | const messages = defineMessages({ |
diff --git a/src/components/downloadManager/DownloadManagerLayout.tsx b/src/components/downloadManager/DownloadManagerLayout.tsx index 1e018cfb8..08c0ace1e 100644 --- a/src/components/downloadManager/DownloadManagerLayout.tsx +++ b/src/components/downloadManager/DownloadManagerLayout.tsx | |||
@@ -1,14 +1,19 @@ | |||
1 | import React, { Component } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 2 | import type React from 'react'; |
3 | import { Component } from 'react'; | ||
4 | import { | ||
5 | type WrappedComponentProps, | ||
6 | defineMessages, | ||
7 | injectIntl, | ||
8 | } from 'react-intl'; | ||
4 | 9 | ||
5 | import { mdiClose } from '@mdi/js'; | 10 | import { mdiClose } from '@mdi/js'; |
6 | import { Outlet } from 'react-router-dom'; | 11 | import { Outlet } from 'react-router-dom'; |
7 | import { Actions } from '../../actions/lib/actions'; | 12 | import type { Actions } from '../../actions/lib/actions'; |
8 | import { isEscKeyPress } from '../../jsUtils'; | 13 | import { isEscKeyPress } from '../../jsUtils'; |
9 | import Appear from '../ui/effects/Appear'; | 14 | import Appear from '../ui/effects/Appear'; |
10 | import ErrorBoundary from '../util/ErrorBoundary'; | ||
11 | import Icon from '../ui/icon'; | 15 | import Icon from '../ui/icon'; |
16 | import ErrorBoundary from '../util/ErrorBoundary'; | ||
12 | 17 | ||
13 | const messages = defineMessages({ | 18 | const messages = defineMessages({ |
14 | closeSettings: { | 19 | closeSettings: { |
diff --git a/src/components/layout/AppLayout.tsx b/src/components/layout/AppLayout.tsx index 97795212a..160664c20 100644 --- a/src/components/layout/AppLayout.tsx +++ b/src/components/layout/AppLayout.tsx | |||
@@ -1,28 +1,33 @@ | |||
1 | import React, { Component, PropsWithChildren } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
4 | import { TitleBar } from 'electron-react-titlebar/renderer'; | ||
5 | import injectSheet, { WithStylesProps } from 'react-jss'; | ||
6 | import { ipcRenderer } from 'electron'; | 1 | import { ipcRenderer } from 'electron'; |
2 | import { TitleBar } from 'electron-react-titlebar/renderer'; | ||
3 | import { observer } from 'mobx-react'; | ||
4 | import type React from 'react'; | ||
5 | import { Component, type PropsWithChildren } from 'react'; | ||
6 | import { | ||
7 | type WrappedComponentProps, | ||
8 | defineMessages, | ||
9 | injectIntl, | ||
10 | } from 'react-intl'; | ||
11 | import injectSheet, { type WithStylesProps } from 'react-jss'; | ||
7 | 12 | ||
8 | import { mdiFlash, mdiPowerPlug } from '@mdi/js'; | 13 | import { mdiFlash, mdiPowerPlug } from '@mdi/js'; |
9 | import { Outlet } from 'react-router-dom'; | 14 | import { Outlet } from 'react-router-dom'; |
10 | import InfoBar from '../ui/InfoBar'; | ||
11 | import { Component as BasicAuth } from '../../features/basicAuth'; | 15 | import { Component as BasicAuth } from '../../features/basicAuth'; |
12 | import { Component as QuickSwitch } from '../../features/quickSwitch'; | ||
13 | import { Component as PublishDebugInfo } from '../../features/publishDebugInfo'; | 16 | import { Component as PublishDebugInfo } from '../../features/publishDebugInfo'; |
14 | import ErrorBoundary from '../util/ErrorBoundary'; | 17 | import { Component as QuickSwitch } from '../../features/quickSwitch'; |
15 | import { updateVersionParse } from '../../helpers/update-helpers'; | 18 | import { updateVersionParse } from '../../helpers/update-helpers'; |
19 | import InfoBar from '../ui/InfoBar'; | ||
20 | import ErrorBoundary from '../util/ErrorBoundary'; | ||
16 | 21 | ||
17 | import { isMac, isWindows } from '../../environment'; | 22 | import { isMac, isWindows } from '../../environment'; |
18 | import WorkspaceSwitchingIndicator from '../../features/workspaces/components/WorkspaceSwitchingIndicator'; | 23 | import Todos from '../../features/todos/containers/TodosScreen'; |
19 | import { workspaceStore } from '../../features/workspaces'; | 24 | import { workspaceStore } from '../../features/workspaces'; |
25 | import WorkspaceSwitchingIndicator from '../../features/workspaces/components/WorkspaceSwitchingIndicator'; | ||
20 | import AppUpdateInfoBar from '../AppUpdateInfoBar'; | 26 | import AppUpdateInfoBar from '../AppUpdateInfoBar'; |
21 | import Todos from '../../features/todos/containers/TodosScreen'; | ||
22 | import Icon from '../ui/icon'; | 27 | import Icon from '../ui/icon'; |
23 | 28 | ||
24 | import LockedScreen from '../../containers/auth/LockedScreen'; | 29 | import LockedScreen from '../../containers/auth/LockedScreen'; |
25 | import SettingsStore from '../../stores/SettingsStore'; | 30 | import type SettingsStore from '../../stores/SettingsStore'; |
26 | 31 | ||
27 | const messages = defineMessages({ | 32 | const messages = defineMessages({ |
28 | servicesUpdated: { | 33 | servicesUpdated: { |
diff --git a/src/components/layout/Sidebar.tsx b/src/components/layout/Sidebar.tsx index 1106113f0..a927d5745 100644 --- a/src/components/layout/Sidebar.tsx +++ b/src/components/layout/Sidebar.tsx | |||
@@ -1,7 +1,3 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { Tooltip as ReactTooltip } from 'react-tooltip'; | ||
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
4 | import { inject, observer } from 'mobx-react'; | ||
5 | import { | 1 | import { |
6 | mdiBell, | 2 | mdiBell, |
7 | mdiBellOff, | 3 | mdiBellOff, |
@@ -9,14 +5,22 @@ import { | |||
9 | mdiChevronDown, | 5 | mdiChevronDown, |
10 | mdiChevronRight, | 6 | mdiChevronRight, |
11 | mdiCog, | 7 | mdiCog, |
8 | mdiDownload, | ||
12 | mdiLock, | 9 | mdiLock, |
13 | mdiMenu, | 10 | mdiMenu, |
14 | mdiPlusBox, | 11 | mdiPlusBox, |
15 | mdiViewGrid, | 12 | mdiViewGrid, |
16 | mdiViewSplitVertical, | 13 | mdiViewSplitVertical, |
17 | mdiDownload, | ||
18 | } from '@mdi/js'; | 14 | } from '@mdi/js'; |
19 | import Tabbar from '../services/tabs/Tabbar'; | 15 | import { inject, observer } from 'mobx-react'; |
16 | import { Component } from 'react'; | ||
17 | import { | ||
18 | type WrappedComponentProps, | ||
19 | defineMessages, | ||
20 | injectIntl, | ||
21 | } from 'react-intl'; | ||
22 | import { Tooltip as ReactTooltip } from 'react-tooltip'; | ||
23 | import type { Actions } from '../../actions/lib/actions'; | ||
20 | import { | 24 | import { |
21 | addNewServiceShortcutKey, | 25 | addNewServiceShortcutKey, |
22 | downloadsShortcutKey, | 26 | downloadsShortcutKey, |
@@ -30,10 +34,10 @@ import { | |||
30 | import { todosStore } from '../../features/todos'; | 34 | import { todosStore } from '../../features/todos'; |
31 | import { todoActions } from '../../features/todos/actions'; | 35 | import { todoActions } from '../../features/todos/actions'; |
32 | import globalMessages from '../../i18n/globalMessages'; | 36 | import globalMessages from '../../i18n/globalMessages'; |
37 | import type Service from '../../models/Service'; | ||
38 | import type { RealStores } from '../../stores'; | ||
39 | import Tabbar from '../services/tabs/Tabbar'; | ||
33 | import Icon from '../ui/icon'; | 40 | import Icon from '../ui/icon'; |
34 | import { Actions } from '../../actions/lib/actions'; | ||
35 | import { RealStores } from '../../stores'; | ||
36 | import Service from '../../models/Service'; | ||
37 | 41 | ||
38 | const messages = defineMessages({ | 42 | const messages = defineMessages({ |
39 | addNewService: { | 43 | addNewService: { |
diff --git a/src/components/services/content/ConnectionLostBanner.tsx b/src/components/services/content/ConnectionLostBanner.tsx index 7040337f0..04e62ff6b 100644 --- a/src/components/services/content/ConnectionLostBanner.tsx +++ b/src/components/services/content/ConnectionLostBanner.tsx | |||
@@ -1,8 +1,12 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import withStyles, { WithStylesProps } from 'react-jss'; | ||
4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
5 | import { mdiAlert } from '@mdi/js'; | 1 | import { mdiAlert } from '@mdi/js'; |
2 | import { observer } from 'mobx-react'; | ||
3 | import { Component, type ReactElement } from 'react'; | ||
4 | import { | ||
5 | type WrappedComponentProps, | ||
6 | defineMessages, | ||
7 | injectIntl, | ||
8 | } from 'react-intl'; | ||
9 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
6 | import { LIVE_API_FERDIUM_WEBSITE } from '../../../config'; | 10 | import { LIVE_API_FERDIUM_WEBSITE } from '../../../config'; |
7 | import Icon from '../../ui/icon'; | 11 | import Icon from '../../ui/icon'; |
8 | 12 | ||
diff --git a/src/components/services/content/ServiceDisabled.tsx b/src/components/services/content/ServiceDisabled.tsx index 2f0d439ec..9b9f377b1 100644 --- a/src/components/services/content/ServiceDisabled.tsx +++ b/src/components/services/content/ServiceDisabled.tsx | |||
@@ -1,6 +1,10 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | 1 | import { observer } from 'mobx-react'; |
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 2 | import { Component, type ReactElement } from 'react'; |
3 | import { | ||
4 | type WrappedComponentProps, | ||
5 | defineMessages, | ||
6 | injectIntl, | ||
7 | } from 'react-intl'; | ||
4 | import Button from '../../ui/button'; | 8 | import Button from '../../ui/button'; |
5 | import { H1 } from '../../ui/headline'; | 9 | import { H1 } from '../../ui/headline'; |
6 | 10 | ||
diff --git a/src/components/services/content/ServiceView.tsx b/src/components/services/content/ServiceView.tsx index d89cd0610..577473b5d 100644 --- a/src/components/services/content/ServiceView.tsx +++ b/src/components/services/content/ServiceView.tsx | |||
@@ -1,18 +1,18 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { autorun, IReactionDisposer } from 'mobx'; | ||
3 | import { observer, inject } from 'mobx-react'; | ||
4 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { type IReactionDisposer, autorun } from 'mobx'; | ||
3 | import { inject, observer } from 'mobx-react'; | ||
4 | import { Component } from 'react'; | ||
5 | import TopBarProgress from 'react-topbar-progress-indicator'; | 5 | import TopBarProgress from 'react-topbar-progress-indicator'; |
6 | import ServiceModel from '../../../models/Service'; | 6 | import { CUSTOM_WEBSITE_RECIPE_ID } from '../../../config'; |
7 | import WebControlsScreen from '../../../features/webControls/containers/WebControlsScreen'; | ||
8 | import type ServiceModel from '../../../models/Service'; | ||
9 | import type { RealStores } from '../../../stores'; | ||
7 | import StatusBarTargetUrl from '../../ui/StatusBarTargetUrl'; | 10 | import StatusBarTargetUrl from '../../ui/StatusBarTargetUrl'; |
8 | import WebviewLoader from '../../ui/WebviewLoader'; | 11 | import WebviewLoader from '../../ui/WebviewLoader'; |
9 | import WebviewCrashHandler from './WebviewCrashHandler'; | ||
10 | import WebviewErrorHandler from './WebviewErrorHandler'; | ||
11 | import ServiceDisabled from './ServiceDisabled'; | 12 | import ServiceDisabled from './ServiceDisabled'; |
12 | import ServiceWebview from './ServiceWebview'; | 13 | import ServiceWebview from './ServiceWebview'; |
13 | import WebControlsScreen from '../../../features/webControls/containers/WebControlsScreen'; | 14 | import WebviewCrashHandler from './WebviewCrashHandler'; |
14 | import { CUSTOM_WEBSITE_RECIPE_ID } from '../../../config'; | 15 | import WebviewErrorHandler from './WebviewErrorHandler'; |
15 | import { RealStores } from '../../../stores'; | ||
16 | 16 | ||
17 | interface IProps { | 17 | interface IProps { |
18 | service: ServiceModel; | 18 | service: ServiceModel; |
diff --git a/src/components/services/content/ServiceWebview.tsx b/src/components/services/content/ServiceWebview.tsx index c598d4be6..0cf34c14b 100644 --- a/src/components/services/content/ServiceWebview.tsx +++ b/src/components/services/content/ServiceWebview.tsx | |||
@@ -1,9 +1,9 @@ | |||
1 | import { join } from 'node:path'; | 1 | import { join } from 'node:path'; |
2 | import { Component, ReactElement } from 'react'; | ||
3 | import { observer } from 'mobx-react'; | ||
4 | import { action, makeObservable, observable, reaction } from 'mobx'; | 2 | import { action, makeObservable, observable, reaction } from 'mobx'; |
3 | import { observer } from 'mobx-react'; | ||
4 | import { Component, type ReactElement } from 'react'; | ||
5 | import ElectronWebView from 'react-electron-web-view'; | 5 | import ElectronWebView from 'react-electron-web-view'; |
6 | import ServiceModel from '../../../models/Service'; | 6 | import type ServiceModel from '../../../models/Service'; |
7 | 7 | ||
8 | const debug = require('../../../preload-safe-debug')('Ferdium:Services'); | 8 | const debug = require('../../../preload-safe-debug')('Ferdium:Services'); |
9 | 9 | ||
diff --git a/src/components/services/content/Services.tsx b/src/components/services/content/Services.tsx index 5766e0d75..65359d0b4 100644 --- a/src/components/services/content/Services.tsx +++ b/src/components/services/content/Services.tsx | |||
@@ -1,13 +1,17 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | 1 | import { observer } from 'mobx-react'; |
3 | import { Link } from 'react-router-dom'; | ||
4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
5 | import Confetti from 'react-confetti'; | ||
6 | import ms from 'ms'; | 2 | import ms from 'ms'; |
7 | import withStyles, { WithStylesProps } from 'react-jss'; | 3 | import { Component, type ReactElement } from 'react'; |
8 | import ServiceView from './ServiceView'; | 4 | import Confetti from 'react-confetti'; |
5 | import { | ||
6 | type WrappedComponentProps, | ||
7 | defineMessages, | ||
8 | injectIntl, | ||
9 | } from 'react-intl'; | ||
10 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
11 | import { Link } from 'react-router-dom'; | ||
12 | import type Service from '../../../models/Service'; | ||
9 | import Appear from '../../ui/effects/Appear'; | 13 | import Appear from '../../ui/effects/Appear'; |
10 | import Service from '../../../models/Service'; | 14 | import ServiceView from './ServiceView'; |
11 | 15 | ||
12 | const messages = defineMessages({ | 16 | const messages = defineMessages({ |
13 | getStarted: { | 17 | getStarted: { |
diff --git a/src/components/services/content/WebviewCrashHandler.tsx b/src/components/services/content/WebviewCrashHandler.tsx index 91c9cf927..0306dcbda 100644 --- a/src/components/services/content/WebviewCrashHandler.tsx +++ b/src/components/services/content/WebviewCrashHandler.tsx | |||
@@ -1,7 +1,11 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | 1 | import { observer } from 'mobx-react'; |
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
4 | import ms from 'ms'; | 2 | import ms from 'ms'; |
3 | import { Component, type ReactElement } from 'react'; | ||
4 | import { | ||
5 | type WrappedComponentProps, | ||
6 | defineMessages, | ||
7 | injectIntl, | ||
8 | } from 'react-intl'; | ||
5 | import Button from '../../ui/button'; | 9 | import Button from '../../ui/button'; |
6 | import { H1 } from '../../ui/headline'; | 10 | import { H1 } from '../../ui/headline'; |
7 | 11 | ||
diff --git a/src/components/services/content/WebviewErrorHandler.tsx b/src/components/services/content/WebviewErrorHandler.tsx index b99c15006..1d33ae117 100644 --- a/src/components/services/content/WebviewErrorHandler.tsx +++ b/src/components/services/content/WebviewErrorHandler.tsx | |||
@@ -1,7 +1,11 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | 1 | import { observer } from 'mobx-react'; |
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 2 | import { Component, type ReactElement } from 'react'; |
4 | import withStyles, { WithStylesProps } from 'react-jss'; | 3 | import { |
4 | type WrappedComponentProps, | ||
5 | defineMessages, | ||
6 | injectIntl, | ||
7 | } from 'react-intl'; | ||
8 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
5 | import Button from '../../ui/button'; | 9 | import Button from '../../ui/button'; |
6 | import { H1 } from '../../ui/headline'; | 10 | import { H1 } from '../../ui/headline'; |
7 | 11 | ||
diff --git a/src/components/services/tabs/TabBarSortableList.tsx b/src/components/services/tabs/TabBarSortableList.tsx index a30587470..2f76c17f1 100644 --- a/src/components/services/tabs/TabBarSortableList.tsx +++ b/src/components/services/tabs/TabBarSortableList.tsx | |||
@@ -1,9 +1,9 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | 1 | import { observer } from 'mobx-react'; |
2 | import { Component } from 'react'; | ||
3 | import { SortableContainer } from 'react-sortable-hoc'; | 3 | import { SortableContainer } from 'react-sortable-hoc'; |
4 | 4 | ||
5 | import type Service from '../../../models/Service'; | ||
5 | import TabItem from './TabItem'; | 6 | import TabItem from './TabItem'; |
6 | import Service from '../../../models/Service'; | ||
7 | 7 | ||
8 | interface IProps { | 8 | interface IProps { |
9 | showMessageBadgeWhenMutedSetting: boolean; | 9 | showMessageBadgeWhenMutedSetting: boolean; |
diff --git a/src/components/services/tabs/TabItem.tsx b/src/components/services/tabs/TabItem.tsx index 804efe8a5..bf193e136 100644 --- a/src/components/services/tabs/TabItem.tsx +++ b/src/components/services/tabs/TabItem.tsx | |||
@@ -1,19 +1,23 @@ | |||
1 | import { app, dialog, Menu } from '@electron/remote'; | 1 | import { Menu, app, dialog } from '@electron/remote'; |
2 | import { mdiExclamation, mdiVolumeSource } from '@mdi/js'; | ||
3 | import classnames from 'classnames'; | ||
2 | import { noop } from 'lodash'; | 4 | import { noop } from 'lodash'; |
3 | import { Component } from 'react'; | 5 | import { autorun, makeObservable, observable, reaction } from 'mobx'; |
4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
5 | import { inject, observer } from 'mobx-react'; | 6 | import { inject, observer } from 'mobx-react'; |
6 | import classnames from 'classnames'; | ||
7 | import { SortableElement } from 'react-sortable-hoc'; | ||
8 | import injectSheet, { WithStylesProps } from 'react-jss'; | ||
9 | import ms from 'ms'; | 7 | import ms from 'ms'; |
10 | import { autorun, makeObservable, observable, reaction } from 'mobx'; | 8 | import { Component } from 'react'; |
11 | import { mdiExclamation, mdiVolumeSource } from '@mdi/js'; | 9 | import { |
12 | import Service from '../../../models/Service'; | 10 | type WrappedComponentProps, |
11 | defineMessages, | ||
12 | injectIntl, | ||
13 | } from 'react-intl'; | ||
14 | import injectSheet, { type WithStylesProps } from 'react-jss'; | ||
15 | import { SortableElement } from 'react-sortable-hoc'; | ||
16 | import type { Stores } from '../../../@types/stores.types'; | ||
13 | import { altKey, cmdOrCtrlShortcutKey, shiftKey } from '../../../environment'; | 17 | import { altKey, cmdOrCtrlShortcutKey, shiftKey } from '../../../environment'; |
14 | import globalMessages from '../../../i18n/globalMessages'; | 18 | import globalMessages from '../../../i18n/globalMessages'; |
19 | import type Service from '../../../models/Service'; | ||
15 | import Icon from '../../ui/icon'; | 20 | import Icon from '../../ui/icon'; |
16 | import { Stores } from '../../../@types/stores.types'; | ||
17 | import MenuItemConstructorOptions = Electron.MenuItemConstructorOptions; | 21 | import MenuItemConstructorOptions = Electron.MenuItemConstructorOptions; |
18 | import { acceleratorString } from '../../../jsUtils'; | 22 | import { acceleratorString } from '../../../jsUtils'; |
19 | 23 | ||
diff --git a/src/components/services/tabs/Tabbar.tsx b/src/components/services/tabs/Tabbar.tsx index d19a4b8de..164051aae 100644 --- a/src/components/services/tabs/Tabbar.tsx +++ b/src/components/services/tabs/Tabbar.tsx | |||
@@ -1,8 +1,8 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | 1 | import { observer } from 'mobx-react'; |
2 | import { Component } from 'react'; | ||
3 | 3 | ||
4 | import type Service from '../../../models/Service'; | ||
4 | import TabBarSortableList from './TabBarSortableList'; | 5 | import TabBarSortableList from './TabBarSortableList'; |
5 | import Service from '../../../models/Service'; | ||
6 | 6 | ||
7 | interface IProps { | 7 | interface IProps { |
8 | useHorizontalStyle: boolean; | 8 | useHorizontalStyle: boolean; |
diff --git a/src/components/settings/SettingsLayout.tsx b/src/components/settings/SettingsLayout.tsx index f96ad7394..17f8c3e33 100644 --- a/src/components/settings/SettingsLayout.tsx +++ b/src/components/settings/SettingsLayout.tsx | |||
@@ -1,12 +1,16 @@ | |||
1 | import { Component, PropsWithChildren, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
4 | import { mdiClose } from '@mdi/js'; | 1 | import { mdiClose } from '@mdi/js'; |
2 | import { observer } from 'mobx-react'; | ||
3 | import { Component, type PropsWithChildren, type ReactElement } from 'react'; | ||
4 | import { | ||
5 | type WrappedComponentProps, | ||
6 | defineMessages, | ||
7 | injectIntl, | ||
8 | } from 'react-intl'; | ||
5 | import { Outlet } from 'react-router-dom'; | 9 | import { Outlet } from 'react-router-dom'; |
6 | import ErrorBoundary from '../util/ErrorBoundary'; | 10 | import { isEscKeyPress } from '../../jsUtils'; |
7 | import Appear from '../ui/effects/Appear'; | 11 | import Appear from '../ui/effects/Appear'; |
8 | import Icon from '../ui/icon'; | 12 | import Icon from '../ui/icon'; |
9 | import { isEscKeyPress } from '../../jsUtils'; | 13 | import ErrorBoundary from '../util/ErrorBoundary'; |
10 | 14 | ||
11 | const messages = defineMessages({ | 15 | const messages = defineMessages({ |
12 | closeSettings: { | 16 | closeSettings: { |
diff --git a/src/components/settings/account/AccountDashboard.tsx b/src/components/settings/account/AccountDashboard.tsx index eab019084..76b4ce14e 100644 --- a/src/components/settings/account/AccountDashboard.tsx +++ b/src/components/settings/account/AccountDashboard.tsx | |||
@@ -1,18 +1,22 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | 1 | import { observer } from 'mobx-react'; |
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 2 | import { Component } from 'react'; |
3 | import { | ||
4 | type WrappedComponentProps, | ||
5 | defineMessages, | ||
6 | injectIntl, | ||
7 | } from 'react-intl'; | ||
4 | import { Tooltip as ReactTooltip } from 'react-tooltip'; | 8 | import { Tooltip as ReactTooltip } from 'react-tooltip'; |
5 | import { H1, H2 } from '../../ui/headline'; | 9 | import { H1, H2 } from '../../ui/headline'; |
6 | 10 | ||
7 | import Loader from '../../ui/loader'; | ||
8 | import Button from '../../ui/button'; | ||
9 | import Infobox from '../../ui/infobox/index'; | ||
10 | import { | 11 | import { |
11 | DEFAULT_LOADER_COLOR, | 12 | DEFAULT_LOADER_COLOR, |
12 | LOCAL_SERVER, | ||
13 | LIVE_FRANZ_API, | 13 | LIVE_FRANZ_API, |
14 | LOCAL_SERVER, | ||
14 | } from '../../../config'; | 15 | } from '../../../config'; |
15 | import User from '../../../models/User'; | 16 | import type User from '../../../models/User'; |
17 | import Button from '../../ui/button'; | ||
18 | import Infobox from '../../ui/infobox/index'; | ||
19 | import Loader from '../../ui/loader'; | ||
16 | 20 | ||
17 | const messages = defineMessages({ | 21 | const messages = defineMessages({ |
18 | headline: { | 22 | headline: { |
diff --git a/src/components/settings/navigation/SettingsNavigation.tsx b/src/components/settings/navigation/SettingsNavigation.tsx index 66763c6a6..0504b6553 100644 --- a/src/components/settings/navigation/SettingsNavigation.tsx +++ b/src/components/settings/navigation/SettingsNavigation.tsx | |||
@@ -1,12 +1,16 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
3 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
2 | import { Component } from 'react'; | ||
3 | import { | ||
4 | type WrappedComponentProps, | ||
5 | defineMessages, | ||
6 | injectIntl, | ||
7 | } from 'react-intl'; | ||
4 | import { NavLink } from 'react-router-dom'; | 8 | import { NavLink } from 'react-router-dom'; |
5 | import { StoresProps } from '../../../@types/ferdium-components.types'; | 9 | import type { StoresProps } from '../../../@types/ferdium-components.types'; |
6 | import { | 10 | import { |
7 | LOCAL_SERVER, | ||
8 | LIVE_FERDIUM_API, | 11 | LIVE_FERDIUM_API, |
9 | LIVE_FRANZ_API, | 12 | LIVE_FRANZ_API, |
13 | LOCAL_SERVER, | ||
10 | } from '../../../config'; | 14 | } from '../../../config'; |
11 | import globalMessages from '../../../i18n/globalMessages'; | 15 | import globalMessages from '../../../i18n/globalMessages'; |
12 | 16 | ||
diff --git a/src/components/settings/releaseNotes/ReleaseNotesDashboard.tsx b/src/components/settings/releaseNotes/ReleaseNotesDashboard.tsx index 9b17e551c..1afc17491 100644 --- a/src/components/settings/releaseNotes/ReleaseNotesDashboard.tsx +++ b/src/components/settings/releaseNotes/ReleaseNotesDashboard.tsx | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import { IntlShape, defineMessages, injectIntl } from 'react-intl'; | ||
4 | import Markdown from 'markdown-to-jsx'; | 1 | import Markdown from 'markdown-to-jsx'; |
2 | import { observer } from 'mobx-react'; | ||
3 | import { Component } from 'react'; | ||
4 | import { type IntlShape, defineMessages, injectIntl } from 'react-intl'; | ||
5 | import { ferdiumVersion } from '../../../environment-remote'; | 5 | import { ferdiumVersion } from '../../../environment-remote'; |
6 | import { | 6 | import { |
7 | getFerdiumVersion, | 7 | getFerdiumVersion, |
diff --git a/src/components/settings/releaseNotes/ReleaseNotesLayout.tsx b/src/components/settings/releaseNotes/ReleaseNotesLayout.tsx index 4a6fe54f4..23db7141e 100644 --- a/src/components/settings/releaseNotes/ReleaseNotesLayout.tsx +++ b/src/components/settings/releaseNotes/ReleaseNotesLayout.tsx | |||
@@ -1,14 +1,18 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 2 | import { Component } from 'react'; |
3 | import { | ||
4 | type WrappedComponentProps, | ||
5 | defineMessages, | ||
6 | injectIntl, | ||
7 | } from 'react-intl'; | ||
4 | 8 | ||
5 | import { mdiClose } from '@mdi/js'; | 9 | import { mdiClose } from '@mdi/js'; |
6 | import { Outlet } from 'react-router-dom'; | 10 | import { Outlet } from 'react-router-dom'; |
7 | import ErrorBoundary from '../../util/ErrorBoundary'; | 11 | import type { Actions } from '../../../actions/lib/actions'; |
12 | import { isEscKeyPress } from '../../../jsUtils'; | ||
8 | import Appear from '../../ui/effects/Appear'; | 13 | import Appear from '../../ui/effects/Appear'; |
9 | import Icon from '../../ui/icon'; | 14 | import Icon from '../../ui/icon'; |
10 | import { isEscKeyPress } from '../../../jsUtils'; | 15 | import ErrorBoundary from '../../util/ErrorBoundary'; |
11 | import { Actions } from '../../../actions/lib/actions'; | ||
12 | 16 | ||
13 | const messages = defineMessages({ | 17 | const messages = defineMessages({ |
14 | closeSettings: { | 18 | closeSettings: { |
diff --git a/src/components/settings/services/EditServiceForm.tsx b/src/components/settings/services/EditServiceForm.tsx index 520cb3c46..69893c16c 100644 --- a/src/components/settings/services/EditServiceForm.tsx +++ b/src/components/settings/services/EditServiceForm.tsx | |||
@@ -1,25 +1,29 @@ | |||
1 | import { Component, FormEvent, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import { Link } from 'react-router-dom'; | ||
4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
5 | import { mdiInformation } from '@mdi/js'; | 1 | import { mdiInformation } from '@mdi/js'; |
6 | import { noop } from 'lodash'; | 2 | import { noop } from 'lodash'; |
7 | import Form from '../../../lib/Form'; | 3 | import { observer } from 'mobx-react'; |
8 | import Tabs from '../../ui/Tabs/Tabs'; | 4 | import { Component, type FormEvent, type ReactElement } from 'react'; |
9 | import TabItem from '../../ui/Tabs/TabItem'; | 5 | import { |
10 | import Input from '../../ui/input/index'; | 6 | type WrappedComponentProps, |
11 | import Toggle from '../../ui/toggle'; | 7 | defineMessages, |
12 | import Slider from '../../ui/Slider'; | 8 | injectIntl, |
13 | import Button from '../../ui/button'; | 9 | } from 'react-intl'; |
14 | import ImageUpload from '../../ui/imageUpload'; | 10 | import { Link } from 'react-router-dom'; |
15 | import Select from '../../ui/Select'; | ||
16 | import { isMac } from '../../../environment'; | 11 | import { isMac } from '../../../environment'; |
12 | import { normalizedUrl } from '../../../helpers/url-helpers'; | ||
17 | import globalMessages from '../../../i18n/globalMessages'; | 13 | import globalMessages from '../../../i18n/globalMessages'; |
18 | import Icon from '../../ui/icon'; | 14 | import type Form from '../../../lib/Form'; |
15 | import type { IRecipe } from '../../../models/Recipe'; | ||
16 | import type Service from '../../../models/Service'; | ||
17 | import Select from '../../ui/Select'; | ||
18 | import Slider from '../../ui/Slider'; | ||
19 | import TabItem from '../../ui/Tabs/TabItem'; | ||
20 | import Tabs from '../../ui/Tabs/Tabs'; | ||
21 | import Button from '../../ui/button'; | ||
19 | import { H3 } from '../../ui/headline'; | 22 | import { H3 } from '../../ui/headline'; |
20 | import { IRecipe } from '../../../models/Recipe'; | 23 | import Icon from '../../ui/icon'; |
21 | import Service from '../../../models/Service'; | 24 | import ImageUpload from '../../ui/imageUpload'; |
22 | import { normalizedUrl } from '../../../helpers/url-helpers'; | 25 | import Input from '../../ui/input/index'; |
26 | import Toggle from '../../ui/toggle'; | ||
23 | 27 | ||
24 | const messages = defineMessages({ | 28 | const messages = defineMessages({ |
25 | saveService: { | 29 | saveService: { |
diff --git a/src/components/settings/services/ServiceError.tsx b/src/components/settings/services/ServiceError.tsx index 87efdeb96..426565547 100644 --- a/src/components/settings/services/ServiceError.tsx +++ b/src/components/settings/services/ServiceError.tsx | |||
@@ -1,7 +1,11 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | 1 | import { observer } from 'mobx-react'; |
2 | import { Component, type ReactElement } from 'react'; | ||
3 | import { | ||
4 | type WrappedComponentProps, | ||
5 | defineMessages, | ||
6 | injectIntl, | ||
7 | } from 'react-intl'; | ||
3 | import { Link } from 'react-router-dom'; | 8 | import { Link } from 'react-router-dom'; |
4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
5 | import Infobox from '../../ui/Infobox'; | 9 | import Infobox from '../../ui/Infobox'; |
6 | import Button from '../../ui/button'; | 10 | import Button from '../../ui/button'; |
7 | 11 | ||
diff --git a/src/components/settings/services/ServiceItem.tsx b/src/components/settings/services/ServiceItem.tsx index 35b63b160..7df59f1d2 100644 --- a/src/components/settings/services/ServiceItem.tsx +++ b/src/components/settings/services/ServiceItem.tsx | |||
@@ -1,10 +1,14 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
3 | import { Tooltip as ReactTooltip } from 'react-tooltip'; | ||
4 | import { observer } from 'mobx-react'; | ||
5 | import classnames from 'classnames'; | ||
6 | import { mdiBellOff, mdiMessageBulletedOff, mdiPower } from '@mdi/js'; | 1 | import { mdiBellOff, mdiMessageBulletedOff, mdiPower } from '@mdi/js'; |
7 | import ServiceModel from '../../../models/Service'; | 2 | import classnames from 'classnames'; |
3 | import { observer } from 'mobx-react'; | ||
4 | import { Component, type ReactElement } from 'react'; | ||
5 | import { | ||
6 | type WrappedComponentProps, | ||
7 | defineMessages, | ||
8 | injectIntl, | ||
9 | } from 'react-intl'; | ||
10 | import { Tooltip as ReactTooltip } from 'react-tooltip'; | ||
11 | import type ServiceModel from '../../../models/Service'; | ||
8 | import Icon from '../../ui/icon'; | 12 | import Icon from '../../ui/icon'; |
9 | 13 | ||
10 | const messages = defineMessages({ | 14 | const messages = defineMessages({ |
diff --git a/src/components/settings/services/ServicesDashboard.tsx b/src/components/settings/services/ServicesDashboard.tsx index b8c3ce3f0..e63898ae5 100644 --- a/src/components/settings/services/ServicesDashboard.tsx +++ b/src/components/settings/services/ServicesDashboard.tsx | |||
@@ -1,16 +1,20 @@ | |||
1 | import { Component, ReactElement } from 'react'; | 1 | import type { To } from 'history'; |
2 | import { observer } from 'mobx-react'; | 2 | import { observer } from 'mobx-react'; |
3 | import { Component, type ReactElement } from 'react'; | ||
4 | import { | ||
5 | type WrappedComponentProps, | ||
6 | defineMessages, | ||
7 | injectIntl, | ||
8 | } from 'react-intl'; | ||
3 | import { Link } from 'react-router-dom'; | 9 | import { Link } from 'react-router-dom'; |
4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 10 | import type Service from '../../../models/Service'; |
5 | import { To } from 'history'; | ||
6 | import SearchInput from '../../ui/SearchInput'; | ||
7 | import Infobox from '../../ui/Infobox'; | ||
8 | import Loader from '../../ui/loader'; | ||
9 | import FAB from '../../ui/FAB'; | 11 | import FAB from '../../ui/FAB'; |
10 | import ServiceItem from './ServiceItem'; | 12 | import Infobox from '../../ui/Infobox'; |
13 | import SearchInput from '../../ui/SearchInput'; | ||
11 | import Appear from '../../ui/effects/Appear'; | 14 | import Appear from '../../ui/effects/Appear'; |
12 | import { H1 } from '../../ui/headline'; | 15 | import { H1 } from '../../ui/headline'; |
13 | import Service from '../../../models/Service'; | 16 | import Loader from '../../ui/loader'; |
17 | import ServiceItem from './ServiceItem'; | ||
14 | 18 | ||
15 | const messages = defineMessages({ | 19 | const messages = defineMessages({ |
16 | headline: { | 20 | headline: { |
diff --git a/src/components/settings/settings/EditSettingsForm.tsx b/src/components/settings/settings/EditSettingsForm.tsx index 81cfe8b12..598158e20 100644 --- a/src/components/settings/settings/EditSettingsForm.tsx +++ b/src/components/settings/settings/EditSettingsForm.tsx | |||
@@ -1,31 +1,20 @@ | |||
1 | import { systemPreferences } from '@electron/remote'; | 1 | import { systemPreferences } from '@electron/remote'; |
2 | import { Component, ReactElement } from 'react'; | ||
3 | import { observer } from 'mobx-react'; | ||
4 | import prettyBytes from 'pretty-bytes'; | ||
5 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
6 | import { mdiGithub, mdiOpenInNew, mdiPowerPlug } from '@mdi/js'; | 2 | import { mdiGithub, mdiOpenInNew, mdiPowerPlug } from '@mdi/js'; |
7 | import { noop } from 'lodash'; | 3 | import { noop } from 'lodash'; |
8 | import Form from '../../../lib/Form'; | 4 | import { observer } from 'mobx-react'; |
9 | import Button from '../../ui/button'; | 5 | import prettyBytes from 'pretty-bytes'; |
10 | import Toggle from '../../ui/toggle'; | 6 | import { Component, type ReactElement } from 'react'; |
11 | import Select from '../../ui/Select'; | ||
12 | import Input from '../../ui/input/index'; | ||
13 | import ColorPickerInput from '../../ui/colorPickerInput'; | ||
14 | import Infobox from '../../ui/Infobox'; | ||
15 | import { H1, H2, H3, H5 } from '../../ui/headline'; | ||
16 | import { | 7 | import { |
17 | ferdiumVersion, | 8 | type WrappedComponentProps, |
18 | userDataCertsPath, | 9 | defineMessages, |
19 | userDataPath, | 10 | injectIntl, |
20 | userDataRecipesPath, | 11 | } from 'react-intl'; |
21 | } from '../../../environment-remote'; | ||
22 | import { updateVersionParse } from '../../../helpers/update-helpers'; | ||
23 | import { | 12 | import { |
24 | DEFAULT_ACCENT_COLOR, | 13 | DEFAULT_ACCENT_COLOR, |
25 | DEFAULT_APP_SETTINGS, | 14 | DEFAULT_APP_SETTINGS, |
26 | FERDIUM_TRANSLATION, | 15 | FERDIUM_TRANSLATION, |
27 | GITHUB_FRANZ_URL, | ||
28 | GITHUB_FERDIUM_URL, | 16 | GITHUB_FERDIUM_URL, |
17 | GITHUB_FRANZ_URL, | ||
29 | SPLIT_COLUMNS_MAX, | 18 | SPLIT_COLUMNS_MAX, |
30 | SPLIT_COLUMNS_MIN, | 19 | SPLIT_COLUMNS_MIN, |
31 | } from '../../../config'; | 20 | } from '../../../config'; |
@@ -35,10 +24,25 @@ import { | |||
35 | isWindows, | 24 | isWindows, |
36 | lockFerdiumShortcutKey, | 25 | lockFerdiumShortcutKey, |
37 | } from '../../../environment'; | 26 | } from '../../../environment'; |
27 | import { | ||
28 | ferdiumVersion, | ||
29 | userDataCertsPath, | ||
30 | userDataPath, | ||
31 | userDataRecipesPath, | ||
32 | } from '../../../environment-remote'; | ||
33 | import { updateVersionParse } from '../../../helpers/update-helpers'; | ||
38 | import { openExternalUrl, openPath } from '../../../helpers/url-helpers'; | 34 | import { openExternalUrl, openPath } from '../../../helpers/url-helpers'; |
39 | import globalMessages from '../../../i18n/globalMessages'; | 35 | import globalMessages from '../../../i18n/globalMessages'; |
40 | import Icon from '../../ui/icon'; | 36 | import type Form from '../../../lib/Form'; |
37 | import Infobox from '../../ui/Infobox'; | ||
38 | import Select from '../../ui/Select'; | ||
41 | import Slider from '../../ui/Slider'; | 39 | import Slider from '../../ui/Slider'; |
40 | import Button from '../../ui/button'; | ||
41 | import ColorPickerInput from '../../ui/colorPickerInput'; | ||
42 | import { H1, H2, H3, H5 } from '../../ui/headline'; | ||
43 | import Icon from '../../ui/icon'; | ||
44 | import Input from '../../ui/input/index'; | ||
45 | import Toggle from '../../ui/toggle'; | ||
42 | 46 | ||
43 | const debug = require('../../../preload-safe-debug')( | 47 | const debug = require('../../../preload-safe-debug')( |
44 | 'Ferdium:EditSettingsForm', | 48 | 'Ferdium:EditSettingsForm', |
diff --git a/src/components/settings/team/TeamDashboard.tsx b/src/components/settings/team/TeamDashboard.tsx index 96613373e..b2d5aa6d5 100644 --- a/src/components/settings/team/TeamDashboard.tsx +++ b/src/components/settings/team/TeamDashboard.tsx | |||
@@ -1,16 +1,20 @@ | |||
1 | // TODO: Is this feature even being used? If not, then we can cleanup this code | 1 | // TODO: Is this feature even being used? If not, then we can cleanup this code |
2 | 2 | ||
3 | import { Component, ReactElement } from 'react'; | 3 | import classnames from 'classnames'; |
4 | import { observer } from 'mobx-react'; | 4 | import { observer } from 'mobx-react'; |
5 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 5 | import { Component, type ReactElement } from 'react'; |
6 | import { | ||
7 | type WrappedComponentProps, | ||
8 | defineMessages, | ||
9 | injectIntl, | ||
10 | } from 'react-intl'; | ||
11 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
6 | import { Tooltip as ReactTooltip } from 'react-tooltip'; | 12 | import { Tooltip as ReactTooltip } from 'react-tooltip'; |
7 | import withStyles, { WithStylesProps } from 'react-jss'; | 13 | import { DEFAULT_LOADER_COLOR, LIVE_FRANZ_API } from '../../../config'; |
8 | import classnames from 'classnames'; | ||
9 | import Loader from '../../ui/loader'; | ||
10 | import Button from '../../ui/button'; | ||
11 | import Infobox from '../../ui/Infobox'; | 14 | import Infobox from '../../ui/Infobox'; |
15 | import Button from '../../ui/button'; | ||
12 | import { H1 } from '../../ui/headline'; | 16 | import { H1 } from '../../ui/headline'; |
13 | import { DEFAULT_LOADER_COLOR, LIVE_FRANZ_API } from '../../../config'; | 17 | import Loader from '../../ui/loader'; |
14 | 18 | ||
15 | const messages = defineMessages({ | 19 | const messages = defineMessages({ |
16 | headline: { | 20 | headline: { |
diff --git a/src/components/settings/user/EditUserForm.tsx b/src/components/settings/user/EditUserForm.tsx index 5a2a5a83e..f4b84166a 100644 --- a/src/components/settings/user/EditUserForm.tsx +++ b/src/components/settings/user/EditUserForm.tsx | |||
@@ -1,14 +1,23 @@ | |||
1 | import { Component, FormEvent, FormEventHandler, ReactElement } from 'react'; | 1 | import { noop } from 'lodash'; |
2 | import { observer } from 'mobx-react'; | 2 | import { observer } from 'mobx-react'; |
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 3 | import { |
4 | Component, | ||
5 | type FormEvent, | ||
6 | type FormEventHandler, | ||
7 | type ReactElement, | ||
8 | } from 'react'; | ||
9 | import { | ||
10 | type WrappedComponentProps, | ||
11 | defineMessages, | ||
12 | injectIntl, | ||
13 | } from 'react-intl'; | ||
4 | import { Link } from 'react-router-dom'; | 14 | import { Link } from 'react-router-dom'; |
5 | import { noop } from 'lodash'; | 15 | import type Form from '../../../lib/Form'; |
6 | import Input from '../../ui/input/index'; | ||
7 | import Form from '../../../lib/Form'; | ||
8 | import Button from '../../ui/button'; | ||
9 | import Radio from '../../ui/Radio'; | ||
10 | import Infobox from '../../ui/Infobox'; | 16 | import Infobox from '../../ui/Infobox'; |
17 | import Radio from '../../ui/Radio'; | ||
18 | import Button from '../../ui/button'; | ||
11 | import { H2 } from '../../ui/headline'; | 19 | import { H2 } from '../../ui/headline'; |
20 | import Input from '../../ui/input/index'; | ||
12 | 21 | ||
13 | const messages = defineMessages({ | 22 | const messages = defineMessages({ |
14 | headline: { | 23 | headline: { |
diff --git a/src/components/ui/AppLoader/index.tsx b/src/components/ui/AppLoader/index.tsx index 4b5828ef4..a2133e174 100644 --- a/src/components/ui/AppLoader/index.tsx +++ b/src/components/ui/AppLoader/index.tsx | |||
@@ -1,9 +1,9 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
3 | import withStyles, { WithStylesProps } from 'react-jss'; | 2 | import { Component, type ReactElement } from 'react'; |
4 | import { Theme } from '../../../themes'; | 3 | import withStyles, { type WithStylesProps } from 'react-jss'; |
5 | import FullscreenLoader from '../FullscreenLoader'; | ||
6 | import shuffleArray from '../../../helpers/array-helpers'; | 4 | import shuffleArray from '../../../helpers/array-helpers'; |
5 | import type { Theme } from '../../../themes'; | ||
6 | import FullscreenLoader from '../FullscreenLoader'; | ||
7 | 7 | ||
8 | import styles from './styles'; | 8 | import styles from './styles'; |
9 | 9 | ||
diff --git a/src/components/ui/FAB.tsx b/src/components/ui/FAB.tsx index acb0f690e..b4eeace8b 100644 --- a/src/components/ui/FAB.tsx +++ b/src/components/ui/FAB.tsx | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Component, ReactElement, ReactNode } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
4 | import { noop } from 'lodash'; | 2 | import { noop } from 'lodash'; |
3 | import { observer } from 'mobx-react'; | ||
4 | import { Component, type ReactElement, type ReactNode } from 'react'; | ||
5 | 5 | ||
6 | interface IProps { | 6 | interface IProps { |
7 | className: string; | 7 | className: string; |
diff --git a/src/components/ui/FullscreenLoader/index.tsx b/src/components/ui/FullscreenLoader/index.tsx index 09c1d5fbb..40b04abe8 100644 --- a/src/components/ui/FullscreenLoader/index.tsx +++ b/src/components/ui/FullscreenLoader/index.tsx | |||
@@ -1,11 +1,11 @@ | |||
1 | import { Component, ReactElement, ReactNode } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import withStyles, { WithStylesProps } from 'react-jss'; | ||
4 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { observer } from 'mobx-react'; | ||
3 | import { Component, type ReactElement, type ReactNode } from 'react'; | ||
4 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
5 | import type { Theme } from '../../../themes'; | ||
6 | import { H1 } from '../headline'; | ||
5 | import Loader from '../loader/index'; | 7 | import Loader from '../loader/index'; |
6 | import styles from './styles'; | 8 | import styles from './styles'; |
7 | import { H1 } from '../headline'; | ||
8 | import { Theme } from '../../../themes'; | ||
9 | 9 | ||
10 | interface IProps extends WithStylesProps<typeof styles> { | 10 | interface IProps extends WithStylesProps<typeof styles> { |
11 | className?: string; | 11 | className?: string; |
diff --git a/src/components/ui/InfoBar.tsx b/src/components/ui/InfoBar.tsx index f3f1adbe7..5fd27f61a 100644 --- a/src/components/ui/InfoBar.tsx +++ b/src/components/ui/InfoBar.tsx | |||
@@ -1,14 +1,18 @@ | |||
1 | import { Component, MouseEventHandler, ReactNode } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 2 | import { observer } from 'mobx-react'; |
3 | import { Component, type MouseEventHandler, type ReactNode } from 'react'; | ||
4 | import { | ||
5 | type WrappedComponentProps, | ||
6 | defineMessages, | ||
7 | injectIntl, | ||
8 | } from 'react-intl'; | ||
5 | 9 | ||
6 | import { mdiClose } from '@mdi/js'; | 10 | import { mdiClose } from '@mdi/js'; |
7 | import { noop } from 'lodash'; | 11 | import { noop } from 'lodash'; |
8 | import Loader from './loader/index'; | 12 | import { DEFAULT_LOADER_COLOR } from '../../config'; |
9 | import Appear from './effects/Appear'; | 13 | import Appear from './effects/Appear'; |
10 | import Icon from './icon'; | 14 | import Icon from './icon'; |
11 | import { DEFAULT_LOADER_COLOR } from '../../config'; | 15 | import Loader from './loader/index'; |
12 | 16 | ||
13 | const messages = defineMessages({ | 17 | const messages = defineMessages({ |
14 | hide: { | 18 | hide: { |
diff --git a/src/components/ui/Infobox.tsx b/src/components/ui/Infobox.tsx index 14e1a581c..fc88c4654 100644 --- a/src/components/ui/Infobox.tsx +++ b/src/components/ui/Infobox.tsx | |||
@@ -1,12 +1,21 @@ | |||
1 | import { Component, MouseEventHandler, ReactElement, ReactNode } from 'react'; | ||
2 | import classnames from 'classnames'; | ||
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
4 | import { mdiAlert, mdiCheckboxMarkedCircleOutline, mdiClose } from '@mdi/js'; | 1 | import { mdiAlert, mdiCheckboxMarkedCircleOutline, mdiClose } from '@mdi/js'; |
2 | import classnames from 'classnames'; | ||
5 | import { noop } from 'lodash'; | 3 | import { noop } from 'lodash'; |
6 | import { observer } from 'mobx-react'; | 4 | import { observer } from 'mobx-react'; |
7 | import Loader from './loader/index'; | 5 | import { |
8 | import Icon from './icon'; | 6 | Component, |
7 | type MouseEventHandler, | ||
8 | type ReactElement, | ||
9 | type ReactNode, | ||
10 | } from 'react'; | ||
11 | import { | ||
12 | type WrappedComponentProps, | ||
13 | defineMessages, | ||
14 | injectIntl, | ||
15 | } from 'react-intl'; | ||
9 | import { DEFAULT_LOADER_COLOR } from '../../config'; | 16 | import { DEFAULT_LOADER_COLOR } from '../../config'; |
17 | import Icon from './icon'; | ||
18 | import Loader from './loader/index'; | ||
10 | 19 | ||
11 | const icons = { | 20 | const icons = { |
12 | 'checkbox-marked-circle-outline': mdiCheckboxMarkedCircleOutline, | 21 | 'checkbox-marked-circle-outline': mdiCheckboxMarkedCircleOutline, |
diff --git a/src/components/ui/Link.tsx b/src/components/ui/Link.tsx index f9fdd57f9..816798d79 100644 --- a/src/components/ui/Link.tsx +++ b/src/components/ui/Link.tsx | |||
@@ -1,9 +1,14 @@ | |||
1 | import { Component, CSSProperties, ReactNode, MouseEvent } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { inject, observer } from 'mobx-react'; | ||
3 | import { | ||
4 | type CSSProperties, | ||
5 | Component, | ||
6 | type MouseEvent, | ||
7 | type ReactNode, | ||
8 | } from 'react'; | ||
9 | import type { StoresProps } from '../../@types/ferdium-components.types'; | ||
4 | import matchRoute from '../../helpers/routing-helpers'; | 10 | import matchRoute from '../../helpers/routing-helpers'; |
5 | import { openExternalUrl } from '../../helpers/url-helpers'; | 11 | import { openExternalUrl } from '../../helpers/url-helpers'; |
6 | import { StoresProps } from '../../@types/ferdium-components.types'; | ||
7 | 12 | ||
8 | interface IProps extends Partial<StoresProps> { | 13 | interface IProps extends Partial<StoresProps> { |
9 | children: ReactNode; | 14 | children: ReactNode; |
@@ -54,7 +59,6 @@ class Link extends Component<IProps> { | |||
54 | }); | 59 | }); |
55 | 60 | ||
56 | return ( | 61 | return ( |
57 | // biome-ignore lint/a11y/useValidAnchor: <explanation> | ||
58 | <a | 62 | <a |
59 | href={router.history.createHref(to)} | 63 | href={router.history.createHref(to)} |
60 | className={linkClasses} | 64 | className={linkClasses} |
diff --git a/src/components/ui/Modal/index.tsx b/src/components/ui/Modal/index.tsx index 154beef0c..15326a289 100644 --- a/src/components/ui/Modal/index.tsx +++ b/src/components/ui/Modal/index.tsx | |||
@@ -1,8 +1,8 @@ | |||
1 | import { Component, ReactNode } from 'react'; | ||
2 | import ReactModal from 'react-modal'; | ||
3 | import classnames from 'classnames'; | ||
4 | import injectCSS, { WithStylesProps } from 'react-jss'; | ||
5 | import { mdiClose } from '@mdi/js'; | 1 | import { mdiClose } from '@mdi/js'; |
2 | import classnames from 'classnames'; | ||
3 | import { Component, type ReactNode } from 'react'; | ||
4 | import injectCSS, { type WithStylesProps } from 'react-jss'; | ||
5 | import ReactModal from 'react-modal'; | ||
6 | 6 | ||
7 | import Icon from '../icon'; | 7 | import Icon from '../icon'; |
8 | import styles from './styles'; | 8 | import styles from './styles'; |
diff --git a/src/components/ui/Radio.tsx b/src/components/ui/Radio.tsx index 901958c78..b556eb4ca 100644 --- a/src/components/ui/Radio.tsx +++ b/src/components/ui/Radio.tsx | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
4 | import FieldInterface from 'mobx-react-form/lib/models/FieldInterface'; | 2 | import { observer } from 'mobx-react'; |
3 | import type FieldInterface from 'mobx-react-form/lib/models/FieldInterface'; | ||
4 | import { Component } from 'react'; | ||
5 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> | 5 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> |
6 | import Error from './error'; | 6 | import Error from './error'; |
7 | 7 | ||
diff --git a/src/components/ui/SearchInput.tsx b/src/components/ui/SearchInput.tsx index b2caaa1de..2e70d1b35 100644 --- a/src/components/ui/SearchInput.tsx +++ b/src/components/ui/SearchInput.tsx | |||
@@ -1,8 +1,8 @@ | |||
1 | import { ChangeEvent, Component, ReactElement } from 'react'; | 1 | import { mdiCloseCircleOutline, mdiMagnify } from '@mdi/js'; |
2 | import { observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | 2 | import classnames from 'classnames'; |
4 | import { debounce, noop } from 'lodash'; | 3 | import { debounce, noop } from 'lodash'; |
5 | import { mdiCloseCircleOutline, mdiMagnify } from '@mdi/js'; | 4 | import { observer } from 'mobx-react'; |
5 | import { type ChangeEvent, Component, type ReactElement } from 'react'; | ||
6 | import Icon from './icon'; | 6 | import Icon from './icon'; |
7 | 7 | ||
8 | interface IProps { | 8 | interface IProps { |
diff --git a/src/components/ui/Select.tsx b/src/components/ui/Select.tsx index a2ed4216f..4abed849d 100644 --- a/src/components/ui/Select.tsx +++ b/src/components/ui/Select.tsx | |||
@@ -1,14 +1,14 @@ | |||
1 | import classnames from 'classnames'; | ||
2 | import { observer } from 'mobx-react'; | ||
1 | import { | 3 | import { |
2 | createRef, | 4 | type ChangeEvent, |
3 | Component, | 5 | Component, |
4 | ReactElement, | 6 | type ReactElement, |
5 | RefObject, | 7 | type ReactNode, |
6 | ChangeEvent, | 8 | type RefObject, |
7 | ReactNode, | 9 | createRef, |
8 | } from 'react'; | 10 | } from 'react'; |
9 | import { observer } from 'mobx-react'; | 11 | import type { Field } from '../../@types/mobx-form.types'; |
10 | import classnames from 'classnames'; | ||
11 | import { Field } from '../../@types/mobx-form.types'; | ||
12 | 12 | ||
13 | interface IProps { | 13 | interface IProps { |
14 | field: Field; | 14 | field: Field; |
diff --git a/src/components/ui/ServiceIcon.tsx b/src/components/ui/ServiceIcon.tsx index 6920611d0..03a345c23 100644 --- a/src/components/ui/ServiceIcon.tsx +++ b/src/components/ui/ServiceIcon.tsx | |||
@@ -1,8 +1,8 @@ | |||
1 | import { Component, ReactNode } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import withStyles, { WithStylesProps } from 'react-jss'; | ||
4 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
5 | import ServiceModel from '../../models/Service'; | 2 | import { observer } from 'mobx-react'; |
3 | import { Component, type ReactNode } from 'react'; | ||
4 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
5 | import type ServiceModel from '../../models/Service'; | ||
6 | 6 | ||
7 | const styles = theme => ({ | 7 | const styles = theme => ({ |
8 | root: { | 8 | root: { |
diff --git a/src/components/ui/Slider.tsx b/src/components/ui/Slider.tsx index aa351ccd2..4f22290ef 100644 --- a/src/components/ui/Slider.tsx +++ b/src/components/ui/Slider.tsx | |||
@@ -1,7 +1,7 @@ | |||
1 | import { ChangeEvent, Component, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
4 | import { noop } from 'lodash'; | 2 | import { noop } from 'lodash'; |
3 | import { observer } from 'mobx-react'; | ||
4 | import { type ChangeEvent, Component, type ReactElement } from 'react'; | ||
5 | 5 | ||
6 | interface IProps { | 6 | interface IProps { |
7 | field: any; | 7 | field: any; |
diff --git a/src/components/ui/StatusBarTargetUrl.tsx b/src/components/ui/StatusBarTargetUrl.tsx index d969267eb..92cb6c36d 100644 --- a/src/components/ui/StatusBarTargetUrl.tsx +++ b/src/components/ui/StatusBarTargetUrl.tsx | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { observer } from 'mobx-react'; | ||
3 | import { Component } from 'react'; | ||
4 | import Appear from './effects/Appear'; | 4 | import Appear from './effects/Appear'; |
5 | 5 | ||
6 | interface IProps { | 6 | interface IProps { |
diff --git a/src/components/ui/Tabs/TabItem.tsx b/src/components/ui/Tabs/TabItem.tsx index 55dee42c6..df99a8bfb 100644 --- a/src/components/ui/Tabs/TabItem.tsx +++ b/src/components/ui/Tabs/TabItem.tsx | |||
@@ -1,4 +1,4 @@ | |||
1 | import { Fragment, ReactElement } from 'react'; | 1 | import { Fragment, type ReactElement } from 'react'; |
2 | 2 | ||
3 | export interface IProps { | 3 | export interface IProps { |
4 | children: | 4 | children: |
diff --git a/src/components/ui/Tabs/Tabs.tsx b/src/components/ui/Tabs/Tabs.tsx index d7f75c8b8..a5ec148aa 100644 --- a/src/components/ui/Tabs/Tabs.tsx +++ b/src/components/ui/Tabs/Tabs.tsx | |||
@@ -1,7 +1,12 @@ | |||
1 | import { Children, Component, ReactElement, ReactPortal } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
4 | import { IProps as TabItemProps } from './TabItem'; | 2 | import { observer } from 'mobx-react'; |
3 | import { | ||
4 | Children, | ||
5 | Component, | ||
6 | type ReactElement, | ||
7 | type ReactPortal, | ||
8 | } from 'react'; | ||
9 | import type { IProps as TabItemProps } from './TabItem'; | ||
5 | 10 | ||
6 | interface IProps { | 11 | interface IProps { |
7 | children: | 12 | children: |
diff --git a/src/components/ui/WebviewLoader/index.tsx b/src/components/ui/WebviewLoader/index.tsx index c4e9c724c..53e10d3b9 100644 --- a/src/components/ui/WebviewLoader/index.tsx +++ b/src/components/ui/WebviewLoader/index.tsx | |||
@@ -1,7 +1,11 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | 1 | import { observer } from 'mobx-react'; |
3 | import injectSheet, { WithStylesProps } from 'react-jss'; | 2 | import { Component, type ReactElement } from 'react'; |
4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 3 | import { |
4 | type WrappedComponentProps, | ||
5 | defineMessages, | ||
6 | injectIntl, | ||
7 | } from 'react-intl'; | ||
8 | import injectSheet, { type WithStylesProps } from 'react-jss'; | ||
5 | import FullscreenLoader from '../FullscreenLoader'; | 9 | import FullscreenLoader from '../FullscreenLoader'; |
6 | 10 | ||
7 | const messages = defineMessages({ | 11 | const messages = defineMessages({ |
diff --git a/src/components/ui/badge/ProBadge.tsx b/src/components/ui/badge/ProBadge.tsx index a5947d3a8..fd5752ed0 100644 --- a/src/components/ui/badge/ProBadge.tsx +++ b/src/components/ui/badge/ProBadge.tsx | |||
@@ -1,9 +1,9 @@ | |||
1 | import { mdiStar } from '@mdi/js'; | 1 | import { mdiStar } from '@mdi/js'; |
2 | import classnames from 'classnames'; | 2 | import classnames from 'classnames'; |
3 | import { Component } from 'react'; | 3 | import { Component } from 'react'; |
4 | import injectStyle, { WithStylesProps } from 'react-jss'; | 4 | import injectStyle, { type WithStylesProps } from 'react-jss'; |
5 | 5 | ||
6 | import { Theme } from '../../../themes'; | 6 | import type { Theme } from '../../../themes'; |
7 | import Icon from '../icon'; | 7 | import Icon from '../icon'; |
8 | import Badge from './index'; | 8 | import Badge from './index'; |
9 | 9 | ||
diff --git a/src/components/ui/badge/index.tsx b/src/components/ui/badge/index.tsx index 44fbf2d4a..e464c07ec 100644 --- a/src/components/ui/badge/index.tsx +++ b/src/components/ui/badge/index.tsx | |||
@@ -1,8 +1,8 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { Component, ReactNode } from 'react'; | 2 | import { Component, type ReactNode } from 'react'; |
3 | import injectStyle, { WithStylesProps } from 'react-jss'; | 3 | import injectStyle, { type WithStylesProps } from 'react-jss'; |
4 | 4 | ||
5 | import { Theme } from '../../../themes'; | 5 | import type { Theme } from '../../../themes'; |
6 | 6 | ||
7 | const badgeStyles = (theme: Theme) => { | 7 | const badgeStyles = (theme: Theme) => { |
8 | const styles = {}; | 8 | const styles = {}; |
diff --git a/src/components/ui/button/index.tsx b/src/components/ui/button/index.tsx index 3247072a9..5c606f274 100644 --- a/src/components/ui/button/index.tsx +++ b/src/components/ui/button/index.tsx | |||
@@ -1,14 +1,14 @@ | |||
1 | /* eslint-disable no-use-before-define */ | 1 | /* eslint-disable no-use-before-define */ |
2 | import Icon from '@mdi/react'; | 2 | import Icon from '@mdi/react'; |
3 | import classnames from 'classnames'; | 3 | import classnames from 'classnames'; |
4 | import { Property } from 'csstype'; | 4 | import type { Property } from 'csstype'; |
5 | import { noop } from 'lodash'; | 5 | import { noop } from 'lodash'; |
6 | import { Component, MouseEventHandler } from 'react'; | 6 | import { Component, type MouseEventHandler } from 'react'; |
7 | import withStyles, { WithStylesProps } from 'react-jss'; | 7 | import withStyles, { type WithStylesProps } from 'react-jss'; |
8 | import Loader from '../loader/index'; | ||
9 | import { Theme } from '../../../themes'; | ||
10 | import { IFormField } from '../typings/generic'; | ||
11 | import { DEFAULT_LOADER_COLOR } from '../../../config'; | 8 | import { DEFAULT_LOADER_COLOR } from '../../../config'; |
9 | import type { Theme } from '../../../themes'; | ||
10 | import Loader from '../loader/index'; | ||
11 | import type { IFormField } from '../typings/generic'; | ||
12 | 12 | ||
13 | type ButtonType = | 13 | type ButtonType = |
14 | | 'primary' | 14 | | 'primary' |
@@ -206,7 +206,6 @@ class ButtonComponent extends Component<IProps, IState> { | |||
206 | ); | 206 | ); |
207 | 207 | ||
208 | const wrapperComponent = href ? ( | 208 | const wrapperComponent = href ? ( |
209 | // biome-ignore lint/a11y/useValidAnchor: <explanation> | ||
210 | <a | 209 | <a |
211 | href={href} | 210 | href={href} |
212 | target={target} | 211 | target={target} |
diff --git a/src/components/ui/colorPickerInput/index.tsx b/src/components/ui/colorPickerInput/index.tsx index 39fd0220a..4870a3675 100644 --- a/src/components/ui/colorPickerInput/index.tsx +++ b/src/components/ui/colorPickerInput/index.tsx | |||
@@ -1,15 +1,15 @@ | |||
1 | import classnames from 'classnames'; | ||
2 | import { noop } from 'lodash'; | ||
3 | import { observer } from 'mobx-react'; | ||
1 | import { | 4 | import { |
2 | ChangeEvent, | 5 | type ChangeEvent, |
3 | Component, | 6 | Component, |
7 | type InputHTMLAttributes, | ||
8 | type RefObject, | ||
4 | createRef, | 9 | createRef, |
5 | InputHTMLAttributes, | ||
6 | RefObject, | ||
7 | } from 'react'; | 10 | } from 'react'; |
8 | import { observer } from 'mobx-react'; | 11 | import { type Color, type ColorResult, SliderPicker } from 'react-color'; |
9 | import classnames from 'classnames'; | 12 | import type { FormFields } from '../../../@types/mobx-form.types'; |
10 | import { Color, ColorResult, SliderPicker } from 'react-color'; | ||
11 | import { noop } from 'lodash'; | ||
12 | import { FormFields } from '../../../@types/mobx-form.types'; | ||
13 | 13 | ||
14 | interface IProps extends InputHTMLAttributes<HTMLInputElement>, FormFields { | 14 | interface IProps extends InputHTMLAttributes<HTMLInputElement>, FormFields { |
15 | onColorChange: (event: ChangeEvent<HTMLInputElement>) => void; | 15 | onColorChange: (event: ChangeEvent<HTMLInputElement>) => void; |
diff --git a/src/components/ui/effects/Appear.tsx b/src/components/ui/effects/Appear.tsx index 06f63a029..c32c339fd 100644 --- a/src/components/ui/effects/Appear.tsx +++ b/src/components/ui/effects/Appear.tsx | |||
@@ -1,4 +1,4 @@ | |||
1 | import { ReactElement, ReactNode, useEffect, useState } from 'react'; | 1 | import { type ReactElement, type ReactNode, useEffect, useState } from 'react'; |
2 | import { CSSTransition, TransitionGroup } from 'react-transition-group'; | 2 | import { CSSTransition, TransitionGroup } from 'react-transition-group'; |
3 | 3 | ||
4 | interface IProps { | 4 | interface IProps { |
diff --git a/src/components/ui/error/index.tsx b/src/components/ui/error/index.tsx index 01fb5ca27..d0008529f 100644 --- a/src/components/ui/error/index.tsx +++ b/src/components/ui/error/index.tsx | |||
@@ -1,4 +1,4 @@ | |||
1 | import { Classes } from 'jss'; | 1 | import type { Classes } from 'jss'; |
2 | import { Component } from 'react'; | 2 | import { Component } from 'react'; |
3 | import injectSheet from 'react-jss'; | 3 | import injectSheet from 'react-jss'; |
4 | 4 | ||
diff --git a/src/components/ui/error/styles.ts b/src/components/ui/error/styles.ts index 9da95705a..ac781052f 100644 --- a/src/components/ui/error/styles.ts +++ b/src/components/ui/error/styles.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { Theme } from '../../../themes'; | 1 | import type { Theme } from '../../../themes'; |
2 | 2 | ||
3 | export default (theme: Theme) => ({ | 3 | export default (theme: Theme) => ({ |
4 | message: { | 4 | message: { |
diff --git a/src/components/ui/headline/index.tsx b/src/components/ui/headline/index.tsx index 8e40fa896..2070745bb 100644 --- a/src/components/ui/headline/index.tsx +++ b/src/components/ui/headline/index.tsx | |||
@@ -1,15 +1,15 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { | 2 | import { |
3 | Component, | 3 | Component, |
4 | type MouseEventHandler, | ||
5 | type ReactElement, | ||
6 | type ReactNode, | ||
4 | createElement, | 7 | createElement, |
5 | MouseEventHandler, | ||
6 | ReactElement, | ||
7 | ReactNode, | ||
8 | } from 'react'; | 8 | } from 'react'; |
9 | import injectStyle, { WithStylesProps } from 'react-jss'; | 9 | import injectStyle, { type WithStylesProps } from 'react-jss'; |
10 | 10 | ||
11 | import { Theme } from '../../../themes'; | 11 | import type { Theme } from '../../../themes'; |
12 | import { Omit } from '../typings/generic'; | 12 | import type { Omit } from '../typings/generic'; |
13 | 13 | ||
14 | const styles = (theme: Theme) => ({ | 14 | const styles = (theme: Theme) => ({ |
15 | headline: { | 15 | headline: { |
diff --git a/src/components/ui/icon/index.tsx b/src/components/ui/icon/index.tsx index 04a00d0e0..ad9f43730 100644 --- a/src/components/ui/icon/index.tsx +++ b/src/components/ui/icon/index.tsx | |||
@@ -1,9 +1,9 @@ | |||
1 | import MdiIcon from '@mdi/react'; | 1 | import MdiIcon from '@mdi/react'; |
2 | import classnames from 'classnames'; | 2 | import classnames from 'classnames'; |
3 | import { Component, ReactElement } from 'react'; | 3 | import { Component, type ReactElement } from 'react'; |
4 | import injectStyle, { WithStylesProps } from 'react-jss'; | 4 | import injectStyle, { type WithStylesProps } from 'react-jss'; |
5 | 5 | ||
6 | import { Theme } from '../../../themes'; | 6 | import type { Theme } from '../../../themes'; |
7 | 7 | ||
8 | const styles = (theme: Theme) => ({ | 8 | const styles = (theme: Theme) => ({ |
9 | icon: { | 9 | icon: { |
diff --git a/src/components/ui/imageUpload/index.tsx b/src/components/ui/imageUpload/index.tsx index 3b164ed41..876572484 100644 --- a/src/components/ui/imageUpload/index.tsx +++ b/src/components/ui/imageUpload/index.tsx | |||
@@ -1,11 +1,11 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | ||
4 | import Dropzone from 'react-dropzone'; | ||
5 | import { mdiDelete, mdiFileImage } from '@mdi/js'; | 1 | import { mdiDelete, mdiFileImage } from '@mdi/js'; |
2 | import classnames from 'classnames'; | ||
3 | import { observer } from 'mobx-react'; | ||
6 | import prettyBytes from 'pretty-bytes'; | 4 | import prettyBytes from 'pretty-bytes'; |
7 | import Icon from '../icon'; | 5 | import { Component, type ReactElement } from 'react'; |
6 | import Dropzone from 'react-dropzone'; | ||
8 | import { isWindows } from '../../../environment'; | 7 | import { isWindows } from '../../../environment'; |
8 | import Icon from '../icon'; | ||
9 | 9 | ||
10 | interface IProps { | 10 | interface IProps { |
11 | field: any; | 11 | field: any; |
diff --git a/src/components/ui/infobox/index.tsx b/src/components/ui/infobox/index.tsx index a1c4f9d21..36ea6a59f 100644 --- a/src/components/ui/infobox/index.tsx +++ b/src/components/ui/infobox/index.tsx | |||
@@ -2,9 +2,9 @@ | |||
2 | import { mdiClose } from '@mdi/js'; | 2 | import { mdiClose } from '@mdi/js'; |
3 | import classnames from 'classnames'; | 3 | import classnames from 'classnames'; |
4 | import { noop } from 'lodash'; | 4 | import { noop } from 'lodash'; |
5 | import { Component, ReactElement, ReactNode } from 'react'; | 5 | import { Component, type ReactElement, type ReactNode } from 'react'; |
6 | import withStyles, { WithStylesProps } from 'react-jss'; | 6 | import withStyles, { type WithStylesProps } from 'react-jss'; |
7 | import { Theme } from '../../../themes'; | 7 | import type { Theme } from '../../../themes'; |
8 | import Icon from '../icon'; | 8 | import Icon from '../icon'; |
9 | 9 | ||
10 | const buttonStyles = (theme: Theme) => { | 10 | const buttonStyles = (theme: Theme) => { |
diff --git a/src/components/ui/input/index.tsx b/src/components/ui/input/index.tsx index 68cc9ee22..c61efe570 100644 --- a/src/components/ui/input/index.tsx +++ b/src/components/ui/input/index.tsx | |||
@@ -1,22 +1,26 @@ | |||
1 | import { mdiEye, mdiEyeOff } from '@mdi/js'; | 1 | import { mdiEye, mdiEyeOff } from '@mdi/js'; |
2 | import classnames from 'classnames'; | 2 | import classnames from 'classnames'; |
3 | import { noop } from 'lodash'; | ||
4 | import { observer } from 'mobx-react'; | ||
3 | import { | 5 | import { |
4 | Component, | 6 | Component, |
7 | type InputHTMLAttributes, | ||
8 | type KeyboardEvent, | ||
9 | type ReactElement, | ||
10 | type RefObject, | ||
5 | createRef, | 11 | createRef, |
6 | InputHTMLAttributes, | ||
7 | ReactElement, | ||
8 | RefObject, | ||
9 | KeyboardEvent, | ||
10 | } from 'react'; | 12 | } from 'react'; |
11 | import withStyles, { WithStylesProps } from 'react-jss'; | 13 | import { |
12 | import { noop } from 'lodash'; | 14 | type WrappedComponentProps, |
13 | import { observer } from 'mobx-react'; | 15 | defineMessages, |
14 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 16 | injectIntl, |
15 | import Icon from '../icon'; | 17 | } from 'react-intl'; |
16 | import { IFormField } from '../typings/generic'; | 18 | import withStyles, { type WithStylesProps } from 'react-jss'; |
17 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> | 19 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> |
18 | import Error from '../error'; | 20 | import Error from '../error'; |
21 | import Icon from '../icon'; | ||
19 | import Label from '../label'; | 22 | import Label from '../label'; |
23 | import type { IFormField } from '../typings/generic'; | ||
20 | import Wrapper from '../wrapper'; | 24 | import Wrapper from '../wrapper'; |
21 | import { scorePasswordFunc } from './scorePassword'; | 25 | import { scorePasswordFunc } from './scorePassword'; |
22 | import styles from './styles'; | 26 | import styles from './styles'; |
diff --git a/src/components/ui/input/styles.ts b/src/components/ui/input/styles.ts index ebae0e40d..580c72889 100644 --- a/src/components/ui/input/styles.ts +++ b/src/components/ui/input/styles.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Property } from 'csstype'; | 1 | import type { Property } from 'csstype'; |
2 | 2 | ||
3 | import { Theme } from '../../../themes'; | 3 | import type { Theme } from '../../../themes'; |
4 | 4 | ||
5 | const prefixStyles = (theme: Theme) => ({ | 5 | const prefixStyles = (theme: Theme) => ({ |
6 | background: theme.inputPrefixBackground, | 6 | background: theme.inputPrefixBackground, |
diff --git a/src/components/ui/label/index.tsx b/src/components/ui/label/index.tsx index 5f5cc5c8e..c0a3903b0 100644 --- a/src/components/ui/label/index.tsx +++ b/src/components/ui/label/index.tsx | |||
@@ -1,8 +1,8 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { Component, LabelHTMLAttributes } from 'react'; | 2 | import { Component, type LabelHTMLAttributes } from 'react'; |
3 | import injectSheet, { WithStylesProps } from 'react-jss'; | 3 | import injectSheet, { type WithStylesProps } from 'react-jss'; |
4 | 4 | ||
5 | import { IFormField } from '../typings/generic'; | 5 | import type { IFormField } from '../typings/generic'; |
6 | 6 | ||
7 | import styles from './styles'; | 7 | import styles from './styles'; |
8 | 8 | ||
diff --git a/src/components/ui/label/styles.ts b/src/components/ui/label/styles.ts index faa44ae5b..fecfa1816 100644 --- a/src/components/ui/label/styles.ts +++ b/src/components/ui/label/styles.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { Theme } from '../../../themes'; | 1 | import type { Theme } from '../../../themes'; |
2 | 2 | ||
3 | export default (theme: Theme) => ({ | 3 | export default (theme: Theme) => ({ |
4 | content: {}, | 4 | content: {}, |
diff --git a/src/components/ui/loader/index.tsx b/src/components/ui/loader/index.tsx index c0ae15028..8757985b9 100644 --- a/src/components/ui/loader/index.tsx +++ b/src/components/ui/loader/index.tsx | |||
@@ -1,9 +1,9 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { inject } from 'mobx-react'; | ||
2 | import { Component } from 'react'; | 3 | import { Component } from 'react'; |
3 | import injectStyle, { WithStylesProps } from 'react-jss'; | 4 | import injectStyle, { type WithStylesProps } from 'react-jss'; |
4 | import { Oval } from 'react-loader-spinner'; | 5 | import { Oval } from 'react-loader-spinner'; |
5 | import { inject } from 'mobx-react'; | 6 | import type { FerdiumStores } from '../../../@types/stores.types'; |
6 | import { FerdiumStores } from '../../../@types/stores.types'; | ||
7 | import { DEFAULT_LOADER_COLOR } from '../../../config'; | 7 | import { DEFAULT_LOADER_COLOR } from '../../../config'; |
8 | 8 | ||
9 | const styles = () => ({ | 9 | const styles = () => ({ |
diff --git a/src/components/ui/select/index.tsx b/src/components/ui/select/index.tsx index 0d8520f58..2716ebc2d 100644 --- a/src/components/ui/select/index.tsx +++ b/src/components/ui/select/index.tsx | |||
@@ -5,14 +5,19 @@ import { | |||
5 | } from '@mdi/js'; | 5 | } from '@mdi/js'; |
6 | import Icon from '@mdi/react'; | 6 | import Icon from '@mdi/react'; |
7 | import classnames from 'classnames'; | 7 | import classnames from 'classnames'; |
8 | import { ChangeEvent, Component, createRef, ReactElement } from 'react'; | ||
9 | import withStyles, { WithStylesProps } from 'react-jss'; | ||
10 | import { noop } from 'lodash'; | 8 | import { noop } from 'lodash'; |
11 | import { Theme } from '../../../themes'; | 9 | import { |
12 | import { IFormField } from '../typings/generic'; | 10 | type ChangeEvent, |
11 | Component, | ||
12 | type ReactElement, | ||
13 | createRef, | ||
14 | } from 'react'; | ||
15 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
16 | import type { Theme } from '../../../themes'; | ||
13 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> | 17 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> |
14 | import Error from '../error'; | 18 | import Error from '../error'; |
15 | import Label from '../label'; | 19 | import Label from '../label'; |
20 | import type { IFormField } from '../typings/generic'; | ||
16 | import Wrapper from '../wrapper'; | 21 | import Wrapper from '../wrapper'; |
17 | 22 | ||
18 | let popupTransition: string = 'none'; | 23 | let popupTransition: string = 'none'; |
diff --git a/src/components/ui/textarea/index.tsx b/src/components/ui/textarea/index.tsx index 0967c4c25..4a0e77afe 100644 --- a/src/components/ui/textarea/index.tsx +++ b/src/components/ui/textarea/index.tsx | |||
@@ -1,9 +1,9 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { Component, createRef, TextareaHTMLAttributes } from 'react'; | 2 | import { Component, type TextareaHTMLAttributes, createRef } from 'react'; |
3 | import injectSheet, { WithStylesProps } from 'react-jss'; | 3 | import injectSheet, { type WithStylesProps } from 'react-jss'; |
4 | 4 | ||
5 | import { noop } from 'lodash'; | 5 | import { noop } from 'lodash'; |
6 | import { IFormField } from '../typings/generic'; | 6 | import type { IFormField } from '../typings/generic'; |
7 | 7 | ||
8 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> | 8 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> |
9 | import Error from '../error'; | 9 | import Error from '../error'; |
diff --git a/src/components/ui/textarea/styles.ts b/src/components/ui/textarea/styles.ts index 36fc2a82e..c4c27b95d 100644 --- a/src/components/ui/textarea/styles.ts +++ b/src/components/ui/textarea/styles.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Property } from 'csstype'; | 1 | import type { Property } from 'csstype'; |
2 | 2 | ||
3 | import { Theme } from '../../../themes'; | 3 | import type { Theme } from '../../../themes'; |
4 | 4 | ||
5 | export default (theme: Theme) => ({ | 5 | export default (theme: Theme) => ({ |
6 | label: { | 6 | label: { |
diff --git a/src/components/ui/toggle/index.tsx b/src/components/ui/toggle/index.tsx index 878ffecdc..dc426b3a1 100644 --- a/src/components/ui/toggle/index.tsx +++ b/src/components/ui/toggle/index.tsx | |||
@@ -1,13 +1,13 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { Property } from 'csstype'; | 2 | import type { Property } from 'csstype'; |
3 | import { noop } from 'lodash'; | 3 | import { noop } from 'lodash'; |
4 | import { Component, InputHTMLAttributes, ReactElement } from 'react'; | 4 | import { Component, type InputHTMLAttributes, type ReactElement } from 'react'; |
5 | import withStyles, { WithStylesProps } from 'react-jss'; | 5 | import withStyles, { type WithStylesProps } from 'react-jss'; |
6 | import { Theme } from '../../../themes'; | 6 | import type { Theme } from '../../../themes'; |
7 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> | 7 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> |
8 | import Error from '../error'; | 8 | import Error from '../error'; |
9 | import Label from '../label'; | 9 | import Label from '../label'; |
10 | import { IFormField } from '../typings/generic'; | 10 | import type { IFormField } from '../typings/generic'; |
11 | import Wrapper from '../wrapper'; | 11 | import Wrapper from '../wrapper'; |
12 | 12 | ||
13 | const buttonTransition: string = window?.matchMedia( | 13 | const buttonTransition: string = window?.matchMedia( |
diff --git a/src/components/ui/wrapper/index.tsx b/src/components/ui/wrapper/index.tsx index 450d09fd1..081b13b36 100644 --- a/src/components/ui/wrapper/index.tsx +++ b/src/components/ui/wrapper/index.tsx | |||
@@ -1,6 +1,6 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { Component, ReactNode } from 'react'; | 2 | import { Component, type ReactNode } from 'react'; |
3 | import injectStyle, { WithStylesProps } from 'react-jss'; | 3 | import injectStyle, { type WithStylesProps } from 'react-jss'; |
4 | 4 | ||
5 | // eslint-disable-next-line no-use-before-define | 5 | // eslint-disable-next-line no-use-before-define |
6 | interface IProps extends WithStylesProps<typeof styles> { | 6 | interface IProps extends WithStylesProps<typeof styles> { |
diff --git a/src/components/util/ErrorBoundary/index.tsx b/src/components/util/ErrorBoundary/index.tsx index 66f860835..a37d1b33a 100644 --- a/src/components/util/ErrorBoundary/index.tsx +++ b/src/components/util/ErrorBoundary/index.tsx | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Component, ReactNode } from 'react'; | 1 | import { Component, type ReactNode } from 'react'; |
2 | import withStyles, { WithStylesProps } from 'react-jss'; | 2 | import { type IntlShape, defineMessages, injectIntl } from 'react-intl'; |
3 | import { defineMessages, injectIntl, IntlShape } from 'react-intl'; | 3 | import withStyles, { type WithStylesProps } from 'react-jss'; |
4 | 4 | ||
5 | import Button from '../../ui/button'; | 5 | import Button from '../../ui/button'; |
6 | import { H1 } from '../../ui/headline'; | 6 | import { H1 } from '../../ui/headline'; |
diff --git a/src/containers/auth/AuthLayoutContainer.tsx b/src/containers/auth/AuthLayoutContainer.tsx index 6a1fed0d7..6c9834ece 100644 --- a/src/containers/auth/AuthLayoutContainer.tsx +++ b/src/containers/auth/AuthLayoutContainer.tsx | |||
@@ -1,8 +1,8 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
2 | import { Component, type ReactElement } from 'react'; | ||
3 | import { ThemeProvider } from 'react-jss'; | 3 | import { ThemeProvider } from 'react-jss'; |
4 | import { Outlet } from 'react-router-dom'; | 4 | import { Outlet } from 'react-router-dom'; |
5 | import { StoresProps } from '../../@types/ferdium-components.types'; | 5 | import type { StoresProps } from '../../@types/ferdium-components.types'; |
6 | import AuthLayout from '../../components/auth/AuthLayout'; | 6 | import AuthLayout from '../../components/auth/AuthLayout'; |
7 | import AppLoader from '../../components/ui/AppLoader'; | 7 | import AppLoader from '../../components/ui/AppLoader'; |
8 | 8 | ||
diff --git a/src/containers/auth/AuthReleaseNotesScreen.tsx b/src/containers/auth/AuthReleaseNotesScreen.tsx index c9d2286e1..3191ba139 100644 --- a/src/containers/auth/AuthReleaseNotesScreen.tsx +++ b/src/containers/auth/AuthReleaseNotesScreen.tsx | |||
@@ -1,16 +1,16 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
2 | import { Component } from 'react'; | ||
3 | 3 | ||
4 | import { IntlShape, defineMessages, injectIntl } from 'react-intl'; | ||
5 | import Markdown from 'markdown-to-jsx'; | ||
6 | import { mdiArrowLeftCircle } from '@mdi/js'; | 4 | import { mdiArrowLeftCircle } from '@mdi/js'; |
7 | import { openExternalUrl } from '../../helpers/url-helpers'; | 5 | import Markdown from 'markdown-to-jsx'; |
6 | import { type IntlShape, defineMessages, injectIntl } from 'react-intl'; | ||
8 | import Icon from '../../components/ui/icon'; | 7 | import Icon from '../../components/ui/icon'; |
9 | import { ferdiumVersion } from '../../environment-remote'; | 8 | import { ferdiumVersion } from '../../environment-remote'; |
10 | import { | 9 | import { |
11 | getFerdiumVersion, | 10 | getFerdiumVersion, |
12 | getUpdateInfoFromGH, | 11 | getUpdateInfoFromGH, |
13 | } from '../../helpers/update-helpers'; | 12 | } from '../../helpers/update-helpers'; |
13 | import { openExternalUrl } from '../../helpers/url-helpers'; | ||
14 | 14 | ||
15 | const messages = defineMessages({ | 15 | const messages = defineMessages({ |
16 | headline: { | 16 | headline: { |
diff --git a/src/containers/auth/ChangeServerScreen.tsx b/src/containers/auth/ChangeServerScreen.tsx index db48479cc..00715a0a2 100644 --- a/src/containers/auth/ChangeServerScreen.tsx +++ b/src/containers/auth/ChangeServerScreen.tsx | |||
@@ -1,9 +1,9 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
3 | import { StoresProps } from '../../@types/ferdium-components.types'; | 2 | import { Component, type ReactElement } from 'react'; |
3 | import type { StoresProps } from '../../@types/ferdium-components.types'; | ||
4 | import type { Actions } from '../../actions/lib/actions'; | ||
4 | import ChangeServer from '../../components/auth/ChangeServer'; | 5 | import ChangeServer from '../../components/auth/ChangeServer'; |
5 | import { Actions } from '../../actions/lib/actions'; | 6 | import type { RealStores } from '../../stores'; |
6 | import { RealStores } from '../../stores'; | ||
7 | 7 | ||
8 | interface IProps { | 8 | interface IProps { |
9 | stores?: RealStores; | 9 | stores?: RealStores; |
diff --git a/src/containers/auth/InviteScreen.tsx b/src/containers/auth/InviteScreen.tsx index 2dfc3c88c..ed656a33a 100644 --- a/src/containers/auth/InviteScreen.tsx +++ b/src/containers/auth/InviteScreen.tsx | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
3 | import { StoresProps } from '../../@types/ferdium-components.types'; | 2 | import { Component, type ReactElement } from 'react'; |
3 | import type { StoresProps } from '../../@types/ferdium-components.types'; | ||
4 | import Invite from '../../components/auth/Invite'; | 4 | import Invite from '../../components/auth/Invite'; |
5 | 5 | ||
6 | class InviteScreen extends Component<StoresProps> { | 6 | class InviteScreen extends Component<StoresProps> { |
diff --git a/src/containers/auth/LockedScreen.tsx b/src/containers/auth/LockedScreen.tsx index a4cb43f73..cf4d5bd53 100644 --- a/src/containers/auth/LockedScreen.tsx +++ b/src/containers/auth/LockedScreen.tsx | |||
@@ -1,11 +1,11 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
3 | import { StoresProps } from '../../@types/ferdium-components.types'; | 2 | import { Component, type ReactElement } from 'react'; |
3 | import type { StoresProps } from '../../@types/ferdium-components.types'; | ||
4 | import Locked from '../../components/auth/Locked'; | 4 | import Locked from '../../components/auth/Locked'; |
5 | 5 | ||
6 | import type { Actions } from '../../actions/lib/actions'; | ||
6 | import { hash } from '../../helpers/password-helpers'; | 7 | import { hash } from '../../helpers/password-helpers'; |
7 | import { Actions } from '../../actions/lib/actions'; | 8 | import type { RealStores } from '../../stores'; |
8 | import { RealStores } from '../../stores'; | ||
9 | 9 | ||
10 | interface IProps { | 10 | interface IProps { |
11 | actions?: Actions; | 11 | actions?: Actions; |
diff --git a/src/containers/auth/LoginScreen.tsx b/src/containers/auth/LoginScreen.tsx index 100736d19..89d002584 100644 --- a/src/containers/auth/LoginScreen.tsx +++ b/src/containers/auth/LoginScreen.tsx | |||
@@ -1,8 +1,8 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
3 | import { | 2 | import { Component, type ReactElement } from 'react'; |
4 | StoresProps, | 3 | import type { |
5 | GlobalError, | 4 | GlobalError, |
5 | StoresProps, | ||
6 | } from '../../@types/ferdium-components.types'; | 6 | } from '../../@types/ferdium-components.types'; |
7 | import Login from '../../components/auth/Login'; | 7 | import Login from '../../components/auth/Login'; |
8 | 8 | ||
diff --git a/src/containers/auth/PasswordScreen.tsx b/src/containers/auth/PasswordScreen.tsx index c7539f21e..e0f25db3e 100644 --- a/src/containers/auth/PasswordScreen.tsx +++ b/src/containers/auth/PasswordScreen.tsx | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
3 | import { StoresProps } from '../../@types/ferdium-components.types'; | 2 | import { Component, type ReactElement } from 'react'; |
3 | import type { StoresProps } from '../../@types/ferdium-components.types'; | ||
4 | import Password from '../../components/auth/Password'; | 4 | import Password from '../../components/auth/Password'; |
5 | 5 | ||
6 | class PasswordScreen extends Component<StoresProps> { | 6 | class PasswordScreen extends Component<StoresProps> { |
diff --git a/src/containers/auth/SetupAssistantScreen.tsx b/src/containers/auth/SetupAssistantScreen.tsx index 1a20ab002..d15b4e6e1 100644 --- a/src/containers/auth/SetupAssistantScreen.tsx +++ b/src/containers/auth/SetupAssistantScreen.tsx | |||
@@ -1,9 +1,9 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
3 | import { StoresProps } from '../../@types/ferdium-components.types'; | 2 | import { Component, type ReactElement } from 'react'; |
4 | import sleep from '../../helpers/async-helpers'; | 3 | import type { StoresProps } from '../../@types/ferdium-components.types'; |
4 | import type { ILegacyServices } from '../../@types/legacy-types'; | ||
5 | import SetupAssistant from '../../components/auth/SetupAssistant'; | 5 | import SetupAssistant from '../../components/auth/SetupAssistant'; |
6 | import { ILegacyServices } from '../../@types/legacy-types'; | 6 | import sleep from '../../helpers/async-helpers'; |
7 | 7 | ||
8 | interface IProps extends StoresProps {} | 8 | interface IProps extends StoresProps {} |
9 | 9 | ||
diff --git a/src/containers/auth/SignupScreen.tsx b/src/containers/auth/SignupScreen.tsx index bf7ffe778..cf5d8006e 100644 --- a/src/containers/auth/SignupScreen.tsx +++ b/src/containers/auth/SignupScreen.tsx | |||
@@ -1,9 +1,9 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
2 | import { Component, type ReactElement } from 'react'; | ||
3 | 3 | ||
4 | import { | 4 | import type { |
5 | StoresProps, | ||
6 | GlobalError, | 5 | GlobalError, |
6 | StoresProps, | ||
7 | } from '../../@types/ferdium-components.types'; | 7 | } from '../../@types/ferdium-components.types'; |
8 | import Signup from '../../components/auth/Signup'; | 8 | import Signup from '../../components/auth/Signup'; |
9 | 9 | ||
diff --git a/src/containers/auth/WelcomeScreen.tsx b/src/containers/auth/WelcomeScreen.tsx index 1f3f50e4a..8a95ded80 100644 --- a/src/containers/auth/WelcomeScreen.tsx +++ b/src/containers/auth/WelcomeScreen.tsx | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
3 | import { StoresProps } from '../../@types/ferdium-components.types'; | 2 | import { Component, type ReactElement } from 'react'; |
3 | import type { StoresProps } from '../../@types/ferdium-components.types'; | ||
4 | import Welcome from '../../components/auth/Welcome'; | 4 | import Welcome from '../../components/auth/Welcome'; |
5 | 5 | ||
6 | interface IProps extends Partial<StoresProps> {} | 6 | interface IProps extends Partial<StoresProps> {} |
diff --git a/src/containers/download-manager/DownloadManagerScreen.tsx b/src/containers/download-manager/DownloadManagerScreen.tsx index 5d395a180..cd9686f4d 100644 --- a/src/containers/download-manager/DownloadManagerScreen.tsx +++ b/src/containers/download-manager/DownloadManagerScreen.tsx | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Component, ReactElement } from 'react'; | 1 | import { Component, type ReactElement } from 'react'; |
2 | import ErrorBoundary from '../../components/util/ErrorBoundary'; | ||
3 | import DownloadManager from '../../components/downloadManager/DownloadManagerDashboard'; | 2 | import DownloadManager from '../../components/downloadManager/DownloadManagerDashboard'; |
3 | import ErrorBoundary from '../../components/util/ErrorBoundary'; | ||
4 | 4 | ||
5 | class DownloadManagerScreen extends Component { | 5 | class DownloadManagerScreen extends Component { |
6 | render(): ReactElement { | 6 | render(): ReactElement { |
diff --git a/src/containers/download-manager/DownloadManagerWindow.tsx b/src/containers/download-manager/DownloadManagerWindow.tsx index e13e51774..4aacd50b6 100644 --- a/src/containers/download-manager/DownloadManagerWindow.tsx +++ b/src/containers/download-manager/DownloadManagerWindow.tsx | |||
@@ -1,9 +1,9 @@ | |||
1 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
2 | import { Component, ReactPortal } from 'react'; | 2 | import { Component, type ReactPortal } from 'react'; |
3 | import ReactDOM from 'react-dom'; | 3 | import ReactDOM from 'react-dom'; |
4 | import { Outlet } from 'react-router-dom'; | 4 | import { Outlet } from 'react-router-dom'; |
5 | 5 | ||
6 | import { StoresProps } from '../../@types/ferdium-components.types'; | 6 | import type { StoresProps } from '../../@types/ferdium-components.types'; |
7 | import Layout from '../../components/downloadManager/DownloadManagerLayout'; | 7 | import Layout from '../../components/downloadManager/DownloadManagerLayout'; |
8 | import ErrorBoundary from '../../components/util/ErrorBoundary'; | 8 | import ErrorBoundary from '../../components/util/ErrorBoundary'; |
9 | 9 | ||
diff --git a/src/containers/layout/AppLayoutContainer.tsx b/src/containers/layout/AppLayoutContainer.tsx index 8748f1032..3f8aad0ac 100644 --- a/src/containers/layout/AppLayoutContainer.tsx +++ b/src/containers/layout/AppLayoutContainer.tsx | |||
@@ -1,15 +1,15 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
2 | import { Component, type ReactElement } from 'react'; | ||
3 | import { ThemeProvider } from 'react-jss'; | 3 | import { ThemeProvider } from 'react-jss'; |
4 | import { Outlet } from 'react-router-dom'; | 4 | import { Outlet } from 'react-router-dom'; |
5 | 5 | ||
6 | import { StoresProps } from '../../@types/ferdium-components.types'; | 6 | import type { StoresProps } from '../../@types/ferdium-components.types'; |
7 | import AppLayout from '../../components/layout/AppLayout'; | 7 | import AppLayout from '../../components/layout/AppLayout'; |
8 | import Sidebar from '../../components/layout/Sidebar'; | 8 | import Sidebar from '../../components/layout/Sidebar'; |
9 | import Services from '../../components/services/content/Services'; | 9 | import Services from '../../components/services/content/Services'; |
10 | import AppLoader from '../../components/ui/AppLoader'; | 10 | import AppLoader from '../../components/ui/AppLoader'; |
11 | import WorkspaceDrawer from '../../features/workspaces/components/WorkspaceDrawer'; | ||
12 | import { workspaceStore } from '../../features/workspaces'; | 11 | import { workspaceStore } from '../../features/workspaces'; |
12 | import WorkspaceDrawer from '../../features/workspaces/components/WorkspaceDrawer'; | ||
13 | 13 | ||
14 | interface IProps extends StoresProps {} | 14 | interface IProps extends StoresProps {} |
15 | 15 | ||
diff --git a/src/containers/settings/AccountScreen.tsx b/src/containers/settings/AccountScreen.tsx index 55aa1e5c9..f1ef1ae3e 100644 --- a/src/containers/settings/AccountScreen.tsx +++ b/src/containers/settings/AccountScreen.tsx | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
2 | import { Component, type ReactElement } from 'react'; | ||
3 | 3 | ||
4 | import { StoresProps } from '../../@types/ferdium-components.types'; | 4 | import type { StoresProps } from '../../@types/ferdium-components.types'; |
5 | 5 | ||
6 | import AccountDashboard from '../../components/settings/account/AccountDashboard'; | 6 | import AccountDashboard from '../../components/settings/account/AccountDashboard'; |
7 | import ErrorBoundary from '../../components/util/ErrorBoundary'; | 7 | import ErrorBoundary from '../../components/util/ErrorBoundary'; |
diff --git a/src/containers/settings/EditServiceScreen.tsx b/src/containers/settings/EditServiceScreen.tsx index 3c65877c8..dde69ef2d 100644 --- a/src/containers/settings/EditServiceScreen.tsx +++ b/src/containers/settings/EditServiceScreen.tsx | |||
@@ -1,23 +1,27 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 2 | import { Component, type ReactElement } from 'react'; |
4 | import { Params } from 'react-router-dom'; | 3 | import { |
5 | import { StoresProps } from '../../@types/ferdium-components.types'; | 4 | type WrappedComponentProps, |
6 | import { IRecipe } from '../../models/Recipe'; | 5 | defineMessages, |
7 | import Service from '../../models/Service'; | 6 | injectIntl, |
8 | import { FormFields } from '../../@types/mobx-form.types'; | 7 | } from 'react-intl'; |
9 | import Form from '../../lib/Form'; | 8 | import type { Params } from 'react-router-dom'; |
10 | import ServiceError from '../../components/settings/services/ServiceError'; | 9 | import type { StoresProps } from '../../@types/ferdium-components.types'; |
10 | import type { FormFields } from '../../@types/mobx-form.types'; | ||
11 | import EditServiceForm from '../../components/settings/services/EditServiceForm'; | 11 | import EditServiceForm from '../../components/settings/services/EditServiceForm'; |
12 | import ServiceError from '../../components/settings/services/ServiceError'; | ||
12 | import ErrorBoundary from '../../components/util/ErrorBoundary'; | 13 | import ErrorBoundary from '../../components/util/ErrorBoundary'; |
13 | import { required, url, oneRequired } from '../../helpers/validation-helpers'; | 14 | import withParams from '../../components/util/WithParams'; |
14 | import { getSelectOptions } from '../../helpers/i18n-helpers'; | 15 | import { DEFAULT_APP_SETTINGS, DEFAULT_SERVICE_SETTINGS } from '../../config'; |
15 | import { config as proxyFeature } from '../../features/serviceProxy'; | 16 | import { config as proxyFeature } from '../../features/serviceProxy'; |
16 | import { SPELLCHECKER_LOCALES } from '../../i18n/languages'; | 17 | import { getSelectOptions } from '../../helpers/i18n-helpers'; |
18 | import { url, oneRequired, required } from '../../helpers/validation-helpers'; | ||
17 | import globalMessages from '../../i18n/globalMessages'; | 19 | import globalMessages from '../../i18n/globalMessages'; |
18 | import { DEFAULT_APP_SETTINGS, DEFAULT_SERVICE_SETTINGS } from '../../config'; | 20 | import { SPELLCHECKER_LOCALES } from '../../i18n/languages'; |
19 | import withParams from '../../components/util/WithParams'; | ||
20 | import { ifUndefined } from '../../jsUtils'; | 21 | import { ifUndefined } from '../../jsUtils'; |
22 | import Form from '../../lib/Form'; | ||
23 | import type { IRecipe } from '../../models/Recipe'; | ||
24 | import type Service from '../../models/Service'; | ||
21 | 25 | ||
22 | const messages = defineMessages({ | 26 | const messages = defineMessages({ |
23 | name: { | 27 | name: { |
diff --git a/src/containers/settings/EditSettingsScreen.tsx b/src/containers/settings/EditSettingsScreen.tsx index 5d1b09296..b731ad50a 100644 --- a/src/containers/settings/EditSettingsScreen.tsx +++ b/src/containers/settings/EditSettingsScreen.tsx | |||
@@ -1,32 +1,36 @@ | |||
1 | import { ipcRenderer } from 'electron'; | 1 | import { ipcRenderer } from 'electron'; |
2 | import { Component, ReactElement } from 'react'; | ||
3 | import { inject, observer } from 'mobx-react'; | 2 | import { inject, observer } from 'mobx-react'; |
4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 3 | import { Component, type ReactElement } from 'react'; |
4 | import { | ||
5 | type WrappedComponentProps, | ||
6 | defineMessages, | ||
7 | injectIntl, | ||
8 | } from 'react-intl'; | ||
5 | 9 | ||
6 | import { FormFields } from '../../@types/mobx-form.types'; | 10 | import type { StoresProps } from '../../@types/ferdium-components.types'; |
7 | import { StoresProps } from '../../@types/ferdium-components.types'; | 11 | import type { FormFields } from '../../@types/mobx-form.types'; |
8 | import Form from '../../lib/Form'; | ||
9 | import { APP_LOCALES, SPELLCHECKER_LOCALES } from '../../i18n/languages'; | ||
10 | import { | 12 | import { |
11 | DEFAULT_APP_SETTINGS, | 13 | DEFAULT_APP_SETTINGS, |
14 | GOOGLE_TRANSLATOR_LANGUAGES, | ||
12 | HIBERNATION_STRATEGIES, | 15 | HIBERNATION_STRATEGIES, |
13 | SIDEBAR_WIDTH, | ||
14 | SIDEBAR_SERVICES_LOCATION, | ||
15 | ICON_SIZES, | 16 | ICON_SIZES, |
17 | LIBRETRANSLATE_TRANSLATOR_LANGUAGES, | ||
16 | NAVIGATION_BAR_BEHAVIOURS, | 18 | NAVIGATION_BAR_BEHAVIOURS, |
17 | SEARCH_ENGINE_NAMES, | 19 | SEARCH_ENGINE_NAMES, |
18 | TRANSLATOR_ENGINE_NAMES, | 20 | SIDEBAR_SERVICES_LOCATION, |
19 | GOOGLE_TRANSLATOR_LANGUAGES, | 21 | SIDEBAR_WIDTH, |
20 | TRANSLATOR_ENGINE_GOOGLE, | 22 | SPLIT_COLUMNS_MAX, |
21 | LIBRETRANSLATE_TRANSLATOR_LANGUAGES, | 23 | SPLIT_COLUMNS_MIN, |
22 | TODO_APPS, | 24 | TODO_APPS, |
23 | WAKE_UP_STRATEGIES, | 25 | TRANSLATOR_ENGINE_GOOGLE, |
26 | TRANSLATOR_ENGINE_NAMES, | ||
24 | WAKE_UP_HIBERNATION_STRATEGIES, | 27 | WAKE_UP_HIBERNATION_STRATEGIES, |
25 | SPLIT_COLUMNS_MIN, | 28 | WAKE_UP_STRATEGIES, |
26 | SPLIT_COLUMNS_MAX, | ||
27 | WEBRTC_IP_HANDLING_POLICY, | 29 | WEBRTC_IP_HANDLING_POLICY, |
28 | } from '../../config'; | 30 | } from '../../config'; |
29 | import { isMac } from '../../environment'; | 31 | import { isMac } from '../../environment'; |
32 | import { APP_LOCALES, SPELLCHECKER_LOCALES } from '../../i18n/languages'; | ||
33 | import Form from '../../lib/Form'; | ||
30 | 34 | ||
31 | import { getSelectOptions } from '../../helpers/i18n-helpers'; | 35 | import { getSelectOptions } from '../../helpers/i18n-helpers'; |
32 | import { hash } from '../../helpers/password-helpers'; | 36 | import { hash } from '../../helpers/password-helpers'; |
@@ -35,8 +39,8 @@ import defaultUserAgent from '../../helpers/userAgent-helpers'; | |||
35 | import EditSettingsForm from '../../components/settings/settings/EditSettingsForm'; | 39 | import EditSettingsForm from '../../components/settings/settings/EditSettingsForm'; |
36 | import ErrorBoundary from '../../components/util/ErrorBoundary'; | 40 | import ErrorBoundary from '../../components/util/ErrorBoundary'; |
37 | 41 | ||
38 | import globalMessages from '../../i18n/globalMessages'; | ||
39 | import { importExportURL } from '../../api/apiBase'; | 42 | import { importExportURL } from '../../api/apiBase'; |
43 | import globalMessages from '../../i18n/globalMessages'; | ||
40 | import { ifUndefined } from '../../jsUtils'; | 44 | import { ifUndefined } from '../../jsUtils'; |
41 | 45 | ||
42 | const debug = require('../../preload-safe-debug')('Ferdium:EditSettingsScreen'); | 46 | const debug = require('../../preload-safe-debug')('Ferdium:EditSettingsScreen'); |
diff --git a/src/containers/settings/EditUserScreen.tsx b/src/containers/settings/EditUserScreen.tsx index 62df170fc..27fe87988 100644 --- a/src/containers/settings/EditUserScreen.tsx +++ b/src/containers/settings/EditUserScreen.tsx | |||
@@ -1,14 +1,14 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
3 | import { IntlShape, defineMessages, injectIntl } from 'react-intl'; | 2 | import { Component, type ReactElement } from 'react'; |
3 | import { type IntlShape, defineMessages, injectIntl } from 'react-intl'; | ||
4 | 4 | ||
5 | import { StoresProps } from '../../@types/ferdium-components.types'; | 5 | import type { StoresProps } from '../../@types/ferdium-components.types'; |
6 | import { FormFields } from '../../@types/mobx-form.types'; | 6 | import type { FormFields } from '../../@types/mobx-form.types'; |
7 | import Form from '../../lib/Form'; | ||
8 | import EditUserForm from '../../components/settings/user/EditUserForm'; | 7 | import EditUserForm from '../../components/settings/user/EditUserForm'; |
9 | import ErrorBoundary from '../../components/util/ErrorBoundary'; | 8 | import ErrorBoundary from '../../components/util/ErrorBoundary'; |
9 | import Form from '../../lib/Form'; | ||
10 | 10 | ||
11 | import { required, email, minLength } from '../../helpers/validation-helpers'; | 11 | import { email, minLength, required } from '../../helpers/validation-helpers'; |
12 | 12 | ||
13 | const messages = defineMessages({ | 13 | const messages = defineMessages({ |
14 | firstname: { | 14 | firstname: { |
diff --git a/src/containers/settings/InviteScreen.tsx b/src/containers/settings/InviteScreen.tsx index c67b892bd..057c36c86 100644 --- a/src/containers/settings/InviteScreen.tsx +++ b/src/containers/settings/InviteScreen.tsx | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Component, ReactNode } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
2 | import { Component, type ReactNode } from 'react'; | ||
3 | 3 | ||
4 | import { StoresProps } from '../../@types/ferdium-components.types'; | 4 | import type { StoresProps } from '../../@types/ferdium-components.types'; |
5 | import Invite from '../../components/auth/Invite'; | 5 | import Invite from '../../components/auth/Invite'; |
6 | import ErrorBoundary from '../../components/util/ErrorBoundary'; | 6 | import ErrorBoundary from '../../components/util/ErrorBoundary'; |
7 | 7 | ||
diff --git a/src/containers/settings/RecipesScreen.tsx b/src/containers/settings/RecipesScreen.tsx index a46510d54..5540b602c 100644 --- a/src/containers/settings/RecipesScreen.tsx +++ b/src/containers/settings/RecipesScreen.tsx | |||
@@ -1,20 +1,20 @@ | |||
1 | import { readJsonSync } from 'fs-extra'; | 1 | import { readJsonSync } from 'fs-extra'; |
2 | import { Component, ReactElement } from 'react'; | 2 | import { type IReactionDisposer, autorun } from 'mobx'; |
3 | import { autorun, IReactionDisposer } from 'mobx'; | ||
4 | import { inject, observer } from 'mobx-react'; | 3 | import { inject, observer } from 'mobx-react'; |
4 | import { Component, type ReactElement } from 'react'; | ||
5 | 5 | ||
6 | import { Params } from 'react-router-dom'; | 6 | import type { Params } from 'react-router-dom'; |
7 | import Recipe from '../../models/Recipe'; | 7 | import type { StoresProps } from '../../@types/ferdium-components.types'; |
8 | import { StoresProps } from '../../@types/ferdium-components.types'; | ||
9 | import RecipesDashboard from '../../components/settings/recipes/RecipesDashboard'; | 8 | import RecipesDashboard from '../../components/settings/recipes/RecipesDashboard'; |
10 | import ErrorBoundary from '../../components/util/ErrorBoundary'; | 9 | import ErrorBoundary from '../../components/util/ErrorBoundary'; |
10 | import withParams from '../../components/util/WithParams'; | ||
11 | import { CUSTOM_WEBSITE_RECIPE_ID, FERDIUM_DEV_DOCS } from '../../config'; | 11 | import { CUSTOM_WEBSITE_RECIPE_ID, FERDIUM_DEV_DOCS } from '../../config'; |
12 | import { userDataRecipesPath } from '../../environment-remote'; | 12 | import { userDataRecipesPath } from '../../environment-remote'; |
13 | import { asarRecipesPath } from '../../helpers/asar-helpers'; | ||
14 | import { communityRecipesStore } from '../../features/communityRecipes'; | 13 | import { communityRecipesStore } from '../../features/communityRecipes'; |
15 | import RecipePreview from '../../models/RecipePreview'; | 14 | import { asarRecipesPath } from '../../helpers/asar-helpers'; |
16 | import { openPath } from '../../helpers/url-helpers'; | 15 | import { openPath } from '../../helpers/url-helpers'; |
17 | import withParams from '../../components/util/WithParams'; | 16 | import type Recipe from '../../models/Recipe'; |
17 | import RecipePreview from '../../models/RecipePreview'; | ||
18 | 18 | ||
19 | interface IProps extends Partial<StoresProps> { | 19 | interface IProps extends Partial<StoresProps> { |
20 | params: Params; | 20 | params: Params; |
diff --git a/src/containers/settings/ReleaseNotesScreen.tsx b/src/containers/settings/ReleaseNotesScreen.tsx index c3014d187..482364817 100644 --- a/src/containers/settings/ReleaseNotesScreen.tsx +++ b/src/containers/settings/ReleaseNotesScreen.tsx | |||
@@ -1,4 +1,4 @@ | |||
1 | import { Component, ReactElement } from 'react'; | 1 | import { Component, type ReactElement } from 'react'; |
2 | 2 | ||
3 | import ReleaseNotes from '../../components/settings/releaseNotes/ReleaseNotesDashboard'; | 3 | import ReleaseNotes from '../../components/settings/releaseNotes/ReleaseNotesDashboard'; |
4 | import ErrorBoundary from '../../components/util/ErrorBoundary'; | 4 | import ErrorBoundary from '../../components/util/ErrorBoundary'; |
diff --git a/src/containers/settings/ReleaseNotesWindow.tsx b/src/containers/settings/ReleaseNotesWindow.tsx index 8215c9f36..a12c821e7 100644 --- a/src/containers/settings/ReleaseNotesWindow.tsx +++ b/src/containers/settings/ReleaseNotesWindow.tsx | |||
@@ -1,9 +1,9 @@ | |||
1 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
2 | import { Component, ReactPortal } from 'react'; | 2 | import { Component, type ReactPortal } from 'react'; |
3 | import ReactDOM from 'react-dom'; | 3 | import ReactDOM from 'react-dom'; |
4 | import { Outlet } from 'react-router-dom'; | 4 | import { Outlet } from 'react-router-dom'; |
5 | 5 | ||
6 | import { StoresProps } from '../../@types/ferdium-components.types'; | 6 | import type { StoresProps } from '../../@types/ferdium-components.types'; |
7 | import Layout from '../../components/settings/releaseNotes/ReleaseNotesLayout'; | 7 | import Layout from '../../components/settings/releaseNotes/ReleaseNotesLayout'; |
8 | import ErrorBoundary from '../../components/util/ErrorBoundary'; | 8 | import ErrorBoundary from '../../components/util/ErrorBoundary'; |
9 | 9 | ||
diff --git a/src/containers/settings/ServicesScreen.tsx b/src/containers/settings/ServicesScreen.tsx index 6b648f038..b8f115e9a 100644 --- a/src/containers/settings/ServicesScreen.tsx +++ b/src/containers/settings/ServicesScreen.tsx | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
3 | import { StoresProps } from '../../@types/ferdium-components.types'; | 2 | import { Component, type ReactElement } from 'react'; |
3 | import type { StoresProps } from '../../@types/ferdium-components.types'; | ||
4 | import ServicesDashboard from '../../components/settings/services/ServicesDashboard'; | 4 | import ServicesDashboard from '../../components/settings/services/ServicesDashboard'; |
5 | import ErrorBoundary from '../../components/util/ErrorBoundary'; | 5 | import ErrorBoundary from '../../components/util/ErrorBoundary'; |
6 | 6 | ||
diff --git a/src/containers/settings/SettingsWindow.tsx b/src/containers/settings/SettingsWindow.tsx index d2cdf3eb3..67d6c8969 100644 --- a/src/containers/settings/SettingsWindow.tsx +++ b/src/containers/settings/SettingsWindow.tsx | |||
@@ -1,10 +1,10 @@ | |||
1 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
2 | import { Component, ReactElement, ReactPortal } from 'react'; | 2 | import { Component, type ReactElement, type ReactPortal } from 'react'; |
3 | import ReactDOM from 'react-dom'; | 3 | import ReactDOM from 'react-dom'; |
4 | import { Outlet } from 'react-router-dom'; | 4 | import { Outlet } from 'react-router-dom'; |
5 | import { StoresProps } from '../../@types/ferdium-components.types'; | 5 | import type { StoresProps } from '../../@types/ferdium-components.types'; |
6 | import Navigation from '../../components/settings/navigation/SettingsNavigation'; | ||
7 | import Layout from '../../components/settings/SettingsLayout'; | 6 | import Layout from '../../components/settings/SettingsLayout'; |
7 | import Navigation from '../../components/settings/navigation/SettingsNavigation'; | ||
8 | import ErrorBoundary from '../../components/util/ErrorBoundary'; | 8 | import ErrorBoundary from '../../components/util/ErrorBoundary'; |
9 | import { workspaceStore } from '../../features/workspaces'; | 9 | import { workspaceStore } from '../../features/workspaces'; |
10 | 10 | ||
diff --git a/src/containers/settings/SupportScreen.tsx b/src/containers/settings/SupportScreen.tsx index c2f25ad8c..4c50869bb 100644 --- a/src/containers/settings/SupportScreen.tsx +++ b/src/containers/settings/SupportScreen.tsx | |||
@@ -1,4 +1,4 @@ | |||
1 | import { Component, ReactElement } from 'react'; | 1 | import { Component, type ReactElement } from 'react'; |
2 | 2 | ||
3 | import SupportFerdium from '../../components/settings/supportFerdium/SupportFerdiumDashboard'; | 3 | import SupportFerdium from '../../components/settings/supportFerdium/SupportFerdiumDashboard'; |
4 | import ErrorBoundary from '../../components/util/ErrorBoundary'; | 4 | import ErrorBoundary from '../../components/util/ErrorBoundary'; |
diff --git a/src/containers/settings/TeamScreen.tsx b/src/containers/settings/TeamScreen.tsx index 9d155f01c..ff2a1fb43 100644 --- a/src/containers/settings/TeamScreen.tsx +++ b/src/containers/settings/TeamScreen.tsx | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
2 | import { Component, type ReactElement } from 'react'; | ||
3 | 3 | ||
4 | import { StoresProps } from '../../@types/ferdium-components.types'; | 4 | import type { StoresProps } from '../../@types/ferdium-components.types'; |
5 | 5 | ||
6 | import TeamDashboard from '../../components/settings/team/TeamDashboard'; | 6 | import TeamDashboard from '../../components/settings/team/TeamDashboard'; |
7 | import ErrorBoundary from '../../components/util/ErrorBoundary'; | 7 | import ErrorBoundary from '../../components/util/ErrorBoundary'; |
diff --git a/src/electron-util.ts b/src/electron-util.ts index 6250366dc..697684232 100644 --- a/src/electron-util.ts +++ b/src/electron-util.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | // Enhanced from: https://github.com/dertieran/electron-util/blob/replace-remote/source/api.js | 1 | // Enhanced from: https://github.com/dertieran/electron-util/blob/replace-remote/source/api.js |
2 | 2 | ||
3 | import { enable, initialize } from '@electron/remote/main'; | ||
3 | import * as electron from 'electron'; | 4 | import * as electron from 'electron'; |
4 | import { initialize, enable } from '@electron/remote/main'; | ||
5 | 5 | ||
6 | export const initializeRemote = (): void => { | 6 | export const initializeRemote = (): void => { |
7 | if (process.type !== 'browser') { | 7 | if (process.type !== 'browser') { |
diff --git a/src/electron/Settings.ts b/src/electron/Settings.ts index 7bb12338e..e15a2e65c 100644 --- a/src/electron/Settings.ts +++ b/src/electron/Settings.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { outputJsonSync, pathExistsSync, readJsonSync } from 'fs-extra'; | ||
1 | import { makeObservable, observable, toJS } from 'mobx'; | 2 | import { makeObservable, observable, toJS } from 'mobx'; |
2 | import { pathExistsSync, outputJsonSync, readJsonSync } from 'fs-extra'; | ||
3 | import { userDataPath } from '../environment-remote'; | 3 | import { userDataPath } from '../environment-remote'; |
4 | 4 | ||
5 | const debug = require('../preload-safe-debug')('Ferdium:Settings'); | 5 | const debug = require('../preload-safe-debug')('Ferdium:Settings'); |
diff --git a/src/electron/deepLinking.ts b/src/electron/deepLinking.ts index 14cb8e5b1..33ec025f7 100644 --- a/src/electron/deepLinking.ts +++ b/src/electron/deepLinking.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { BrowserWindow } from 'electron'; | 1 | import type { BrowserWindow } from 'electron'; |
2 | import { protocolClient } from '../environment-remote'; | 2 | import { protocolClient } from '../environment-remote'; |
3 | 3 | ||
4 | export default function handleDeepLink( | 4 | export default function handleDeepLink( |
diff --git a/src/electron/ipc-api/appIndicator.ts b/src/electron/ipc-api/appIndicator.ts index f4a5ba480..2837a75f0 100644 --- a/src/electron/ipc-api/appIndicator.ts +++ b/src/electron/ipc-api/appIndicator.ts | |||
@@ -1,8 +1,8 @@ | |||
1 | import { join } from 'node:path'; | 1 | import { join } from 'node:path'; |
2 | import { app, ipcMain, BrowserWindow } from 'electron'; | 2 | import { type BrowserWindow, app, ipcMain } from 'electron'; |
3 | import { autorun } from 'mobx'; | 3 | import { autorun } from 'mobx'; |
4 | import { isMac, isWindows, isLinux } from '../../environment'; | 4 | import { isLinux, isMac, isWindows } from '../../environment'; |
5 | import TrayIcon from '../../lib/Tray'; | 5 | import type TrayIcon from '../../lib/Tray'; |
6 | 6 | ||
7 | const INDICATOR_TASKBAR = 'taskbar'; | 7 | const INDICATOR_TASKBAR = 'taskbar'; |
8 | const FILE_EXTENSION = isWindows ? 'ico' : 'png'; | 8 | const FILE_EXTENSION = isWindows ? 'ico' : 'png'; |
diff --git a/src/electron/ipc-api/autoUpdate.ts b/src/electron/ipc-api/autoUpdate.ts index 14214aacb..775daf602 100644 --- a/src/electron/ipc-api/autoUpdate.ts +++ b/src/electron/ipc-api/autoUpdate.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { ipcMain, BrowserWindow } from 'electron'; | 1 | import { BrowserWindow, ipcMain } from 'electron'; |
2 | import { autoUpdater } from 'electron-updater'; | 2 | import { autoUpdater } from 'electron-updater'; |
3 | import { appEvents } from '../..'; | 3 | import { appEvents } from '../..'; |
4 | 4 | ||
diff --git a/src/electron/ipc-api/download.ts b/src/electron/ipc-api/download.ts index 44eec9fc1..d749cb889 100644 --- a/src/electron/ipc-api/download.ts +++ b/src/electron/ipc-api/download.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { PathLike } from 'node:fs'; | 1 | import type { PathLike } from 'node:fs'; |
2 | import { ipcMain, dialog, BrowserWindow } from 'electron'; | 2 | import { BrowserWindow, dialog, ipcMain } from 'electron'; |
3 | import { download } from 'electron-dl'; | 3 | import { download } from 'electron-dl'; |
4 | import { writeFileSync } from 'fs-extra'; | 4 | import { writeFileSync } from 'fs-extra'; |
5 | 5 | ||
diff --git a/src/electron/ipc-api/focusState.ts b/src/electron/ipc-api/focusState.ts index 01aa1a971..bfda92b1e 100644 --- a/src/electron/ipc-api/focusState.ts +++ b/src/electron/ipc-api/focusState.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { BrowserWindow } from 'electron'; | 1 | import type { BrowserWindow } from 'electron'; |
2 | 2 | ||
3 | export default (params: { mainWindow: BrowserWindow }) => { | 3 | export default (params: { mainWindow: BrowserWindow }) => { |
4 | params.mainWindow.on('focus', () => { | 4 | params.mainWindow.on('focus', () => { |
diff --git a/src/electron/ipc-api/index.ts b/src/electron/ipc-api/index.ts index b57a9d881..48c6d142c 100644 --- a/src/electron/ipc-api/index.ts +++ b/src/electron/ipc-api/index.ts | |||
@@ -1,15 +1,15 @@ | |||
1 | import { BrowserWindow } from 'electron'; | 1 | import type { BrowserWindow } from 'electron'; |
2 | import autoUpdate from './autoUpdate'; | 2 | import type TrayIcon from '../../lib/Tray'; |
3 | import settings from './settings'; | ||
4 | import sessionStorage from './sessionStorage'; | ||
5 | import appIndicator from './appIndicator'; | 3 | import appIndicator from './appIndicator'; |
6 | import download from './download'; | 4 | import autoUpdate from './autoUpdate'; |
7 | import processManager from './processManager'; | ||
8 | import localServer from './localServer'; | ||
9 | import languageDetect from './languageDetect'; | ||
10 | import dnd from './dnd'; | 5 | import dnd from './dnd'; |
6 | import download from './download'; | ||
11 | import focusState from './focusState'; | 7 | import focusState from './focusState'; |
12 | import TrayIcon from '../../lib/Tray'; | 8 | import languageDetect from './languageDetect'; |
9 | import localServer from './localServer'; | ||
10 | import processManager from './processManager'; | ||
11 | import sessionStorage from './sessionStorage'; | ||
12 | import settings from './settings'; | ||
13 | 13 | ||
14 | export default (params: { | 14 | export default (params: { |
15 | mainWindow: BrowserWindow; | 15 | mainWindow: BrowserWindow; |
diff --git a/src/electron/ipc-api/localServer.ts b/src/electron/ipc-api/localServer.ts index bcc2f9d78..99c40dfd6 100644 --- a/src/electron/ipc-api/localServer.ts +++ b/src/electron/ipc-api/localServer.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { randomBytes } from 'node:crypto'; | 1 | import { randomBytes } from 'node:crypto'; |
2 | import { createServer } from 'node:net'; | 2 | import { createServer } from 'node:net'; |
3 | import { ipcMain, BrowserWindow } from 'electron'; | 3 | import { type BrowserWindow, ipcMain } from 'electron'; |
4 | import { LOCAL_HOSTNAME, LOCAL_PORT } from '../../config'; | 4 | import { LOCAL_HOSTNAME, LOCAL_PORT } from '../../config'; |
5 | import { userDataPath } from '../../environment-remote'; | 5 | import { userDataPath } from '../../environment-remote'; |
6 | import { server } from '../../internal-server/start'; | 6 | import { server } from '../../internal-server/start'; |
diff --git a/src/electron/ipc-api/processManager.ts b/src/electron/ipc-api/processManager.ts index 96501eeaa..6e9069666 100644 --- a/src/electron/ipc-api/processManager.ts +++ b/src/electron/ipc-api/processManager.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { ipcMain } from 'electron'; | ||
2 | import { openProcessManager } from '@krisdages/electron-process-manager'; | 1 | import { openProcessManager } from '@krisdages/electron-process-manager'; |
2 | import { ipcMain } from 'electron'; | ||
3 | 3 | ||
4 | export default () => { | 4 | export default () => { |
5 | ipcMain.on('openProcessManager', () => { | 5 | ipcMain.on('openProcessManager', () => { |
diff --git a/src/electron/ipc-api/sessionStorage.ts b/src/electron/ipc-api/sessionStorage.ts index 39e84d42b..0f32cd6de 100644 --- a/src/electron/ipc-api/sessionStorage.ts +++ b/src/electron/ipc-api/sessionStorage.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { ipcMain, Session, session } from 'electron'; | 1 | import { type Session, ipcMain, session } from 'electron'; |
2 | 2 | ||
3 | import { TODOS_PARTITION_ID } from '../../config'; | 3 | import { TODOS_PARTITION_ID } from '../../config'; |
4 | 4 | ||
diff --git a/src/electron/ipc-api/settings.ts b/src/electron/ipc-api/settings.ts index 72de6866d..3cc001080 100644 --- a/src/electron/ipc-api/settings.ts +++ b/src/electron/ipc-api/settings.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { ipcMain, BrowserWindow, Settings } from 'electron'; | 1 | import { type BrowserWindow, type Settings, ipcMain } from 'electron'; |
2 | 2 | ||
3 | export default (params: { mainWindow: BrowserWindow; settings: Settings }) => { | 3 | export default (params: { mainWindow: BrowserWindow; settings: Settings }) => { |
4 | ipcMain.on('getAppSettings', (_event, type) => { | 4 | ipcMain.on('getAppSettings', (_event, type) => { |
diff --git a/src/electron/macOSPermissions.ts b/src/electron/macOSPermissions.ts index 2ad3d6cd0..90f0f4028 100644 --- a/src/electron/macOSPermissions.ts +++ b/src/electron/macOSPermissions.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { dirname } from 'node:path'; | 1 | import { dirname } from 'node:path'; |
2 | import { systemPreferences, BrowserWindow, dialog } from 'electron'; | 2 | import { type BrowserWindow, dialog, systemPreferences } from 'electron'; |
3 | import { pathExistsSync, mkdirSync, writeFileSync } from 'fs-extra'; | 3 | import { mkdirSync, pathExistsSync, writeFileSync } from 'fs-extra'; |
4 | import macosVersion from 'macos-version'; | 4 | import macosVersion from 'macos-version'; |
5 | // eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error | 5 | // eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error |
6 | // @ts-ignore | 6 | // @ts-ignore |
diff --git a/src/enforce-macos-app-location.ts b/src/enforce-macos-app-location.ts index 222127acf..298ef4d09 100644 --- a/src/enforce-macos-app-location.ts +++ b/src/enforce-macos-app-location.ts | |||
@@ -1,8 +1,8 @@ | |||
1 | // Enhanced from: https://github.com/dertieran/electron-util/blob/replace-remote/source/enforce-macos-app-location.js | 1 | // Enhanced from: https://github.com/dertieran/electron-util/blob/replace-remote/source/enforce-macos-app-location.js |
2 | 2 | ||
3 | import { api } from './electron-util'; | ||
3 | import { isMac } from './environment'; | 4 | import { isMac } from './environment'; |
4 | import { isDevMode } from './environment-remote'; | 5 | import { isDevMode } from './environment-remote'; |
5 | import { api } from './electron-util'; | ||
6 | 6 | ||
7 | export default function enforceMacOSAppLocation(): void { | 7 | export default function enforceMacOSAppLocation(): void { |
8 | if (isDevMode || !isMac || api.app.isInApplicationsFolder()) { | 8 | if (isDevMode || !isMac || api.app.isInApplicationsFolder()) { |
diff --git a/src/environment-remote.ts b/src/environment-remote.ts index 346a75e97..629131658 100644 --- a/src/environment-remote.ts +++ b/src/environment-remote.ts | |||
@@ -1,16 +1,16 @@ | |||
1 | import { join } from 'node:path'; | 1 | import { join } from 'node:path'; |
2 | import { api as electronApi } from './electron-util'; | ||
3 | import { | 2 | import { |
4 | LIVE_FERDIUM_API, | ||
5 | DEV_FRANZ_API, | ||
6 | LOCAL_API, | ||
7 | LOCAL_API_WEBSITE, | ||
8 | DEV_API_FRANZ_WEBSITE, | 3 | DEV_API_FRANZ_WEBSITE, |
4 | DEV_FRANZ_API, | ||
5 | DEV_WS_API, | ||
9 | LIVE_API_FERDIUM_WEBSITE, | 6 | LIVE_API_FERDIUM_WEBSITE, |
7 | LIVE_FERDIUM_API, | ||
10 | LIVE_WS_API, | 8 | LIVE_WS_API, |
9 | LOCAL_API, | ||
10 | LOCAL_API_WEBSITE, | ||
11 | LOCAL_WS_API, | 11 | LOCAL_WS_API, |
12 | DEV_WS_API, | ||
13 | } from './config'; | 12 | } from './config'; |
13 | import { api as electronApi } from './electron-util'; | ||
14 | import { isWindows } from './environment'; | 14 | import { isWindows } from './environment'; |
15 | 15 | ||
16 | export const { app } = electronApi; | 16 | export const { app } = electronApi; |
diff --git a/src/features/appearance/index.ts b/src/features/appearance/index.ts index 46403275e..049080505 100644 --- a/src/features/appearance/index.ts +++ b/src/features/appearance/index.ts | |||
@@ -3,14 +3,14 @@ import { reaction } from 'mobx'; | |||
3 | import TopBarProgress from 'react-topbar-progress-indicator'; | 3 | import TopBarProgress from 'react-topbar-progress-indicator'; |
4 | 4 | ||
5 | import { pathExistsSync, readFileSync } from 'fs-extra'; | 5 | import { pathExistsSync, readFileSync } from 'fs-extra'; |
6 | import { isWindows, isLinux } from '../../environment'; | ||
7 | import { | 6 | import { |
8 | DEFAULT_APP_SETTINGS, | 7 | DEFAULT_APP_SETTINGS, |
9 | iconSizeBias, | ||
10 | SIDEBAR_SERVICES_LOCATION_TOPLEFT, | ||
11 | SIDEBAR_SERVICES_LOCATION_CENTER, | ||
12 | SIDEBAR_SERVICES_LOCATION_BOTTOMRIGHT, | 8 | SIDEBAR_SERVICES_LOCATION_BOTTOMRIGHT, |
9 | SIDEBAR_SERVICES_LOCATION_CENTER, | ||
10 | SIDEBAR_SERVICES_LOCATION_TOPLEFT, | ||
11 | iconSizeBias, | ||
13 | } from '../../config'; | 12 | } from '../../config'; |
13 | import { isLinux, isWindows } from '../../environment'; | ||
14 | import { userDataPath } from '../../environment-remote'; | 14 | import { userDataPath } from '../../environment-remote'; |
15 | 15 | ||
16 | const STYLE_ELEMENT_ID = 'custom-appearance-style'; | 16 | const STYLE_ELEMENT_ID = 'custom-appearance-style'; |
diff --git a/src/features/basicAuth/Component.tsx b/src/features/basicAuth/Component.tsx index e20f7641b..7c901344d 100644 --- a/src/features/basicAuth/Component.tsx +++ b/src/features/basicAuth/Component.tsx | |||
@@ -1,17 +1,21 @@ | |||
1 | import { Component, FormEvent, ReactElement } from 'react'; | ||
2 | import injectSheet, { WithStylesProps } from 'react-jss'; | ||
3 | import { observer } from 'mobx-react'; | ||
4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
5 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
6 | import { noop } from 'lodash'; | 2 | import { noop } from 'lodash'; |
3 | import { observer } from 'mobx-react'; | ||
4 | import { Component, type FormEvent, type ReactElement } from 'react'; | ||
5 | import { | ||
6 | type WrappedComponentProps, | ||
7 | defineMessages, | ||
8 | injectIntl, | ||
9 | } from 'react-intl'; | ||
10 | import injectSheet, { type WithStylesProps } from 'react-jss'; | ||
7 | import Modal from '../../components/ui/Modal'; | 11 | import Modal from '../../components/ui/Modal'; |
8 | import Input from '../../components/ui/input/index'; | ||
9 | import Button from '../../components/ui/button'; | 12 | import Button from '../../components/ui/button'; |
10 | import { state, resetState, sendCredentials, cancelLogin } from './store'; | 13 | import { H1 } from '../../components/ui/headline'; |
14 | import Input from '../../components/ui/input/index'; | ||
15 | import globalMessages from '../../i18n/globalMessages'; | ||
11 | import Form from './Form'; | 16 | import Form from './Form'; |
17 | import { cancelLogin, resetState, sendCredentials, state } from './store'; | ||
12 | import styles from './styles'; | 18 | import styles from './styles'; |
13 | import globalMessages from '../../i18n/globalMessages'; | ||
14 | import { H1 } from '../../components/ui/headline'; | ||
15 | 19 | ||
16 | const messages = defineMessages({ | 20 | const messages = defineMessages({ |
17 | signIn: { | 21 | signIn: { |
diff --git a/src/features/basicAuth/index.ts b/src/features/basicAuth/index.ts index ae698cba8..bedb57309 100644 --- a/src/features/basicAuth/index.ts +++ b/src/features/basicAuth/index.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { AuthInfo, BrowserWindow, ipcRenderer } from 'electron'; | 1 | import { type AuthInfo, type BrowserWindow, ipcRenderer } from 'electron'; |
2 | 2 | ||
3 | import { state as ModalState } from './store'; | 3 | import { state as ModalState } from './store'; |
4 | 4 | ||
diff --git a/src/features/basicAuth/mainIpcHandler.ts b/src/features/basicAuth/mainIpcHandler.ts index d9cedc974..d46657748 100644 --- a/src/features/basicAuth/mainIpcHandler.ts +++ b/src/features/basicAuth/mainIpcHandler.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { BrowserWindow } from 'electron'; | 1 | import type { BrowserWindow } from 'electron'; |
2 | 2 | ||
3 | const debug = require('../../preload-safe-debug')( | 3 | const debug = require('../../preload-safe-debug')( |
4 | 'Ferdium:feature:basicAuth:main', | 4 | 'Ferdium:feature:basicAuth:main', |
diff --git a/src/features/basicAuth/store.ts b/src/features/basicAuth/store.ts index 0fc289916..489eac087 100644 --- a/src/features/basicAuth/store.ts +++ b/src/features/basicAuth/store.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { observable } from 'mobx'; | ||
2 | import { ipcRenderer } from 'electron'; | 1 | import { ipcRenderer } from 'electron'; |
2 | import { observable } from 'mobx'; | ||
3 | 3 | ||
4 | const debug = require('../../preload-safe-debug')('Ferdium:feature:basicAuth'); | 4 | const debug = require('../../preload-safe-debug')('Ferdium:feature:basicAuth'); |
5 | 5 | ||
diff --git a/src/features/publishDebugInfo/Component.tsx b/src/features/publishDebugInfo/Component.tsx index 3c6729ba0..8b38ba5af 100644 --- a/src/features/publishDebugInfo/Component.tsx +++ b/src/features/publishDebugInfo/Component.tsx | |||
@@ -1,15 +1,19 @@ | |||
1 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
2 | import { Component, ReactElement } from 'react'; | 2 | import { Component, type ReactElement } from 'react'; |
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 3 | import { |
4 | import withStyles, { WithStylesProps } from 'react-jss'; | 4 | type WrappedComponentProps, |
5 | import { StoresProps } from '../../@types/ferdium-components.types'; | 5 | defineMessages, |
6 | import { state as ModalState } from './store'; | 6 | injectIntl, |
7 | import { H1 } from '../../components/ui/headline'; | 7 | } from 'react-intl'; |
8 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
9 | import type { StoresProps } from '../../@types/ferdium-components.types'; | ||
8 | import { sendAuthRequest } from '../../api/utils/auth'; | 10 | import { sendAuthRequest } from '../../api/utils/auth'; |
11 | import Modal from '../../components/ui/Modal'; | ||
9 | import Button from '../../components/ui/button'; | 12 | import Button from '../../components/ui/button'; |
13 | import { H1 } from '../../components/ui/headline'; | ||
10 | import Input from '../../components/ui/input/index'; | 14 | import Input from '../../components/ui/input/index'; |
11 | import Modal from '../../components/ui/Modal'; | ||
12 | import { DEBUG_API } from '../../config'; | 15 | import { DEBUG_API } from '../../config'; |
16 | import { state as ModalState } from './store'; | ||
13 | 17 | ||
14 | const debug = require('../../preload-safe-debug')( | 18 | const debug = require('../../preload-safe-debug')( |
15 | 'Ferdium:feature:publishDebugInfo', | 19 | 'Ferdium:feature:publishDebugInfo', |
diff --git a/src/features/quickSwitch/Component.tsx b/src/features/quickSwitch/Component.tsx index 7f6ad6432..a5c102386 100644 --- a/src/features/quickSwitch/Component.tsx +++ b/src/features/quickSwitch/Component.tsx | |||
@@ -1,15 +1,24 @@ | |||
1 | import { ChangeEvent, Component, createRef, ReactElement } from 'react'; | ||
2 | import { getCurrentWindow } from '@electron/remote'; | 1 | import { getCurrentWindow } from '@electron/remote'; |
3 | import { observer, inject } from 'mobx-react'; | ||
4 | import { reaction } from 'mobx'; | ||
5 | import withStyles, { WithStylesProps } from 'react-jss'; | ||
6 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
7 | import { compact, invoke, noop } from 'lodash'; | 2 | import { compact, invoke, noop } from 'lodash'; |
8 | import { StoresProps } from '../../@types/ferdium-components.types'; | 3 | import { reaction } from 'mobx'; |
9 | import Service from '../../models/Service'; | 4 | import { inject, observer } from 'mobx-react'; |
10 | import Input from '../../components/ui/input/index'; | 5 | import { |
11 | import { H1 } from '../../components/ui/headline'; | 6 | type ChangeEvent, |
7 | Component, | ||
8 | type ReactElement, | ||
9 | createRef, | ||
10 | } from 'react'; | ||
11 | import { | ||
12 | type WrappedComponentProps, | ||
13 | defineMessages, | ||
14 | injectIntl, | ||
15 | } from 'react-intl'; | ||
16 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
17 | import type { StoresProps } from '../../@types/ferdium-components.types'; | ||
12 | import Modal from '../../components/ui/Modal'; | 18 | import Modal from '../../components/ui/Modal'; |
19 | import { H1 } from '../../components/ui/headline'; | ||
20 | import Input from '../../components/ui/input/index'; | ||
21 | import type Service from '../../models/Service'; | ||
13 | import { state as ModalState } from './store'; | 22 | import { state as ModalState } from './store'; |
14 | 23 | ||
15 | const messages = defineMessages({ | 24 | const messages = defineMessages({ |
diff --git a/src/features/serviceProxy/index.ts b/src/features/serviceProxy/index.ts index c98ae00a7..68415c31e 100644 --- a/src/features/serviceProxy/index.ts +++ b/src/features/serviceProxy/index.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { autorun, action, observable } from 'mobx'; | ||
2 | import { session } from '@electron/remote'; | 1 | import { session } from '@electron/remote'; |
2 | import { action, autorun, observable } from 'mobx'; | ||
3 | 3 | ||
4 | const debug = require('../../preload-safe-debug')( | 4 | const debug = require('../../preload-safe-debug')( |
5 | 'Ferdium:feature:serviceProxy', | 5 | 'Ferdium:feature:serviceProxy', |
diff --git a/src/features/todos/actions.ts b/src/features/todos/actions.ts index 5273cc858..c2000752f 100644 --- a/src/features/todos/actions.ts +++ b/src/features/todos/actions.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Webview } from 'react-electron-web-view'; | ||
2 | import PropTypes from 'prop-types'; | 1 | import PropTypes from 'prop-types'; |
2 | import type { Webview } from 'react-electron-web-view'; | ||
3 | import { createActionsFromDefinitions } from '../../actions/lib/actions'; | 3 | import { createActionsFromDefinitions } from '../../actions/lib/actions'; |
4 | 4 | ||
5 | export interface TodoClientMessage { | 5 | export interface TodoClientMessage { |
diff --git a/src/features/todos/components/TodosWebview.tsx b/src/features/todos/components/TodosWebview.tsx index 1ccfa3cdd..f9493d519 100644 --- a/src/features/todos/components/TodosWebview.tsx +++ b/src/features/todos/components/TodosWebview.tsx | |||
@@ -1,10 +1,15 @@ | |||
1 | import { Component, createRef, ReactElement, MouseEvent } from 'react'; | 1 | import classnames from 'classnames'; |
2 | import { observer } from 'mobx-react'; | 2 | import { observer } from 'mobx-react'; |
3 | import withStyles, { WithStylesProps } from 'react-jss'; | 3 | import { |
4 | Component, | ||
5 | type MouseEvent, | ||
6 | type ReactElement, | ||
7 | createRef, | ||
8 | } from 'react'; | ||
4 | import Webview from 'react-electron-web-view'; | 9 | import Webview from 'react-electron-web-view'; |
5 | import classnames from 'classnames'; | 10 | import withStyles, { type WithStylesProps } from 'react-jss'; |
6 | import { TODOS_PARTITION_ID } from '../../../config'; | 11 | import { TODOS_PARTITION_ID } from '../../../config'; |
7 | import { TodoClientMessage } from '../actions'; | 12 | import type { TodoClientMessage } from '../actions'; |
8 | 13 | ||
9 | const styles = theme => ({ | 14 | const styles = theme => ({ |
10 | root: { | 15 | root: { |
diff --git a/src/features/todos/containers/TodosScreen.tsx b/src/features/todos/containers/TodosScreen.tsx index 8941a4b39..29ecd5a0e 100644 --- a/src/features/todos/containers/TodosScreen.tsx +++ b/src/features/todos/containers/TodosScreen.tsx | |||
@@ -1,11 +1,11 @@ | |||
1 | import { Component, ReactElement } from 'react'; | 1 | import { inject, observer } from 'mobx-react'; |
2 | import { observer, inject } from 'mobx-react'; | 2 | import { Component, type ReactElement } from 'react'; |
3 | import TodosWebview from '../components/TodosWebview'; | ||
4 | import ErrorBoundary from '../../../components/util/ErrorBoundary'; | ||
5 | import { todosStore } from '..'; | 3 | import { todosStore } from '..'; |
4 | import ErrorBoundary from '../../../components/util/ErrorBoundary'; | ||
6 | import { TODOS_MIN_WIDTH } from '../../../config'; | 5 | import { TODOS_MIN_WIDTH } from '../../../config'; |
6 | import type { RealStores } from '../../../stores'; | ||
7 | import { todoActions } from '../actions'; | 7 | import { todoActions } from '../actions'; |
8 | import { RealStores } from '../../../stores'; | 8 | import TodosWebview from '../components/TodosWebview'; |
9 | 9 | ||
10 | interface IProps { | 10 | interface IProps { |
11 | stores?: RealStores; | 11 | stores?: RealStores; |
diff --git a/src/features/todos/store.ts b/src/features/todos/store.ts index 50704c73f..b3f7195e7 100644 --- a/src/features/todos/store.ts +++ b/src/features/todos/store.ts | |||
@@ -1,25 +1,26 @@ | |||
1 | import { Webview } from 'react-electron-web-view'; | 1 | import { action, computed, makeObservable, observable } from 'mobx'; |
2 | import { computed, action, observable, makeObservable } from 'mobx'; | ||
3 | import localStorage from 'mobx-localstorage'; | 2 | import localStorage from 'mobx-localstorage'; |
4 | import { Actions } from '../../actions/lib/actions'; | 3 | import type { Webview } from 'react-electron-web-view'; |
4 | import type { Actions } from '../../actions/lib/actions'; | ||
5 | 5 | ||
6 | import { ThemeType } from '../../themes'; | ||
7 | import { todoActions } from './actions'; | ||
8 | import { | 6 | import { |
9 | CUSTOM_TODO_SERVICE, | 7 | CUSTOM_TODO_SERVICE, |
10 | TODO_SERVICE_RECIPE_IDS, | 8 | DEFAULT_IS_TODO_FEATURE_ENABLED_BY_USER, |
9 | DEFAULT_TODOS_VISIBLE, | ||
11 | DEFAULT_TODOS_WIDTH, | 10 | DEFAULT_TODOS_WIDTH, |
12 | TODOS_MIN_WIDTH, | 11 | TODOS_MIN_WIDTH, |
13 | DEFAULT_TODOS_VISIBLE, | 12 | TODO_SERVICE_RECIPE_IDS, |
14 | DEFAULT_IS_TODO_FEATURE_ENABLED_BY_USER, | ||
15 | } from '../../config'; | 13 | } from '../../config'; |
16 | import { isValidExternalURL } from '../../helpers/url-helpers'; | 14 | import { isValidExternalURL } from '../../helpers/url-helpers'; |
17 | import FeatureStore from '../utils/FeatureStore'; | 15 | import { ifUndefined } from '../../jsUtils'; |
18 | import Reaction, { createReactions } from '../../stores/lib/Reaction'; | 16 | import UserAgent from '../../models/UserAgent'; |
17 | import type Reaction from '../../stores/lib/Reaction'; | ||
18 | import { createReactions } from '../../stores/lib/Reaction'; | ||
19 | import { ThemeType } from '../../themes'; | ||
19 | import { createActionBindings } from '../utils/ActionBinding'; | 20 | import { createActionBindings } from '../utils/ActionBinding'; |
21 | import FeatureStore from '../utils/FeatureStore'; | ||
22 | import { todoActions } from './actions'; | ||
20 | import { IPC, TODOS_ROUTES } from './constants'; | 23 | import { IPC, TODOS_ROUTES } from './constants'; |
21 | import UserAgent from '../../models/UserAgent'; | ||
22 | import { ifUndefined } from '../../jsUtils'; | ||
23 | 24 | ||
24 | const debug = require('../../preload-safe-debug')( | 25 | const debug = require('../../preload-safe-debug')( |
25 | 'Ferdium:feature:todos:store', | 26 | 'Ferdium:feature:todos:store', |
diff --git a/src/features/utils/FeatureStore.ts b/src/features/utils/FeatureStore.ts index 2bdd167f3..df82a7bd0 100644 --- a/src/features/utils/FeatureStore.ts +++ b/src/features/utils/FeatureStore.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import Reaction from '../../stores/lib/Reaction'; | 1 | import type Reaction from '../../stores/lib/Reaction'; |
2 | 2 | ||
3 | export default class FeatureStore { | 3 | export default class FeatureStore { |
4 | _actions: any = []; | 4 | _actions: any = []; |
diff --git a/src/features/webControls/components/WebControls.tsx b/src/features/webControls/components/WebControls.tsx index 54f45c843..aee568a7d 100644 --- a/src/features/webControls/components/WebControls.tsx +++ b/src/features/webControls/components/WebControls.tsx | |||
@@ -1,14 +1,18 @@ | |||
1 | import { createRef, Component, ReactElement, RefObject } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import withStyles, { WithStylesProps } from 'react-jss'; | ||
4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
5 | import { | 1 | import { |
6 | mdiReload, | ||
7 | mdiArrowRight, | ||
8 | mdiArrowLeft, | 2 | mdiArrowLeft, |
9 | mdiHomeOutline, | 3 | mdiArrowRight, |
10 | mdiEarth, | 4 | mdiEarth, |
5 | mdiHomeOutline, | ||
6 | mdiReload, | ||
11 | } from '@mdi/js'; | 7 | } from '@mdi/js'; |
8 | import { observer } from 'mobx-react'; | ||
9 | import { Component, type ReactElement, type RefObject, createRef } from 'react'; | ||
10 | import { | ||
11 | type WrappedComponentProps, | ||
12 | defineMessages, | ||
13 | injectIntl, | ||
14 | } from 'react-intl'; | ||
15 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
12 | import { Tooltip as ReactTooltip } from 'react-tooltip'; | 16 | import { Tooltip as ReactTooltip } from 'react-tooltip'; |
13 | import Icon from '../../../components/ui/icon'; | 17 | import Icon from '../../../components/ui/icon'; |
14 | 18 | ||
diff --git a/src/features/webControls/containers/WebControlsScreen.tsx b/src/features/webControls/containers/WebControlsScreen.tsx index f6f1cddb8..b492264bf 100644 --- a/src/features/webControls/containers/WebControlsScreen.tsx +++ b/src/features/webControls/containers/WebControlsScreen.tsx | |||
@@ -1,17 +1,17 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { observer, inject } from 'mobx-react'; | ||
3 | import { | 1 | import { |
4 | autorun, | 2 | type IReactionDisposer, |
5 | action, | 3 | action, |
4 | autorun, | ||
6 | makeObservable, | 5 | makeObservable, |
7 | observable, | 6 | observable, |
8 | IReactionDisposer, | ||
9 | } from 'mobx'; | 7 | } from 'mobx'; |
10 | import ElectronWebView from 'react-electron-web-view'; | 8 | import { inject, observer } from 'mobx-react'; |
11 | import WebControls from '../components/WebControls'; | 9 | import { Component, type ReactElement } from 'react'; |
12 | import Service from '../../../models/Service'; | 10 | import type ElectronWebView from 'react-electron-web-view'; |
11 | import type { StoresProps } from '../../../@types/ferdium-components.types'; | ||
13 | import { SEARCH_ENGINE_URLS } from '../../../config'; | 12 | import { SEARCH_ENGINE_URLS } from '../../../config'; |
14 | import { StoresProps } from '../../../@types/ferdium-components.types'; | 13 | import type Service from '../../../models/Service'; |
14 | import WebControls from '../components/WebControls'; | ||
15 | 15 | ||
16 | const URL_EVENTS = [ | 16 | const URL_EVENTS = [ |
17 | 'load-commit', | 17 | 'load-commit', |
diff --git a/src/features/workspaces/actions.ts b/src/features/workspaces/actions.ts index cfe4f9e8e..7970c042c 100644 --- a/src/features/workspaces/actions.ts +++ b/src/features/workspaces/actions.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import PropTypes from 'prop-types'; | 1 | import PropTypes from 'prop-types'; |
2 | import Workspace from './models/Workspace'; | ||
3 | import { createActionsFromDefinitions } from '../../actions/lib/actions'; | 2 | import { createActionsFromDefinitions } from '../../actions/lib/actions'; |
3 | import Workspace from './models/Workspace'; | ||
4 | 4 | ||
5 | type WorkspaceArg = { workspace: Workspace }; | 5 | type WorkspaceArg = { workspace: Workspace }; |
6 | 6 | ||
diff --git a/src/features/workspaces/api.ts b/src/features/workspaces/api.ts index b8bb703cd..6ae71a930 100644 --- a/src/features/workspaces/api.ts +++ b/src/features/workspaces/api.ts | |||
@@ -1,8 +1,8 @@ | |||
1 | import { pick } from 'lodash'; | 1 | import { pick } from 'lodash'; |
2 | import apiBase from '../../api/apiBase'; | ||
2 | import { sendAuthRequest } from '../../api/utils/auth'; | 3 | import { sendAuthRequest } from '../../api/utils/auth'; |
3 | import Request from '../../stores/lib/Request'; | 4 | import Request from '../../stores/lib/Request'; |
4 | import Workspace from './models/Workspace'; | 5 | import Workspace from './models/Workspace'; |
5 | import apiBase from '../../api/apiBase'; | ||
6 | 6 | ||
7 | const debug = require('../../preload-safe-debug')( | 7 | const debug = require('../../preload-safe-debug')( |
8 | 'Ferdium:feature:workspaces:api', | 8 | 'Ferdium:feature:workspaces:api', |
diff --git a/src/features/workspaces/components/CreateWorkspaceForm.tsx b/src/features/workspaces/components/CreateWorkspaceForm.tsx index b72052fe2..0c365564a 100644 --- a/src/features/workspaces/components/CreateWorkspaceForm.tsx +++ b/src/features/workspaces/components/CreateWorkspaceForm.tsx | |||
@@ -1,11 +1,15 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | 1 | import { observer } from 'mobx-react'; |
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 2 | import { Component, type ReactElement } from 'react'; |
4 | import withStyles, { WithStylesProps } from 'react-jss'; | 3 | import { |
5 | import Input from '../../../components/ui/input/index'; | 4 | type WrappedComponentProps, |
5 | defineMessages, | ||
6 | injectIntl, | ||
7 | } from 'react-intl'; | ||
8 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
6 | import Button from '../../../components/ui/button'; | 9 | import Button from '../../../components/ui/button'; |
7 | import Form from '../../../lib/Form'; | 10 | import Input from '../../../components/ui/input/index'; |
8 | import { required } from '../../../helpers/validation-helpers'; | 11 | import { required } from '../../../helpers/validation-helpers'; |
12 | import Form from '../../../lib/Form'; | ||
9 | import { workspaceStore } from '../index'; | 13 | import { workspaceStore } from '../index'; |
10 | 14 | ||
11 | const messages = defineMessages({ | 15 | const messages = defineMessages({ |
diff --git a/src/features/workspaces/components/EditWorkspaceForm.tsx b/src/features/workspaces/components/EditWorkspaceForm.tsx index d902d29be..18e7c251e 100644 --- a/src/features/workspaces/components/EditWorkspaceForm.tsx +++ b/src/features/workspaces/components/EditWorkspaceForm.tsx | |||
@@ -1,21 +1,25 @@ | |||
1 | import { Component, ReactElement } from 'react'; | 1 | import { noop } from 'lodash'; |
2 | import { observer } from 'mobx-react'; | 2 | import { observer } from 'mobx-react'; |
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 3 | import { Component, type ReactElement } from 'react'; |
4 | import { | ||
5 | type WrappedComponentProps, | ||
6 | defineMessages, | ||
7 | injectIntl, | ||
8 | } from 'react-intl'; | ||
9 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
4 | import { Link } from 'react-router-dom'; | 10 | import { Link } from 'react-router-dom'; |
5 | import withStyles, { WithStylesProps } from 'react-jss'; | 11 | import Button from '../../../components/ui/button'; |
6 | import { noop } from 'lodash'; | 12 | import { H2 } from '../../../components/ui/headline'; |
7 | import Infobox from '../../../components/ui/infobox/index'; | 13 | import Infobox from '../../../components/ui/infobox/index'; |
8 | import Input from '../../../components/ui/input'; | 14 | import Input from '../../../components/ui/input'; |
9 | import Button from '../../../components/ui/button'; | 15 | import Toggle from '../../../components/ui/toggle'; |
10 | import Workspace from '../models/Workspace'; | 16 | import { KEEP_WS_LOADED_USID } from '../../../config'; |
11 | import Service from '../../../models/Service'; | ||
12 | import Form from '../../../lib/Form'; | ||
13 | import { required } from '../../../helpers/validation-helpers'; | 17 | import { required } from '../../../helpers/validation-helpers'; |
18 | import Form from '../../../lib/Form'; | ||
19 | import type Service from '../../../models/Service'; | ||
20 | import type Request from '../../../stores/lib/Request'; | ||
21 | import type Workspace from '../models/Workspace'; | ||
14 | import WorkspaceServiceListItem from './WorkspaceServiceListItem'; | 22 | import WorkspaceServiceListItem from './WorkspaceServiceListItem'; |
15 | import Request from '../../../stores/lib/Request'; | ||
16 | import { KEEP_WS_LOADED_USID } from '../../../config'; | ||
17 | import Toggle from '../../../components/ui/toggle'; | ||
18 | import { H2 } from '../../../components/ui/headline'; | ||
19 | 23 | ||
20 | const messages = defineMessages({ | 24 | const messages = defineMessages({ |
21 | buttonDelete: { | 25 | buttonDelete: { |
diff --git a/src/features/workspaces/components/WorkspaceDrawer.tsx b/src/features/workspaces/components/WorkspaceDrawer.tsx index 3e05cb7de..2826b741a 100644 --- a/src/features/workspaces/components/WorkspaceDrawer.tsx +++ b/src/features/workspaces/components/WorkspaceDrawer.tsx | |||
@@ -1,17 +1,21 @@ | |||
1 | import { Component, ReactElement } from 'react'; | 1 | import { mdiCog, mdiPlusBox } from '@mdi/js'; |
2 | import { noop } from 'lodash'; | ||
2 | import { observer } from 'mobx-react'; | 3 | import { observer } from 'mobx-react'; |
3 | import withStyles, { WithStylesProps } from 'react-jss'; | 4 | import { Component, type ReactElement } from 'react'; |
4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 5 | import { |
6 | type WrappedComponentProps, | ||
7 | defineMessages, | ||
8 | injectIntl, | ||
9 | } from 'react-intl'; | ||
10 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
5 | import { Tooltip as ReactTooltip } from 'react-tooltip'; | 11 | import { Tooltip as ReactTooltip } from 'react-tooltip'; |
6 | import { mdiPlusBox, mdiCog } from '@mdi/js'; | ||
7 | import { noop } from 'lodash'; | ||
8 | import { H1 } from '../../../components/ui/headline'; | 12 | import { H1 } from '../../../components/ui/headline'; |
9 | import Icon from '../../../components/ui/icon'; | 13 | import Icon from '../../../components/ui/icon'; |
10 | import WorkspaceDrawerItem from './WorkspaceDrawerItem'; | ||
11 | import workspaceActions from '../actions'; | 14 | import workspaceActions from '../actions'; |
12 | import { workspaceStore } from '../index'; | ||
13 | import { getUserWorkspacesRequest } from '../api'; | 15 | import { getUserWorkspacesRequest } from '../api'; |
14 | import Workspace from '../models/Workspace'; | 16 | import { workspaceStore } from '../index'; |
17 | import type Workspace from '../models/Workspace'; | ||
18 | import WorkspaceDrawerItem from './WorkspaceDrawerItem'; | ||
15 | 19 | ||
16 | const messages = defineMessages({ | 20 | const messages = defineMessages({ |
17 | headline: { | 21 | headline: { |
diff --git a/src/features/workspaces/components/WorkspaceDrawerItem.tsx b/src/features/workspaces/components/WorkspaceDrawerItem.tsx index 85ed4c38c..1e4b57dba 100644 --- a/src/features/workspaces/components/WorkspaceDrawerItem.tsx +++ b/src/features/workspaces/components/WorkspaceDrawerItem.tsx | |||
@@ -1,11 +1,15 @@ | |||
1 | import { Component, MouseEventHandler, ReactElement } from 'react'; | 1 | import { Menu } from '@electron/remote'; |
2 | import { observer } from 'mobx-react'; | ||
3 | import withStyles, { WithStylesProps } from 'react-jss'; | ||
4 | import classnames from 'classnames'; | 2 | import classnames from 'classnames'; |
5 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 3 | import type { MenuItemConstructorOptions } from 'electron'; |
6 | import { noop } from 'lodash'; | 4 | import { noop } from 'lodash'; |
7 | import { Menu } from '@electron/remote'; | 5 | import { observer } from 'mobx-react'; |
8 | import { MenuItemConstructorOptions } from 'electron'; | 6 | import { Component, type MouseEventHandler, type ReactElement } from 'react'; |
7 | import { | ||
8 | type WrappedComponentProps, | ||
9 | defineMessages, | ||
10 | injectIntl, | ||
11 | } from 'react-intl'; | ||
12 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
9 | import { altKey, cmdOrCtrlShortcutKey } from '../../../environment'; | 13 | import { altKey, cmdOrCtrlShortcutKey } from '../../../environment'; |
10 | import { acceleratorString } from '../../../jsUtils'; | 14 | import { acceleratorString } from '../../../jsUtils'; |
11 | 15 | ||
diff --git a/src/features/workspaces/components/WorkspaceItem.tsx b/src/features/workspaces/components/WorkspaceItem.tsx index 36c6ed2f5..f24e6a85d 100644 --- a/src/features/workspaces/components/WorkspaceItem.tsx +++ b/src/features/workspaces/components/WorkspaceItem.tsx | |||
@@ -1,8 +1,8 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import withStyles, { WithStylesProps } from 'react-jss'; | ||
4 | import { noop } from 'lodash'; | 1 | import { noop } from 'lodash'; |
5 | import Workspace from '../models/Workspace'; | 2 | import { observer } from 'mobx-react'; |
3 | import { Component, type ReactElement } from 'react'; | ||
4 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
5 | import type Workspace from '../models/Workspace'; | ||
6 | 6 | ||
7 | const styles = theme => ({ | 7 | const styles = theme => ({ |
8 | row: { | 8 | row: { |
diff --git a/src/features/workspaces/components/WorkspaceServiceListItem.tsx b/src/features/workspaces/components/WorkspaceServiceListItem.tsx index 9034be37c..6f61f8a51 100644 --- a/src/features/workspaces/components/WorkspaceServiceListItem.tsx +++ b/src/features/workspaces/components/WorkspaceServiceListItem.tsx | |||
@@ -1,11 +1,11 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import withStyles, { WithStylesProps } from 'react-jss'; | ||
4 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
5 | import { noop } from 'lodash'; | 2 | import { noop } from 'lodash'; |
6 | import Toggle from '../../../components/ui/toggle'; | 3 | import { observer } from 'mobx-react'; |
4 | import { Component, type ReactElement } from 'react'; | ||
5 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
7 | import ServiceIcon from '../../../components/ui/ServiceIcon'; | 6 | import ServiceIcon from '../../../components/ui/ServiceIcon'; |
8 | import Service from '../../../models/Service'; | 7 | import Toggle from '../../../components/ui/toggle'; |
8 | import type Service from '../../../models/Service'; | ||
9 | 9 | ||
10 | const styles = theme => ({ | 10 | const styles = theme => ({ |
11 | listItem: { | 11 | listItem: { |
diff --git a/src/features/workspaces/components/WorkspaceSwitchingIndicator.tsx b/src/features/workspaces/components/WorkspaceSwitchingIndicator.tsx index 19dd9037d..7fddd8553 100644 --- a/src/features/workspaces/components/WorkspaceSwitchingIndicator.tsx +++ b/src/features/workspaces/components/WorkspaceSwitchingIndicator.tsx | |||
@@ -1,11 +1,15 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import withStyles, { WithStylesProps } from 'react-jss'; | ||
4 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
5 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 2 | import { observer } from 'mobx-react'; |
3 | import { Component, type ReactElement } from 'react'; | ||
4 | import { | ||
5 | type WrappedComponentProps, | ||
6 | defineMessages, | ||
7 | injectIntl, | ||
8 | } from 'react-intl'; | ||
9 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
6 | import Loader from '../../../components/ui/loader'; | 10 | import Loader from '../../../components/ui/loader'; |
7 | import { workspaceStore } from '../index'; | ||
8 | import { DEFAULT_LOADER_COLOR } from '../../../config'; | 11 | import { DEFAULT_LOADER_COLOR } from '../../../config'; |
12 | import { workspaceStore } from '../index'; | ||
9 | 13 | ||
10 | const messages = defineMessages({ | 14 | const messages = defineMessages({ |
11 | switchingTo: { | 15 | switchingTo: { |
diff --git a/src/features/workspaces/components/WorkspacesDashboard.tsx b/src/features/workspaces/components/WorkspacesDashboard.tsx index 0a417bffd..8fb2cf923 100644 --- a/src/features/workspaces/components/WorkspacesDashboard.tsx +++ b/src/features/workspaces/components/WorkspacesDashboard.tsx | |||
@@ -1,15 +1,19 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | 1 | import { observer } from 'mobx-react'; |
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 2 | import { Component, type ReactElement } from 'react'; |
4 | import withStyles, { WithStylesProps } from 'react-jss'; | 3 | import { |
4 | type WrappedComponentProps, | ||
5 | defineMessages, | ||
6 | injectIntl, | ||
7 | } from 'react-intl'; | ||
8 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
9 | import Appear from '../../../components/ui/effects/Appear'; | ||
10 | import { H1 } from '../../../components/ui/headline'; | ||
5 | import Infobox from '../../../components/ui/infobox/index'; | 11 | import Infobox from '../../../components/ui/infobox/index'; |
6 | import Loader from '../../../components/ui/loader'; | 12 | import Loader from '../../../components/ui/loader'; |
7 | import WorkspaceItem from './WorkspaceItem'; | 13 | import type Request from '../../../stores/lib/Request'; |
14 | import type Workspace from '../models/Workspace'; | ||
8 | import CreateWorkspaceForm from './CreateWorkspaceForm'; | 15 | import CreateWorkspaceForm from './CreateWorkspaceForm'; |
9 | import Request from '../../../stores/lib/Request'; | 16 | import WorkspaceItem from './WorkspaceItem'; |
10 | import Appear from '../../../components/ui/effects/Appear'; | ||
11 | import { H1 } from '../../../components/ui/headline'; | ||
12 | import Workspace from '../models/Workspace'; | ||
13 | 17 | ||
14 | const messages = defineMessages({ | 18 | const messages = defineMessages({ |
15 | headline: { | 19 | headline: { |
diff --git a/src/features/workspaces/containers/EditWorkspaceScreen.tsx b/src/features/workspaces/containers/EditWorkspaceScreen.tsx index abc747c33..92450d685 100644 --- a/src/features/workspaces/containers/EditWorkspaceScreen.tsx +++ b/src/features/workspaces/containers/EditWorkspaceScreen.tsx | |||
@@ -1,12 +1,12 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
2 | import { Component } from 'react'; | ||
3 | 3 | ||
4 | import { StoresProps } from '../../../@types/ferdium-components.types'; | 4 | import type { StoresProps } from '../../../@types/ferdium-components.types'; |
5 | import ErrorBoundary from '../../../components/util/ErrorBoundary'; | 5 | import ErrorBoundary from '../../../components/util/ErrorBoundary'; |
6 | import { deleteWorkspaceRequest, updateWorkspaceRequest } from '../api'; | ||
6 | import EditWorkspaceForm from '../components/EditWorkspaceForm'; | 7 | import EditWorkspaceForm from '../components/EditWorkspaceForm'; |
7 | import Workspace from '../models/Workspace'; | ||
8 | import { workspaceStore } from '../index'; | 8 | import { workspaceStore } from '../index'; |
9 | import { deleteWorkspaceRequest, updateWorkspaceRequest } from '../api'; | 9 | import Workspace from '../models/Workspace'; |
10 | 10 | ||
11 | class EditWorkspaceScreen extends Component<StoresProps> { | 11 | class EditWorkspaceScreen extends Component<StoresProps> { |
12 | onDelete = () => { | 12 | onDelete = () => { |
diff --git a/src/features/workspaces/containers/WorkspacesScreen.tsx b/src/features/workspaces/containers/WorkspacesScreen.tsx index 39f19935f..92565b45c 100644 --- a/src/features/workspaces/containers/WorkspacesScreen.tsx +++ b/src/features/workspaces/containers/WorkspacesScreen.tsx | |||
@@ -1,16 +1,16 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
3 | import { StoresProps } from '../../../@types/ferdium-components.types'; | 2 | import { Component } from 'react'; |
4 | import WorkspacesDashboard from '../components/WorkspacesDashboard'; | 3 | import type { StoresProps } from '../../../@types/ferdium-components.types'; |
5 | import ErrorBoundary from '../../../components/util/ErrorBoundary'; | 4 | import ErrorBoundary from '../../../components/util/ErrorBoundary'; |
6 | import { workspaceStore } from '../index'; | ||
7 | import { | 5 | import { |
8 | createWorkspaceRequest, | 6 | createWorkspaceRequest, |
9 | deleteWorkspaceRequest, | 7 | deleteWorkspaceRequest, |
10 | getUserWorkspacesRequest, | 8 | getUserWorkspacesRequest, |
11 | updateWorkspaceRequest, | 9 | updateWorkspaceRequest, |
12 | } from '../api'; | 10 | } from '../api'; |
13 | import Workspace from '../models/Workspace'; | 11 | import WorkspacesDashboard from '../components/WorkspacesDashboard'; |
12 | import { workspaceStore } from '../index'; | ||
13 | import type Workspace from '../models/Workspace'; | ||
14 | 14 | ||
15 | interface IProps extends StoresProps {} | 15 | interface IProps extends StoresProps {} |
16 | 16 | ||
diff --git a/src/features/workspaces/store.ts b/src/features/workspaces/store.ts index f97009186..41bf5d6f4 100644 --- a/src/features/workspaces/store.ts +++ b/src/features/workspaces/store.ts | |||
@@ -1,8 +1,10 @@ | |||
1 | import { computed, observable, action, makeObservable } from 'mobx'; | 1 | import { action, computed, makeObservable, observable } from 'mobx'; |
2 | import localStorage from 'mobx-localstorage'; | 2 | import localStorage from 'mobx-localstorage'; |
3 | import matchRoute from '../../helpers/routing-helpers'; | 3 | import matchRoute from '../../helpers/routing-helpers'; |
4 | import workspaceActions from './actions'; | 4 | import { createReactions } from '../../stores/lib/Reaction'; |
5 | import { createActionBindings } from '../utils/ActionBinding'; | ||
5 | import FeatureStore from '../utils/FeatureStore'; | 6 | import FeatureStore from '../utils/FeatureStore'; |
7 | import workspaceActions from './actions'; | ||
6 | import { | 8 | import { |
7 | createWorkspaceRequest, | 9 | createWorkspaceRequest, |
8 | deleteWorkspaceRequest, | 10 | deleteWorkspaceRequest, |
@@ -10,12 +12,10 @@ import { | |||
10 | updateWorkspaceRequest, | 12 | updateWorkspaceRequest, |
11 | } from './api'; | 13 | } from './api'; |
12 | import { WORKSPACES_ROUTES } from './constants'; | 14 | import { WORKSPACES_ROUTES } from './constants'; |
13 | import { createReactions } from '../../stores/lib/Reaction'; | ||
14 | import { createActionBindings } from '../utils/ActionBinding'; | ||
15 | 15 | ||
16 | import type { Actions } from '../../actions/lib/actions'; | ||
16 | import { KEEP_WS_LOADED_USID } from '../../config'; | 17 | import { KEEP_WS_LOADED_USID } from '../../config'; |
17 | import Workspace from './models/Workspace'; | 18 | import type Workspace from './models/Workspace'; |
18 | import { Actions } from '../../actions/lib/actions'; | ||
19 | 19 | ||
20 | const debug = require('../../preload-safe-debug')( | 20 | const debug = require('../../preload-safe-debug')( |
21 | 'Ferdium:feature:workspaces:store', | 21 | 'Ferdium:feature:workspaces:store', |
diff --git a/src/helpers/certs-helpers.ts b/src/helpers/certs-helpers.ts index a6c83f5c4..fdbc495bc 100644 --- a/src/helpers/certs-helpers.ts +++ b/src/helpers/certs-helpers.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { readdirSync, readFileSync, ensureDirSync } from 'fs-extra'; | ||
2 | import { join } from 'node:path'; | 1 | import { join } from 'node:path'; |
2 | import { ensureDirSync, readFileSync, readdirSync } from 'fs-extra'; | ||
3 | import { userDataCertsPath } from '../environment-remote'; | 3 | import { userDataCertsPath } from '../environment-remote'; |
4 | import { removeNewLines } from '../jsUtils'; | 4 | import { removeNewLines } from '../jsUtils'; |
5 | 5 | ||
diff --git a/src/helpers/password-helpers.ts b/src/helpers/password-helpers.ts index 75ef5606a..a628ea51e 100644 --- a/src/helpers/password-helpers.ts +++ b/src/helpers/password-helpers.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { createHash, BinaryLike } from 'node:crypto'; | 1 | import { type BinaryLike, createHash } from 'node:crypto'; |
2 | 2 | ||
3 | export function hash(password: BinaryLike): string { | 3 | export function hash(password: BinaryLike): string { |
4 | return createHash('sha256').update(password).digest('base64'); | 4 | return createHash('sha256').update(password).digest('base64'); |
diff --git a/src/helpers/update-helpers.ts b/src/helpers/update-helpers.ts index ca541c4b0..3e548c69b 100644 --- a/src/helpers/update-helpers.ts +++ b/src/helpers/update-helpers.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Octokit } from '@octokit/core'; | 1 | import { Octokit } from '@octokit/core'; |
2 | import { defineMessages, IntlShape } from 'react-intl'; | 2 | import { type IntlShape, defineMessages } from 'react-intl'; |
3 | 3 | ||
4 | export function getFerdiumVersion( | 4 | export function getFerdiumVersion( |
5 | currentLocation: string, | 5 | currentLocation: string, |
diff --git a/src/helpers/url-helpers.ts b/src/helpers/url-helpers.ts index fe637bb08..b30c2cd83 100644 --- a/src/helpers/url-helpers.ts +++ b/src/helpers/url-helpers.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | // This is taken from: https://benjamin-altpeter.de/shell-openexternal-dangers/ | 1 | // This is taken from: https://benjamin-altpeter.de/shell-openexternal-dangers/ |
2 | import { URL } from 'node:url'; | 2 | import { URL } from 'node:url'; |
3 | import { ensureDirSync, existsSync } from 'fs-extra'; | ||
4 | import { shell } from 'electron'; | 3 | import { shell } from 'electron'; |
4 | import { ensureDirSync, existsSync } from 'fs-extra'; | ||
5 | import normalizeUrl from 'normalize-url'; | 5 | import normalizeUrl from 'normalize-url'; |
6 | import { ALLOWED_PROTOCOLS } from '../config'; | 6 | import { ALLOWED_PROTOCOLS } from '../config'; |
7 | 7 | ||
diff --git a/src/helpers/userAgent-helpers.ts b/src/helpers/userAgent-helpers.ts index 42e3a9851..fd9b8c835 100644 --- a/src/helpers/userAgent-helpers.ts +++ b/src/helpers/userAgent-helpers.ts | |||
@@ -3,9 +3,9 @@ import macosVersion from 'macos-version'; | |||
3 | import { chrome } from 'useragent-generator'; | 3 | import { chrome } from 'useragent-generator'; |
4 | import { | 4 | import { |
5 | chromeVersion, | 5 | chromeVersion, |
6 | is64Bit, | ||
6 | isMac, | 7 | isMac, |
7 | isWindows, | 8 | isWindows, |
8 | is64Bit, | ||
9 | osArch, | 9 | osArch, |
10 | osRelease, | 10 | osRelease, |
11 | } from '../environment'; | 11 | } from '../environment'; |
diff --git a/src/index.ts b/src/index.ts index fe254b4f6..a2fcfb890 100644 --- a/src/index.ts +++ b/src/index.ts | |||
@@ -1,22 +1,22 @@ | |||
1 | /* eslint-disable import/first */ | 1 | /* eslint-disable import/first */ |
2 | 2 | ||
3 | import { join } from 'node:path'; | ||
4 | import { EventEmitter } from 'node:events'; | 3 | import { EventEmitter } from 'node:events'; |
4 | import { join } from 'node:path'; | ||
5 | import { | 5 | import { |
6 | app, | ||
7 | BrowserWindow, | 6 | BrowserWindow, |
7 | app, | ||
8 | desktopCapturer, | ||
9 | dialog, | ||
8 | globalShortcut, | 10 | globalShortcut, |
9 | ipcMain, | 11 | ipcMain, |
10 | session, | 12 | session, |
11 | dialog, | ||
12 | desktopCapturer, | ||
13 | } from 'electron'; | 13 | } from 'electron'; |
14 | 14 | ||
15 | import { emptyDirSync, ensureFileSync } from 'fs-extra'; | 15 | import { initialize } from 'electron-react-titlebar/main'; |
16 | import windowStateKeeper from 'electron-window-state'; | 16 | import windowStateKeeper from 'electron-window-state'; |
17 | import { emptyDirSync, ensureFileSync } from 'fs-extra'; | ||
17 | import minimist from 'minimist'; | 18 | import minimist from 'minimist'; |
18 | import ms from 'ms'; | 19 | import ms from 'ms'; |
19 | import { initialize } from 'electron-react-titlebar/main'; | ||
20 | import { enableWebContents, initializeRemote } from './electron-util'; | 20 | import { enableWebContents, initializeRemote } from './electron-util'; |
21 | import enforceMacOSAppLocation from './enforce-macos-app-location'; | 21 | import enforceMacOSAppLocation from './enforce-macos-app-location'; |
22 | 22 | ||
@@ -24,33 +24,33 @@ initializeRemote(); | |||
24 | 24 | ||
25 | import { DEFAULT_APP_SETTINGS, DEFAULT_WINDOW_OPTIONS } from './config'; | 25 | import { DEFAULT_APP_SETTINGS, DEFAULT_WINDOW_OPTIONS } from './config'; |
26 | 26 | ||
27 | import { isMac, isWindows, isLinux, altKey } from './environment'; | 27 | import { altKey, isLinux, isMac, isWindows } from './environment'; |
28 | import { | 28 | import { |
29 | isDevMode, | 29 | isDevMode, |
30 | userDataRecipesPath, | ||
31 | userDataPath, | ||
32 | protocolClient, | 30 | protocolClient, |
31 | userDataPath, | ||
32 | userDataRecipesPath, | ||
33 | } from './environment-remote'; | 33 | } from './environment-remote'; |
34 | import { ifUndefined } from './jsUtils'; | 34 | import { ifUndefined } from './jsUtils'; |
35 | 35 | ||
36 | import { mainIpcHandler as basicAuthHandler } from './features/basicAuth'; | ||
37 | // eslint-disable-next-line import/no-cycle | ||
38 | import ipcApi from './electron/ipc-api'; | ||
39 | import TrayIcon from './lib/Tray'; | ||
40 | import DBus from './lib/DBus'; | ||
41 | import Settings from './electron/Settings'; | 36 | import Settings from './electron/Settings'; |
42 | import handleDeepLink from './electron/deepLinking'; | 37 | import handleDeepLink from './electron/deepLinking'; |
38 | import './electron/exception'; | ||
39 | // eslint-disable-next-line import/no-cycle | ||
40 | import ipcApi from './electron/ipc-api'; | ||
43 | import isPositionValid from './electron/windowUtils'; | 41 | import isPositionValid from './electron/windowUtils'; |
42 | import { mainIpcHandler as basicAuthHandler } from './features/basicAuth'; | ||
43 | import DBus from './lib/DBus'; | ||
44 | import TrayIcon from './lib/Tray'; | ||
44 | // @ts-expect-error Cannot find module './package.json' or its corresponding type declarations. | 45 | // @ts-expect-error Cannot find module './package.json' or its corresponding type declarations. |
45 | import { appId } from './package.json'; | 46 | import { appId } from './package.json'; |
46 | import './electron/exception'; | ||
47 | 47 | ||
48 | import { asarPath } from './helpers/asar-helpers'; | 48 | import { asarPath } from './helpers/asar-helpers'; |
49 | import { checkIfCertIsPresent } from './helpers/certs-helpers'; | ||
50 | import { translateTo } from './helpers/translation-helpers'; | ||
49 | import { openExternalUrl } from './helpers/url-helpers'; | 51 | import { openExternalUrl } from './helpers/url-helpers'; |
50 | import userAgent from './helpers/userAgent-helpers'; | 52 | import userAgent from './helpers/userAgent-helpers'; |
51 | import { translateTo } from './helpers/translation-helpers'; | ||
52 | import { darkThemeGrayDarkest } from './themes/legacy'; | 53 | import { darkThemeGrayDarkest } from './themes/legacy'; |
53 | import { checkIfCertIsPresent } from './helpers/certs-helpers'; | ||
54 | 54 | ||
55 | const debug = require('./preload-safe-debug')('Ferdium:App'); | 55 | const debug = require('./preload-safe-debug')('Ferdium:App'); |
56 | 56 | ||
diff --git a/src/internal-server/start.ts b/src/internal-server/start.ts index bcd3ee3a1..c88a61fec 100644 --- a/src/internal-server/start.ts +++ b/src/internal-server/start.ts | |||
@@ -18,7 +18,7 @@ | |||
18 | import { join } from 'node:path'; | 18 | import { join } from 'node:path'; |
19 | import fold from '@adonisjs/fold'; | 19 | import fold from '@adonisjs/fold'; |
20 | import { Ignitor, hooks } from '@adonisjs/ignitor'; | 20 | import { Ignitor, hooks } from '@adonisjs/ignitor'; |
21 | import { readFile, stat, chmod, writeFile } from 'fs-extra'; | 21 | import { chmod, readFile, stat, writeFile } from 'fs-extra'; |
22 | import { LOCAL_HOSTNAME } from '../config'; | 22 | import { LOCAL_HOSTNAME } from '../config'; |
23 | import { isWindows } from '../environment'; | 23 | import { isWindows } from '../environment'; |
24 | 24 | ||
diff --git a/src/lib/DBus.ts b/src/lib/DBus.ts index 530e30c85..70c8132a3 100644 --- a/src/lib/DBus.ts +++ b/src/lib/DBus.ts | |||
@@ -1,9 +1,9 @@ | |||
1 | import { ipcMain } from 'electron'; | 1 | import { ipcMain } from 'electron'; |
2 | import { comparer } from 'mobx'; | 2 | import { comparer } from 'mobx'; |
3 | 3 | ||
4 | import { MessageBus, sessionBus } from 'dbus-next'; | 4 | import { type MessageBus, sessionBus } from 'dbus-next'; |
5 | import { isLinux } from '../environment'; | 5 | import { isLinux } from '../environment'; |
6 | import TrayIcon from './Tray'; | 6 | import type TrayIcon from './Tray'; |
7 | import Ferdium, { type UnreadServices } from './dbus/Ferdium'; | 7 | import Ferdium, { type UnreadServices } from './dbus/Ferdium'; |
8 | 8 | ||
9 | export default class DBus { | 9 | export default class DBus { |
diff --git a/src/lib/Form.ts b/src/lib/Form.ts index 2b25eb193..c60506446 100644 --- a/src/lib/Form.ts +++ b/src/lib/Form.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import Form from 'mobx-react-form'; | 1 | import Form from 'mobx-react-form'; |
2 | import vjf from 'mobx-react-form/lib/validators/VJF'; | 2 | import vjf from 'mobx-react-form/lib/validators/VJF'; |
3 | import { FormFields } from '../@types/mobx-form.types'; | 3 | import type { FormFields } from '../@types/mobx-form.types'; |
4 | 4 | ||
5 | export default class DefaultForm extends Form { | 5 | export default class DefaultForm extends Form { |
6 | // eslint-disable-next-line @typescript-eslint/no-useless-constructor | 6 | // eslint-disable-next-line @typescript-eslint/no-useless-constructor |
diff --git a/src/lib/Menu.ts b/src/lib/Menu.ts index 12dc1e42c..f7ed3b310 100644 --- a/src/lib/Menu.ts +++ b/src/lib/Menu.ts | |||
@@ -1,54 +1,54 @@ | |||
1 | import os from 'node:os'; | 1 | import os from 'node:os'; |
2 | import { clipboard, MenuItemConstructorOptions } from 'electron'; | ||
3 | import { | 2 | import { |
4 | app, | ||
5 | Menu, | 3 | Menu, |
4 | app, | ||
6 | dialog, | 5 | dialog, |
7 | webContents, | ||
8 | systemPreferences, | ||
9 | getCurrentWindow, | 6 | getCurrentWindow, |
7 | systemPreferences, | ||
8 | webContents, | ||
10 | } from '@electron/remote'; | 9 | } from '@electron/remote'; |
11 | import { autorun, action, makeObservable, observable } from 'mobx'; | 10 | import { type MenuItemConstructorOptions, clipboard } from 'electron'; |
12 | import { defineMessages, IntlShape } from 'react-intl'; | ||
13 | import osName from 'os-name'; | ||
14 | import { fromJS } from 'immutable'; | 11 | import { fromJS } from 'immutable'; |
12 | import { action, autorun, makeObservable, observable } from 'mobx'; | ||
13 | import osName from 'os-name'; | ||
14 | import { type IntlShape, defineMessages } from 'react-intl'; | ||
15 | import semver from 'semver'; | 15 | import semver from 'semver'; |
16 | import type { StoresProps } from '../@types/ferdium-components.types'; | ||
17 | import { importExportURL, serverBase, serverName } from '../api/apiBase'; | ||
18 | // @ts-expect-error Cannot find module '../buildInfo.json' or its corresponding type declarations. | ||
19 | import { gitBranch, gitHashShort, timestamp } from '../buildInfo.json'; | ||
20 | import { CUSTOM_WEBSITE_RECIPE_ID, LIVE_API_FERDIUM_WEBSITE } from '../config'; | ||
16 | import { | 21 | import { |
17 | isWindows, | 22 | addNewServiceShortcutKey, |
18 | cmdOrCtrlShortcutKey, | ||
19 | altKey, | 23 | altKey, |
20 | shiftKey, | 24 | chromeVersion, |
21 | settingsShortcutKey, | 25 | cmdOrCtrlShortcutKey, |
26 | downloadsShortcutKey, | ||
27 | electronVersion, | ||
22 | isLinux, | 28 | isLinux, |
23 | isMac, | 29 | isMac, |
30 | isWindows, | ||
24 | lockFerdiumShortcutKey, | 31 | lockFerdiumShortcutKey, |
25 | todosToggleShortcutKey, | ||
26 | workspaceToggleShortcutKey, | ||
27 | addNewServiceShortcutKey, | ||
28 | splitModeToggleShortcutKey, | ||
29 | muteFerdiumShortcutKey, | 32 | muteFerdiumShortcutKey, |
30 | electronVersion, | ||
31 | chromeVersion, | ||
32 | nodeVersion, | 33 | nodeVersion, |
33 | osArch, | 34 | osArch, |
35 | settingsShortcutKey, | ||
36 | shiftKey, | ||
37 | splitModeToggleShortcutKey, | ||
38 | todosToggleShortcutKey, | ||
34 | toggleFullScreenKey, | 39 | toggleFullScreenKey, |
35 | downloadsShortcutKey, | 40 | workspaceToggleShortcutKey, |
36 | } from '../environment'; | 41 | } from '../environment'; |
37 | import { CUSTOM_WEBSITE_RECIPE_ID, LIVE_API_FERDIUM_WEBSITE } from '../config'; | ||
38 | import { ferdiumVersion } from '../environment-remote'; | 42 | import { ferdiumVersion } from '../environment-remote'; |
39 | import { todoActions } from '../features/todos/actions'; | 43 | import { todoActions } from '../features/todos/actions'; |
40 | import workspaceActions from '../features/workspaces/actions'; | 44 | import workspaceActions from '../features/workspaces/actions'; |
41 | import { workspaceStore } from '../features/workspaces/index'; | 45 | import { workspaceStore } from '../features/workspaces/index'; |
42 | import { importExportURL, serverBase, serverName } from '../api/apiBase'; | 46 | import { onAuthGoToReleaseNotes } from '../helpers/update-helpers'; |
43 | import { openExternalUrl } from '../helpers/url-helpers'; | 47 | import { openExternalUrl } from '../helpers/url-helpers'; |
44 | import globalMessages from '../i18n/globalMessages'; | 48 | import globalMessages from '../i18n/globalMessages'; |
45 | import { onAuthGoToReleaseNotes } from '../helpers/update-helpers'; | ||
46 | // @ts-expect-error Cannot find module '../buildInfo.json' or its corresponding type declarations. | ||
47 | import { timestamp, gitHashShort, gitBranch } from '../buildInfo.json'; | ||
48 | import Service from '../models/Service'; | ||
49 | import { StoresProps } from '../@types/ferdium-components.types'; | ||
50 | import { RealStores } from '../stores'; | ||
51 | import { acceleratorString } from '../jsUtils'; | 49 | import { acceleratorString } from '../jsUtils'; |
50 | import type Service from '../models/Service'; | ||
51 | import type { RealStores } from '../stores'; | ||
52 | 52 | ||
53 | const menuItems = defineMessages({ | 53 | const menuItems = defineMessages({ |
54 | edit: { | 54 | edit: { |
@@ -688,11 +688,9 @@ class FranzMenu implements StoresProps { | |||
688 | } | 688 | } |
689 | 689 | ||
690 | getOsName(): string { | 690 | getOsName(): string { |
691 | let osNameParse = osName(); | 691 | return isWindows && semver.satisfies(os.release(), '>=10.0.22000') |
692 | const isWin11 = semver.satisfies(os.release(), '>=10.0.22000'); | 692 | ? 'Windows 11' |
693 | osNameParse = isWindows && isWin11 ? 'Windows 11' : osNameParse; | 693 | : osName(os.platform(), os.release()); |
694 | |||
695 | return osNameParse; | ||
696 | } | 694 | } |
697 | 695 | ||
698 | _build(): void { | 696 | _build(): void { |
diff --git a/src/lib/TouchBar.ts b/src/lib/TouchBar.ts index 417e20411..5adeb84b5 100644 --- a/src/lib/TouchBar.ts +++ b/src/lib/TouchBar.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import semver from 'semver'; | ||
2 | import { TouchBar, getCurrentWindow } from '@electron/remote'; | 1 | import { TouchBar, getCurrentWindow } from '@electron/remote'; |
3 | import { autorun } from 'mobx'; | 2 | import { autorun } from 'mobx'; |
3 | import semver from 'semver'; | ||
4 | 4 | ||
5 | import { isMac, osRelease } from '../environment'; | 5 | import { isMac, osRelease } from '../environment'; |
6 | 6 | ||
diff --git a/src/lib/Tray.ts b/src/lib/Tray.ts index 726d32b23..447096b4c 100644 --- a/src/lib/Tray.ts +++ b/src/lib/Tray.ts | |||
@@ -1,17 +1,17 @@ | |||
1 | import { join } from 'node:path'; | 1 | import { join } from 'node:path'; |
2 | import { | 2 | import { |
3 | app, | 3 | BrowserWindow, |
4 | Menu, | 4 | Menu, |
5 | type NativeImage, | ||
6 | Tray, | ||
7 | app, | ||
8 | ipcMain, | ||
5 | nativeImage, | 9 | nativeImage, |
6 | nativeTheme, | 10 | nativeTheme, |
7 | systemPreferences, | 11 | systemPreferences, |
8 | Tray, | ||
9 | ipcMain, | ||
10 | BrowserWindow, | ||
11 | NativeImage, | ||
12 | } from 'electron'; | 12 | } from 'electron'; |
13 | import macosVersion from 'macos-version'; | 13 | import macosVersion from 'macos-version'; |
14 | import { isMac, isWindows, isLinux } from '../environment'; | 14 | import { isLinux, isMac, isWindows } from '../environment'; |
15 | 15 | ||
16 | const FILE_EXTENSION = isWindows ? 'ico' : 'png'; | 16 | const FILE_EXTENSION = isWindows ? 'ico' : 'png'; |
17 | const INDICATOR_TRAY_PLAIN = 'tray'; | 17 | const INDICATOR_TRAY_PLAIN = 'tray'; |
diff --git a/src/models/Recipe.ts b/src/models/Recipe.ts index 53d6c4b89..e8f11df5f 100644 --- a/src/models/Recipe.ts +++ b/src/models/Recipe.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { join } from 'node:path'; | 1 | import { join } from 'node:path'; |
2 | import semver from 'semver'; | ||
3 | import { pathExistsSync } from 'fs-extra'; | 2 | import { pathExistsSync } from 'fs-extra'; |
3 | import semver from 'semver'; | ||
4 | import { DEFAULT_SERVICE_SETTINGS } from '../config'; | 4 | import { DEFAULT_SERVICE_SETTINGS } from '../config'; |
5 | import { ifUndefined } from '../jsUtils'; | 5 | import { ifUndefined } from '../jsUtils'; |
6 | 6 | ||
diff --git a/src/models/Service.ts b/src/models/Service.ts index da9fa43dd..6d19f44f1 100644 --- a/src/models/Service.ts +++ b/src/models/Service.ts | |||
@@ -1,17 +1,17 @@ | |||
1 | import { join, basename } from 'node:path'; | 1 | import { basename, join } from 'node:path'; |
2 | import { autorun, action, computed, makeObservable, observable } from 'mobx'; | ||
3 | import { ipcRenderer } from 'electron'; | ||
4 | import { webContents } from '@electron/remote'; | 2 | import { webContents } from '@electron/remote'; |
5 | import ElectronWebView from 'react-electron-web-view'; | 3 | import { ipcRenderer } from 'electron'; |
4 | import { action, autorun, computed, makeObservable, observable } from 'mobx'; | ||
5 | import type ElectronWebView from 'react-electron-web-view'; | ||
6 | 6 | ||
7 | import { v4 as uuidV4 } from 'uuid'; | 7 | import { v4 as uuidV4 } from 'uuid'; |
8 | import { needsToken } from '../api/apiBase'; | ||
9 | import { DEFAULT_SERVICE_ORDER, DEFAULT_SERVICE_SETTINGS } from '../config'; | ||
8 | import { todosStore } from '../features/todos'; | 10 | import { todosStore } from '../features/todos'; |
9 | import { isValidExternalURL, normalizedUrl } from '../helpers/url-helpers'; | 11 | import { isValidExternalURL, normalizedUrl } from '../helpers/url-helpers'; |
10 | import UserAgent from './UserAgent'; | ||
11 | import { DEFAULT_SERVICE_ORDER, DEFAULT_SERVICE_SETTINGS } from '../config'; | ||
12 | import { ifUndefined } from '../jsUtils'; | 12 | import { ifUndefined } from '../jsUtils'; |
13 | import { IRecipe } from './Recipe'; | 13 | import type { IRecipe } from './Recipe'; |
14 | import { needsToken } from '../api/apiBase'; | 14 | import UserAgent from './UserAgent'; |
15 | 15 | ||
16 | const debug = require('../preload-safe-debug')('Ferdium:Service'); | 16 | const debug = require('../preload-safe-debug')('Ferdium:Service'); |
17 | 17 | ||
diff --git a/src/models/UserAgent.ts b/src/models/UserAgent.ts index d54286ee8..817dea4a1 100644 --- a/src/models/UserAgent.ts +++ b/src/models/UserAgent.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { action, computed, makeObservable, observable, observe } from 'mobx'; | 1 | import { action, computed, makeObservable, observable, observe } from 'mobx'; |
2 | 2 | ||
3 | import ElectronWebView from 'react-electron-web-view'; | 3 | import type ElectronWebView from 'react-electron-web-view'; |
4 | import defaultUserAgent from '../helpers/userAgent-helpers'; | 4 | import defaultUserAgent from '../helpers/userAgent-helpers'; |
5 | 5 | ||
6 | const debug = require('../preload-safe-debug')('Ferdium:UserAgent'); | 6 | const debug = require('../preload-safe-debug')('Ferdium:UserAgent'); |
diff --git a/src/routes.tsx b/src/routes.tsx index 436f25ea4..d2a88950f 100644 --- a/src/routes.tsx +++ b/src/routes.tsx | |||
@@ -1,42 +1,42 @@ | |||
1 | import { Component, ReactElement } from 'react'; | 1 | import type { HashHistory } from 'history'; |
2 | import { inject, observer } from 'mobx-react'; | 2 | import { inject, observer } from 'mobx-react'; |
3 | import { Component, type ReactElement } from 'react'; | ||
3 | import { | 4 | import { |
5 | unstable_HistoryRouter as HistoryRouter, | ||
4 | Navigate, | 6 | Navigate, |
5 | Route, | 7 | Route, |
6 | Routes, | 8 | Routes, |
7 | unstable_HistoryRouter as HistoryRouter, | ||
8 | } from 'react-router-dom'; | 9 | } from 'react-router-dom'; |
9 | import { HashHistory } from 'history'; | 10 | import type { StoresProps } from './@types/ferdium-components.types'; |
11 | import type { Actions } from './actions/lib/actions'; | ||
12 | import AuthLayoutContainer from './containers/auth/AuthLayoutContainer'; | ||
13 | import AuthReleaseNotesScreen from './containers/auth/AuthReleaseNotesScreen'; | ||
14 | import ChangeServerScreen from './containers/auth/ChangeServerScreen'; | ||
15 | import InviteScreen from './containers/auth/InviteScreen'; | ||
16 | import LoginScreen from './containers/auth/LoginScreen'; | ||
17 | import PasswordScreen from './containers/auth/PasswordScreen'; | ||
18 | import SetupAssistantScreen from './containers/auth/SetupAssistantScreen'; | ||
19 | import SignupScreen from './containers/auth/SignupScreen'; | ||
20 | import WelcomeScreen from './containers/auth/WelcomeScreen'; | ||
21 | import DownloadManagerScreen from './containers/download-manager/DownloadManagerScreen'; | ||
22 | import DownloadManagerWindow from './containers/download-manager/DownloadManagerWindow'; | ||
10 | import AppLayoutContainer from './containers/layout/AppLayoutContainer'; | 23 | import AppLayoutContainer from './containers/layout/AppLayoutContainer'; |
11 | import SettingsWindow from './containers/settings/SettingsWindow'; | ||
12 | import ReleaseNotesWindow from './containers/settings/ReleaseNotesWindow'; | ||
13 | import RecipesScreen from './containers/settings/RecipesScreen'; | ||
14 | import ServicesScreen from './containers/settings/ServicesScreen'; | ||
15 | import EditServiceScreen from './containers/settings/EditServiceScreen'; | ||
16 | import AccountScreen from './containers/settings/AccountScreen'; | 24 | import AccountScreen from './containers/settings/AccountScreen'; |
17 | import TeamScreen from './containers/settings/TeamScreen'; | 25 | import EditServiceScreen from './containers/settings/EditServiceScreen'; |
18 | import EditUserScreen from './containers/settings/EditUserScreen'; | ||
19 | import EditSettingsScreen from './containers/settings/EditSettingsScreen'; | 26 | import EditSettingsScreen from './containers/settings/EditSettingsScreen'; |
27 | import EditUserScreen from './containers/settings/EditUserScreen'; | ||
20 | import InviteSettingsScreen from './containers/settings/InviteScreen'; | 28 | import InviteSettingsScreen from './containers/settings/InviteScreen'; |
21 | import SupportFerdiumScreen from './containers/settings/SupportScreen'; | 29 | import RecipesScreen from './containers/settings/RecipesScreen'; |
22 | import ReleaseNotesScreen from './containers/settings/ReleaseNotesScreen'; | 30 | import ReleaseNotesScreen from './containers/settings/ReleaseNotesScreen'; |
23 | import WelcomeScreen from './containers/auth/WelcomeScreen'; | 31 | import ReleaseNotesWindow from './containers/settings/ReleaseNotesWindow'; |
24 | import LoginScreen from './containers/auth/LoginScreen'; | 32 | import ServicesScreen from './containers/settings/ServicesScreen'; |
25 | import AuthReleaseNotesScreen from './containers/auth/AuthReleaseNotesScreen'; | 33 | import SettingsWindow from './containers/settings/SettingsWindow'; |
26 | import PasswordScreen from './containers/auth/PasswordScreen'; | 34 | import SupportFerdiumScreen from './containers/settings/SupportScreen'; |
27 | import ChangeServerScreen from './containers/auth/ChangeServerScreen'; | 35 | import TeamScreen from './containers/settings/TeamScreen'; |
28 | import SignupScreen from './containers/auth/SignupScreen'; | ||
29 | import SetupAssistantScreen from './containers/auth/SetupAssistantScreen'; | ||
30 | import InviteScreen from './containers/auth/InviteScreen'; | ||
31 | import AuthLayoutContainer from './containers/auth/AuthLayoutContainer'; | ||
32 | import WorkspacesScreen from './features/workspaces/containers/WorkspacesScreen'; | ||
33 | import EditWorkspaceScreen from './features/workspaces/containers/EditWorkspaceScreen'; | ||
34 | import { WORKSPACES_ROUTES } from './features/workspaces/constants'; | 36 | import { WORKSPACES_ROUTES } from './features/workspaces/constants'; |
35 | import { StoresProps } from './@types/ferdium-components.types'; | 37 | import EditWorkspaceScreen from './features/workspaces/containers/EditWorkspaceScreen'; |
36 | import { Actions } from './actions/lib/actions'; | 38 | import WorkspacesScreen from './features/workspaces/containers/WorkspacesScreen'; |
37 | import { RealStores } from './stores'; | 39 | import type { RealStores } from './stores'; |
38 | import DownloadManagerScreen from './containers/download-manager/DownloadManagerScreen'; | ||
39 | import DownloadManagerWindow from './containers/download-manager/DownloadManagerWindow'; | ||
40 | 40 | ||
41 | interface IProps { | 41 | interface IProps { |
42 | history: HashHistory; | 42 | history: HashHistory; |
diff --git a/src/stores/AppStore.ts b/src/stores/AppStore.ts index b8356bd56..b0a925411 100644 --- a/src/stores/AppStore.ts +++ b/src/stores/AppStore.ts | |||
@@ -1,46 +1,46 @@ | |||
1 | import { URL } from 'node:url'; | 1 | import { URL } from 'node:url'; |
2 | import { ipcRenderer } from 'electron'; | ||
3 | import { | 2 | import { |
4 | app, | 3 | app, |
5 | screen, | ||
6 | powerMonitor, | ||
7 | nativeTheme, | ||
8 | getCurrentWindow, | 4 | getCurrentWindow, |
5 | nativeTheme, | ||
6 | powerMonitor, | ||
9 | process as remoteProcess, | 7 | process as remoteProcess, |
8 | screen, | ||
10 | } from '@electron/remote'; | 9 | } from '@electron/remote'; |
10 | import AutoLaunch from 'auto-launch'; | ||
11 | import { ipcRenderer } from 'electron'; | ||
12 | import { readJsonSync } from 'fs-extra'; | ||
11 | import { action, computed, makeObservable, observable } from 'mobx'; | 13 | import { action, computed, makeObservable, observable } from 'mobx'; |
12 | import moment from 'moment'; | 14 | import moment from 'moment'; |
13 | import AutoLaunch from 'auto-launch'; | ||
14 | import ms from 'ms'; | 15 | import ms from 'ms'; |
15 | import { readJsonSync } from 'fs-extra'; | ||
16 | 16 | ||
17 | import { Stores } from '../@types/stores.types'; | 17 | import type { Stores } from '../@types/stores.types'; |
18 | import { ApiInterface } from '../api'; | 18 | import type { Actions } from '../actions/lib/actions'; |
19 | import { Actions } from '../actions/lib/actions'; | 19 | import type { ApiInterface } from '../api'; |
20 | import TypedStore from './lib/TypedStore'; | ||
21 | import Request from './lib/Request'; | ||
22 | import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config'; | 20 | import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config'; |
23 | import { cleanseJSObject } from '../jsUtils'; | ||
24 | import { | 21 | import { |
22 | electronVersion, | ||
25 | isMac, | 23 | isMac, |
26 | isWinPortable, | 24 | isWinPortable, |
27 | electronVersion, | ||
28 | osRelease, | 25 | osRelease, |
29 | } from '../environment'; | 26 | } from '../environment'; |
30 | import { | 27 | import { |
28 | ferdiumLocale, | ||
31 | ferdiumVersion, | 29 | ferdiumVersion, |
32 | userDataPath, | 30 | userDataPath, |
33 | ferdiumLocale, | ||
34 | } from '../environment-remote'; | 31 | } from '../environment-remote'; |
35 | import generatedTranslations from '../i18n/translations'; | ||
36 | import { getLocale } from '../helpers/i18n-helpers'; | 32 | import { getLocale } from '../helpers/i18n-helpers'; |
33 | import generatedTranslations from '../i18n/translations'; | ||
34 | import { cleanseJSObject } from '../jsUtils'; | ||
35 | import Request from './lib/Request'; | ||
36 | import TypedStore from './lib/TypedStore'; | ||
37 | 37 | ||
38 | import sleep from '../helpers/async-helpers'; | ||
38 | import { | 39 | import { |
39 | getServiceIdsFromPartitions, | 40 | getServiceIdsFromPartitions, |
40 | removeServicePartitionDirectory, | 41 | removeServicePartitionDirectory, |
41 | } from '../helpers/service-helpers'; | 42 | } from '../helpers/service-helpers'; |
42 | import { openExternalUrl } from '../helpers/url-helpers'; | 43 | import { openExternalUrl } from '../helpers/url-helpers'; |
43 | import sleep from '../helpers/async-helpers'; | ||
44 | 44 | ||
45 | const debug = require('../preload-safe-debug')('Ferdium:AppStore'); | 45 | const debug = require('../preload-safe-debug')('Ferdium:AppStore'); |
46 | 46 | ||
diff --git a/src/stores/FeaturesStore.ts b/src/stores/FeaturesStore.ts index 8584b6060..6167d0e22 100644 --- a/src/stores/FeaturesStore.ts +++ b/src/stores/FeaturesStore.ts | |||
@@ -5,18 +5,18 @@ import { | |||
5 | observable, | 5 | observable, |
6 | runInAction, | 6 | runInAction, |
7 | } from 'mobx'; | 7 | } from 'mobx'; |
8 | import { Stores } from '../@types/stores.types'; | 8 | import type { Stores } from '../@types/stores.types'; |
9 | import { ApiInterface } from '../api'; | 9 | import type { Actions } from '../actions/lib/actions'; |
10 | import { Actions } from '../actions/lib/actions'; | 10 | import type { ApiInterface } from '../api'; |
11 | import CachedRequest from './lib/CachedRequest'; | 11 | import appearance from '../features/appearance'; |
12 | import serviceProxy from '../features/serviceProxy'; | ||
13 | import basicAuth from '../features/basicAuth'; | 12 | import basicAuth from '../features/basicAuth'; |
14 | import workspaces from '../features/workspaces'; | ||
15 | import quickSwitch from '../features/quickSwitch'; | ||
16 | import publishDebugInfo from '../features/publishDebugInfo'; | ||
17 | import communityRecipes from '../features/communityRecipes'; | 13 | import communityRecipes from '../features/communityRecipes'; |
14 | import publishDebugInfo from '../features/publishDebugInfo'; | ||
15 | import quickSwitch from '../features/quickSwitch'; | ||
16 | import serviceProxy from '../features/serviceProxy'; | ||
18 | import todos from '../features/todos'; | 17 | import todos from '../features/todos'; |
19 | import appearance from '../features/appearance'; | 18 | import workspaces from '../features/workspaces'; |
19 | import CachedRequest from './lib/CachedRequest'; | ||
20 | import TypedStore from './lib/TypedStore'; | 20 | import TypedStore from './lib/TypedStore'; |
21 | 21 | ||
22 | export default class FeaturesStore extends TypedStore { | 22 | export default class FeaturesStore extends TypedStore { |
diff --git a/src/stores/GlobalErrorStore.ts b/src/stores/GlobalErrorStore.ts index 74a43100b..1da81eaa3 100644 --- a/src/stores/GlobalErrorStore.ts +++ b/src/stores/GlobalErrorStore.ts | |||
@@ -1,8 +1,8 @@ | |||
1 | import { observable, action, makeObservable } from 'mobx'; | 1 | import type { Response } from 'electron'; |
2 | import { Response } from 'electron'; | 2 | import { action, makeObservable, observable } from 'mobx'; |
3 | import { Actions } from '../actions/lib/actions'; | 3 | import type { Stores } from '../@types/stores.types'; |
4 | import { ApiInterface } from '../api'; | 4 | import type { Actions } from '../actions/lib/actions'; |
5 | import { Stores } from '../@types/stores.types'; | 5 | import type { ApiInterface } from '../api'; |
6 | import Request from './lib/Request'; | 6 | import Request from './lib/Request'; |
7 | import TypedStore from './lib/TypedStore'; | 7 | import TypedStore from './lib/TypedStore'; |
8 | 8 | ||
diff --git a/src/stores/RecipePreviewsStore.ts b/src/stores/RecipePreviewsStore.ts index 1c95e6b54..f851f3203 100644 --- a/src/stores/RecipePreviewsStore.ts +++ b/src/stores/RecipePreviewsStore.ts | |||
@@ -1,14 +1,14 @@ | |||
1 | import { action, computed, makeObservable, observable } from 'mobx'; | 1 | import { action, computed, makeObservable, observable } from 'mobx'; |
2 | 2 | ||
3 | import { Actions } from '../actions/lib/actions'; | 3 | import type { Stores } from '../@types/stores.types'; |
4 | import { ApiInterface } from '../api'; | 4 | import type { Actions } from '../actions/lib/actions'; |
5 | import Recipe from '../models/Recipe'; | 5 | import type { ApiInterface } from '../api'; |
6 | import { Stores } from '../@types/stores.types'; | 6 | import type Recipe from '../models/Recipe'; |
7 | 7 | ||
8 | import type RecipePreview from '../models/RecipePreview'; | ||
8 | import CachedRequest from './lib/CachedRequest'; | 9 | import CachedRequest from './lib/CachedRequest'; |
9 | import Request from './lib/Request'; | 10 | import Request from './lib/Request'; |
10 | import TypedStore from './lib/TypedStore'; | 11 | import TypedStore from './lib/TypedStore'; |
11 | import RecipePreview from '../models/RecipePreview'; | ||
12 | 12 | ||
13 | export default class RecipePreviewsStore extends TypedStore { | 13 | export default class RecipePreviewsStore extends TypedStore { |
14 | @observable allRecipePreviewsRequest = new CachedRequest( | 14 | @observable allRecipePreviewsRequest = new CachedRequest( |
diff --git a/src/stores/RecipesStore.ts b/src/stores/RecipesStore.ts index 9b5565dcf..3cd81807a 100644 --- a/src/stores/RecipesStore.ts +++ b/src/stores/RecipesStore.ts | |||
@@ -1,15 +1,15 @@ | |||
1 | import { action, computed, makeObservable, observable } from 'mobx'; | ||
2 | import { readJSONSync } from 'fs-extra'; | 1 | import { readJSONSync } from 'fs-extra'; |
2 | import { action, computed, makeObservable, observable } from 'mobx'; | ||
3 | import semver from 'semver'; | 3 | import semver from 'semver'; |
4 | 4 | ||
5 | import Recipe from '../models/Recipe'; | 5 | import type { Stores } from '../@types/stores.types'; |
6 | import { Stores } from '../@types/stores.types'; | 6 | import type { Actions } from '../actions/lib/actions'; |
7 | import { ApiInterface } from '../api'; | 7 | import type { ApiInterface } from '../api'; |
8 | import { Actions } from '../actions/lib/actions'; | 8 | import { asarRecipesPath } from '../helpers/asar-helpers'; |
9 | import matchRoute from '../helpers/routing-helpers'; | ||
10 | import type Recipe from '../models/Recipe'; | ||
9 | import CachedRequest from './lib/CachedRequest'; | 11 | import CachedRequest from './lib/CachedRequest'; |
10 | import Request from './lib/Request'; | 12 | import Request from './lib/Request'; |
11 | import matchRoute from '../helpers/routing-helpers'; | ||
12 | import { asarRecipesPath } from '../helpers/asar-helpers'; | ||
13 | import TypedStore from './lib/TypedStore'; | 13 | import TypedStore from './lib/TypedStore'; |
14 | 14 | ||
15 | const debug = require('../preload-safe-debug')('Ferdium:RecipeStore'); | 15 | const debug = require('../preload-safe-debug')('Ferdium:RecipeStore'); |
diff --git a/src/stores/RequestStore.ts b/src/stores/RequestStore.ts index 807f2d126..bad9f39ea 100644 --- a/src/stores/RequestStore.ts +++ b/src/stores/RequestStore.ts | |||
@@ -2,11 +2,11 @@ import { ipcRenderer } from 'electron'; | |||
2 | import { action, computed, makeObservable, observable } from 'mobx'; | 2 | import { action, computed, makeObservable, observable } from 'mobx'; |
3 | import ms from 'ms'; | 3 | import ms from 'ms'; |
4 | 4 | ||
5 | import { Actions } from '../actions/lib/actions'; | 5 | import type { Stores } from '../@types/stores.types'; |
6 | import { ApiInterface } from '../api'; | 6 | import type { Actions } from '../actions/lib/actions'; |
7 | import { Stores } from '../@types/stores.types'; | 7 | import type { ApiInterface } from '../api'; |
8 | import CachedRequest from './lib/CachedRequest'; | ||
9 | import { LOCAL_HOSTNAME, LOCAL_PORT } from '../config'; | 8 | import { LOCAL_HOSTNAME, LOCAL_PORT } from '../config'; |
9 | import type CachedRequest from './lib/CachedRequest'; | ||
10 | 10 | ||
11 | import TypedStore from './lib/TypedStore'; | 11 | import TypedStore from './lib/TypedStore'; |
12 | 12 | ||
diff --git a/src/stores/ServicesStore.ts b/src/stores/ServicesStore.ts index d7804a3fe..8105aa084 100644 --- a/src/stores/ServicesStore.ts +++ b/src/stores/ServicesStore.ts | |||
@@ -1,29 +1,29 @@ | |||
1 | import { join } from 'node:path'; | 1 | import { join } from 'node:path'; |
2 | import { clipboard, ipcRenderer, shell } from 'electron'; | 2 | import { clipboard, ipcRenderer, shell } from 'electron'; |
3 | import { action, reaction, computed, observable, makeObservable } from 'mobx'; | 3 | import { ensureFileSync, pathExistsSync, writeFileSync } from 'fs-extra'; |
4 | import { debounce, remove } from 'lodash'; | 4 | import { debounce, remove } from 'lodash'; |
5 | import { action, computed, makeObservable, observable, reaction } from 'mobx'; | ||
5 | import ms from 'ms'; | 6 | import ms from 'ms'; |
6 | import { ensureFileSync, pathExistsSync, writeFileSync } from 'fs-extra'; | ||
7 | 7 | ||
8 | import { Stores } from '../@types/stores.types'; | 8 | import type { Stores } from '../@types/stores.types'; |
9 | import { ApiInterface } from '../api'; | 9 | import type { Actions } from '../actions/lib/actions'; |
10 | import { Actions } from '../actions/lib/actions'; | 10 | import type { ApiInterface } from '../api'; |
11 | import Request from './lib/Request'; | 11 | import { DEFAULT_SERVICE_SETTINGS, KEEP_WS_LOADED_USID } from '../config'; |
12 | import CachedRequest from './lib/CachedRequest'; | 12 | import { ferdiumVersion } from '../environment-remote'; |
13 | import matchRoute from '../helpers/routing-helpers'; | 13 | import { workspaceStore } from '../features/workspaces'; |
14 | import { isInTimeframe } from '../helpers/schedule-helpers'; | ||
15 | import { | 14 | import { |
16 | getRecipeDirectory, | ||
17 | getDevRecipeDirectory, | 15 | getDevRecipeDirectory, |
16 | getRecipeDirectory, | ||
18 | } from '../helpers/recipe-helpers'; | 17 | } from '../helpers/recipe-helpers'; |
19 | import Service from '../models/Service'; | 18 | import matchRoute from '../helpers/routing-helpers'; |
20 | import { workspaceStore } from '../features/workspaces'; | 19 | import { isInTimeframe } from '../helpers/schedule-helpers'; |
21 | import { DEFAULT_SERVICE_SETTINGS, KEEP_WS_LOADED_USID } from '../config'; | ||
22 | import { cleanseJSObject } from '../jsUtils'; | ||
23 | import { SPELLCHECKER_LOCALES } from '../i18n/languages'; | 20 | import { SPELLCHECKER_LOCALES } from '../i18n/languages'; |
24 | import { ferdiumVersion } from '../environment-remote'; | 21 | import { cleanseJSObject } from '../jsUtils'; |
25 | import TypedStore from './lib/TypedStore'; | ||
26 | import type { UnreadServices } from '../lib/dbus/Ferdium'; | 22 | import type { UnreadServices } from '../lib/dbus/Ferdium'; |
23 | import type Service from '../models/Service'; | ||
24 | import CachedRequest from './lib/CachedRequest'; | ||
25 | import Request from './lib/Request'; | ||
26 | import TypedStore from './lib/TypedStore'; | ||
27 | 27 | ||
28 | const debug = require('../preload-safe-debug')('Ferdium:ServiceStore'); | 28 | const debug = require('../preload-safe-debug')('Ferdium:ServiceStore'); |
29 | 29 | ||
diff --git a/src/stores/SettingsStore.ts b/src/stores/SettingsStore.ts index 010290a4a..72d6331cb 100644 --- a/src/stores/SettingsStore.ts +++ b/src/stores/SettingsStore.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import { ipcRenderer } from 'electron'; | ||
2 | import { getCurrentWindow } from '@electron/remote'; | 1 | import { getCurrentWindow } from '@electron/remote'; |
2 | import { ipcRenderer } from 'electron'; | ||
3 | import { action, computed, makeObservable, observable, reaction } from 'mobx'; | 3 | import { action, computed, makeObservable, observable, reaction } from 'mobx'; |
4 | import localStorage from 'mobx-localstorage'; | 4 | import localStorage from 'mobx-localstorage'; |
5 | import { Stores } from '../@types/stores.types'; | 5 | import type { Stores } from '../@types/stores.types'; |
6 | import { ApiInterface } from '../api'; | 6 | import type { Actions } from '../actions/lib/actions'; |
7 | import { Actions } from '../actions/lib/actions'; | 7 | import type { ApiInterface } from '../api'; |
8 | import { | 8 | import { |
9 | DEFAULT_APP_SETTINGS, | 9 | DEFAULT_APP_SETTINGS, |
10 | FILE_SYSTEM_SETTINGS_TYPES, | 10 | FILE_SYSTEM_SETTINGS_TYPES, |
diff --git a/src/stores/UIStore.ts b/src/stores/UIStore.ts index a3330c2e6..614c16763 100644 --- a/src/stores/UIStore.ts +++ b/src/stores/UIStore.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import { action, observable, computed, reaction, makeObservable } from 'mobx'; | ||
2 | import { nativeTheme } from '@electron/remote'; | 1 | import { nativeTheme } from '@electron/remote'; |
2 | import { action, computed, makeObservable, observable, reaction } from 'mobx'; | ||
3 | 3 | ||
4 | import { Stores } from '../@types/stores.types'; | 4 | import type { Stores } from '../@types/stores.types'; |
5 | import { ApiInterface } from '../api'; | 5 | import type { Actions } from '../actions/lib/actions'; |
6 | import { Actions } from '../actions/lib/actions'; | 6 | import type { ApiInterface } from '../api'; |
7 | import { Theme, theme, ThemeType } from '../themes'; | 7 | import { type Theme, ThemeType, theme } from '../themes'; |
8 | import TypedStore from './lib/TypedStore'; | 8 | import TypedStore from './lib/TypedStore'; |
9 | 9 | ||
10 | export default class UIStore extends TypedStore { | 10 | export default class UIStore extends TypedStore { |
diff --git a/src/stores/UserStore.ts b/src/stores/UserStore.ts index 9c3fcd3b9..ade68e4d4 100644 --- a/src/stores/UserStore.ts +++ b/src/stores/UserStore.ts | |||
@@ -1,16 +1,16 @@ | |||
1 | import { observable, computed, action, makeObservable } from 'mobx'; | 1 | import { ipcRenderer } from 'electron'; |
2 | import moment from 'moment'; | ||
3 | import jwt from 'jsonwebtoken'; | 2 | import jwt from 'jsonwebtoken'; |
3 | import { action, computed, makeObservable, observable } from 'mobx'; | ||
4 | import localStorage from 'mobx-localstorage'; | 4 | import localStorage from 'mobx-localstorage'; |
5 | import { ipcRenderer } from 'electron'; | 5 | import moment from 'moment'; |
6 | 6 | ||
7 | import { ApiInterface } from '../api'; | 7 | import type { Stores } from '../@types/stores.types'; |
8 | import { Actions } from '../actions/lib/actions'; | 8 | import type { Actions } from '../actions/lib/actions'; |
9 | import { Stores } from '../@types/stores.types'; | 9 | import type { ApiInterface } from '../api'; |
10 | import { TODOS_PARTITION_ID } from '../config'; | 10 | import { TODOS_PARTITION_ID } from '../config'; |
11 | import { isDevMode } from '../environment-remote'; | 11 | import { isDevMode } from '../environment-remote'; |
12 | import Request from './lib/Request'; | ||
13 | import CachedRequest from './lib/CachedRequest'; | 12 | import CachedRequest from './lib/CachedRequest'; |
13 | import Request from './lib/Request'; | ||
14 | import TypedStore from './lib/TypedStore'; | 14 | import TypedStore from './lib/TypedStore'; |
15 | 15 | ||
16 | const debug = require('../preload-safe-debug')('Ferdium:UserStore'); | 16 | const debug = require('../preload-safe-debug')('Ferdium:UserStore'); |
diff --git a/src/stores/index.ts b/src/stores/index.ts index f9927d9a3..5b96e6efb 100644 --- a/src/stores/index.ts +++ b/src/stores/index.ts | |||
@@ -1,19 +1,19 @@ | |||
1 | import { RouterStore } from '@superwf/mobx-react-router'; | 1 | import type { RouterStore } from '@superwf/mobx-react-router'; |
2 | import { ApiInterface } from '../api'; | 2 | import type { Actions } from '../actions/lib/actions'; |
3 | import { Actions } from '../actions/lib/actions'; | 3 | import type { ApiInterface } from '../api'; |
4 | import { communityRecipesStore } from '../features/communityRecipes'; | ||
5 | import { todosStore } from '../features/todos'; | ||
6 | import { workspaceStore } from '../features/workspaces'; | ||
4 | import AppStore from './AppStore'; | 7 | import AppStore from './AppStore'; |
5 | import UserStore from './UserStore'; | ||
6 | import FeaturesStore from './FeaturesStore'; | 8 | import FeaturesStore from './FeaturesStore'; |
7 | import SettingsStore from './SettingsStore'; | 9 | import GlobalErrorStore from './GlobalErrorStore'; |
8 | import ServicesStore from './ServicesStore'; | ||
9 | import RecipesStore from './RecipesStore'; | ||
10 | import RecipePreviewsStore from './RecipePreviewsStore'; | 10 | import RecipePreviewsStore from './RecipePreviewsStore'; |
11 | import UIStore from './UIStore'; | 11 | import RecipesStore from './RecipesStore'; |
12 | import RequestStore from './RequestStore'; | 12 | import RequestStore from './RequestStore'; |
13 | import GlobalErrorStore from './GlobalErrorStore'; | 13 | import ServicesStore from './ServicesStore'; |
14 | import { workspaceStore } from '../features/workspaces'; | 14 | import SettingsStore from './SettingsStore'; |
15 | import { communityRecipesStore } from '../features/communityRecipes'; | 15 | import UIStore from './UIStore'; |
16 | import { todosStore } from '../features/todos'; | 16 | import UserStore from './UserStore'; |
17 | 17 | ||
18 | export interface RealStores { | 18 | export interface RealStores { |
19 | router: RouterStore; | 19 | router: RouterStore; |
diff --git a/src/stores/lib/CachedRequest.ts b/src/stores/lib/CachedRequest.ts index b24336fe6..3b15fcf3f 100644 --- a/src/stores/lib/CachedRequest.ts +++ b/src/stores/lib/CachedRequest.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { action } from 'mobx'; | ||
2 | import { isEqual } from 'lodash'; | 1 | import { isEqual } from 'lodash'; |
2 | import { action } from 'mobx'; | ||
3 | import Request from './Request'; | 3 | import Request from './Request'; |
4 | 4 | ||
5 | export default class CachedRequest extends Request { | 5 | export default class CachedRequest extends Request { |
diff --git a/src/stores/lib/Reaction.ts b/src/stores/lib/Reaction.ts index 3966c8073..d418d8db8 100644 --- a/src/stores/lib/Reaction.ts +++ b/src/stores/lib/Reaction.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { autorun, IReactionDisposer, IReactionPublic } from 'mobx'; | 1 | import { type IReactionDisposer, type IReactionPublic, autorun } from 'mobx'; |
2 | 2 | ||
3 | export default class Reaction { | 3 | export default class Reaction { |
4 | public reaction: (r: IReactionPublic) => any; | 4 | public reaction: (r: IReactionPublic) => any; |
diff --git a/src/stores/lib/Request.ts b/src/stores/lib/Request.ts index 587af87d7..e7739bba1 100644 --- a/src/stores/lib/Request.ts +++ b/src/stores/lib/Request.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { observable, action, computed, makeObservable } from 'mobx'; | 1 | import { action, computed, makeObservable, observable } from 'mobx'; |
2 | 2 | ||
3 | // eslint-disable-next-line no-use-before-define | 3 | // eslint-disable-next-line no-use-before-define |
4 | type Hook = (request: Request) => void; | 4 | type Hook = (request: Request) => void; |
diff --git a/src/stores/lib/TypedStore.ts b/src/stores/lib/TypedStore.ts index 8bae529ba..6d499b637 100644 --- a/src/stores/lib/TypedStore.ts +++ b/src/stores/lib/TypedStore.ts | |||
@@ -1,13 +1,13 @@ | |||
1 | import { | 1 | import { |
2 | type IReactionPublic, | ||
2 | action, | 3 | action, |
3 | computed, | 4 | computed, |
4 | IReactionPublic, | ||
5 | makeObservable, | 5 | makeObservable, |
6 | observable, | 6 | observable, |
7 | } from 'mobx'; | 7 | } from 'mobx'; |
8 | import { Actions } from '../../actions/lib/actions'; | 8 | import type { Stores } from '../../@types/stores.types'; |
9 | import { ApiInterface } from '../../api'; | 9 | import type { Actions } from '../../actions/lib/actions'; |
10 | import { Stores } from '../../@types/stores.types'; | 10 | import type { ApiInterface } from '../../api'; |
11 | import Reaction from './Reaction'; | 11 | import Reaction from './Reaction'; |
12 | 12 | ||
13 | export default abstract class TypedStore { | 13 | export default abstract class TypedStore { |
diff --git a/src/themes/default/index.ts b/src/themes/default/index.ts index ac04a6e3b..8df7ff06e 100644 --- a/src/themes/default/index.ts +++ b/src/themes/default/index.ts | |||
@@ -1,9 +1,9 @@ | |||
1 | import color from 'color'; | 1 | import color from 'color'; |
2 | import { cloneDeep } from 'lodash'; | 2 | import { cloneDeep } from 'lodash'; |
3 | 3 | ||
4 | import * as legacyStyles from '../legacy'; | ||
5 | import type IStyleTypes from '../IStyleTypes'; | ||
6 | import { DEFAULT_LOADER_COLOR } from '../../config'; | 4 | import { DEFAULT_LOADER_COLOR } from '../../config'; |
5 | import type IStyleTypes from '../IStyleTypes'; | ||
6 | import * as legacyStyles from '../legacy'; | ||
7 | 7 | ||
8 | export default (brandPrimary: string) => { | 8 | export default (brandPrimary: string) => { |
9 | if (!brandPrimary) { | 9 | if (!brandPrimary) { |
diff --git a/src/webview/contextMenuBuilder.ts b/src/webview/contextMenuBuilder.ts index ee55fbe62..155e533e9 100644 --- a/src/webview/contextMenuBuilder.ts +++ b/src/webview/contextMenuBuilder.ts | |||
@@ -7,20 +7,25 @@ | |||
7 | * Source: https://github.com/electron-userland/electron-spellchecker/blob/master/src/context-menu-builder.js | 7 | * Source: https://github.com/electron-userland/electron-spellchecker/blob/master/src/context-menu-builder.js |
8 | */ | 8 | */ |
9 | 9 | ||
10 | import { clipboard, ipcRenderer, nativeImage, WebContents } from 'electron'; | ||
11 | import { Menu, MenuItem } from '@electron/remote'; | 10 | import { Menu, MenuItem } from '@electron/remote'; |
11 | import { | ||
12 | type WebContents, | ||
13 | clipboard, | ||
14 | ipcRenderer, | ||
15 | nativeImage, | ||
16 | } from 'electron'; | ||
12 | import { cmdOrCtrlShortcutKey, isMac } from '../environment'; | 17 | import { cmdOrCtrlShortcutKey, isMac } from '../environment'; |
13 | 18 | ||
14 | import { | 19 | import { |
20 | GOOGLE_TRANSLATOR_LANGUAGES, | ||
21 | LIBRETRANSLATE_TRANSLATOR_LANGUAGES, | ||
15 | SEARCH_ENGINE_NAMES, | 22 | SEARCH_ENGINE_NAMES, |
16 | SEARCH_ENGINE_URLS, | 23 | SEARCH_ENGINE_URLS, |
17 | GOOGLE_TRANSLATOR_LANGUAGES, | ||
18 | TRANSLATOR_ENGINE_GOOGLE, | 24 | TRANSLATOR_ENGINE_GOOGLE, |
19 | TRANSLATOR_ENGINE_LIBRETRANSLATE, | 25 | TRANSLATOR_ENGINE_LIBRETRANSLATE, |
20 | LIBRETRANSLATE_TRANSLATOR_LANGUAGES, | ||
21 | } from '../config'; | 26 | } from '../config'; |
22 | import { openExternalUrl } from '../helpers/url-helpers'; | 27 | import { openExternalUrl } from '../helpers/url-helpers'; |
23 | import IContextMenuParams from '../models/IContextMenuParams'; | 28 | import type IContextMenuParams from '../models/IContextMenuParams'; |
24 | 29 | ||
25 | function matchesWord(string: string) { | 30 | function matchesWord(string: string) { |
26 | const regex = | 31 | const regex = |
diff --git a/src/webview/lib/RecipeWebview.ts b/src/webview/lib/RecipeWebview.ts index 31e9a288d..3b6b9cc88 100644 --- a/src/webview/lib/RecipeWebview.ts +++ b/src/webview/lib/RecipeWebview.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { ipcRenderer } from 'electron'; | ||
2 | import { BrowserWindow } from '@electron/remote'; | 1 | import { BrowserWindow } from '@electron/remote'; |
3 | import { pathExistsSync, readFileSync, existsSync } from 'fs-extra'; | 2 | import { ipcRenderer } from 'electron'; |
3 | import { existsSync, pathExistsSync, readFileSync } from 'fs-extra'; | ||
4 | import { safeParseInt } from '../../jsUtils'; | 4 | import { safeParseInt } from '../../jsUtils'; |
5 | 5 | ||
6 | const debug = require('../../preload-safe-debug')( | 6 | const debug = require('../../preload-safe-debug')( |
diff --git a/src/webview/recipe.ts b/src/webview/recipe.ts index 148ea6fab..d6db39779 100644 --- a/src/webview/recipe.ts +++ b/src/webview/recipe.ts | |||
@@ -1,26 +1,24 @@ | |||
1 | /* eslint-disable global-require */ | 1 | /* eslint-disable global-require */ |
2 | /* eslint-disable import/no-dynamic-require */ | 2 | /* eslint-disable import/no-dynamic-require */ |
3 | 3 | ||
4 | import { join } from 'node:path'; | ||
5 | import { existsSync } from 'node:fs'; | 4 | import { existsSync } from 'node:fs'; |
6 | import { noop, debounce } from 'lodash'; | 5 | import { join } from 'node:path'; |
7 | import { contextBridge, ipcRenderer } from 'electron'; | ||
8 | import { autorun, computed, makeObservable, observable } from 'mobx'; | ||
9 | import { pathExistsSync, readFileSync } from 'fs-extra'; | ||
10 | import { | 6 | import { |
11 | disable as disableDarkMode, | 7 | disable as disableDarkMode, |
12 | enable as enableDarkMode, | 8 | enable as enableDarkMode, |
13 | } from 'darkreader'; | 9 | } from 'darkreader'; |
10 | import { contextBridge, ipcRenderer } from 'electron'; | ||
11 | import { pathExistsSync, readFileSync } from 'fs-extra'; | ||
12 | import { debounce, noop } from 'lodash'; | ||
13 | import { autorun, computed, makeObservable, observable } from 'mobx'; | ||
14 | 14 | ||
15 | import ignoreList from './darkmode/ignore'; | ||
16 | import customDarkModeCss from './darkmode/custom'; | 15 | import customDarkModeCss from './darkmode/custom'; |
16 | import ignoreList from './darkmode/ignore'; | ||
17 | 17 | ||
18 | import RecipeWebview from './lib/RecipeWebview'; | 18 | import RecipeWebview from './lib/RecipeWebview'; |
19 | import Userscript from './lib/Userscript'; | 19 | import Userscript from './lib/Userscript'; |
20 | 20 | ||
21 | import BadgeHandler from './badge'; | 21 | import BadgeHandler from './badge'; |
22 | import DialogTitleHandler from './dialogTitle'; | ||
23 | import SessionHandler from './sessionHandler'; | ||
24 | import contextMenu from './contextMenu'; | 22 | import contextMenu from './contextMenu'; |
25 | import { | 23 | import { |
26 | darkModeStyleExists, | 24 | darkModeStyleExists, |
@@ -28,25 +26,27 @@ import { | |||
28 | isDarkModeStyleInjected, | 26 | isDarkModeStyleInjected, |
29 | removeDarkModeStyle, | 27 | removeDarkModeStyle, |
30 | } from './darkmode'; | 28 | } from './darkmode'; |
29 | import DialogTitleHandler from './dialogTitle'; | ||
31 | import FindInPage from './find'; | 30 | import FindInPage from './find'; |
32 | import { | 31 | import { |
33 | notificationsClassDefinition, | ||
34 | NotificationsHandler, | 32 | NotificationsHandler, |
33 | notificationsClassDefinition, | ||
35 | } from './notifications'; | 34 | } from './notifications'; |
36 | import { | 35 | import { |
37 | getDisplayMediaSelector, | 36 | getDisplayMediaSelector, |
38 | screenShareCss, | 37 | screenShareCss, |
39 | screenShareJs, | 38 | screenShareJs, |
40 | } from './screenshare'; | 39 | } from './screenshare'; |
40 | import SessionHandler from './sessionHandler'; | ||
41 | import { | 41 | import { |
42 | getSpellcheckerLocaleByFuzzyIdentifier, | 42 | getSpellcheckerLocaleByFuzzyIdentifier, |
43 | switchDict, | 43 | switchDict, |
44 | } from './spellchecker'; | 44 | } from './spellchecker'; |
45 | 45 | ||
46 | import type { AppStore } from '../@types/stores.types'; | ||
46 | import { DEFAULT_APP_SETTINGS } from '../config'; | 47 | import { DEFAULT_APP_SETTINGS } from '../config'; |
47 | import { cleanseJSObject, ifUndefined, safeParseInt } from '../jsUtils'; | 48 | import { cleanseJSObject, ifUndefined, safeParseInt } from '../jsUtils'; |
48 | import { AppStore } from '../@types/stores.types'; | 49 | import type Service from '../models/Service'; |
49 | import Service from '../models/Service'; | ||
50 | 50 | ||
51 | // For some services darkreader tries to use the chrome extension message API | 51 | // For some services darkreader tries to use the chrome extension message API |
52 | // This will cause the service to fail loading | 52 | // This will cause the service to fail loading |
diff --git a/src/webview/spellchecker.ts b/src/webview/spellchecker.ts index 8e452c791..92024b9b0 100644 --- a/src/webview/spellchecker.ts +++ b/src/webview/spellchecker.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { ipcRenderer } from 'electron'; | 1 | import { ipcRenderer } from 'electron'; |
2 | import { SPELLCHECKER_LOCALES } from '../i18n/languages'; | ||
3 | import { isMac } from '../environment'; | 2 | import { isMac } from '../environment'; |
3 | import { SPELLCHECKER_LOCALES } from '../i18n/languages'; | ||
4 | 4 | ||
5 | const debug = require('../preload-safe-debug')('Ferdium:spellchecker'); | 5 | const debug = require('../preload-safe-debug')('Ferdium:spellchecker'); |
6 | 6 | ||