Commit Graph
100 Commits
Author SHA1 Message Date
Fernando Fernández c86a4ad948 chore: tag v0.3.0 2023-04-03 12:52:57 +02:00
Fernando Fernández 6917a2519d chore: pre-merge cleanup
* Update renovate config
* Commit component.d.ts file
* Upgrade @jellyfin/sdk to 0.8.1
2023-04-03 12:52:57 +02:00
Fernando Fernández 1988e95c26 refactor: search page
* Memoize previous search queries
* Use computed for data filters
* Fix old results temporarily appearing when clearing the query
2023-04-03 12:52:57 +02:00
Fernando Fernández 55c685e14e chore: update readme
The readme was not fitting for the current state of the client. Use
better futureproofing in the wording and link to wiki pages where
the most up-to-date information (like configuration settings) will live.

* Make the description framework agnostic, so we don't need to update it
in case we switch our desktop app bundler (for example).

* Add better description for end users. We were too developer centric.

* Add links to Wiki for all the pieces that are more susceptible of evolving.

* Add some clarification about how jellyfin-vue works
(add a note about jellyfin-web too) in regards to privacy,
since by what I read on Reddit,
many people assume the connections are not direct between their devices
and the target Jellyfin server.

* Made that privacy note really agnostic for how the client might be
served/distributed in the future (but hopefully I did it in a clear way).

* Clarify the "Getting started" and "Running a production build sections".
2023-04-03 12:52:57 +02:00
Fernando Fernández 65514c29f8 feat: permanent scrollbars in default layout only
The splashcreen and video/music/login pages with scrollbars were really ugly
2023-04-03 12:52:57 +02:00
Fernando Fernández 4b2badc08c chore: remove unnecessary Options API type declarations 2023-04-03 12:52:57 +02:00
Fernando Fernández f2e7d32b7b refactor: remove workaround for Safari's iOS fullscreen
* A new release of VueUse will be needed to get this back working
in Safari iOS (after PR 2915 is merged there)
2023-04-03 12:52:57 +02:00
Fernando Fernández 9db65f6ae8 fix: failing github actions
Co-authored-by: aweebs <8809837+aweebs@users.noreply.github.com>

