Commit Graph

62 Commits

Author SHA1 Message Date
absidue aaea23b943
Switch settings sections and form elements to created lifecycle hook (#5224) 2024-06-04 09:00:10 +00:00
Jason d52ab88e7f
Add icons to dropdowns (#5006)
* Implement icons for all ft-selects

* Remove unnecessary v-if

* Update to use getIconForSortPreference util function with all arrows pointing down

* Update src/renderer/views/Playlist/Playlist.js

Co-authored-by: PikachuEXE <git@pikachuexe.net>

---------

Co-authored-by: PikachuEXE <git@pikachuexe.net>
2024-04-25 22:29:52 +02: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 af2913592e
Add SUPPORTS_LOCAL_API build flag (#4931) 2024-04-12 06:12:50 +00:00
ChunkyProgrammer d8387b76d7
Add i18n-eslint-plugin (#4763)
* add i18n-eslint-plugin

* remove `FreeTube` `Invidious` and `YouTube` from locale files as those shouldn't be translated

* Remove testing code

* Uncomment code

* use separate getColorTranslations function

* make suggested changes

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

* Add back blank line between import & export

---------

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
Co-authored-by: PikachuEXE <git@pikachuexe.net>
2024-04-07 14:58:15 +00:00
pkrasicki ead8fc23a9
Fix style for the Select component (#4405)
* Fix style for the Select component

Fixes #1804

Fixes the width of dropdowns and changes their style a little bit

* Fix lint

* Fix comments partially obscuring the sort dropdown

* Move select tooltip
2024-01-03 09:11:10 +08:00
Jason 58fe474d9f
Make landing page configurable (#4200)
* Implement customizable landing pages

* Implement curated list for default landing page dropdown options

* Update top nav link to redirect back to selected landing page

* Update top nav title to be 'Go to {page}' for improved clarity

* Remove landing page from selection and/or restore selection to default if is no longer valid
2023-11-20 15:01:18 -05:00
Jason 262dd67809
Chores: move 'blur' to be thumbnailPreference, move 1 dep to devDependencies (#4218)
* Chore: move stylelint-use-logical-spec to devDependencies

* Update blur to be a thumbnail preference instead of its own ft-toggle-switch

* Update en-US.yaml
2023-10-30 21:59:34 -04: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
Jason 3db6f437c9
Implement Stylelint linting of CSS logical properties (#4023)
* Add Stylelint plugin and rule for evaluating use of logical properties

* Implement stylelint-advised use of logical properties in SCSS files

* Implement stylelint-advised use of logical properties in CSS files

* Implement stylelint linting before each commit to any branch of the repo

* Remove other Stylelint plugins so that we can add them in later one-by-one

After discussing this with the FreeTube team, it seems that we are still undecided on which rules we want to be active, including ones currently enabled. As a stopgap fix, we disabled Stylelint checking in our pre-commit Git hook and our recommended
> freetube@0.19.0 lint-fix
> run-p eslint-fix lint-style-fix command. With this change, we will be using Stylelint in our
> freetube@0.19.0 lint-fix
> run-p eslint-fix lint-style-fix command, while giving us the flexibility to add in additional desired plugins and rules as separate efforts.

* Add video player to .stylelintignore

* Replace non-logical property usage in templates

This is not enforced by the plugin at this time.

* Remove use of logical properties from ft-video-player, & allow empty input when .stylelintignore files are changed

* Update ft-video-player.css to disable use of logical property linter

We want to avoid introducing directionality-specific properties that could muck up the video player.

* Remove redundant/unnecessary scripts in package.json
2023-09-14 08:22:33 +08: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
PikachuEXE 37e67f58c9
Fix `Current Invidious Instance input field removes character while typing` (#3776) 2023-07-17 05:32:07 -07:00
absidue 45d679b84b
Clean up unused component properties (#3458) 2023-04-25 20:03:36 -04:00
absidue 3ca561c3e6
Miscellaneous cleanup (#3148) 2023-02-04 15:04:04 +08:00
absidue 2cd8f0f2d3
Switch from Vue.extend to defineComponent (#3066) 2023-01-18 08:50:02 +01:00
ChunkyProgrammer 43a25f8738
update linters & add stylelint (#3023)
* update linters, add stylelint, switch from sass to scss

* remove unused babel-eslint module

* fix spacing in scss files

* dont use npm in script calls

* dont error for `:deep` selector in css
2023-01-03 19:19:41 +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
absidue 8f55a648b1
Cleanup unused component imports (#2773) 2022-10-27 09:34:39 +00:00
absidue d39512db0a
Minor performance improvement in the general-settings component (#2723) 2022-10-19 09:25:13 +08: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
absidue c0f98eeafe
Use named parameters instead of $ and % in localised strings (#2685)
* Use named parameters instead of $ and % in localised strings

* Fix URL warning again

* Update placeholders in most locales

* Let the translators fix the problematic RTL strings

* Fix the missing quotes in some of the YAML files
2022-10-13 11:51:15 +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 63946f7561
Add a settings section component to reduce duplicate code (#2609) 2022-09-24 09:12:11 +00:00
ChunkyProgrammer 7822f7423e
Remove console.logs (#2606)
* remove console.logs

* use 'off' instead of 0
2022-09-23 09:04:10 +08:00
ChunkyProgrammer d1a50a4e52
update vue2 to latest (#2554)
* update vue2 to latest

* remove vue-template-compiler, update loader & router

* use :deep instead of v-deep

* fix yarn.lock
2022-09-16 14:49:27 +00:00
absidue 62829b736a
Electron variable at build time instead of at runtime (#2574) 2022-09-15 08:59:09 +00:00
absidue 620e2eaa10
Drastically improve loading speed of the settings page (#2452) 2022-08-05 08:29:31 -04:00
Jason 41fedf8b2e
Disabling mutually exclusive settings (#1822)
* Adds :disabled styling/functionality for ft-button & ft-select

* Disable proxy, external player, & SponsorBlock settings when applicable

* Changes Invidious General Settings, Proxy Settings, and SponsorBlock settings to disappear when appropriate

* Update ft-toggle-switch.sass

* Switches to styling with disabled class for ft-toggle-switch

* Sets cursor to not-allowed for disabled controls
2021-10-20 13:14:49 +00:00
PikachuEXE 87e1093c4d
Update top nav input box action button icon depends on input (#1738)
* Rename `showArrow` to `showActionButton`

* * Display different icon for action button when input text look like a Youtube URL

* ! Fix transition for button appearing absent

* * Update to use new icon for all FT supported URLs

* Update src/renderer/components/ft-input/ft-input.js

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

* * Update action button to look disabled when input text is empty

* * Disable button hover/active visual effect when "disabled"

* * Make action button only respond to cursor when enabled

Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
2021-10-01 07:38:33 +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 cfeac8c7f1
Collapsible Settings Sections (#1699)
* Adds base dropdown ability to settings page with <details> & <summary>

* Adjusts styling of settings page

Replaces css stylesheets with sass stylesheets on some settings elements for better standardization of styling. Removes now unnecessary ft-card, .card, etc styling. Adds styling to new dropdown functionality.

* Update subscription-settings.sass

* Update Settings.css
2021-09-15 10:03:00 +08: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 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 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
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
Preston e735378a1a Update Invidious instance site and add link directly to site 2021-01-21 21:21:33 -05:00
Preston f75df62c90 Move logic to utils store and load country data on boot 2020-10-22 14:56:49 -04:00
Luca 3bb7be9ddb Move country update back out of if check 2020-10-22 18:24:05 +02:00
Luca d480b9113f Added tooltip to region of trends 2020-10-22 18:14:36 +02:00
Luca 7dff578422 Added dfault fallback to the geoLocation 2020-10-22 18:06:23 +02:00
Luca bf2737b947 Added geoLocation code 2020-10-22 13:47:30 +02:00
Preston f12b85e4f4 Add tooltips and context to the settings page 2020-10-19 11:32:53 -04:00
Preston 0c1800a8d5 Update general-settings.js 2020-10-02 10:16:56 -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 602a140361 Fix Locale issues and add Privacy Settings card to settings page 2020-08-22 16:51:04 -04:00
Preston 0ba7cc53ca Add Locale Setting and enable German Translation 2020-08-11 18:17:09 -04:00