diff options
author | 2021-09-14 10:34:04 +0200 | |
---|---|---|
committer | 2021-09-14 10:34:04 +0200 | |
commit | 979ec02c9a1019152be08705986337e470eabb57 (patch) | |
tree | 6021179ad8649112717a499780f475275af487f2 /src/actions/service.ts | |
parent | refactor: defensive programming to avoid javascript error for unread badges (diff) | |
download | ferdium-app-979ec02c9a1019152be08705986337e470eabb57.tar.gz ferdium-app-979ec02c9a1019152be08705986337e470eabb57.tar.zst ferdium-app-979ec02c9a1019152be08705986337e470eabb57.zip |
chore: codebase improvements (#1930)
Diffstat (limited to 'src/actions/service.ts')
-rw-r--r-- | src/actions/service.ts | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/src/actions/service.ts b/src/actions/service.ts new file mode 100644 index 000000000..e56513f8f --- /dev/null +++ b/src/actions/service.ts | |||
@@ -0,0 +1,111 @@ | |||
1 | import PropTypes from 'prop-types'; | ||
2 | import ServiceModel from '../models/Service'; | ||
3 | |||
4 | export default { | ||
5 | setActive: { | ||
6 | serviceId: PropTypes.string.isRequired, | ||
7 | keepActiveRoute: PropTypes.bool, | ||
8 | }, | ||
9 | blurActive: {}, | ||
10 | setActiveNext: {}, | ||
11 | setActivePrev: {}, | ||
12 | showAddServiceInterface: { | ||
13 | recipeId: PropTypes.string.isRequired, | ||
14 | }, | ||
15 | createService: { | ||
16 | recipeId: PropTypes.string.isRequired, | ||
17 | serviceData: PropTypes.object.isRequired, | ||
18 | }, | ||
19 | createFromLegacyService: { | ||
20 | data: PropTypes.object.isRequired, | ||
21 | }, | ||
22 | updateService: { | ||
23 | serviceId: PropTypes.string.isRequired, | ||
24 | serviceData: PropTypes.object.isRequired, | ||
25 | redirect: PropTypes.bool, | ||
26 | }, | ||
27 | deleteService: { | ||
28 | serviceId: PropTypes.string.isRequired, | ||
29 | redirect: PropTypes.string, | ||
30 | }, | ||
31 | openRecipeFile: { | ||
32 | recipe: PropTypes.string.isRequired, | ||
33 | file: PropTypes.string.isRequired, | ||
34 | }, | ||
35 | clearCache: { | ||
36 | serviceId: PropTypes.string.isRequired, | ||
37 | }, | ||
38 | setUnreadMessageCount: { | ||
39 | serviceId: PropTypes.string.isRequired, | ||
40 | count: PropTypes.object.isRequired, | ||
41 | }, | ||
42 | setWebviewReference: { | ||
43 | serviceId: PropTypes.string.isRequired, | ||
44 | webview: PropTypes.object.isRequired, | ||
45 | }, | ||
46 | detachService: { | ||
47 | service: PropTypes.instanceOf(ServiceModel).isRequired, | ||
48 | }, | ||
49 | focusService: { | ||
50 | serviceId: PropTypes.string.isRequired, | ||
51 | }, | ||
52 | focusActiveService: {}, | ||
53 | toggleService: { | ||
54 | serviceId: PropTypes.string.isRequired, | ||
55 | }, | ||
56 | handleIPCMessage: { | ||
57 | serviceId: PropTypes.string.isRequired, | ||
58 | channel: PropTypes.string.isRequired, | ||
59 | args: PropTypes.array.isRequired, | ||
60 | }, | ||
61 | sendIPCMessage: { | ||
62 | serviceId: PropTypes.string.isRequired, | ||
63 | channel: PropTypes.string.isRequired, | ||
64 | args: PropTypes.object.isRequired, | ||
65 | }, | ||
66 | sendIPCMessageToAllServices: { | ||
67 | channel: PropTypes.string.isRequired, | ||
68 | args: PropTypes.object.isRequired, | ||
69 | }, | ||
70 | openWindow: { | ||
71 | event: PropTypes.object.isRequired, | ||
72 | }, | ||
73 | reload: { | ||
74 | serviceId: PropTypes.string.isRequired, | ||
75 | }, | ||
76 | reloadActive: {}, | ||
77 | reloadAll: {}, | ||
78 | reloadUpdatedServices: {}, | ||
79 | filter: { | ||
80 | needle: PropTypes.string.isRequired, | ||
81 | }, | ||
82 | resetFilter: {}, | ||
83 | resetStatus: {}, | ||
84 | reorder: { | ||
85 | oldIndex: PropTypes.number.isRequired, | ||
86 | newIndex: PropTypes.number.isRequired, | ||
87 | }, | ||
88 | toggleNotifications: { | ||
89 | serviceId: PropTypes.string.isRequired, | ||
90 | }, | ||
91 | toggleAudio: { | ||
92 | serviceId: PropTypes.string.isRequired, | ||
93 | }, | ||
94 | toggleDarkMode: { | ||
95 | serviceId: PropTypes.string.isRequired, | ||
96 | }, | ||
97 | openDevTools: { | ||
98 | serviceId: PropTypes.string.isRequired, | ||
99 | }, | ||
100 | openDevToolsForActiveService: {}, | ||
101 | hibernate: { | ||
102 | serviceId: PropTypes.string.isRequired, | ||
103 | }, | ||
104 | awake: { | ||
105 | serviceId: PropTypes.string.isRequired, | ||
106 | }, | ||
107 | resetLastPollTimer: { | ||
108 | serviceId: PropTypes.string, | ||
109 | }, | ||
110 | shareSettingsWithServiceProcess: {}, | ||
111 | }; | ||