Due to a regression in npm 9.3.0 (upgraded by Node.JS 18 LTS at 18.14.0,
see https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V18.md#2023-02-02-version-18140-hydrogen-lts-bethgriggs-prepared-by-juanarbol),
the `npm get config` command stopped working in workspaces. This made
our actions using actions/setup-node to fail.

Issues were opened in the relevant repositories since january
and february (check https://github.com/npm/cli/issues/6099 and https://github.com/actions/setup-node/issues/712)
but it looks like getting this fixed upstream it's going to take a long time.
We have been waiting for a really long time
for other fixes in npm, so I don't expect this situation will be solved really soon

We need a working CI before the Vue 3 merge, so applying this commit will
solve the issue in the meantime. In the future, it might be interesting
to revert this commit.

Also format the GitHub Actions workflows using the official VSCode GitHub extension
2023-04-03 12:52:57 +02:00
Fernando Fernández 90e5d1507b fix: minor fixes
* Fix MediaSession handling
* Remove useless property at taskManager
* Fix timeout of sync task not being followed
2023-04-03 12:52:57 +02:00
Fernando Fernández ca0781c6d5 refactor: reimplement SortableJS for queue 2023-04-03 12:52:57 +02:00
Fernando Fernández dd458de062 chore: cleanup old files
* Remove unused image assets. If they're needed in the future, we can simply use unplugin-icons
* Add deprecation notices
* Remove the canPlay check at playerElement: hls.js should handle that directly
2023-04-03 12:52:57 +02:00
Fernando Fernández 5e183ce23b chore: add additional linting suites
These additional linting suites doesn't add new errors or warnings,
so they're good to have to prevent possible future problems

eslint-plugin-jsonc is also better maintained than eslint-plugin-json
2023-04-03 12:52:57 +02:00
Fernando Fernández a2000c23c0 fix: artist images 2023-04-03 12:52:57 +02:00
Fernando Fernández 0303d74fe7 chore: clear old dependencies' usage 2023-04-03 12:52:57 +02:00
Fernando Fernández 2c4b004920 chore: add roboto font for consistent display across all devices 2023-04-03 12:52:57 +02:00
Fernando Fernández a0264eb48d chore: remove CONTRIBUTING.md
Moves the content as is (although it must be updated to reflect Vue 3 upgrade)
to the wiki, where it will be more easily editable even by others if we want to, independently from the source code
2023-04-03 12:52:57 +02:00
Fernando Fernández 2461dffc95 fix: external dependency's types
* Upgrade to the new Vuetify 3.1.11, which fixes all missing VGrid types
* Upgrade axios and @jellyfin-sdk. Mismatched axios versions caused type errors
2023-04-03 12:52:57 +02:00
Fernando Fernández c1d8886388 fix: remaining SonarCloud bugs 2023-04-03 12:52:57 +02:00
Fernando Fernández 474befd3f1 feat(vue3): create global loading state
Show a v-progress-linear when an Axios request is happening or suspense
is loading content.

In a similar fashion to GitHub's and YouTube loading indicators
2023-04-03 12:52:57 +02:00
Fernando Fernández 14e50440e0 ci: update Dockerfile to new config.json client configuration
* Fix some markup validation errors in index.html
* Fix config.json fetching
* Fix incorrect variable name for external config
2023-04-03 12:52:57 +02:00
Fernando Fernández bab6f5aa4d ci: expand devcontainer configuration to support Docker
Current Codespace configuration didn't had Docker installed. Now Docker is installed and can be used in the development flow
2023-04-03 12:52:57 +02:00
Fernando Fernández bdbb8a9cca fix: page, menus overflow, color icons
The page overflowed because unplugin-icons settled a size for the icon components.
With ``scale: 0`` this no longer happens.
Fixing that also fixed all the overflows present in the page.

The color of the playback buttons in the music player has been fixed by upgrading Vuetify
2023-04-03 12:52:57 +02:00
Fernando Fernández 59ecdb94f8 fix: use correct key for routerviewtransition
Fixes the need of watchers for path params
2023-04-03 12:52:57 +02:00
Fernando Fernández a21f1f2143 refactor: remove multiple usage of user-select: none property 2023-04-03 12:52:57 +02:00
Fernando Fernández 59317ac944 refactor: router middleware for playback pages
Merge redirection logic of music and video players into playerElement store

A middleware for handling direct URL access has been made, which will avoid
the player pages temporarily appearing after the splashscreen or if the user inputs the URL manually.
2023-04-03 12:52:57 +02:00
Fernando Fernández dd540c2a1b feat: reverse transition when going to the back page 2023-04-03 12:52:57 +02:00
Fernando Fernández 4664984ea2 refactor: replace Vue router's back function
When there are pages in the history stack, go back.
When there are no pages in the history stack, go home instead of back
2023-04-03 12:52:57 +02:00
Fernando Fernández 64f0a42b03 fix: transitions
Use Vuetify transition classes and add new `enter` and `leave` hooks for
further transition customization.
2023-04-03 12:52:57 +02:00
Fernando Fernández cfa6d2ec56 feat: new music fullscreen page 2023-04-03 12:52:57 +02:00
Fernando Fernández 698519d667 refactor: merge osdplayer into fullscreen 2023-04-03 12:52:57 +02:00
Fernando Fernández 81210bc4d9 refactor: factorize playback buttons into components 2023-04-03 12:52:57 +02:00
Fernando Fernández 84213b9ff8 refactor: apply suggestions from code review 2023-04-03 12:52:57 +02:00
Fernando Fernández 28b82d1aee perf: debounce image width change, refactor shared state usage and remove wildcard exports from store
This will reduce resource usage.
For instance, useNow requests a lot of animation frames, which can be heavy when
invoked in multiple components.

Also, removed wildcard exports for stores (types now must be explicitly imported from the relevant store)
This is to avoid polluting the store exports. Just the new globals are allowed for wildcards.

Further changes:
* Components that can benefit from an shared state (like BlurhashImage) are refactored to use that.
* Fix #1888
2023-04-03 12:52:57 +02:00
Fernando Fernández e5d3e8a58e refactor: keep all completed tasks in TaskManagerButton
Previously, if all the tasks were completed, they wouldn't disappear from the menu.
Now, completed tasks that live alongisde running tasks are also affected by this.
2023-04-03 12:52:57 +02:00
Fernando Fernández 7f18016987 refactor: merge state into the class instances
* Uniformize the comments used across them
* Ensure all the stores are cleared up on user logout
2023-04-03 12:52:57 +02:00
Fernando Fernández 428296f846 refactor: auto color mode and language
* Improve TS typechecking for locale values
* Add an automatic language mode to LocaleSwitcher
* Add an automatic color mode that follows browser color schema
* Fix tooltips in appbar
2023-04-03 12:52:57 +02:00
e178e70872 refactor: apply suggestions from code review
Co-authored-by: Adam <8809837+aweebs@users.noreply.github.com>
Co-authored-by: Thibault Nocchi <1619359+ThibaultNocchi@users.noreply.github.com>
2023-04-03 12:52:57 +02:00
Fernando Fernández ba657f00ae fix: don't change locale code following browser locale change 2023-04-03 12:52:57 +02:00
Fernando Fernández 7a2e55384e refactor: taskManager 2023-04-03 12:52:57 +02:00
Fernando Fernández efb864ac5c refactor: make LikeButton computed
TODO: This will only work properly with the playback elements, since the items store must be completely reactive for this
2023-04-03 12:52:57 +02:00
Fernando FernándezandAdam 5f36f4ae17 refactor: apply suggestions from code review
Co-authored-by: Adam <8809837+aweebs@users.noreply.github.com>

* Refactored the use of the remote plugin in the playbackManager store
2023-04-03 12:52:57 +02:00
Fernando Fernández 52a04c70dd refactor: items store
Remove computed properties and use proxy reactivity exclusively.

TODO: This store is still not fully reactive when data is returned through an Axios request.
2023-04-03 12:52:57 +02:00
Fernando Fernández ea2a59b532 fix: refactor stores, fix concurrency errors when pushing data to server
* Concurrency errors happened when using a deep watcher in clientSettings
* The watcher location of all the stores have been moved into the constructor
* All the computed properties from the stores have been removed, as getters/setters are reactive
* Rename default import from remote plugin at Axios plugin
2023-04-03 12:52:57 +02:00
Fernando Fernández 20a57084c1 refactor: improve volar autocompletion 2023-04-03 12:52:57 +02:00
Fernando Fernández 74c1295adc perf: improve index page rendering
Swiper's new virtual modes solved the performance issues while swapping between slides, so now it's fully safe to use
2023-04-03 12:52:57 +02:00
Fernando Fernández ae9d06bf2d fix(videoplayer): few refactors and lint fixes 2023-04-03 12:52:57 +02:00
Fernando Fernández f6c3c49b8c refactor: better video player handling 2023-04-03 12:52:57 +02:00
Fernando Fernández 1dd7c44b18 fix music playback starting from the previous time when going to the next track 2023-04-03 12:52:57 +02:00
Fernando Fernández bbb66bcf2a refactor: fix long running timeout and requestAnimationFrame handlers
Vue will batch the DOM updates without the need of DOM updates
2023-04-03 12:52:57 +02:00
Fernando Fernández 235a92c00c chore: sonarcloud and unicorn fixes 2023-04-03 12:52:57 +02:00
Fernando Fernández 0916e4e9b8 refactor(vue3): migrate the remaining Carousel components to Composition API
With the improvements on loading, items of the carousel would change after the component is instantiated.
However, there were some issues preventing the components from being reactive.
By migrating to Composition API, those reactivity issues are fixed.
2023-04-03 12:52:57 +02:00
Fernando Fernández f2a28346cb perf(vue3): improve index loading times by only blocking navigation at login 2023-04-03 12:52:57 +02:00
Fernando FernándezandThibault 538c40e6be feat(search-vue3): trim input string
Co-authored-by: Thibault <1619359+ThibaultNocchi@users.noreply.github.com>
2023-04-03 12:52:57 +02:00
Fernando Fernández 6d92dc29e1 feat(search-vue3): handle search page based on SearchField focus state, not query 2023-04-03 12:52:57 +02:00
Fernando Fernández 00bdc87057 chore(search-vue3): remove top results and improve logic
Top results are removed because they have bad UX, showing cards of different sizes.
TODO: Reconsider other UXs for showing this properly
2023-04-03 12:52:57 +02:00
Fernando Fernández 0b702e8231 feat(item-grid): add no-virtual prop to skip virtual rendering in some places 2023-04-03 12:52:57 +02:00
Fernando Fernández c25395f42d fix: music playback and home section's swipers
* Update swiper to v9.X
* Fixed music changing when accessing fullscreen page
* Disable the navigation buttons when the swiper is at the end of beginning in swiper sections
2023-04-03 12:52:57 +02:00
Fernando Fernández 965c264851 ci(vue3): update linting and type checking configuration 2023-04-03 12:52:57 +02:00
Fernando Fernández 0ca9a79928 refactor(auth): remove computed property and fix some type errors 2023-04-03 12:52:57 +02:00
Fernando Fernández d3a2994d58 fix(vuetify): backdrop borking v-app
Backdrop was breaking v-app's behaviour. The order of the elements is important for things like v-hover to work properly
2023-04-03 12:52:57 +02:00
Fernando Fernández 6c6f1f135e fix(vuetify): hover slots 2023-04-03 12:52:57 +02:00
Fernando Fernández 1a3816d72f refactor(vue3-router): remove deprecated tag prop 2023-04-03 12:52:57 +02:00
Fernando Fernández ef568de7d3 feat(vue3): refactor playerManager store and fix music playback
* This commit lays the groundwork and adds some hints to some files, with ideas of how I see those features reimplemented for playback.
* Only music works at this point, but without AudioContext or any fancyness.
* Change folder layout from Players to Playback
2023-04-03 12:52:57 +02:00
Fernando Fernández 89b8a46d39 refactor(store): don't use async storage for stores and minor refactor
* Don't use async storage

* Use arrow functions for TypeScript compatibility with this

* Add store keys as constants

* Fix defaultState being mutated using Object.assign as well, create a clone with lodash's cloneDeep
2023-04-03 12:52:57 +02:00
Fernando Fernández 57c63cb4ff fix(socket): update vueuse to overcome socket limitations
Check https://github.com/vueuse/vueuse/releases/tag/v9.12.0

Prior, socket required an string as a ref. As my PR has now been merged, undefined refs can be passed as well, so we can have the socket connect/disconnect behaviour working properly
2023-04-03 12:52:57 +02:00
Fernando Fernández aa366e7bba perf(virtual-grid): don't use throttle function when no throttle is defined 2023-04-03 12:52:57 +02:00
Fernando Fernández cedc32114c chore(devcontainer): update codespaces config for Vue 3 2023-04-03 12:52:57 +02:00
Fernando Fernández 53b4b97423 perf(blurhash-image): rely less on watchers 2023-04-03 12:52:57 +02:00
Fernando Fernández 1d5ab89d44 refactor(datefns): move locale handling to composable 2023-04-03 12:52:57 +02:00
Fernando Fernández fbd32e1b82 fix(virtual-grid): slice bounds
When the available virtual buffer is bigger than the amount of items that we want to show, the incorrect slice bounds were used.
When the length of items is less than whatever buffer we had set, no virtual scrolling is used at all.
2023-04-03 12:52:57 +02:00
Fernando Fernández 14b5d33ead fix(vue3): change references to new playbackManager
During the Pinia deprecation, some properties from playbackManager were changed. Update those references throughout the code
2023-04-03 12:52:57 +02:00
Fernando Fernández 9ef68e3fef chore(vue3): add temporal .gitignore for components.d.ts
components.d.ts provides type support for components imported by unplugin-vue-components.

It needs to be commited to version control. However, any minor modification to components or moving files around modifies it.
As the Vue 3 branch is evolving so quickly, having it committed means that almost every commit will have modifications for it.

In order to keep a clear commit history, it's better to leave it ignored until before the Vue 3 migration's PR is merged
2023-04-03 12:52:57 +02:00
Fernando Fernández b8430d8bf8 chore(vue3): replace ~ with @ for imports
Adding @ as an import alias is something that was done in the project scaffolding.
Using @ it's easier in the keyboard than ~, as ~ typically requires double key taps, while @ is inputted directly in most keyboard layouts.

Replacing the imports was something left for the last moment, as it implied modifying a lot of files at once, which is something I wanted to keep for the final stages of the Vue 3 migration
2023-04-03 12:52:57 +02:00
Fernando Fernández bbc143cd1b chore(vue3): update plugin imports
With the pinia deprecation, there's no need to distinguish between vue and store plugins
2023-04-03 12:52:57 +02:00
Fernando Fernández dcdb2d5e89 chore(vue3): deprecate pinia
Pinia was great in Vue 2. However, since in Vue 3 there's no longer a global instance,
doing reactivity and watching outside the app context is much easier and simplifies tremendously
our app initialization context (for things like playback watchers) and persistence.

Also, Pinia didn't allow us to be explicit with what we wanted to expose and, by default,
all the methods, state properties and getters were accessible by everyone. With TypeScript classes,
we have full control of the external visibility of every property and
how we want to expose everything (readonly or not readonly?)

We lose the ability to have DevTools support, but it's not like we used it that much anyway
2023-04-03 12:52:57 +02:00
Fernando Fernández c0aa557a1b chore(vue3): move router history config to JSON 2023-04-03 12:52:57 +02:00
Fernando Fernández 704e58842a chore(vue3): update thai language in i18n and add sort-keys rule to language map 2023-04-03 12:52:57 +02:00
Fernando Fernández 8106b2fc17 perf(vue3): implement virtual scroller for item grid
Based on the implementation at https://github.com/rocwang/vue-virtual-scroll-grid. MIT licensed.
2023-04-03 12:52:57 +02:00
Fernando Fernández ce4aa6ccf0 perf(vue3): fix image popping on load and cache blurhashes 2023-04-03 12:52:57 +02:00
Fernando Fernández 93419c7838 fix(vue3): prop watching
* Removed the need for returning something in computed property
2023-04-03 12:52:57 +02:00
Fernando Fernández 2fcf093b6a chore/perf(vue3): cleanup and minor performance improvements
* Wrap all the DOM population inside requestIdleCallback and requestAnimationFrame
* Fix slow scrolling
* Move types under a subdirectory
* Fix missing class in useResponsiveClasses JSDOC
2023-04-03 12:52:57 +02:00
Fernando Fernández 8aa14552d0 chore(vue3): router, main and lint improvements
* Remove useless rules from eslintrc
* Remove v-text usage
* Rework layout so the entire app is wrapped around v-app
* Remove useless script declaration in ItemCols
* Migrate PeopleList (previously named PersonList) to Composition API
* Migrate index page to Composition API
* Fix z-indexes of BlurhashImage
* Remove unnecessary computed propierties from app-bar-button-layout
* Migrate HomeSection to Composition API (fixes as well item popping)
* Migrate RelatedItems to Composition API, fixing a crash
2023-04-03 12:52:57 +02:00
Fernando Fernández 366beda5ad feat(vue3): make time runtime reactive
* Also migrate MediaInfo to Composition API
2023-04-03 12:52:57 +02:00
Fernando Fernández 5d41d5ddec chore(vue3): replace ~icons/ with virtual:icons/ imports
* Also run automatic lint fixing
2023-04-03 12:52:57 +02:00
Fernando Fernández 60e6be032f feat(vue3): improvements pass
* Update packages
* Allow the use of data-* attributes with strict template checking
* Use OverlayScrollbars for a consistent scrollbar experience
* Refactor ItemMenu to reduce function complexity
* Refactor Vuetify colors and styles to match Vuetify 3
* Fix color in WatchedIndicator
* Remove unused props in Card
* Add rgb use to all the CSS variables as Vuetify requests it
* Icon fixes
* Fix search bar styling
* Migrate ArtistTab to Composition API
* Reliability and logic improvements to BlurhashImage and fallback behaviour
* Fix order of main app bar and navigation drawer
* Add app bar to music playback page
* Migrate login page to Composition API
* Fix logic error in app-wide api availability
2023-04-03 12:52:57 +02:00
Fernando Fernández 9b643e92f6 fix(tauri): icon paths 2023-04-03 12:52:57 +02:00
Fernando Fernández a347202d29 chore(vue3): first reimplementation of music playback's swiper 2023-04-03 12:52:57 +02:00
Fernando Fernández 25fd93d528 chore(vue3): plug all the styling rules together 2023-04-03 12:52:57 +02:00
Fernando Fernández cfb1230a17 chore(vue3): minor fixes 2023-04-03 12:52:57 +02:00
Fernando Fernández a45cc9cf94 chore(vue3): remove nuxt remnants and fix typechecking in some options API components 2023-04-03 12:52:57 +02:00
Fernando Fernández ba6b6ccf51 chore(vue3): start bug bashing and minor improvements
* Update v-menu activator for itemmenu
* Fix app bar icons
* Fix user views
* Migrate swiper
* Fix CORS issues with Vite
* Improve UserImage size handling (TODO: size in UserCard)
* Migrate more minor components to Composition API
2023-04-03 12:52:57 +02:00
Fernando Fernández 4d9a5de8d5 chore(vue3): update $api usage to new SDK
* Migrate more minor components to Composition API
2023-04-03 12:52:57 +02:00
Fernando Fernández af97c2a0b6 chore(vue3): generate route typings using unplugin-vue-router
For pages, we will still use vite-plugin-pages as it's stable and
unplugin-vue-router had issues with layouts. Using both won't increase the bundle
size, as unplugin-vue-router is not imported anywhere in the bundle.

We should keep a close track to both projects and just stick with one in the future.
2023-04-03 12:52:57 +02:00
Fernando Fernández 3615828fa3 chore(vue3): remove mapStores and use setup for stores 2023-04-03 12:52:57 +02:00
Fernando Fernández 7cb6f36025 chore(vue3): migrate NavigationDrawer to composition API 2023-04-03 12:52:57 +02:00
Fernando Fernández 59eb208e4f chore(vue3): migrate Blurhash to composition API 2023-04-03 12:52:57 +02:00
Fernando Fernández 68d73eb453 chore(vue3): migrate DraggableQueue to composition API 2023-04-03 12:52:57 +02:00
Fernando Fernández 022e56ee65 chore(vite): remove unnecessary @types dependencies 2023-04-03 12:52:57 +02:00
Fernando Fernández a0c5c641cd chore(vite): use lodash-es instead of lodash
* In Nuxt, lodash-es rendered a bigger bundle size than lodash, so we kept it. With full complete of our building tools, we can switch back to lodash-es and remove the eslint plugin
2023-04-03 12:52:57 +02:00
Fernando Fernández 7b3302f42a chore(vue3): migrate VolumeSlider to composition API 2023-04-03 12:52:57 +02:00