freetube/src/renderer/components
Svallinn daecf944fb
Store Revamp / Full database synchronization across windows (#1833)
* 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
2021-12-15 13:42:24 -05:00
..
data-settings Store Revamp / Full database synchronization across windows (#1833) 2021-12-15 13:42:24 -05:00
distraction-settings Collapsible Settings Sections (#1699) 2021-09-15 10:03:00 +08:00
external-player-settings Disabling mutually exclusive settings (#1822) 2021-10-20 13:14:49 +00:00
ft-auto-grid Proportional scaling inside grid (#1514) 2021-09-14 10:01:48 +08:00
ft-button Disabling mutually exclusive settings (#1822) 2021-10-20 13:14:49 +00:00
ft-card Push Latest Code to Repository 2020-02-16 13:30:00 -05:00
ft-channel-bubble Fix linting issues 2020-09-15 23:10:15 -04:00
ft-element-list Fix lazy wrapper's height in list mode 2020-08-25 21:19:25 +03:00
ft-flex-box Push Latest Code to Repository 2020-02-16 13:30:00 -05:00
ft-grid Push Latest Code to Repository 2020-02-16 13:30:00 -05:00
ft-icon-button ! Fix profile menu toggle button to toggle menu instead of keep opening (#1437) 2021-08-25 15:39:38 +01:00
ft-input Disabling mutually exclusive settings (#1822) 2021-10-20 13:14:49 +00:00
ft-intersection-observer Creating ft-intersection-observer component (#571) 2020-10-03 16:30:09 -04:00
ft-list-channel [Fix] Invidious not used for channels icons in search (#1477) 2021-10-07 06:36:13 +00:00
ft-list-dropdown Update colours (search results & select boxes) to match theme (#1482) 2021-09-23 06:48:40 +00:00
ft-list-lazy-wrapper Proportional scaling inside grid (#1514) 2021-09-14 10:01:48 +08:00
ft-list-playlist Invidious: Randomize instance on startup 2021-07-03 02:55:56 +01:00
ft-list-video Invidious: Randomize instance on startup 2021-07-03 02:55:56 +01:00
ft-loader Push Latest Code to Repository 2020-02-16 13:30:00 -05:00
ft-notification-banner Add notifications for new blog posts and app updates 2020-09-20 14:22:39 -04:00
ft-profile-bubble Profile+Everywhere: Tweak CSS on profile related components 2021-06-16 05:34:37 +01:00
ft-profile-channel-list Invidious: Randomize instance on startup 2021-07-03 02:55:56 +01:00
ft-profile-edit Store Revamp / Full database synchronization across windows (#1833) 2021-12-15 13:42:24 -05:00
ft-profile-filter-channels-list Invidious: Randomize instance on startup 2021-07-03 02:55:56 +01:00
ft-profile-selector Store Revamp / Full database synchronization across windows (#1833) 2021-12-15 13:42:24 -05:00
ft-progress-bar Finish Profile Logic and working subscriptions 2020-09-01 23:21:32 -04:00
ft-prompt * Implement setting for disabling external link opening (#1427) 2021-09-16 19:03:25 -04:00
ft-radio-button Prevent certain search filter combinations from being used 2020-12-17 13:55:47 -05:00
ft-search-filters Top-Nav: Improve search filter's appearance (#1360) 2021-06-15 14:53:06 +00:00
ft-select Disabling mutually exclusive settings (#1822) 2021-10-20 13:14:49 +00:00
ft-share-button Invidious: Randomize instance on startup 2021-07-03 02:55:56 +01:00
ft-slider Alignment and typography corrections (#653) 2020-10-14 11:12:58 -04:00
ft-timestamp-catcher Update dependencies and fix linting problems 2020-10-04 14:30:54 -04:00
ft-toast Allow hidden toast messages to be clicked through 2020-12-01 11:02:52 -05:00
ft-toggle-switch Disabling mutually exclusive settings (#1822) 2021-10-20 13:14:49 +00:00
ft-tooltip Fixed tooltip position (#831) 2021-01-11 10:29:55 -05:00
ft-video-player Store Revamp / Full database synchronization across windows (#1833) 2021-12-15 13:42:24 -05:00
general-settings Disabling mutually exclusive settings (#1822) 2021-10-20 13:14:49 +00:00
player-settings Ctrl plus scroll to change playback rate (#1745) 2021-11-24 16:52:56 -05:00
playlist-info Feedback when copying playlist link (#1660) 2021-09-06 14:39:54 +00:00
privacy-settings Store Revamp / Full database synchronization across windows (#1833) 2021-12-15 13:42:24 -05:00
proxy-settings Store Revamp / Full database synchronization across windows (#1833) 2021-12-15 13:42:24 -05:00
side-nav Store Revamp / Full database synchronization across windows (#1833) 2021-12-15 13:42:24 -05:00
side-nav-more-options Sidebar compact issue1293 (#1462) 2021-10-05 20:16:47 +00:00
sponsor-block-settings Disabling mutually exclusive settings (#1822) 2021-10-20 13:14:49 +00:00
subscription-settings Collapsible Settings Sections (#1699) 2021-09-15 10:03:00 +08:00
theme-settings Sidebar compact issue1293 (#1462) 2021-10-05 20:16:47 +00:00
top-nav Store Revamp / Full database synchronization across windows (#1833) 2021-12-15 13:42:24 -05:00
watch-video-comments Feature: Add pinned, owner and reply from owner indicators for comments (#1795) 2021-11-06 10:11:21 +08:00
watch-video-description Hides video description when it is empty (#1585) 2021-08-20 19:51:46 +00:00
watch-video-info Store Revamp / Full database synchronization across windows (#1833) 2021-12-15 13:42:24 -05:00
watch-video-live-chat Escape HTML in chat & comments (#1342) 2021-07-21 10:37:55 -04:00
watch-video-playlist Remove logic for getting the next page in the Invidious API as it isn't needed anymore 2021-11-11 16:29:37 -05:00
watch-video-recommendations Make autoplay text fit inside top bar when translated (#1767) 2021-10-03 10:53:21 +00:00