* History: Refactor history module
* Profiles: Refactor profiles module
* IPC: Move channel ids to their own file and make them constants
* IPC: Replace single sync channel for one channel per sync type
* Everywhere: Replace default profile id magic strings with constant ref
* Profiles: Refactor `activeProfile` property from store
This commit makes it so that `activeProfile`'s getter returns
the entire profile, while the related update function only needs
the profile id (instead of the previously used array index)
to change the currently active profile.
This change was made due to inconsistency regarding the active profile
when creating new profiles.
If a new profile coincidentally landed in the current active profile's
array index after sorting, the app would mistakenly change to it
without any action from the user apart from the profile's creation.
Turning the profile id into the selector instead solves this issue.
* Revert "Store: Implement history synchronization between windows"
This reverts commit 99b61e6178.
This is necessary for an upcoming improved implementation of the
history synchronization.
* History: Remove unused mutation
* Everywhere: Create abstract database handlers
The project now utilizes abstract handlers to fetch, modify
or otherwise manipulate data from the database.
This facilitates 3 aspects of the app, in addition of
making them future proof:
- Switching database libraries is now trivial
Since most of the app utilizes the abstract handlers, it's incredibly
easily to change to a different DB library.
Hypothetically, all that would need to be done is to simply replace the
the file containing the base handlers, while the rest of the app
would go unchanged.
- Syncing logic between Electron and web is now properly separated
There are now two distinct DB handling APIs: the Electron one and
the web one.
The app doesn't need to manually choose the API, because it's detected
which platform is being utilized on import.
- All Electron windows now share the same database instance
This provides a single source of truth, improving consistency
regarding data manipulation and windows synchronization.
As a sidenote, syncing implementation has been left as is
(web unimplemented; Electron only syncs settings, remaining
datastore syncing will be implemented in the upcoming commits).
* Electron/History: Implement history synchronization
* Profiles: Implement suplementary profile creation logic
* ft-profile-edit: Small fix on profile name missing display
* Electron/Profiles: Implement profile synchronization
* Electron/Playlists: Implement playlist synchronization
* 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
* 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>
* 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
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.