Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Fernando Fernández <ferferga@hotmail.com>
  • Loading branch information
ferferga committed Jan 8, 2025
1 parent 013e1a6 commit fc18ccb
Show file tree
Hide file tree
Showing 17 changed files with 47 additions and 17 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/lib/JView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<template
v-if="!apploaded && root"
#fallback>
<JSplashscreen />
<Splashscreen />
</template>
</Suspense>
</JTransition>
Expand Down
6 changes: 0 additions & 6 deletions frontend/src/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ import { remote } from '#/plugins/remote';
import { router } from '#/plugins/router';
import type { SubtitleTypographyChoices } from '#/store/client-settings/subtitle-settings';

/**
* This file contains global variables (specially VueUse refs) that are used multiple times across the client.
* VueUse composables will set new event handlers, so it's more
* efficient to reuse those, both in components and TS files.
*/

export const DEFAULT_TYPOGRAPHY = 'Figtree Variable';
/**
* Type for the different typography choices across the application
Expand Down
1 change: 1 addition & 0 deletions frontend/src/utils/i18n.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { isStr } from '@jellyfin-vue/shared/validation';
import { upperFirst } from '#/utils/data-manipulation';

/**
Expand Down
1 change: 1 addition & 0 deletions frontend/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": "@jellyfin-vue/configs/typescript",
"compilerOptions": {
"baseUrl": ".",
"lib": [
"ESNext",
"DOM",
Expand Down
6 changes: 3 additions & 3 deletions frontend/types/global/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ declare module 'vue' {
ItemsCarousel: typeof import('./../../src/components/Layout/Carousel/Item/ItemsCarousel.vue')['default']
ItemsCarouselTitle: typeof import('./../../src/components/Layout/Carousel/Item/ItemsCarouselTitle.vue')['default']
JApp: typeof import('./../../src/components/lib/JApp.vue')['default']
JHover: typeof import('./../../src/components/lib/JHover.vue')['default']
JHover: typeof import('@jellyfin-vue/ui-toolkit/components')['JHover']
JImg: typeof import('./../../src/components/lib/JImg.vue')['default']
JOverlay: typeof import('./../../src/components/lib/JOverlay.vue')['default']
JSafeHtml: typeof import('./../../src/components/lib/JSafeHtml.vue')['default']
JSlot: typeof import('./../../src/components/lib/JSlot.vue')['default']
JSlot: typeof import('@jellyfin-vue/ui-toolkit/components')['JSlot']
JSplashscreen: typeof import('./../../src/components/lib/JSplashscreen.vue')['default']
JTransition: typeof import('./../../src/components/lib/JTransition.vue')['default']
JView: typeof import('./../../src/components/lib/JView.vue')['default']
JVirtual: typeof import('./../../src/components/lib/JVirtual/JVirtual.vue')['default']
JVirtual: typeof import('@jellyfin-vue/ui-toolkit/components')['JVirtual']
LikeButton: typeof import('./../../src/components/Buttons/LikeButton.vue')['default']
LoadingIndicator: typeof import('./../../src/components/System/LoadingIndicator.vue')['default']
LocaleSwitcher: typeof import('./../../src/components/System/LocaleSwitcher.vue')['default']
Expand Down
8 changes: 7 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 13 additions & 2 deletions packages/ui-toolkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
"name": "@jellyfin-vue/ui-toolkit",
"type": "module",
"description": "Base components and UI toolkit for Jellyfin Vue",
"imports": {
"#/*": "./src/*"
},
"exports": {
"./components": "./src/components"
"./components": "./src/components/index.ts",
"./store": "./src/store.ts",
"./resolver": "./src/resolver.ts"
},
"scripts": {
"lint": "eslint . --flag unstable_ts_config",
Expand All @@ -13,6 +18,12 @@
},
"devDependencies": {
"@jellyfin-vue/configs": "*",
"unplugin-vue-components": "0.28.0"
"unplugin-vue-components": "28.0.0"
},
"dependencies": {
"@skirtle/vue-vnode-utils": "0.2.0",
"@vueuse/core": "12.3.0",
"comlink": "4.4.2",
"vue": "3.5.13"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ import {
} from './pipeline';
import type { IJVirtualWorker } from './j-virtual.worker';
import JVirtualWorker from './j-virtual.worker?worker';
import { vuetify } from '#/plugins/vuetify';
import { windowSize } from '#/store.ts';
/**
* SHARED STATE ACROSS ALL THE COMPONENT INSTANCES
*/
const display = vuetify.display;
const displayWidth = refDebounced(display.width, 250);
const displayHeight = refDebounced(display.height, 250);
const displayWidth = refDebounced(windowSize.width, 250);
const displayHeight = refDebounced(windowSize.height, 250);
</script>

<script setup lang="ts" generic="T">
Expand Down
5 changes: 5 additions & 0 deletions packages/ui-toolkit/src/components/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export { default as JVirtual } from './JVirtual/index.vue';

export { default as JHover } from './JHover.vue';
export { default as JOverlay } from './JVirtual/index.vue';
export { default as JSlot } from './JSlot.vue';
9 changes: 9 additions & 0 deletions packages/ui-toolkit/src/store.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* This module contains application-level state (specially VueUse refs)
* that are used multiple times across the client. VueUse composables will set
* new event handlers/effects, so it's more efficient to reuse those,
* both in components and TS files.
*/
import { useWindowSize } from '@vueuse/core';

export const windowSize = useWindowSize();
3 changes: 3 additions & 0 deletions packages/vite-plugins/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "@jellyfin-vue/configs/typescript",
"compilerOptions": {
"baseUrl": "."
},
"exclude": [
"dist",
"node_modules",
Expand Down

0 comments on commit fc18ccb

Please sign in to comment.