Commit Graph

58 Commits

Author SHA1 Message Date
JInfantesC 9f591ba6ee
Sidebar compact issue1293 (#1462)
* #1293. Revise side-nav text labels

* #1293. Remove text on collapsed menu

* #1293. Height of collapsed Option

* Update side-nav.vue. Trending text in title attr

* Side-nav-more-options revised

* Restore navLabel on closed status

* Sidenav label in compact mode as an opt-in setting

* Sidenav-more-options using hideCompactSidebarText

* Sidenav after lintfix

* Sidenav label option renamed and moved to theme settings

* Set minimum height for .navOption

* Correct capitalization

* NavBar icon size on compact mode

* More compact navbar while hiding labels

* Fix store getter

* side-nav.css remove comments

* Update hide labels text

Co-authored-by: Preston <freetubeapp@protonmail.com>
2021-10-05 20:16:47 +00:00
PikachuEXE f931092b96
* Implement setting for disabling external link opening (#1427)
* * Implement setting for disabling external link opening

* * Implement setting for disabling external link opening in dropdown

* * Place proper tooltip content on setting tooltip

* Implement "open link after prompt"

* Fix new setting placement and long translation entry value issue

* fix via increasing width instead of truncating text

* * Access new perference via computed property

* ~ Move the code comment back to original place

* * Update prompt to show URL

* Fix missing :key for element with v-for

* Do Nothing > No Action

* $ Use shortcut to preference value in conditional statements

* Update translation text

* move and update tooltip text

* Rename "Open Link After Prompt" > "Ask Before Opening Link"

Also fix the translation value
2021-09-16 19:03:25 -04:00
Jason 354a2151df
Add customized fast-forward / rewind intervals (#1390)
* Setting to customize fast-forward/rewind times

* Move variable placement to keep alphabetical order

Moves defaultSkipInterval to be one line below defaultQuality because Q comes before S in the alphabet. This keeps the variable declarations alphabetical.
2021-08-05 22:17:01 +02:00
Svallinn 40d7278383
Invidious: Randomize instance on startup
There are now two separate settings related to Invidious instances:
- currentInvidiousInstance
- defaultInvidiousInstance

'currentInvidiousInstance' is a value that exists solely in memory
and it's the value used by the app to make the API calls,
while 'defaultInvidiousInstance' is the value that can be persisted
in the database by user action and will be used to initiate
the 'currentInvidiousInstance' on startup.

If the user has not saved a default value to the database,
'currentInvidiousInstance' is randomized from
a fetched list of viable candidates.
2021-07-03 02:55:56 +01:00
Svallinn 99b61e6178
Store: Implement history synchronization between windows 2021-06-26 05:06:21 +01:00
Svallinn b68e1700c0
Main+Renderer: Make IRC window syncing channels more generic
This commit renames the 'syncSettings' IRC channels to 'syncWindows' and
changes the renderer's listener setup for this channel more generic
so that it can cover other store modules besides the settings' module.
2021-06-26 05:06:18 +01:00
Svallinn 9859a7ce18
App+Settings: Make locale changes reactive between windows
This commit moves the locale relevant code to the settings' store module
and incorporates it with its current architecture.

I should clarify that this makes the value present in the `localStorage`
nonmeaningful, as that value is no longer being used in any way.
2021-06-20 02:47:44 +01:00
Svallinn be11e3d8cb
Chore+Refactor: Replace `nedb` package with `nedb-promises`
The 'nedb' package is unmaintained (last update was 5 years ago) and
has a couple of high severity vulnerabilities.

In addition, the use of callbacks is somewhat cumbersome for
the project's current workflow.

Therefore, I've decided to replace it with the 'nedb-promises' package,
which, internally, makes use of a maintained fork of 'nedb' and
wraps its API with Promises.
2021-06-17 04:21:58 +01: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 28b4713334.

* 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
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
Seb 2297bf3732
Implement persistence for caption settings (#1269) 2021-06-10 19:35:00 +00: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 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
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
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
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
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
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
Luca 4e11233f3e Verify check 2021-03-26 19:30:44 +01:00
Luca 24d12a4357 Started investigating default profile loading inconsistency 2021-03-19 12:05:25 +01:00
Sai Deepesh 3b75a97859
added playlist next video interval (#1006) 2021-03-06 11:25:50 -05:00
Sai Deepesh 8c88571f6f
feat: added ability to hide Playlists (#972) 2021-03-06 11:21:22 -05:00
Preston a3fe91bef5 Update to Webpack 5 and Electron 12 2021-03-02 22:51:01 -05:00
Preston 6d7d874bc0 Add Proxy configuration to settings. Fix ft-video-list height when using list display 2021-01-14 13:51:33 -05:00
pablodekota f65377127d
Hide active subscriptions (#918)
* Update distraction-settings.js

* Update side-nav.js

* added hiding subscription activity

* Update distraction-settings.js

* Update distraction-settings.js

* Update side-nav.js

* Update side-nav.vue

* Update distraction-settings.vue

* Update settings.js

* Update side-nav.vue

* Update distraction-settings.js

* Update en-US.yaml

* Update en_GB.yaml

* Update distraction-settings.js

* Update settings.js

* Update side-nav.vue

* Update side-nav.vue

* Update side-nav.vue

Co-authored-by: Pablo <8d1d1de7-176f-4d40-b5f0-5a552aabd433@4wrd.cc>
2021-01-09 22:11:42 -05:00
Preston d6e4a1e9cc Add Setting to disable smooth scrolling 2020-10-07 09:57:22 -04:00
Preston 15c73ee0b3 Allow UI Scaling and Have side bar open by default 2020-10-06 11:53:54 -04:00
tayloraviets d5970f58c6
PR ready distraction free feature (#596)
* PR ready distraction free feature

Signed-off-by: Taylor <tayloraviets@gmail.com>

* presumably fixed linter issues

Signed-off-by: Taylor <tayloraviets@gmail.com>

* addressed PR issues and hopefully made the linter happy

Signed-off-by: Taylor <tayloraviets@gmail.com>

* fixed more linter issues

Signed-off-by: Taylor <tayloraviets@gmail.com>

* fixed more linter issues again

Signed-off-by: Taylor <tayloraviets@gmail.com>

* fixed more linter issues again.

Signed-off-by: Taylor <tayloraviets@gmail.com>

* moved bad quote

Signed-off-by: Taylor <tayloraviets@gmail.com>
2020-10-05 22:27:32 -04:00
Preston 88117cb360 Update -, build.yml, and 3 more files... 2020-09-30 20:49:43 -04:00
Preston b0d1ddf1ac Add notifications for new blog posts and app updates 2020-09-20 14:22:39 -04:00
Preston 648b2884e4 Enable more locales and replace https://invidio.us defaults with https://invidious.snopyta.org 2020-09-16 09:51:26 -04:00
Preston 8f35f95a5b Finish Core Subscriptions logic and add more locales to profiles page 2020-09-01 23:21:32 -04:00
Preston 0a612ae0e7 Create Profile Edit Page 2020-09-01 23:21:32 -04:00
Preston 602a140361 Fix Locale issues and add Privacy Settings card to settings page 2020-08-22 16:51:04 -04:00
Preston 6e5a1a1085 Add toggle for search suggestions 2020-06-19 15:46:01 -04:00
Preston c8da6fec3d Add Search Suggestions and Custom Invidious Instance 2020-06-01 22:42:29 -04:00
Preston 6c3539943b Show icons in build and remove unused items. 2020-05-27 22:48:41 -04:00
Preston 1faa075a7b Add Theatre Mode Toggle Setting and adjust video player side 2020-04-21 22:59:09 -04:00
Preston e1dd7e6db8 Fix web build script and fix errors when running web version 2020-04-17 23:17:45 -04:00