aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores
diff options
context:
space:
mode:
authorLibravatar André Oliveira <37463445+SpecialAro@users.noreply.github.com>2022-08-17 22:54:41 +0100
committerLibravatar GitHub <noreply@github.com>2022-08-17 22:54:41 +0100
commitfb0cc81d1db0d88c90bb112a0caec66095fcc0f0 (patch)
treeaaa5d0f92f55ccf3984af2cbf2ebbcb1da5fd7c6 /src/stores
parent6.0.1-nightly.16 [skip ci] (diff)
downloadferdium-app-fb0cc81d1db0d88c90bb112a0caec66095fcc0f0.tar.gz
ferdium-app-fb0cc81d1db0d88c90bb112a0caec66095fcc0f0.tar.zst
ferdium-app-fb0cc81d1db0d88c90bb112a0caec66095fcc0f0.zip
Feature: Add Ferdium Translator (#548)
Add feature to translate text natively using https://github.com/shikar/NODE_GOOGLE_TRANSLATE package and a LibreTranslate self-hosted option (already running on our server on https://translator.ferdium.org).
Diffstat (limited to 'src/stores')
-rw-r--r--src/stores/ServicesStore.ts21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/stores/ServicesStore.ts b/src/stores/ServicesStore.ts
index 83ec7d18e..00cf33b17 100644
--- a/src/stores/ServicesStore.ts
+++ b/src/stores/ServicesStore.ts
@@ -158,6 +158,13 @@ export default class ServicesStore extends TypedStore {
158 ); 158 );
159 159
160 reaction( 160 reaction(
161 () => this.stores.settings.app.enableTranslator,
162 () => {
163 this._shareSettingsWithServiceProcess();
164 },
165 );
166
167 reaction(
161 () => this.stores.settings.app.spellcheckerLanguage, 168 () => this.stores.settings.app.spellcheckerLanguage,
162 () => { 169 () => {
163 this._shareSettingsWithServiceProcess(); 170 this._shareSettingsWithServiceProcess();
@@ -207,6 +214,20 @@ export default class ServicesStore extends TypedStore {
207 ); 214 );
208 215
209 reaction( 216 reaction(
217 () => this.stores.settings.app.translatorEngine,
218 () => {
219 this._shareSettingsWithServiceProcess();
220 },
221 );
222
223 reaction(
224 () => this.stores.settings.app.translatorLanguage,
225 () => {
226 this._shareSettingsWithServiceProcess();
227 },
228 );
229
230 reaction(
210 () => this.stores.settings.app.clipboardNotifications, 231 () => this.stores.settings.app.clipboardNotifications,
211 () => { 232 () => {
212 this._shareSettingsWithServiceProcess(); 233 this._shareSettingsWithServiceProcess();