aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/todos
diff options
context:
space:
mode:
authorLibravatar Markandan R <rmarkandan@yahoo.com>2021-06-22 10:56:34 +0530
committerLibravatar GitHub <noreply@github.com>2021-06-22 10:56:34 +0530
commita94ed659846f0bc93c05bccf0c96785b91e5c78f (patch)
tree0a50eeb85e9043708936da9a0c923b32edbe8ab9 /src/features/todos
parentDowngraded submodule 'src/internal-server' (diff)
downloadferdium-app-a94ed659846f0bc93c05bccf0c96785b91e5c78f.tar.gz
ferdium-app-a94ed659846f0bc93c05bccf0c96785b91e5c78f.tar.zst
ferdium-app-a94ed659846f0bc93c05bccf0c96785b91e5c78f.zip
Removed the cyclical dependency (#1519) (#1539)
Diffstat (limited to 'src/features/todos')
-rw-r--r--src/features/todos/components/TodosWebview.js2
-rw-r--r--src/features/todos/constants.js4
-rw-r--r--src/features/todos/containers/TodosScreen.js3
-rw-r--r--src/features/todos/index.js10
-rw-r--r--src/features/todos/store.js15
5 files changed, 16 insertions, 18 deletions
diff --git a/src/features/todos/components/TodosWebview.js b/src/features/todos/components/TodosWebview.js
index 03bb5efe8..dccb818a6 100644
--- a/src/features/todos/components/TodosWebview.js
+++ b/src/features/todos/components/TodosWebview.js
@@ -5,7 +5,7 @@ import injectSheet from 'react-jss';
5import Webview from 'react-electron-web-view'; 5import Webview from 'react-electron-web-view';
6import classnames from 'classnames'; 6import classnames from 'classnames';
7 7
8import { TODOS_PARTITION_ID } from '..'; 8import { TODOS_PARTITION_ID } from '../../../config';
9 9
10const styles = theme => ({ 10const styles = theme => ({
11 root: { 11 root: {
diff --git a/src/features/todos/constants.js b/src/features/todos/constants.js
index 2e8a431cc..303a7a16e 100644
--- a/src/features/todos/constants.js
+++ b/src/features/todos/constants.js
@@ -2,3 +2,7 @@ export const IPC = {
2 TODOS_HOST_CHANNEL: 'TODOS_HOST_CHANNEL', 2 TODOS_HOST_CHANNEL: 'TODOS_HOST_CHANNEL',
3 TODOS_CLIENT_CHANNEL: 'TODOS_CLIENT_CHANNEL', 3 TODOS_CLIENT_CHANNEL: 'TODOS_CLIENT_CHANNEL',
4}; 4};
5
6export const TODOS_ROUTES = {
7 TARGET: '/todos',
8};
diff --git a/src/features/todos/containers/TodosScreen.js b/src/features/todos/containers/TodosScreen.js
index 96147d5ab..6425746e6 100644
--- a/src/features/todos/containers/TodosScreen.js
+++ b/src/features/todos/containers/TodosScreen.js
@@ -5,7 +5,8 @@ import PropTypes from 'prop-types';
5import FeaturesStore from '../../../stores/FeaturesStore'; 5import FeaturesStore from '../../../stores/FeaturesStore';
6import TodosWebview from '../components/TodosWebview'; 6import TodosWebview from '../components/TodosWebview';
7import ErrorBoundary from '../../../components/util/ErrorBoundary'; 7import ErrorBoundary from '../../../components/util/ErrorBoundary';
8import { TODOS_MIN_WIDTH, todosStore } from '..'; 8import { todosStore } from '..';
9import { TODOS_MIN_WIDTH } from '../../../config';
9import { todoActions } from '../actions'; 10import { todoActions } from '../actions';
10import ServicesStore from '../../../stores/ServicesStore'; 11import ServicesStore from '../../../stores/ServicesStore';
11 12
diff --git a/src/features/todos/index.js b/src/features/todos/index.js
index b6d13e5e1..1c6c9179a 100644
--- a/src/features/todos/index.js
+++ b/src/features/todos/index.js
@@ -5,16 +5,6 @@ const debug = require('debug')('Ferdi:feature:todos');
5 5
6export const GA_CATEGORY_TODOS = 'Todos'; 6export const GA_CATEGORY_TODOS = 'Todos';
7 7
8export const DEFAULT_TODOS_WIDTH = 300;
9export const TODOS_MIN_WIDTH = 200;
10export const DEFAULT_TODOS_VISIBLE = true;
11export const DEFAULT_IS_FEATURE_ENABLED_BY_USER = true;
12export const TODOS_PARTITION_ID = 'persist:todos';
13
14export const TODOS_ROUTES = {
15 TARGET: '/todos',
16};
17
18export const todosStore = new TodoStore(); 8export const todosStore = new TodoStore();
19 9
20export default function initTodos(stores, actions) { 10export default function initTodos(stores, actions) {
diff --git a/src/features/todos/store.js b/src/features/todos/store.js
index 4febd7bb1..429507927 100644
--- a/src/features/todos/store.js
+++ b/src/features/todos/store.js
@@ -7,17 +7,20 @@ import {
7import localStorage from 'mobx-localstorage'; 7import localStorage from 'mobx-localstorage';
8 8
9import { todoActions } from './actions'; 9import { todoActions } from './actions';
10import { CUSTOM_TODO_SERVICE, TODO_SERVICE_RECIPE_IDS } from '../../config'; 10import {
11 CUSTOM_TODO_SERVICE,
12 TODO_SERVICE_RECIPE_IDS,
13 DEFAULT_TODOS_WIDTH,
14 TODOS_MIN_WIDTH,
15 DEFAULT_TODOS_VISIBLE,
16 DEFAULT_IS_FEATURE_ENABLED_BY_USER,
17} from '../../config';
11import { isValidExternalURL } from '../../helpers/url-helpers'; 18import { isValidExternalURL } from '../../helpers/url-helpers';
12import { FeatureStore } from '../utils/FeatureStore'; 19import { FeatureStore } from '../utils/FeatureStore';
13import { createReactions } from '../../stores/lib/Reaction'; 20import { createReactions } from '../../stores/lib/Reaction';
14import { createActionBindings } from '../utils/ActionBinding'; 21import { createActionBindings } from '../utils/ActionBinding';
15import { 22import { IPC, TODOS_ROUTES } from './constants';
16 DEFAULT_TODOS_WIDTH, TODOS_MIN_WIDTH, DEFAULT_TODOS_VISIBLE, TODOS_ROUTES, DEFAULT_IS_FEATURE_ENABLED_BY_USER,
17} from '.';
18import { IPC } from './constants';
19import { state as delayAppState } from '../delayApp'; 23import { state as delayAppState } from '../delayApp';
20
21import UserAgent from '../../models/UserAgent'; 24import UserAgent from '../../models/UserAgent';
22 25
23const debug = require('debug')('Ferdi:feature:todos:store'); 26const debug = require('debug')('Ferdi:feature:todos:store');