diff options
author | 2021-08-13 00:45:01 +0530 | |
---|---|---|
committer | 2021-08-13 00:45:01 +0530 | |
commit | 2d27d5e66649d4f5baf127a53ee5ae524eae3a59 (patch) | |
tree | c592ea219ac8cd987fc367f57b54034c450ab2ab /src/features/todos | |
parent | Ferdi v5.6.0 (diff) | |
parent | 5.6.1-nightly.24 [skip ci] (diff) | |
download | ferdium-app-2d27d5e66649d4f5baf127a53ee5ae524eae3a59.tar.gz ferdium-app-2d27d5e66649d4f5baf127a53ee5ae524eae3a59.tar.zst ferdium-app-2d27d5e66649d4f5baf127a53ee5ae524eae3a59.zip |
chore: merge from nightly branch into release branch in prep for next beta
Diffstat (limited to 'src/features/todos')
-rw-r--r-- | src/features/todos/components/TodosWebview.js | 20 | ||||
-rw-r--r-- | src/features/todos/containers/TodosScreen.js | 4 | ||||
-rw-r--r-- | src/features/todos/store.js | 15 |
3 files changed, 9 insertions, 30 deletions
diff --git a/src/features/todos/components/TodosWebview.js b/src/features/todos/components/TodosWebview.js index ca8460f94..2dc30cdf2 100644 --- a/src/features/todos/components/TodosWebview.js +++ b/src/features/todos/components/TodosWebview.js | |||
@@ -35,26 +35,6 @@ const styles = (theme) => ({ | |||
35 | zIndex: 400, | 35 | zIndex: 400, |
36 | background: theme.todos.dragIndicator.background, | 36 | background: theme.todos.dragIndicator.background, |
37 | }, | 37 | }, |
38 | premiumContainer: { | ||
39 | display: 'flex', | ||
40 | flexDirection: 'column', | ||
41 | justifyContent: 'center', | ||
42 | alignItems: 'center', | ||
43 | width: '80%', | ||
44 | maxWidth: 300, | ||
45 | margin: [0, 'auto'], | ||
46 | textAlign: 'center', | ||
47 | }, | ||
48 | premiumIcon: { | ||
49 | marginBottom: 40, | ||
50 | background: theme.styleTypes.primary.accent, | ||
51 | fill: theme.styleTypes.primary.contrast, | ||
52 | padding: 10, | ||
53 | borderRadius: 10, | ||
54 | }, | ||
55 | premiumCTA: { | ||
56 | marginTop: 40, | ||
57 | }, | ||
58 | isTodosServiceActive: { | 38 | isTodosServiceActive: { |
59 | width: 'calc(100% - 368px)', | 39 | width: 'calc(100% - 368px)', |
60 | position: 'absolute', | 40 | position: 'absolute', |
diff --git a/src/features/todos/containers/TodosScreen.js b/src/features/todos/containers/TodosScreen.js index 6425746e6..d05e24e56 100644 --- a/src/features/todos/containers/TodosScreen.js +++ b/src/features/todos/containers/TodosScreen.js | |||
@@ -24,10 +24,10 @@ class TodosScreen extends Component { | |||
24 | isVisible={todosStore.isTodosPanelVisible} | 24 | isVisible={todosStore.isTodosPanelVisible} |
25 | togglePanel={todoActions.toggleTodosPanel} | 25 | togglePanel={todoActions.toggleTodosPanel} |
26 | handleClientMessage={todoActions.handleClientMessage} | 26 | handleClientMessage={todoActions.handleClientMessage} |
27 | setTodosWebview={webview => todoActions.setTodosWebview({ webview })} | 27 | setTodosWebview={(webview) => todoActions.setTodosWebview({ webview })} |
28 | width={todosStore.width} | 28 | width={todosStore.width} |
29 | minWidth={TODOS_MIN_WIDTH} | 29 | minWidth={TODOS_MIN_WIDTH} |
30 | resize={width => todoActions.resize({ width })} | 30 | resize={(width) => todoActions.resize({ width })} |
31 | userAgent={todosStore.userAgent} | 31 | userAgent={todosStore.userAgent} |
32 | todoUrl={todosStore.todoUrl} | 32 | todoUrl={todosStore.todoUrl} |
33 | isTodoUrlValid={todosStore.isTodoUrlValid} | 33 | isTodoUrlValid={todosStore.isTodoUrlValid} |
diff --git a/src/features/todos/store.js b/src/features/todos/store.js index 429507927..f283c1e59 100644 --- a/src/features/todos/store.js +++ b/src/features/todos/store.js | |||
@@ -20,7 +20,6 @@ import { FeatureStore } from '../utils/FeatureStore'; | |||
20 | import { createReactions } from '../../stores/lib/Reaction'; | 20 | import { createReactions } from '../../stores/lib/Reaction'; |
21 | import { createActionBindings } from '../utils/ActionBinding'; | 21 | import { createActionBindings } from '../utils/ActionBinding'; |
22 | import { IPC, TODOS_ROUTES } from './constants'; | 22 | import { IPC, TODOS_ROUTES } from './constants'; |
23 | import { state as delayAppState } from '../delayApp'; | ||
24 | import UserAgent from '../../models/UserAgent'; | 23 | import UserAgent from '../../models/UserAgent'; |
25 | 24 | ||
26 | const debug = require('debug')('Ferdi:feature:todos:store'); | 25 | const debug = require('debug')('Ferdi:feature:todos:store'); |
@@ -46,7 +45,7 @@ export default class TodoStore extends FeatureStore { | |||
46 | 45 | ||
47 | @computed get isTodosPanelForceHidden() { | 46 | @computed get isTodosPanelForceHidden() { |
48 | const { isAnnouncementShown } = this.stores.announcements; | 47 | const { isAnnouncementShown } = this.stores.announcements; |
49 | return delayAppState.isDelayAppScreenVisible || !this.isFeatureEnabledByUser || isAnnouncementShown; | 48 | return !this.isFeatureEnabledByUser || isAnnouncementShown; |
50 | } | 49 | } |
51 | 50 | ||
52 | @computed get isTodosPanelVisible() { | 51 | @computed get isTodosPanelVisible() { |
@@ -123,12 +122,6 @@ export default class TodoStore extends FeatureStore { | |||
123 | this._registerReactions(this._allReactions); | 122 | this._registerReactions(this._allReactions); |
124 | 123 | ||
125 | this.isFeatureActive = true; | 124 | this.isFeatureActive = true; |
126 | |||
127 | if (this.settings.isFeatureEnabledByUser === undefined) { | ||
128 | this._updateSettings({ | ||
129 | isFeatureEnabledByUser: DEFAULT_IS_FEATURE_ENABLED_BY_USER, | ||
130 | }); | ||
131 | } | ||
132 | } | 125 | } |
133 | 126 | ||
134 | @action stop() { | 127 | @action stop() { |
@@ -266,6 +259,12 @@ export default class TodoStore extends FeatureStore { | |||
266 | _firstLaunchReaction = () => { | 259 | _firstLaunchReaction = () => { |
267 | const { stats } = this.stores.settings.all; | 260 | const { stats } = this.stores.settings.all; |
268 | 261 | ||
262 | if (this.settings.isFeatureEnabledByUser === undefined) { | ||
263 | this._updateSettings({ | ||
264 | isFeatureEnabledByUser: DEFAULT_IS_FEATURE_ENABLED_BY_USER, | ||
265 | }); | ||
266 | } | ||
267 | |||
269 | // Hide todos layer on first app start but show on second | 268 | // Hide todos layer on first app start but show on second |
270 | if (stats.appStarts <= 1) { | 269 | if (stats.appStarts <= 1) { |
271 | this._updateSettings({ | 270 | this._updateSettings({ |