Skip to content

Commit d78c4e6

Browse files
authored
Merge branch 'main' into chapter_time
2 parents 27df1b9 + bff8f5d commit d78c4e6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+2996
-1019
lines changed

.github/workflows/lokalise-download.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
build:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v4
9+
- uses: actions/checkout@v5
1010
- name: Lokalise CLI
1111
run: curl -sfL https://raw.githubusercontent.com/lokalise/lokalise-cli-2-go/master/install.sh | sh
1212
- name: Pull

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ jobs:
2424
contents: write # Required to upload release assets
2525
steps:
2626
- name: Checkout the repository
27-
uses: actions/checkout@v4
27+
uses: actions/checkout@v5
2828

2929
- name: Get tag
3030
id: vars
3131
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
3232

3333
- name: Set up Python ${{ env.PYTHON_VERSION }}
34-
uses: actions/setup-python@v5
34+
uses: actions/setup-python@v6
3535
with:
3636
python-version: ${{ env.PYTHON_VERSION }}
3737

3838
- name: Set up Node ${{ env.NODE_VERSION }}
39-
uses: actions/setup-node@v4
39+
uses: actions/setup-node@v5
4040
with:
4141
node-version: ${{ env.NODE_VERSION }}
4242
cache: yarn
@@ -67,13 +67,13 @@ jobs:
6767
python3 -m build
6868
6969
- name: Publish release to PyPI
70-
uses: pypa/gh-action-pypi-publish@v1.12.4
70+
uses: pypa/gh-action-pypi-publish@v1.13.0
7171
with:
7272
user: __token__
7373
password: ${{ secrets.PYPI_TOKEN }}
7474

