Commit Graph

3051 Commits

Author SHA1 Message Date
Svallinn 0ad1518038
Store/Settings: Remove accidently duplicated commented out setting 2021-06-11 15:29:45 +01:00
Svallinn 672c734024
Store/Settings: Sort `state` entries alphabetically 2021-06-11 03:56:03 +01:00
Svallinn bc4a329f58
Store/Settings: Remove/comment out some unused settings 2021-06-11 03:53:14 +01:00
Svallinn b6bd3e6434
Store/Settings: Propagate side effects to other existing windows
When syncing a setting between windows, if that setting has any
side effects, a trigger is fired in all other windows to perform
those side effects in their own environment.
2021-06-11 03:49:21 +01:00
Svallinn b26e8b68ef
Store/Settings: Make `grabUserSettings` check for side effects globally
Previously, a custom Map was provided to the function in order to
determine whether or not a setting contained side effects that needed
to be handled.

That Map has now been deleted and the function has been modified
to make use of the module's new architecture.
2021-06-11 03:49:20 +01:00
Svallinn 55a25dc1ea
Store/Settings: Handle `defaultVolume`'s side effects in the module 2021-06-11 03:49:20 +01:00
Svallinn b0f973b76a
Store/Settings: Handle `uiScale`'s side effects in the module 2021-06-11 03:49:12 +01:00
Svallinn bb64efbe4d
Store: Redesign the settings module architecture
Previously, the settings' module was not properly equipped to handle
setting updates that featured certain side effects and no way to
propagate those side effects to other windows.

This redesign is a direct answer to those needs, in preparation to
move these settings and related logic to the aproppriate structures,
which will be done over the course of several commits.

A more in-depth documentation of the current redesign can be found at
the top of the settings module file.
2021-06-11 02:56:40 +01:00
Svallinn 7e94abb3b4
Main+App+Store: Implement basic setting sync between Electron windows
The app utilizes the Electron IPC to communicate settings' updates
to the other existing windows.

This is still at a fairly rudimentary stage, since some settings are
not syncing at all, while other settings have related side effects that
are not currently being propagated to the remaining windows.

An example of this would be the 'uiScale' setting, in which
the value is properly synced, but the app's actual scaling isn't.
2021-06-11 02:56:39 +01:00
Svallinn 5e105f5584
Store: Move `nedb`'s `Datastore` instances to their own file 2021-06-11 02:56:39 +01:00
Svallinn 8b785bd71d
Settings: Remove unnecessary handler for `defaultVolume` update 2021-06-11 02:56:39 +01:00
Svallinn 324e834083
Settings: Round `defaultVolume`'s getter value to the nearest integer
This fixes a bug related to the presentation of the `defaultVolume`
value in its respective label in the Settings view.

Since the value stored in the database and in the in-memory store
is a decimal number, it is subject to floating point arithmetic related
limitations.

