Commit Graph

120 Commits

Author SHA1 Message Date
Jason 9815ed3da2
Sort videos within playlist (#4921)
* Implement playlist sorting

* Hide sort menu for remote playlists

* Remove 'Custom (descending)' sort order

I don't see the need for this particular sort order.

* Adjust sort order & align dropdown with 'More Options' button

* Make 'Latest added first' default option instead of custom

* Remove unlikely-to-be-implemented 'Date published' sorting options

Context from absidue: 'I don't think we should even attempt to support it, due to all of the situations where it wouldn't be possible.'

* Update to use sortOrder as main variable throughout

* Hide sort menu for playlists of length <2
2024-04-17 06:26:43 +08:00
PikachuEXE 2b7c96eb97
Update most paginated places to auto load next page (except comments) (#4565)
* * Update most paginated places to auto load next page (except comments)

* * Make comment section auto load next pages too

* $ Use new component to dedup auto load code

* * Implement auto load next page for single playlist page

* * Remove comment auto load setting

* * Update tooltip text
2024-04-16 22:16:08 +02:00
absidue bb7d90be05
Fix imports of the "electron" module that are missing an Electron guard (#4935) 2024-04-14 13:16:55 +00:00
absidue af2913592e
Add SUPPORTS_LOCAL_API build flag (#4931) 2024-04-12 06:12:50 +00:00
absidue bc6b88231e
Add locale fallbacks for "es_AR", "es-MX", "pt-BR" and "pt-PT" (#4892)
* Add fallback to "es" when strings are missing in "es_AR" and "es-MX"

* Add fallbacks for pt-PT and pt-BR too
2024-04-11 07:59:01 -04:00
absidue f7206ec7e8
Use blob URLs for storyboards instead of writing them to the file system (#4891) 2024-04-08 09:31:20 +08:00
absidue 48e2f0c290
Change the default download behaviour to the better "Open in web browser" value (#4683) 2024-02-17 08:13:30 +00:00
Jason 64e3f32f78
Video title filter / blacklist (#4202)
* Implement hiding of videos with user-inputted text

* Implement ft-input minInputLength

* Enable for playlists

* Enable feature on channel pages

The premise for this change is that users would not want to see that forbidden content anywhere, as opposed to hidden channels, where you're clearly on a channel page to see things from that channel.

* Fix 'Play Next Video' playing forbiddenTitle videos and hidden channel videos

* Fix issue of hidden recommended videos taking up vertical space

* Rename variables to better match non-video-specific function, and remove blocks from History and videos in playlists

* Fix to respect hideForbiddenTitles value

* Modify label

* Clarify restriction affecting original titles

* Add toast for entered input of length below min input length

* Add toast for element already exists

* Update to not clear if duplicate tag is entered for Hide Forbidden feature
2024-01-22 17:59:46 -05:00
ChunkyProgrammer 1becb8eaf2
Fix system locale setting logic (#4570) 2024-01-19 19:24:57 +01:00
PikachuEXE 32a2ad9479
Add feature to set a playlist as quick bookmark target (#4518)
* + Add feature to set a playlist as quick bookmark target

* Add back button to watch page

* focus behavior style update

* * Different button text when video saved

* ! Fix mutation function `removeVideos` (still unused)

* * Make default generated favorites playlist as default quick bookmark target

* ! Add fix for `deleteVideoIdsByPlaylistId`

* * Update button text

* * Update quick bookmark playlist first allow revert later

* * Update single playlist view to hide fav button when viewing the target playlist

* - Remove unused code
2024-01-17 22:52:42 -05:00
ChunkyProgrammer ae7a2fa221
Add dearrow support for thumbnails (#4520)
* Add dearrow support for thumbnails

* add translations

* add missing tooltip

* make hidden thumbnails take a higher priority over dearrowed thumbnails

* Implement code suggestions

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>

---------

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
2024-01-15 04:20:15 +00:00
trostboot 40ff63abbb
Add toggle to suppress sending additional args to external players (#4515)
* Add toggle to supress sending additional args to ext. players

* Reverse ignoreArgs conditional logic

* Disable custom arg input if args are disabled

* Keep custom arguments, rename option accordingly
2024-01-12 23:06:52 -05:00
PikachuEXE c40b4a69d5
(Multiple) Local Playlist (instead of saving video in one hidden list) (#4234)
* ! Fix add/removing videos from favourite list

* ! Fix playlist type not passed into video list item component

* ! Fix playlist data loading issue on new windows

* ! Fix user playlist data parsing

* * Ensure playlist view rerender on video additonal removal for displayed playlist

* ! Fix icons & moving videos up/down in user playlist

* * Don't show move up/down buttons when cannot be done

* * Make user playlist view filtering function now works for filtering playlists

* ! Fix style of prompt from any button within playlist-info component

* $ Refactor a function to use early return style

* * Disallow empty playlist name when saving in playlist edit mode

* * Update add video to playlist prompt to have simple filtering like user playlist view

* * Update playlist view to only show video reorder/remove buttons in edit mode

With notice message

* ! Fix playlist view for remote playlist unnecessary reload on save

* ! Fix add to playlist prompt behaviour when some playlists are hidden due to filtering

* $ Remove unused watch function arguments

* * Update user playlist view create new playlist button position

* * Update playlist view to add transitions to video reorder/removal

* * Allow playlist with different case to be created

* * Update visibility of user playlist related action components according to hide playlist settings

Only those visible on video, remote playlist are updated

* * Update video items to only show add to playlist buttons on hover

* - Remove add to favorites button from video list item component

* * Update watch-video-info component to add "add to playlist" button

* * Update watch-video-info component to remove "add to favourite" button

* * Ensure video thumbnail image displayed in 16/9 aspect ratio

Mainly due to YT missing video thumbnail image got different aspect ratio 4/3

* * Update new buttons theme

* * Put edit playlist button before copy button

* * Move "remove video from playlist" button to most right

* * Make video reorder & remove button visible on hover in user playlist view, regardless of "edit mode"

* ! Fix video count parsing for user playlist

* * Update user playlist to allow duplicate video entries (per video ID)

* * Remove extra attributes assignment to video object except `timeAdded`

Unintended change

* * Update copy playlist button to like adding multiple videos to playlists

* * Update copy playlist prompt to prefill title if create new playlist prompt shown

* * Ensure all playlists have `playlistName`

* $- Remove unused playlist property `removeOnWatched`

* * Update read all playlist code to ensure existing "default" playlist properties (_id, protected) have same values as those in default

Also fix issue discovered during testing

* *- Remove unnecessary code line

* * Update playlists from default playlists to be deletable

* ! Fix duplicate `timeAdded` value for videos copied from user playlist

* ! Fix playlist import (tested with db file exported from this branch)

* * Update grid view to only display playlist title up to 255 chars

Still can see full title in single playlist view

* * Update add video to playlist prompt to only display playlist title up to 255 chars

* * Update text of new playlist button to be same as new profile button

* * Ignore many extra keys from playlist objectrs

Also make data import check for object keys against required keys not key counts

* * Disallow playlist import from changing internal playlist ID of existing playlists

Existing playlists are matched by playlist name, not by internal playlist ID

* * Ensure playlist name & description trimmed when saved

* * Add missing change for importing playlist to ignore `protected`

* $ Refactor code for "video object has all require keys"

* ! Fix style of prompt from any button within playlist-info component again

z-index war

* * Update some empty message & button text

* * Ensure playlist item action buttons are hidden during animations

* ! Fix other prompt z-index

* * Update `showAddToPlaylistPromptForManyVideos` to throw error when required keys missing from passed in video data

* *- Remove unused video property `paid` from playlist related code

* *- Remove unused video property `type` from playlist related code

* ! Fix duplicate playlist displayed on playlist conversion

* *- Remove unused video property `published` from playlist related code

* * Don't require & generate property `timeAdded` when display a prompt

* *- Remove unused video property `isLive` from playlist related code

* ! Fix text

* ! Revert code change for debugging only

* ! Fix CSS for "Ensure playlist item action buttons are hidden during animations"

* * Update add playlist button to be shown for live videos

* + Add clear all playlists button

* * Update add video to playlist prompt to swap "save" & "create playlist" button

* ! Fix playlist view won't load after default playlist added due to lack of playlist

* * Show toast message when no playlist selected after pressing save button

* * Update add video to playlist prompt to show latest updated playlist first

Easier for copying playlist with new playlist(s)

* ! Fix watch page when visited via history after viewing the video from a deleted user playlist

* ! Fix share buttons emitting user playlist IDs

* * Add toast message after removing all playlists

* ! Fix remote playlist video list rendering with duplicate videos

* ! Fix missing key for some direct child elements under `transition-group`

* ! Fix animation introduced to unnecessary elements

* ! Prevent video link click during animation

* ! Fix playlist creation/removal not reflected in other windows

* * Ensure playlist visual selected state in sync with data in parent

* * Update add video to playlist prompt to auto select playlists created after prompt shown once

* * Update copy playlist button to show warning about not loaded videos when some not loaded yet

For remote playlist

Won't work for Invidious though (coz no way to load more)

* * Update add video prompt to make it easier to access buttons via keyboard

* * Make video reorder & remove button always visible in user playlist view

* * Make plus button can be focused with tab

Side effect is thumbnail link can be focused too (otherwise can't make plus button visible)

* * Update add video to playlist prompt to focus on search input on shown

* * Accept playlist optional property `createdAt` when importing

* * Update playlist view to always show add to playlist button

* $ Refactor `inUserPlaylist`

Only playlist view would supply `playlistType`

* * Improve accessibility for new prompts

* * Make edit playlist inputs focused on entering edit mode

* * Make most prompts focus back to last focused element on close

* $ Use tabindex 0 for prompts

Possible tabindex values unnecessary with elements programatically focused

* * Update add video to playlist prompt to focus back to search input after new playlist created

* * Update ft-list-video to focus back on thumbnail link element after add to playlist prompt closed

* ! Fix unable to import duplicate video entries into an existing playlist

* ! Fix create playlist prompt looks unclosed after playlist created when opened via add video to playlist prompt

* ! Fix duplicate video entry ID when playlist with duplicate videoId entries copied to another playlist

* ! Fix issues caused by last merge in e291cc8b41b2273a0d77c9f35ea760f0e0f7ac10

* $ Remove unused imports

* ! Fix default playlists added when no playlist stored had no required attributes added on 1st run

* ! Fix invalid prop type warning

* * Use v-if instead of v-show

* $ Just assign bool value instead of if-else

* + Update playlists view to add sorting option

* $- Remove unnecessary property assignments

* ! Fix issues caused by "Remove unnecessary property assignments"

* ! Fix issues caused by "Remove unnecessary property assignments"

* * Ensure sort by time also fallbacks to playlist name sorting

* ! Fix add/remove video does not update playlist last created time

* ! Fix multi window playlist sync

* * Show filtering input & sorting element when no. of playlist > 1

* * Update upcoming video to allow saving in playlist

* ! Fix unable to visit previous video when playing first video in a playlist

* * Update sorting options labels

* ! Fix add to play prompt max width

* ! Fix user playlist view incorrectly sorted playlists by latest updated first when filtered

* * Update add to playlist prompt to add sort options

* $ Remove unused classname

* ! Ensure new playlist button focused after add to playlist prompt closed while thumbnail link unselectable

* * Add playlists sort order for last played at, update it on play

* ! Fix bug introduced by last merge

* ! Fix thumbnail not respecting backend preference

* ! Fix empty playlist thumbnail in single playlist view

* * Make adding large no. of videos faster

* $ Remove unused mapActions entries

* $ Remove unused and unusable playlist code for inserting video IDs into a playlist

* * Update single playlist view to only show `Remove watched videos` btn when there is any video

* ! Fix prompt style issue caused by old branch changes

* ! Fix removing video from local playlist remove all entries with same video ID

* ! Fix adding video does not have uniqueID & timeAdded set

Caused by previous add many video performance fix

* ! Fix navigation in user playlist between entries of same video

* * Reflect playlist updates on watch page playlist panel

* $- Remove outdated incorrect prompt style fix

* ! Fix add video to playlist prompt too high when there are too many playlists

* ! Fix watch page play next/prev video in local playlist

* ! Fix error in online playlist playing

* * Keep partial playlist backward compatibility by restoring `type` in persisted playlist videos

* ! Fix grid item for playlist to hide external player button for local playlist

* * Make history rememeber uniqueId (local playlist video entry) when playing video with local playlist

* ! Fix grid item for video in user playlist to hide external player button

* ! Fix grid item for video in history with user playlist to hide external player button

* ! Fix grid item for video in watch page playlist component with user playlist to hide external player button

* * Update watch page to clear `uniqueID` from query when not playing local playlist

* ! Fix watch page about user playlist detection on new window

* * Reflect playlist updates on watch page playlist panel, even for currently playing video

* ! Allow video with local playlist to be played in external player, but without playlist

Also add missing fix for WatchVideoInfo

* ! Fix external player handling for video in local playlist

* ! Fix ft-video having different URLs in links

* yarn run lint-style-fix

* $ Rename uniqueId to playlistItemId

* * Ensure local playlist ID won't conflict with remote playlist ID

* - Remove import video while creating playlist related code

* * Make text translatable

* * Make sort option text translatable

* ! Fix reverse condition

* $ Just use ?.

* Code review changes

* Spaces

* beforeDestroy

* Remove unused methods

* Remove infoData

* filter > find

* avoid importing `crypto` from NodeJS

* Compress CSS ruleset

* $ Remove useless prefix from key

* Use template for element with v-if only

* Make playlist selector look more selectable (cursor: pointer)

* Translate toast messages and fix remove watched videos from playlist

* ! Fix translation

* - Remove unused methods

* $ Remove workaround for issue which cannot be reproduced anymore

* $ Remove remaining useless code following last commit removing workaround

* you have no playlist > you have no playlists

* CSS use var --horizontal-directionality-coefficient

* * Update danger buttons color to primary (like clear search cache button)

* ! Fix playlist icon container size

* ! Fix sorting in add video to playlist prompt when filtered

* $- Update ft-inputs to removed prop input-tabindex

* ! Fix vue warning

* + Add toggle to export playlist for older FT

* * Update tooltip text

* ! Fix vue warning

* * Update text align

* * Remove the extra surrounding spaces

* Backtick > quote

* - Remove useless prop

* Fix tootip in lower width view

* Update default filename

* * Make tooltip auto-wrap

* Revert "* Make tooltip auto-wrap"

This reverts commit 7d932b936c.

* Adjust tooltip styling

* * Wait for local playlist loading only when playing with a user playlist

* * Wait for local playlist loading only when playing with a user playlist requested

Request user playlist can still be absent (but not requested for no playlist or remote playlist)

* ! Fix single playlist view cover image having link when no video

* ! Workaround create playlist prompt won't close when enter pressed in input box

* ! Fix clear text button style

* ! Fix copying playlist twice to the same user playlist produces same playlistItemId

* ! Fix add video to playlist prompt input box style

* ! Fix workaround for "create playlist prompt won't close when enter pressed in input box"

* ! Ensure add video to playlist prompt updated when a playlist deleted (in another window)

* ! Avoid saving and displaying unwanted video attributes into playlists

* ! Fix playlist view for deleted user playlists

* ! Fix copying playlist twice to the same user playlist produces same playlistItemId

Real fix
Cause of issue: updating property of input objects (which is shared across multiple run)

* ! Fix search suggestions being blocked by playlist info component in single playlist view

* ! Fix warning when reversing playlist in watch view

* ! Fix prompt in playlist view (playlistinfo component) not above sidebar

* Remove CSS top comments absent in other CSS files

* Remove not useful comment for CSS

* Float with variable

Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>

* Revert "! Fix clear text button style"

This reverts commit 44ed286848.

* Missing change for Revert "! Fix clear text button style"

* $ Remove unused style for ft-playlist-selector

* Apply changes from review

* * Use $tc for translation entries with different value according to count values

* ! Fix playlist link in watch view

---------

Co-authored-by: Jason Henriquez <jasonhenriquez@protonmail.com>
Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
2024-01-03 19:44:57 +01:00
Jason bed4af1c46
Setting to turn on subtitles by default (#4450)
* Add back 'Turn on Subtitles by Default'

* Update variable name

* Fix double-selection issue when auto-generated & native tracks exist, & fix similar pre-existing bug

Also fixes pre-existing bug with pressing 'c' having the effect of multiple tracks (inaccurately) showing as selected.
2024-01-03 08:28:13 +08:00
Jason 6af85b3726
Show latest from channel (#4352)
* Implement 'show latest video from channel' feature

* Apply suggestions from code review

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>

* Adjust ordering to maximize chance of content being presented

---------

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
2023-11-26 08:27:29 +08:00
Jason 62903ceed8
Open/close all settings tabs persistent toggle (#4204)
* Open or close all settings tabs toggle

* Update labels to expanded/collapsed

* Move settings expansion toggle on top (& shorten label)
2023-11-25 18:44:29 +01:00
Benjababe 3c0ed260c1
Keep download folder path when changing to 'ask for download path' and back (#4101)
* separate ask download folder from folder path value

* update variable name

* update download folder prompt handling
2023-10-10 22:44:57 -04:00
ChunkyProgrammer 47ef3e5746
Subscriptions: Add community tab (#3973)
* Add subscription community tab

* fix up community tab

* simplify if statement

* use global.community for all references to community

* dont show community when useRss is set

* check visibleTabs for showing the community tab

* fix caching, decrease datalimit for community, add missing translations

* L: Hide shared posts, IV: Don't show errors for empty community tab

* add links to related issues
2023-09-23 00:19:50 +00:00
absidue c29d947d5c
Avoid extending the VueI18n class as it won't exist in Vue 3 (#4046) 2023-09-18 18:39:36 +00:00
absidue d333990fbc
Improve performance of the watch history handling (#4017)
* Improve performance of the watch history handling

* Remove duplicate checks for whether history entries exist

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>

* Remove leftover `typeof`

---------

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
2023-09-13 21:31:07 -04:00
David Frederick Batt 884ba91115
Add option to change thumbnail appearance (#3890)
* Add option to blur thumbnails

* Add dropdown for different thumbnail display modes

* Add dropdown for different thumbnail display modes

* Fix thumbnail display mode setting not appearing due to incorrect localization

* Rename thumbnail display mode option 'Not Loaded' to 'Hidden'

* Fix thumbnail display mode 'hidden' not working

* Fix thumbnail display mode not applying to playlists

Makes thumbnail display mode setting also affect thumbnails in ft-list-playlist and playlist-info.

* Remove unnecessary styling

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>

* Make hidden thumbnails toggleable from thumbnail preferences

* Replace thumbnail placeholder png with svg

* Fix thumbnail preference 'hidden' not applying to ft-list-playlist

* Fix placeholder svg breaking playlist layout

* Refactor ft-list-video

---------

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
2023-08-31 11:18:52 -04:00
Benjababe 0b44548331
Include hide comment photos setting (#3939)
* Added hide comment photos option into settings

* Hide comment photos if setting is enabled

* include hidden photos for comment replies

* Always show video uploader photo in comments

* reverted en_GB changes

* Updated settings to "Hide Profile Pictures in Comments"
2023-08-30 00:08:55 +00:00
Preston b9eb2a76fb
Add Tabs to subscriptions page for live streams and shorts (#3725)
* Add Tabs to subscriptions page for live streams and shorts

* Fix naming issue with fetching live streams via Invidious RSS

* Remove console log

* Better error handling and better live stream sorting

* Fix linter issues

* Change videos RSS feed. Make live stream call more efficient.

* Store last used tab in memory. Return to last used tab on mount

* Fix live sorting. Reorganize tabs and check for currentTab via created instead of mounted

* Fix linting issue

* Start Global locales object, add distraction free checks for subscriptions tab

* Start Global locales object for all locales

* Cleanup and reduce duplicate code

* Undo original distraction free settings change

* Fix missing change in previous commit

* Add distraction free settings to hide tabs

* Improve accessibility

* Make app-wide hide live streams setting override hide subscriptions live

* Fix incorrect all tabs disabled message

* Fix arrow key navigation

* Create shared UI component for the subscription tabs

---------

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
2023-07-21 07:33:34 -04:00
ChunkyProgrammer 095568e1b1
Channels: Add support for release and podcast tab (#3778)
* Channels: Add support for release and podcast tab (local)

* Add support for releases and podcasts tab (Invidious API)

* add urls with has_url

* Fix copy paste error

Co-Authored-By: absidue <48293849+absidue@users.noreply.github.com>

---------

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
2023-07-20 00:16:45 +02:00
ChunkyProgrammer cf88bd77d8
Add DeArrow support for ft-list-video titles (#3688)
* Add deArrow support for ft-list-video titles

* Implement requested changes

* Remove some code duplication

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>

* fix lint issues + exception

* Check for vote count when title is not locked

Co-authored-by: Ajay Ramachandran <dev@ajay.app>

* simplify title

* Apply suggestions from code review

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>

* remove unused clearDeArrowCache function

* Fix deArrow title

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>

* allow using DeArrow without enabling SB

* add tooltip for DeArrow setting

---------

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
Co-authored-by: Ajay Ramachandran <dev@ajay.app>
2023-07-03 18:27:49 +02:00
ChunkyProgrammer 23d8af59f6
Fix some web build errors (#3687) 2023-06-26 18:13:32 +00:00
absidue c53f5b6dac
Add distraction free setting to hide channel shorts (#3569)
* Add distraction free setting to hide channel shorts

* Add support for channel shorts URLs
2023-05-23 08:59:24 +08:00
ChunkyProgrammer 1b45f25985
Add hide community, playlist and featured channels settings (#3484)
* Add hide community, playlist and featured channels setting

* fix lint issues
2023-05-06 14:14:51 +00:00
PikachuEXE b5e35d0543
Add setting to auto load comment section (#3352)
* + Add setting to auto load comment section

* * Cleanup hooks when possible

* * Update new setting to be a toggle

Possible values reduced to disabled & 0%

* * Use vue-observe-visibility to implement comment autoload

* - Remove unused translation entries

* - Remove no longer valid code comment

* * Rename & retype new setting

* * Implement auto more comment loading

* - Remove outdated comment

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>

* * Disable new setting switch when hide comments enabled

* * Remove the unnecessary delay on video comment loading

* * Update according to review

* * Disable autoload when hide comment enabled

---------

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
2023-04-26 21:56:42 -04:00
predystopic-dev 3a904b5f83
Setting loudness to default volume in new videos (#3203)
* Made changes as suggested.

* Made player set volume to user default if it was muted by dragging volume slider to zero. Volume and muted are kept track of seperately and both are set on player with respect to how it was set for previous video

* added comments

* fixed

* fixed

* Changed comments to be more accurate.
2023-03-08 19:22:45 +01:00
PikachuEXE 0daa422284
Add feature to remember video history with last viewed playlist when enabled (#3006)
* + Add "infra" code for new feature

* * Update view/component to implement remembering last playlistID in history

* * Implement option to disable new feature

* ! Fix implementation for use case "Find a video (with playlist PL-A) to view, go to channel, view that same video, no playlist restored"
2023-01-26 03:18:04 +01:00
absidue 5424122339
Filter out WebM DASH formats (#3105)
* Filter out WebM DASH formats

* Address pull request feedback
2023-01-25 15:58:25 -05:00
Simon Epstein 36e34fb5ed
Add option to display distraction free titles (#2987)
* 2953 Added boilerplate to manage setting.

* Hooked in distraction free title to video list view.

* Tweaked the regexp to include apostrophe when looking for runs.

Also only change case for runs of 3 or more, to avoid messing with
common abbreviations.

* Addressed review feedback.

Co-authored-by: Simon Epstein <simon.epstein@67bricks.com>
2023-01-01 22:53:29 +01:00
absidue 1d1e6eacea
Switch from sync fs APIs to fs/promises (#2991)
* Switch from sync fs APIs to fs/promises

* Fix error and await storyboard creation

* Start a new file for filesystem helpers starting with pathExists
2022-12-29 01:19:48 +00:00
vr10t 869e45ccd5
Option to skip through the video by scrolling (#2418)
* initial commit

* remove extra play button toggle

* add missing comment

Co-authored-by: Alin <ai6@tutanota.com>
Co-authored-by: ChunkyPtogrammer <78101139+ChunkyProgrammer@users.noreply.github.com>
2022-12-22 16:21:32 +01:00
petaded f33f14268f
Option to hide videos from certain channels (#2849)
* add logic to hide channels

* Add new ft-input-tags ui element and use this for channel hiding

* remove unused tooltip code

* Add tooltip to the ft-input-tags and the new setting

* Add spacer between toggle options and ft-flex-box

* Swap to stringify from semicolon + add focus to label

* Simplify the input_tags code + rename setting to channelsHidden

* Fix issue shown by linter

* Recentralize input button + fix tooltip for small windows

* Improve accessiblity

* fix hiding playlist when channel ID entered

* pass tag directly to removeTag function

Co-authored-by: petaded <code@zikl.co.uk>
Co-authored-by: petaded <petaded@zikl.co.uk>
2022-12-17 16:49:44 +01:00
Simon Epstein dbb54737c4
Password protect settings (#2932)
* Hide unsubscribe button on channel list if this is set in parental
controls.

* Fix github linting errors

* Removed trailing whitespace.

* Reverted yarn.lock change

* Remove package-lock.json

* Added support for password protecting settings.

* Push password handling code inside password-settings component.

* Added incorrect password message

* Replace update method with watch.

* Use updateSettingsPassword to commit value to database.

* Move password settings to the bottom (review comment)

* Moved unlock into separate component (review feedback)

* Styling password dialog

* Removed incorrect (and unused) prop value - review comment.

* Removed unused component imports

Co-authored-by: Simon Epstein <simon.epstein@67bricks.com>
2022-12-17 15:28:17 +01:00
absidue a88bafeb27
Make getUserDataPath, getPicturesPath and getSystemLocale helpers (#2920) 2022-12-06 12:37:44 +01:00
theforbiddenpool 064db4ba28
Add option to hide FreeTube header logo (#2893) 2022-11-27 08:55:34 -05:00
M. Ian Graham 207d72a9c2
Add setting: Distraction Free Settings → Hide Upcoming Premieres (#2853) 2022-11-24 13:31:53 +01:00
Emma f8ff0e1249
Add setting to toggle `Enter fullscreen on rotate` (#2808)
It defaults to `false`. This should prevent users with
multiple displays from running into issues when they
drag the window from a portrait display to a landscape
display too quickly.
2022-11-04 09:11:22 +08:00
Emma 6e693c6c37
Implement `getRegionData` in web (#2743)
* Implement `getRegionData` in web

- Adjust __dirname to be a more sensible value
- Add `process.env.GEOLOCATION_NAMES` for web builds to avoid having
to blindly try and fetch

* Reverting webpack changes

* Change `indexOf` to `includes`

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>

* Adding a new helper `createWebURL`

It takes a given path to a resource, and it returns an
 easily fetch-able absolute path

* Using `createWebUrl` inside of the locale fetch

* Using `createWebURL` inside of `getRegionData`

* Removing an unnecessary leftover import

* Wait, no I was mistaken

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
2022-10-22 10:31:34 +02:00
Emma c26445a09d
Expanding the settings which are iterated in `grabUserSettings` (#2737)
Previously, only settings which have a user defined value would
be iterated on in this loop. Now, all settings that have a user defined
value or that have side effects will be iterated. This is important because
`currentLocale`'s side effect handler contains a call to `getRegionData`,
and if this side effect handler is never called, the `Region for Trending`
option in settings will never populate.
2022-10-18 17:50:40 +02:00
Emma b453b01b81
Adding web support to dev-runner (#2729)
* Adding ytpl and ytsr as externals in web.config

This should get rid of those two warnings that were
showing up on web builds

* Reducing discrepancies between dev and prod in web builds

* Removing  a line which would prevent hot reloading

`this.locales` is retained between hot reloads, so it shouldn't
be set to `null`.

* Adding a new flag to the dev runner

Adding a new command: `run dev:web`

* Running `loadLocale` in development web builds

* Adding a line back which was removed

* Removing a line which was added
2022-10-18 08:50:32 -04:00
absidue 3aa080d707
Make showToast a helper (#2695) 2022-10-14 05:59:49 +00:00
Aiz 6ddbce2e02
Add setting to disable automatic fetching of subscription feed (#2632)
* Add setting to disable automatic fetching of subscriptions

* rename from load to fetch. fix profile switch auto fetching

* add message for when auto fetch is disabled

* add strings to locale file

* Use a switch column grid for the subscription settings

This matches the layout other settings components

* remove import of now unused ft-flex-box component

* add variable to track if an attempt to fetch has been made.

used so the disable automatic fetch message doesn't block the
empty channels message.

* reduce distance between switches by adding compact=true

* edit tooltip wording
2022-09-29 22:29:47 -04:00
absidue bc886af726
Implement chapters (#2224)
* Implement chapters

* Generate chapters locally for the Invidious API backend

* Performance improvements

* More performance improvements

* Improve chapters appearance and add compact mode for Invidious

* Update UI while seeking instead of afterwards

* Invidious extract chapters with range timestamps properly and duplicate chapters

* Minor code improvement

* Add accessibility labels and keyboard navigation

* Add chapter markers

* Fix missing newline at the bottom of ft-video-player.css

* Fix marker placement
2022-09-29 20:01:54 +00:00
absidue fa8d423bc6
Fix some development code not getting optimised out (#2605) 2022-09-26 16:15:13 -04:00
absidue ac4cc4a611
Compress and lazy load locales (#2603)
* Compress and lazy load locales

* Remove index.html when loading the locales on the web

* Fix locale output path for web build
2022-09-24 11:06:50 -04:00
absidue 62829b736a
Electron variable at build time instead of at runtime (#2574) 2022-09-15 08:59:09 +00:00