Commit Graph

2217 Commits

Author SHA1 Message Date
Svallinn 990417a588
Chore: Update and dedupe various dependencies 2021-06-16 17:39:16 +01:00
Svallinn 77e743060f
Main+Renderer+Dev-Runner: Refactor smooth scrolling toggling
Smooth scrolling toggling is currently wonky on runtime, since,
most of the time, it doesn't toggle on and off properly.
In addition, now that we have multi-window support,
the current implementation was somewhat lacking.

This commit solves those issues by replacing
the existing smooth scrolling related channels with a
new generic `relaunchRequest` channel.
2021-06-16 05:43:26 +01:00
Svallinn bceab435b7
Main: Move session data cleanup to `window-all-closed` event
Since the session is shared by all 'BrowserWindow's and
it can be accessed without a window reference,
it's best to clear data when the 'window-all-closed' event is emitted.
2021-06-16 05:43:25 +01:00
Svallinn bbc9b63357
Main: Simplify `createWindow` function
With the knowledge that the session is shared by all 'BrowserWindow's,
proxy and cookie related logic can now be set once on startup and
it's not necessary to set them again for every window created.
2021-06-16 05:43:09 +01:00
Svallinn bd4e867db1
Main: Change `window.webContents.session` to `session.defaultSession`
Previously, the code misleadingly lead developers to believe that
each 'BrowserWindow' had its own isolated session.
This commit clarifies the fact that a global session is shared
by all 'BrowserWindow's by default.
2021-06-16 05:34:38 +01:00
Svallinn 0551ce44f2
Main+Renderer: Enforce synchronous messages on `setBounds` channel
This should fix an issue where, when closing the app, an error window
would very occasionally pop up declaring that 'getNormalBounds'
was called on an undefined variable.
2021-06-16 05:34:37 +01:00
Svallinn 65df233e8a
Profile+Everywhere: Tweak CSS on profile related components
This commit improves the centering of profile bubble initials
and tweaks other parts of profile related components.
2021-06-16 05:34:37 +01:00
Dragibus Noir 29ca006142
Translated using Weblate (French)
Currently translated at 100.0% (489 of 489 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/fr/
2021-06-16 05:34:23 +02:00
kuhaku 903e1a37e7
feat(external-player): add cmd argument mapping for VLC player (#1409)
Signed-off-by: Randshot <randshot@norealm.xyz>
2021-06-15 21:54:10 +02:00
PikachuEXE 6d2b1f3632
Top-Nav: Improve search filter's appearance (#1360)
* Update search filter style to have little transparency & smaller size
2021-06-15 14:53:06 +00:00
PikachuEXE 9acafc7292
* Update top nav search input to disable spellcheck (#1346) 2021-06-15 14:42:37 +00:00
PikachuEXE 825bec1a81
* Update playlist page thumbnail to start playing first video on click (#1361) 2021-06-15 14:42:00 +00:00
PikachuEXE 78b6adeb5e
Playlist: create navigation to the respective channel (#1347) 2021-06-15 14:18:08 +00:00
Dragibus Noir 5ec5ef300f
Translated using Weblate (French)
Currently translated at 100.0% (489 of 489 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/fr/
2021-06-15 13:34:02 +02:00
Jeff Huang 6f582cb9b5
Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (489 of 489 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/zh_Hant/
2021-06-15 06:34:18 +02:00
Dragibus Noir 85a7e99862
Translated using Weblate (French)
Currently translated at 100.0% (489 of 489 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/fr/
2021-06-15 03:35:59 +02:00
qwerty287 53988a2164
Translated using Weblate (German)
Currently translated at 96.5% (472 of 489 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/de/
2021-06-14 22:34:09 +02:00
PikachuEXE ce15f4b7c4
Watch: stop autoplay countdown toasts when navigating to another page (#1287) 2021-06-14 18:10:21 +00:00
ChunkyProgrammer bb3edb750f
Hide trending and most popular when set to hidden (Portrait Mode) (#1324)
* hide trending & popular videos from bottom nav

* add computed properties for Hide Popular & Hide Trending
2021-06-14 17:54:03 +00:00
PikachuEXE 588b488856
Watch: set volume's session value to 0 when the player is muted (#1352) 2021-06-14 17:15:46 +00:00
ChunkyProgrammer f6c2e0937b
Fix emoji initials in Profile Previews (#1407)
* updated get profile initial methods

* simplify return statements
2021-06-14 16:59:09 +00:00
zmni 92dadefbbd
Translated using Weblate (Indonesian)
Currently translated at 100.0% (489 of 489 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/id/
2021-06-14 17:35:32 +02:00
Karl Tammik 925ba901b1
Translated using Weblate (Estonian)
Currently translated at 94.6% (463 of 489 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/et/
2021-06-14 13:34:20 +02:00
Ihor Hordiichuk 535ac31ab4
Translated using Weblate (Ukrainian)
Currently translated at 100.0% (489 of 489 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/uk/
2021-06-14 02:39:20 +02:00
ovari b8e11d0700
Translated using Weblate (Hungarian)
Currently translated at 100.0% (489 of 489 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/hu/
2021-06-14 02:39:19 +02:00
Allan Nordhøy 38299707b4
Translated using Weblate (Norwegian Bokmål)
Currently translated at 97.5% (477 of 489 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/nb_NO/
2021-06-14 02:39:18 +02:00
Grzegorz Wójcicki 5ecebfbaaa
Translated using Weblate (Polish)
Currently translated at 99.5% (487 of 489 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/pl/
2021-06-14 02:39:16 +02:00
Dragibus Noir 69237c0f34
Translated using Weblate (French)
Currently translated at 96.7% (473 of 489 strings)

Translation: FreeTube/Translations
Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/fr/
2021-06-14 02:39:15 +02:00
Luca Hohmann 2b75e63b19
Bumped comment scraper (#1410) 2021-06-13 22:08:12 +02:00
kuhaku 52fa523df1
Add support for External Players (closes #418) (#1271)
* feat: add support for opening videos/playlists in external players (like mpv) #418

Signed-off-by: Randshot <randshot@norealm.xyz>

* feat: move external player settings into own section
feat: add warnings for when the external player doesn't support the current action (e.g. reversing playlists)
feat: add toggle in settings for ignoring unsupported action warnings

Signed-off-by: Randshot <randshot@norealm.xyz>

* improvement: do not append start offset argument when the watch progress is 0

Signed-off-by: Randshot <randshot@norealm.xyz>

* fix: fix undefined showToast error when clicking on the external player playlist button

Signed-off-by: Randshot <randshot@norealm.xyz>

* feat: add icon button for external player to watch-video-info (below video player) component
improvement: refactor the code for opening the external player into a separate function in utils.js

Signed-off-by: Randshot <randshot@norealm.xyz>

* feat: add support for ytdl protocol urls (supportsYtdlProtocol)
chore: fix lint error

Signed-off-by: Randshot <randshot@norealm.xyz>

* feat: add support for passing default playback rate to external player
improvement: add warning message for when the external player does not support starting playback at
             a given offset
chore: rename reverse, shuffle, and loopPlaylist fields for consistency

Signed-off-by: Randshot <randshot@norealm.xyz>

* feat: add setting for custom external player command line arguments

Signed-off-by: Randshot <randshot@norealm.xyz>

* chore: fix lint error

Signed-off-by: Randshot <randshot@norealm.xyz>

* improvement(watch-video-info.js): change the default for playlistId back to null (consistent with other occurrences)
improvement(utils.js/openInExternalPlayer): also check for empty playlistId string
fix(watch-video-info.js): fix merge error

Signed-off-by: Randshot <randshot@norealm.xyz>

* improvement(components/ft-list-video): check whether watch history is turned on, before adding a video to it
fix(store/utils): fix playlistReverse typo, causing `undefined` being set as a command line argument
fix(store/utils): check for 'string' type, instead of `null` and `undefined`
fix(views/Watch): fix getPlaylistIndex returning an incorrect index, when reverse was turned on
chore(locales/en-US): fix thumbnail and suppress typo
chore(locales/en_GB): fix thumbnail and suppress typo

Signed-off-by: Randshot <randshot@norealm.xyz>

* feat: pause player when opening video in external player

Signed-off-by: Randshot <randshot@norealm.xyz>

* feat(externalPlayer): refactor externalPlayerCmdArguments into a separate static file `static/external-player-map.json`
chore(components/ft-list-video): fix lint error

Signed-off-by: Randshot <randshot@norealm.xyz>

* Revert "feat: pause player when opening video in external player"

This reverts commit 28b4713334bf941be9e403abf517bb4b89beb04f.

* feat: pause the app's player when opening video in external player

* This commit addresses above requested changes.

improvement(components/external-player-settings): move `externalPlayer` check to `ft-flex-box`
improvement(components/external-player-settings): use `update*` methods, instead of `handle*`

improvement(store/utils): move child_process invocation to `main/index.js` via IPC call to renderer
improvement(store/utils): use `dispatch` for calling actions
improvement(store/utils): get external player related settings directly in the action

improvement(renderer/App): move `checkExternalPlayer` call down into `usingElectron` if statement
fix(renderer/App): fix lint error

improvement(components/ft-list-playlist): remove unnecessary payload fields
fix(components/ft-list-playlist): fix typo in component name

improvement(components/ft-list-video): remove unnecessary payload fields

improvement(components/watch-video-info): remove unnecessary payload fields
improvement(views/Settings): add `usingElectron` condition

Signed-off-by: Randshot <randshot@norealm.xyz>

* fix(store/utils): fix toast message error

Signed-off-by: Randshot <randshot@norealm.xyz>

* fix(store/utils): fix a few code mess-ups

Co-authored-by: Svallinn <41585298+Svallinn@users.noreply.github.com>
2021-06-13 17:31:43 +02:00
dependabot[bot] 003eeabb78
Bump normalize-url from 4.5.0 to 4.5.1 (#1400)
Bumps [normalize-url](https://github.com/sindresorhus/normalize-url) from 4.5.0 to 4.5.1.
- [Release notes](https://github.com/sindresorhus/normalize-url/releases)
- [Commits](https://github.com/sindresorhus/normalize-url/commits)

---
updated-dependencies:
- dependency-name: normalize-url
  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-13 11:16:28 +00:00
Svallinn 84e15cccbb
Store+Vuetools: Remove some leftover artifacts that would break vuetools 2021-06-13 12:09:43 +01:00
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