Commit Graph

688 Commits

Author SHA1 Message Date
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
Seb 2297bf3732
Implement persistence for caption settings (#1269) 2021-06-10 19:35:00 +00: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
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
Preston 5f54a26e8b Merge branch 'v0.13.1-hotfix' 2021-05-29 17:52:23 -04:00
Luca Hohmann 5f1818ee91
Setting to enable and disable display of video play button (#1370)
* Added setting to toggle play button in video player

* Fixed wrong way around boolean check

* Fixed setting not loading on startup
2021-05-29 20:35:28 +02:00
PikachuEXE 754a4a8aa3
Update video player to remove default big play button shown when paused (#1270) 2021-05-28 22:29:35 +02:00
Alex Stewart f9f5223f23
Allow changing volume by scrolling over any part of video player (#1254)
* Added toggle component to settings

* Setting to toggle this feature is now functional. Video volume can now be changed by scrolling anywhere on the video, or just on the slider, depending on this setting

* Added translation lines for en_US and en_GB

* Changed setting line from 'Scroll Volume Over Video' to 'Scroll Volume Over Video Player'

* Changed 'mousewheel' to 'wheel' event, as 'mousewheel' is deprecated

* Ran lint check in settings.js

Co-authored-by: Alex Stewart <albinexotech@gmail.com>
2021-05-26 17:55:11 +02:00
PikachuEXE 3bce276564
Implement search filter changed indicator (#1257)
* ! Fix app unable to load due to missing `getLocale` in `mapActions`

* Implement search filter changed indicator
2021-05-25 19:54:27 +02:00
PikachuEXE 70aa159bb8
Update "Open Link" button to include playlist ID (#1258)
* ! Fix app unable to load due to missing `getLocale` in `mapActions`

* $ Update a function's name with incorrect name casing

* Update "open youtube link" button to open with playlist when playing a video with an active playlist
2021-05-25 19:39:34 +02:00
ChunkyProgrammer 2def271bb2
Settings/Fix: Filter out non-YouTube links in NewPipe imports (#1319) 2021-05-23 15:42:04 +00:00
Svallinn 1c57c2b0d7
Refactor/Main: Remove `enableRemoteModule` option from `webPreferences` 2021-05-23 04:39:48 +01:00
Luca Hohmann 3c9de5e63a
Added Estonian, Serbian languages, fixed comment likes and bumped packages (#1311) 2021-05-22 21:21:48 +02:00
Svallinn 6ccc7e9fa4
Refactor: Swap `dispatch`/`commit` calls with mapped actions/mutations 2021-05-22 00:56:32 +01:00
Svallinn e72fbcf0a4
Refactor: Remove all `v` delegate variables 2021-05-22 00:52:11 +01:00
Svallinn af0353ea32
Refactor: Erase `@electron/remote` references and other dangerous calls
The `remote` module is deprecated and `@electron/remote` is unnecessary,
since the `ipcMain` and `ipcRenderer` can replace their functionality,
providing better performance and better security.

All other dangerous calls (mainly pulling main process constructs into
the renderer process) have also been removed.
2021-05-22 00:49:48 +01:00
Svallinn 56f4c37735
Search: Fix up a few duration and upload time related options 2021-05-20 17:21:26 +01:00
Svallinn 089cd5845b
SponsorBlock: Prevent multiple notifications at the end of a video
Closes: #1299

Previously, the app would notified the user (with a toast) of a
sponsor segment skip repeatedly if the segment lasted
until the end of a video.
This commit fixes that behavior so that it's displayed only once.
2021-05-20 04:00:39 +01:00
Luca Hohmann 67218ab5f1
Fixed wrongly sized clickable link to comment authors. Added link to reply author's channel (#1298) 2021-05-18 22:52:47 +02:00
Luca Hohmann 0cc88642b0
Fixed old trending page api call (#1297) 2021-05-18 20:59:23 +02:00
Preston 55f62d1018 Update ft-video-player.js 2021-05-17 15:06:10 -04:00
Preston 4d248d57ce Use accent color for Sponsorblock categories 2021-05-17 15:05:42 -04:00
Preston 40abb9f054 Update ft-video-player.js 2021-05-16 22:30:03 -04:00
Preston e52223c7c5 Hide volume percentage on hover 2021-05-16 21:43:34 -04:00
Preston 8f8df5d8e6 Fix quality changing logic for Invidious API 2021-05-16 21:40:34 -04:00
Filip Czaplicki 440b04bbf0
SponsorBlock (#1130)
* SponsorBlock: enable/url settings

* SponsorBlock: fetch and display skipped fragments

* SponsorBlock: skip sponsor blocks

* npm add node-forge

* SponsorBlock: use hash prefix API

* SponsorBlock: configurable toast on skipped segment

* SponsorBlock: add /api/ to url, remove trailing slash
2021-05-16 16:01:24 -04:00
Preston d9a02ba007 Add TODO 2021-05-15 15:13:17 -04:00
Preston 176d81dd6b Fix quality logic again 2021-05-15 15:08:41 -04:00
Svallinn f2d29f667a
Captions: Fix 'system' locale unwanted behavior
Closes: #1268

Having 'system' locale set would wrongfully send the wrong
locale information to YouTube, which would result in the captions
not being set properly. This commit fixes that behavior.
2021-05-11 18:25:47 +01:00
Svallinn bd60d3c838
Top-Nav: Fix undefined/misplaced references 2021-05-11 16:28:26 +01:00
Svallinn 1279944c9d
Chore: Remove devtron from dev dependencies
Devtron is currently broken and entirely unmaintained.
The latest release was on Oct 7, 2016.
2021-05-10 06:17:00 +01:00
Svallinn 640ed6818a
Main: Clear cache and storage data only when the last window is closed
This prevents the CONSENT cookie from being deleted after a window
is closed by the user, making it so that the user can no
longer load the comment section.
2021-05-10 06:01:35 +01:00
Svallinn b37c46f12d
Revert unintended merged code from "Update package-lock.json"
This was caused by an unexpected Weblate interaction with a force push.
2021-05-10 05:59:48 +01:00
Svallinn 36d94c812d
Update package-lock.json 2021-05-09 05:48:03 +01:00
Preston 785e7b15bb Remove this.currentLocale 2021-05-06 23:06:56 -04:00
Preston 8e4fe4eacb Re-Arrange System Default Locale logic 2021-05-06 22:59:37 -04:00
Milu fc5429ec59
Adding a "System Language" option to the "Locale Preference" (#1241)
Closes: #1205

* Added "Follow System" option to
`Settings -> General Settings -> Locale Preference`
and set it to default

* Changed double quotes to single quotes

* Removed unnecessary comment

* Changed `app` accessing method

* Cleaned up if/else statements

* Checks similar locales as fallback

* Changed label to "System Language"

* Changed locale filtering logic to use the filter() method
2021-05-06 16:45:49 +00:00
Svallinn 91776441f1
chore: bump electron version to 12.0.6
* Bump electron version to 12.0.6
* Move web content clean up logic to window close event

Reference from electron release notes:
> Fixed the window-all-closed event being emitted while the last
BrowserWindow was still in the process of being closed.
2021-05-01 03:50:52 +01:00
Preston 5387618b82 Fix linter issue 2021-04-30 20:36:46 -04:00
Preston 29cdae7f8e Fix issue with recent live streams not being playable and update credits link in about 2021-04-30 17:43:12 -04:00
Preston 5322280b2f Add new docs and blog URLs to About page 2021-04-30 17:26:25 -04:00
Preston 81a571e7c9 Hide New window icon when mobile UI is active 2021-04-30 17:24:21 -04:00
Preston 689479eb21 Channel Fixes and finish quality change logic 2021-04-30 17:18:45 -04:00
PikachuEXE 4101a4a167
! Fix new window not created when all windows closed and app activated (#1203)
Since the app is coded to quit for non MacOS when all windows are closed
This issue happens only on MacOS
2021-04-29 20:51:23 +00:00
Svallinn e696af3f7a
Apply playlist autoplay interval to regular autoplay
The interval to play the next video in a playlist was dynamic and
wasn't applied to the normal autoplay timer.
This commit merges the logic of these two scenarios so that they both
utilize the user-defined interval.
2021-04-29 19:33:13 +01:00
PikachuEXE 76260d9c4c
* Implement playlist countdown per second (#1234)
Closes: #1214
2021-04-29 16:58:00 +00:00
PikachuEXE 82aeaac734
* Update top nav search input to direct to channel panel when channel URL provided (#1221)
* $ Extract function which extract details from a Youtube URL

* * Update top nav handling to use extract function to handle input text if it's Youtube URL

* - Remove no longer used function
2021-04-28 19:21:16 +02:00
Svallinn 539500f370
Routing: Remove unnecessary router import 2021-04-28 13:31:46 +00:00
Anton Nesterov 4d080babcd
feat: better keyboard navigation (#1104)
Related issue: #375
2021-04-27 20:29:28 +00:00
PikachuEXE e4e3090153
! Fix unable to view another playlist when already in playlist view (#1211) 2021-04-27 18:30:29 +00:00
PikachuEXE 2752006179
* Update "toggle theatre mode" button icon (#1225)
Closes: #1180
2021-04-27 15:52:09 +00:00
Svallinn 61b2fc4b48
Improve YouTube link handler
* Handle /user channel URL type
* Fix minor problems with the regexps
* Display informational toasts for hashtag and unknown URL types
* Add toast messages to the default locale
2021-04-25 01:28:29 +01:00
PikachuEXE 7d93217596
* Update player to hide full window button when in full screen mode (#1222) 2021-04-22 20:41:50 +02:00
Svallinn c8d96d38b6
Save watch progress when closing window (#1217) 2021-04-21 18:38:46 +00:00
Svallinn 5f4ea74c16
Prevent deleted history and profile data from being exported
Closes: #934, #937

This assures that the profiles and history datastores are properly
compacted before their respective exports
2021-04-21 05:09:06 +01:00
Svallinn c4afaaaf06
Display error when importing invalid YouTube JSON
Closes: #969

Apparently, every importing option had a proper error message
displayed on a toast... except this one.
Oops.
2021-04-21 03:43:40 +01:00
Svallinn 78324ff775
Handle other url types from freetube:// protocol
Closes: #1207

The app was mistakenly only set up to handle video type urls from
the freetube:// protocol.
It should now be able to additionally handle playlist, search and
channel type as well.
2021-04-21 02:07:26 +01:00
Svallinn 52e600dc13
Bugfix: load of subscriptions at startup (#1216) 2021-04-20 18:07:47 +00:00
Svallinn 1fd08af136
Select search text on focus (#1201) 2021-04-15 21:30:26 +02:00
PikachuEXE ebc829cef0
Add "open new window" button (#1153) 2021-04-15 20:28:35 +02:00
Luca 49aab11acb Svallinns locale fix 2021-04-12 23:00:07 +02:00
Preston cd78017540 Remove console.log 2021-04-11 18:51:50 -04:00
Preston 519128a99a Fix issue with live videos causing errors in search results 2021-04-11 18:49:56 -04:00
Luca 58882b3e16 Fix for missing import of marked as watched videos 2021-04-10 22:04:59 +02:00
Luca Hohmann edb6de2e88
Merge pull request #1121 from Svallinn/improved-captions
Overhaul of the captions subsystem
2021-04-10 21:20:27 +02:00
Luca Hohmann d75ded4d41
Merge pull request #1148 from Svallinn/811-youtube-links-inside-app
Link app views to related YouTube url navigations
2021-04-10 21:20:12 +02:00
Svallinn 9031acc260
Merge branch 'development' into 946-version-flag 2021-04-08 19:05:01 +00:00
Preston ae76aebc97 Remove unneeded session import 2021-04-08 09:42:24 -04:00
Luca Hohmann 2b1d8e499f
Added board automation for Bugs and Features (#1146)
* Added board automation for Bugs and Features

* Added correct github secret to automation

* Linter fix
2021-04-08 13:54:30 +02:00
Svallinn 9b92db3522
Remove stray spaces 2021-04-08 03:13:40 +00:00
Svallinn 9ff0994cee
Merge branch 'development' into 946-version-flag 2021-04-08 03:07:15 +00:00
Preston 01da5277ee Add more URLs for consent cookie 2021-04-07 22:40:35 -04:00
Preston 3048e39106
Add 'enable-file-cookies' flag 2021-04-07 17:54:44 -04:00
Preston 8f64b083aa
Remove trailing spaces 2021-04-07 17:38:09 -04:00
Preston e155426700
Add second consent cookie for compatibility 2021-04-07 17:33:56 -04:00
Preston 7b3f67073b Add consent cookie to fix comments and various problems 2021-04-07 16:39:14 -04:00
Luca Hohmann 039cd9874d
New languages and yt-channel-info bump (#1155) 2021-04-01 16:21:04 +02:00
Luca Hohmann c5fac9fcd7
Video meta file removal option (#1154)
* Implemented video meta file removal option

* Lint fix
2021-04-01 15:54:45 +02:00
Svallinn c56cb87f7c
Gilgus did this and left it there for days -_-' 2021-03-30 03:34:56 +01:00
Svallinn f9f49a5f6d
Link app views to related YouTube url navigations 2021-03-30 03:32:17 +01:00
Svallinn f39579c6d2
Stop replacing YouTube hrefs for protocol links 2021-03-30 03:31:35 +01:00
Luca a27fc9215c Unnecessary print removed 2021-03-27 19:03:57 +01:00