Example (processed by the V8 engine):
0.28 * 100 = 28.000000000000004
2021-06-11 02:56:38 +01:00
Svallinn 08cf749277
App: Remove unnecessary leftover artifacts 2021-06-11 02:56:38 +01:00
Sandyran 8784a041f5
Translated using Weblate (Norwegian Nynorsk)
Currently translated at 100.0% (468 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/nn/
2021-06-10 22:35:28 +02:00
Seb 2297bf3732
Implement persistence for caption settings (#1269) 2021-06-10 19:35:00 +00:00
Dennis ten Hoove bd063a9d51
Translated using Weblate (Dutch)
Currently translated at 100.0% (468 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/nl/
2021-06-10 20:33:32 +02:00
alium 958e59631b
Translated using Weblate (Czech)
Currently translated at 100.0% (468 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/cs/
2021-06-09 18:34:10 +02:00
Svallinn 94fcacc308
Main: Rearrange/refactor the main process' logic
This commit removes duplicated handler logic related to the app's
'ready' event. In addition, it rearranges the template used to build the
app's menu in order to make it a bit easier to understand.
2021-06-07 19:10:35 +01:00
Svallinn 5a2c1f401f
Store/Settings: Refactor `grabUserSettings` action
This function made use of a switch statement that was hundred of
lines in height and a majority of cases had similar logic.

This commit generalizes the logic of the majority of the cases into
a condensed for loop, which additionally handles the few existing
oddball cases in an easy-to-understand manner.
2021-06-07 15:22:50 +01:00
Svallinn e4d7790d6d
Store/Settings: Remove unnecessary `updateInvidiousInstance` call
The 'grabUserSettings' action calls the 'updateInvidiousInstance'
action whenever the database returns an empty value for this setting.

However, that scenario should never happen in the first place.
In addition, a default value is already provided directly in the state.
2021-06-07 15:22:49 +01:00
Svallinn 58bd0d1f36
Store/Settings: Rename `webframe` -> `webFrame` and respective import
This fixes an issue in which the user's preferred UI scaling was
being ignored on startup.
2021-06-07 15:22:49 +01:00
Svallinn 0bd75d558f
App: Remove unnecessary logic related to the `usingElectron` setting 2021-06-07 15:22:48 +01:00
Svallinn 49c4c7ac5e
Store: Refactor the settings module
The settings' store module has had a lot of duplicated logic for
the majority of its getters, mutations and actions.

This commit serves to remedy that duplication substantially
by auto generating all getters, mutations and the majority
of actions, using a predictable pattern.
2021-06-07 15:22:01 +01:00
Sandyran 8de473cf2b
Translated using Weblate (Norwegian Nynorsk)
Currently translated at 100.0% (468 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/nn/
2021-06-06 16:33:59 +02:00
Allan Nordhøy 7a1f51fe46
Translated using Weblate (Norwegian Bokmål)
Currently translated at 99.7% (467 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/nb_NO/
2021-06-06 16:33:58 +02:00
dependabot[bot] 5aade6aeac
Bump ws from 6.2.1 to 6.2.2 (#1393)
Bumps [ws](https://github.com/websockets/ws) from 6.2.1 to 6.2.2.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/commits)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-05 23:51:28 -04:00
Sandyran 2edaa219f6
Translated using Weblate (Norwegian Nynorsk)
Currently translated at 100.0% (468 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/nn/
2021-06-06 00:33:40 +02:00
Ihor Hordiichuk 27d38782ca
Translated using Weblate (Ukrainian)
Currently translated at 100.0% (468 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/uk/
2021-06-06 00:33:39 +02:00
Sandyran d74d5d5e26
Translated using Weblate (Norwegian Bokmål)
Currently translated at 99.7% (467 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/nb_NO/
2021-06-06 00:33:39 +02:00
Karl Tammik 503b6c2124
Translated using Weblate (Estonian)
Currently translated at 92.0% (431 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/et/
2021-06-04 15:34:19 +02:00
zmni c27c7bf2b2
Translated using Weblate (Indonesian)
Currently translated at 99.7% (467 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/id/
2021-06-03 21:34:43 +02:00
Luca Hohmann 7cca8e3745
Bumped yt-comment-scraper (#1389) 2021-06-03 20:09:14 +02:00
Sandyran c09ed62734
Translated using Weblate (Norwegian Nynorsk)
Currently translated at 99.7% (467 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/nn/
2021-06-03 04:33:45 +02:00
retiolus 244bbe7f30
Translated using Weblate (Catalan)
Currently translated at 26.7% (125 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/ca/
2021-06-03 04:33:45 +02:00
Rex_sa 7ccd25b64d
Translated using Weblate (Arabic)
Currently translated at 100.0% (468 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/ar/
2021-06-03 04:33:44 +02:00
Sandyran 7994070b13
Translated using Weblate (Norwegian Bokmål)
Currently translated at 99.5% (466 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/nb_NO/
2021-06-03 04:33:44 +02:00
Jacque Fresco cf895aa7ee
Translated using Weblate (Indonesian)
Currently translated at 99.5% (466 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/id/
2021-06-03 02:31:33 +02:00
The Cats 1a035feec0
Translated using Weblate (Spanish)
Currently translated at 100.0% (468 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/es/
2021-06-02 21:34:02 +02:00
The Cats dd803b5a17
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (468 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/pt_BR/
2021-06-02 21:34:01 +02:00
Michael 8979cf2d84
Translated using Weblate (Swedish)
Currently translated at 100.0% (468 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/sv/
2021-06-02 09:33:32 +02:00
Michael 0829501bfa
Translated using Weblate (Swedish)
Currently translated at 93.5% (438 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/sv/
2021-06-02 07:34:53 +02:00
Michal L 026086c5bf
Translated using Weblate (Polish)
Currently translated at 99.7% (467 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/pl/
2021-06-01 23:34:11 +02:00
Jeff Huang 6aebfb8666
Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (468 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/zh_Hant/
2021-06-01 05:33:56 +02:00
Rusi Dimitrov a50bbdc684
Translated using Weblate (Bulgarian)
Currently translated at 100.0% (468 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/bg/
2021-05-31 23:33:41 +02:00
Rusi Dimitrov 1364132c32
Translated using Weblate (Bulgarian)
Currently translated at 99.5% (466 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/bg/
2021-05-31 21:33:30 +02:00
мачко c7a77d0267
Translated using Weblate (Bulgarian)
Currently translated at 99.1% (464 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/bg/
2021-05-31 14:33:54 +02:00
Milo Ivir 63747acd04
Translated using Weblate (Croatian)
Currently translated at 100.0% (468 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/hr/
2021-05-31 14:33:54 +02:00
Luca Hohmann 71829c6895
Translated using Weblate (German)
Currently translated at 100.0% (468 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/de/
2021-05-31 14:33:53 +02:00
PikachuEXE a3cf210fca
Update Youtube URL handling to recongnize playlist ID in URL (#1260)
* * Update Youtube URL handling to recongnize playlist ID in URL

Only for format of `https://www.youtube.com/watch?v=vid&list=lid`

* ! Fix vue component prop declaration

A prop where the value can be undefined cannot be declared "required"
2021-05-31 13:23:35 +02:00
My Random Thoughts a2df781f76
Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (468 of 468 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/en_GB/
2021-05-30 13:34:02 +02:00