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.
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.
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
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.
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.
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.
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.
* * 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"
* 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>
* ! 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
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.
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.
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.
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.
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
* 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.
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.
* $ 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
* 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
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.
This allows users to specify the timestamp of a video (in seconds)
- by inputting a link into the search bar
- by making use of the protocol link (freetube://), p.e in a browser
When pulling video information from Invidious, hashtag-related links present in the description need to be replaced with valid links.
In this case, a freetube:// link was deemed the most appropriate.
Fixes#932
* Delete FtProfileAllChannelsList component
* Replace FtProfileAllChannelsList component with new filtered variant
* Add new locale for profile filter label
* Add FtProfileFilterChannelsList vue component with ft-select addition
* Add FtProfileFilterChannelsList script with profile filtering support
* Add css modifications to new FtProfileFilterChannelsList component
* Revamp about page
* Add more cards to about page
* Fix linter issues
* Add missing info and update locales
* Add license URL
Co-authored-by: Preston <freetubeapp@protonmail.com>