7575
- name: Upload release assets
76-
uses: softprops/[email protected].2
76+
uses: softprops/[email protected].3
7777
with:
7878
files: |
7979
dist/*.whl

.github/workflows/test.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Lint Vue frontend
1+
name: Test and Lint Vue frontend
22
on:
33
push:
44
pull_request:
@@ -8,18 +8,21 @@ env:
88
NODE_VERSION: "22.x" # set this to the node version to use
99

1010
jobs:
11-
lint:
12-
name: Lint
11+
test-and-lint:
12+
name: Test and Lint
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v5
16+
1617
- name: Use Node.js
17-
uses: actions/setup-node@v4
18+
uses: actions/setup-node@v5
1819
with:
1920
node-version: ${{ env.NODE_VERSION }}
21+
2022
- name: Get yarn cache directory path
2123
id: yarn-cache-dir-path
2224
run: echo "::set-output name=dir::$(yarn cache dir)"
25+
2326
- name: Cache Node.js modules
2427
id: yarn-cache
2528
uses: actions/cache@v4
@@ -28,18 +31,27 @@ jobs:
2831
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
2932
restore-keys: |
3033
${{ runner.os }}-yarn-
34+
3135
- name: Install dependencies
3236
run: yarn install --frozen-lockfile --silent
3337
env:
3438
CI: true
39+
40+
- name: Run tests
41+
run: yarn test:run
42+
env:
43+
CI: true
44+
3545
- name: Lint
3646
run: yarn lint
3747
env:
3848
CI: true
39-
- name: Lint
49+
50+
- name: Build
4051
run: yarn build
4152
env:
4253
CI: true
54+
4355
# disable typecheck for now
4456
# - name: Typecheck
4557
# run: yarn typecheck

.husky/pre-commit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
yarn lint
2+
yarn test:run

package.json

Lines changed: 69 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,71 @@
11
{
2-
"name": "frontend",
3-
"version": "0.0.0",
4-
"type": "module",
5-
"description": "The Music Assistant frontend developed in Vue.",
6-
"scripts": {
7-
"dev": "vite",
8-
"build": "vue-tsc --noEmit && vite build",
9-
"preview": "vite preview",
10-
"lint": "eslint . --fix --ignore-path .gitignore"
11-
},
12-
"dependencies": {
13-
"@intlify/unplugin-vue-i18n": "6.0.8",
14-
"@mdi/font": "7.4.47",
15-
"@mdi/js": "7.4.47",
16-
"color": "5.0.0",
17-
"colorthief": "2.6.0",
18-
"home-assistant-js-websocket": "9.5.0",
19-
"marked": "^16.1.2",
20-
"mitt": "3.0.1",
21-
"mobile-detect": "1.4.5",
22-
"swiper": "^11.2.10",
23-
"vue": "3.5.18",
24-
"vue-audio-better": "3.0.1",
25-
"vue-i18n": "11.1.11",
26-
"vue-router": "4.5.1",
27-
"vuetify": "3.9.4",
28-
"websocket-ts": "2.2.1"
29-
},
30-
"devDependencies": {
31-
"@fontsource/roboto": "5.2.6",
32-
"@types/color": "4.2.0",
33-
"@types/node": "24.2.1",
34-
"@typescript-eslint/eslint-plugin": "7.0.0",
35-
"@typescript-eslint/parser": "6.21.0",
36-
"@vitejs/plugin-vue": "6.0.1",
37-
"@vue/eslint-config-typescript": "13.0.0",
38-
"@vue/tsconfig": "0.7.0",
39-
"eslint": "8.57.1",
40-
"eslint-config-prettier": "10.1.8",
41-
"eslint-plugin-prettier": "5.5.4",
42-
"eslint-plugin-vue": "9.33.0",
43-
"https-localhost": "4.7.1",
44-
"jsdom": "26.1.0",
45-
"material-design-icons-iconfont": "6.7.0",
46-
"nanoid": "5.1.5",
47-
"prettier": "3.6.2",
48-
"replace-in-file": "8.3.0",
49-
"sass": "1.90.0",
50-
"typescript": "5.9.2",
51-
"unplugin": "^2.3.5",
52-
"vite": "^7.1.2",
53-
"vite-plugin-pwa": "1.0.2",
54-
"vite-plugin-vuetify": "2.1.2",
55-
"vite-plugin-webfont-dl": "3.11.1",
56-
"vite-svg-loader": "^5.1.0",
57-
"vue-tsc": "3.0.5"
58-
},
59-
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
2+
"name": "frontend",
3+
"version": "0.0.0",
4+
"type": "module",
5+
"description": "The Music Assistant frontend developed in Vue.",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "vue-tsc --noEmit && vite build",
9+
"preview": "vite preview",
10+
"lint": "eslint . --fix --ignore-path .gitignore",
11+
"test": "vitest",
12+
"test:ui": "vitest --ui",
13+
"test:run": "vitest run",
14+
"test:coverage": "vitest run --coverage",
15+
"prepare": "husky"
16+
},
17+
"dependencies": {
18+
"@intlify/unplugin-vue-i18n": "11.0.0",
19+
"@mdi/font": "7.4.47",
20+
"@mdi/js": "7.4.47",
21+
"color": "5.0.0",
22+
"colorthief": "2.6.0",
23+
"home-assistant-js-websocket": "9.5.0",
24+
"marked": "^16.2.1",
25+
"mitt": "3.0.1",
26+
"mobile-detect": "1.4.5",
27+
"swiper": "^11.2.10",
28+
"ts-pattern": "^5.8.0",
29+
"vue": "3.5.21",
30+
"vue-audio-better": "3.0.1",
31+
"vue-i18n": "11.1.12",
32+
"vue-router": "4.5.1",
33+
"vuetify": "3.9.7",
34+
"websocket-ts": "2.2.1"
35+
},
36+
"devDependencies": {
37+
"@fontsource/roboto": "5.2.6",
38+
"@types/color": "4.2.0",
39+
"@types/node": "24.3.1",
40+
"@typescript-eslint/eslint-plugin": "7.0.0",
41+
"@typescript-eslint/parser": "6.21.0",
42+
"@vitejs/plugin-vue": "6.0.1",
43+
"@vitest/coverage-v8": "^3.2.4",
44+
"@vitest/ui": "3.2.4",
45+
"@vue/eslint-config-typescript": "13.0.0",
46+
"@vue/test-utils": "^2.4.6",
47+
"@vue/tsconfig": "0.8.1",
48+
"eslint": "8.57.1",
49+
"eslint-config-prettier": "10.1.8",
50+
"eslint-plugin-prettier": "5.5.4",
51+
"eslint-plugin-vue": "9.33.0",
52+
"https-localhost": "4.7.1",
53+
"husky": "^9.1.7",
54+
"jsdom": "^26.1.0",
55+
"material-design-icons-iconfont": "6.7.0",
56+
"nanoid": "5.1.5",
57+
"prettier": "3.6.2",
58+
"replace-in-file": "8.3.0",
59+
"sass": "1.92.1",
60+
"typescript": "5.9.2",
61+
"unplugin": "^2.3.10",
62+
"vite": "^7.1.4",
63+
"vite-plugin-pwa": "1.0.3",
64+
"vite-plugin-vuetify": "2.1.2",
65+
"vite-plugin-webfont-dl": "3.11.1",
66+
"vite-svg-loader": "^5.1.0",
67+
"vitest": "^3.2.4",
68+
"vue-tsc": "3.0.6"
69+
},
70+
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
6071
}

src/components/Button.vue

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<template>
2+
<v-btn
3+
v-bind="buttonProps"
4+
:class="buttonClasses"
5+
@click="$emit('click', $event)"
6+
>
7+
<v-icon v-if="icon && typeof icon === 'string'" :icon="icon" />
8+
<template v-for="(_, name) in $slots" #[name]>
9+
<slot :name="name"></slot>
10+
</template>
11+
</v-btn>
12+
</template>
13+
14+
<script lang="ts">
15+
export type { ButtonEmits, ButtonProps } from "@/composables/useButton";
16+
</script>
17+
18+
<script setup lang="ts">
19+
import {
20+
defaultButtonProps,
21+
useButton,
22+
type ButtonEmits,
23+
type ButtonProps,
24+
} from "@/composables/useButton";
25+
26+
const props = withDefaults(defineProps<ButtonProps>(), defaultButtonProps);
27+
28+
defineEmits<ButtonEmits>();
29+
30+
const { buttonProps, buttonClasses } = useButton(props);
31+
</script>
32+
33+
<style scoped>
34+
.button:focus-visible {
35+
outline: 2px solid var(--v-theme-primary);
36+
outline-offset: 2px;
37+
}
38+
39+
@media (prefers-contrast: high) {
40+
.button {
41+
border: 1px solid currentColor;
42+
}
43+
}
44+
45+
@media (prefers-reduced-motion: reduce) {
46+
.button {
47+
transition: none;
48+
}
49+
}
50+
51+
.button--responsive {
52+
min-height: 48px;
53+
min-width: 48px;
54+
}
55+
56+
.button--icon {
57+
min-height: 40px;
58+
min-width: 40px;
59+
}
60+
61+
.button--icon :deep(.v-ripple__container) {
62+
border-radius: 50% !important;
63+
transform: scale(0.7) !important;
64+
}
65+
66+
.button--icon :deep(.v-ripple__animation) {
67+
border-radius: 50% !important;
68+
}
69+
70+
.button--nav {
71+
border-radius: 0;
72+
}
73+
</style>

src/components/Chapters.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@
3636
</template>
3737

3838
<script setup lang="ts">
39-
import { itemIsAvailable } from "@/plugins/api/helpers";
39+
import Container from "@/components/Container.vue";
40+
import Toolbar from "@/components/Toolbar.vue";
4041
import { formatDuration } from "@/helpers/utils";
41-
import { MediaItemChapter, type MediaItemType } from "@/plugins/api/interfaces";
4242
import { api } from "@/plugins/api";
43-
import Container from "@/components/mods/Container.vue";
44-
import Toolbar from "@/components/Toolbar.vue";
45-
import { computed, reactive, ref } from "vue";
43+
import { itemIsAvailable } from "@/plugins/api/helpers";
44+
import { MediaItemChapter, type MediaItemType } from "@/plugins/api/interfaces";
45+
import { computed, ref } from "vue";
4646
4747
export interface Props {
4848
itemDetails: MediaItemType;

0 commit comments

Comments
 (0)