[web] Refactor search pages

This commit is contained in:
Alain Nussbaumer 2025-05-18 18:35:58 +02:00
parent b5fe530f0d
commit 708370aab9
10 changed files with 319 additions and 312 deletions

File diff suppressed because one or more lines are too long

View File

@ -1368,9 +1368,9 @@
}
},
"node_modules/@rollup/rollup-android-arm-eabi": {
"version": "4.40.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.40.2.tgz",
"integrity": "sha512-JkdNEq+DFxZfUwxvB58tHMHBHVgX23ew41g1OQinthJ+ryhdRk67O31S7sYw8u2lTjHUPFxwar07BBt1KHp/hg==",
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.41.0.tgz",
"integrity": "sha512-KxN+zCjOYHGwCl4UCtSfZ6jrq/qi88JDUtiEFk8LELEHq2Egfc/FgW+jItZiOLRuQfb/3xJSgFuNPC9jzggX+A==",
"cpu": [
"arm"
],
@ -1382,9 +1382,9 @@
]
},
"node_modules/@rollup/rollup-android-arm64": {
"version": "4.40.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.40.2.tgz",
"integrity": "sha512-13unNoZ8NzUmnndhPTkWPWbX3vtHodYmy+I9kuLxN+F+l+x3LdVF7UCu8TWVMt1POHLh6oDHhnOA04n8oJZhBw==",
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.41.0.tgz",
"integrity": "sha512-yDvqx3lWlcugozax3DItKJI5j05B0d4Kvnjx+5mwiUpWramVvmAByYigMplaoAQ3pvdprGCTCE03eduqE/8mPQ==",
"cpu": [
"arm64"
],
@ -1396,9 +1396,9 @@
]
},
"node_modules/@rollup/rollup-darwin-arm64": {
"version": "4.40.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.40.2.tgz",
"integrity": "sha512-Gzf1Hn2Aoe8VZzevHostPX23U7N5+4D36WJNHK88NZHCJr7aVMG4fadqkIf72eqVPGjGc0HJHNuUaUcxiR+N/w==",
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.41.0.tgz",
"integrity": "sha512-2KOU574vD3gzcPSjxO0eyR5iWlnxxtmW1F5CkNOHmMlueKNCQkxR6+ekgWyVnz6zaZihpUNkGxjsYrkTJKhkaw==",
"cpu": [
"arm64"
],
@ -1410,9 +1410,9 @@
]
},
"node_modules/@rollup/rollup-darwin-x64": {
"version": "4.40.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.40.2.tgz",
"integrity": "sha512-47N4hxa01a4x6XnJoskMKTS8XZ0CZMd8YTbINbi+w03A2w4j1RTlnGHOz/P0+Bg1LaVL6ufZyNprSg+fW5nYQQ==",
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.41.0.tgz",
"integrity": "sha512-gE5ACNSxHcEZyP2BA9TuTakfZvULEW4YAOtxl/A/YDbIir/wPKukde0BNPlnBiP88ecaN4BJI2TtAd+HKuZPQQ==",
"cpu": [
"x64"
],
@ -1424,9 +1424,9 @@
]
},
"node_modules/@rollup/rollup-freebsd-arm64": {
"version": "4.40.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.40.2.tgz",
"integrity": "sha512-8t6aL4MD+rXSHHZUR1z19+9OFJ2rl1wGKvckN47XFRVO+QL/dUSpKA2SLRo4vMg7ELA8pzGpC+W9OEd1Z/ZqoQ==",
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.41.0.tgz",
"integrity": "sha512-GSxU6r5HnWij7FoSo7cZg3l5GPg4HFLkzsFFh0N/b16q5buW1NAWuCJ+HMtIdUEi6XF0qH+hN0TEd78laRp7Dg==",
"cpu": [
"arm64"
],
@ -1438,9 +1438,9 @@
]
},
"node_modules/@rollup/rollup-freebsd-x64": {
"version": "4.40.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.40.2.tgz",
"integrity": "sha512-C+AyHBzfpsOEYRFjztcYUFsH4S7UsE9cDtHCtma5BK8+ydOZYgMmWg1d/4KBytQspJCld8ZIujFMAdKG1xyr4Q==",
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.41.0.tgz",
"integrity": "sha512-KGiGKGDg8qLRyOWmk6IeiHJzsN/OYxO6nSbT0Vj4MwjS2XQy/5emsmtoqLAabqrohbgLWJ5GV3s/ljdrIr8Qjg==",
"cpu": [
"x64"
],
@ -1452,9 +1452,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
"version": "4.40.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.40.2.tgz",
"integrity": "sha512-de6TFZYIvJwRNjmW3+gaXiZ2DaWL5D5yGmSYzkdzjBDS3W+B9JQ48oZEsmMvemqjtAFzE16DIBLqd6IQQRuG9Q==",
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.41.0.tgz",
"integrity": "sha512-46OzWeqEVQyX3N2/QdiU/CMXYDH/lSHpgfBkuhl3igpZiaB3ZIfSjKuOnybFVBQzjsLwkus2mjaESy8H41SzvA==",
"cpu": [
"arm"
],
@ -1466,9 +1466,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm-musleabihf": {
"version": "4.40.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.40.2.tgz",
"integrity": "sha512-urjaEZubdIkacKc930hUDOfQPysezKla/O9qV+O89enqsqUmQm8Xj8O/vh0gHg4LYfv7Y7UsE3QjzLQzDYN1qg==",
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.41.0.tgz",
"integrity": "sha512-lfgW3KtQP4YauqdPpcUZHPcqQXmTmH4nYU0cplNeW583CMkAGjtImw4PKli09NFi2iQgChk4e9erkwlfYem6Lg==",
"cpu": [
"arm"
],
@ -1480,9 +1480,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-gnu": {
"version": "4.40.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.40.2.tgz",
"integrity": "sha512-KlE8IC0HFOC33taNt1zR8qNlBYHj31qGT1UqWqtvR/+NuCVhfufAq9fxO8BMFC22Wu0rxOwGVWxtCMvZVLmhQg==",
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.41.0.tgz",
"integrity": "sha512-nn8mEyzMbdEJzT7cwxgObuwviMx6kPRxzYiOl6o/o+ChQq23gfdlZcUNnt89lPhhz3BYsZ72rp0rxNqBSfqlqw==",
"cpu": [
"arm64"
],
@ -1494,9 +1494,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-musl": {
"version": "4.40.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.40.2.tgz",
"integrity": "sha512-j8CgxvfM0kbnhu4XgjnCWJQyyBOeBI1Zq91Z850aUddUmPeQvuAy6OiMdPS46gNFgy8gN1xkYyLgwLYZG3rBOg==",
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.41.0.tgz",
"integrity": "sha512-l+QK99je2zUKGd31Gh+45c4pGDAqZSuWQiuRFCdHYC2CSiO47qUWsCcenrI6p22hvHZrDje9QjwSMAFL3iwXwQ==",
"cpu": [
"arm64"
],
@ -1508,9 +1508,9 @@
]
},
"node_modules/@rollup/rollup-linux-loongarch64-gnu": {
"version": "4.40.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.40.2.tgz",
"integrity": "sha512-Ybc/1qUampKuRF4tQXc7G7QY9YRyeVSykfK36Y5Qc5dmrIxwFhrOzqaVTNoZygqZ1ZieSWTibfFhQ5qK8jpWxw==",
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.41.0.tgz",
"integrity": "sha512-WbnJaxPv1gPIm6S8O/Wg+wfE/OzGSXlBMbOe4ie+zMyykMOeqmgD1BhPxZQuDqwUN+0T/xOFtL2RUWBspnZj3w==",
"cpu": [
"loong64"
],
@ -1522,9 +1522,9 @@
]
},
"node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
"version": "4.40.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.40.2.tgz",
"integrity": "sha512-3FCIrnrt03CCsZqSYAOW/k9n625pjpuMzVfeI+ZBUSDT3MVIFDSPfSUgIl9FqUftxcUXInvFah79hE1c9abD+Q==",
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.41.0.tgz",
"integrity": "sha512-eRDWR5t67/b2g8Q/S8XPi0YdbKcCs4WQ8vklNnUYLaSWF+Cbv2axZsp4jni6/j7eKvMLYCYdcsv8dcU+a6QNFg==",
"cpu": [
"ppc64"
],
@ -1536,9 +1536,9 @@
]
},
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
"version": "4.40.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.40.2.tgz",
"integrity": "sha512-QNU7BFHEvHMp2ESSY3SozIkBPaPBDTsfVNGx3Xhv+TdvWXFGOSH2NJvhD1zKAT6AyuuErJgbdvaJhYVhVqrWTg==",
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.41.0.tgz",
"integrity": "sha512-TWrZb6GF5jsEKG7T1IHwlLMDRy2f3DPqYldmIhnA2DVqvvhY2Ai184vZGgahRrg8k9UBWoSlHv+suRfTN7Ua4A==",
"cpu": [
"riscv64"
],
@ -1550,9 +1550,9 @@
]
},
"node_modules/@rollup/rollup-linux-riscv64-musl": {
"version": "4.40.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.40.2.tgz",
"integrity": "sha512-5W6vNYkhgfh7URiXTO1E9a0cy4fSgfE4+Hl5agb/U1sa0kjOLMLC1wObxwKxecE17j0URxuTrYZZME4/VH57Hg==",
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.41.0.tgz",
"integrity": "sha512-ieQljaZKuJpmWvd8gW87ZmSFwid6AxMDk5bhONJ57U8zT77zpZ/TPKkU9HpnnFrM4zsgr4kiGuzbIbZTGi7u9A==",
"cpu": [
"riscv64"
],
@ -1564,9 +1564,9 @@
]
},
"node_modules/@rollup/rollup-linux-s390x-gnu": {
"version": "4.40.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.40.2.tgz",
"integrity": "sha512-B7LKIz+0+p348JoAL4X/YxGx9zOx3sR+o6Hj15Y3aaApNfAshK8+mWZEf759DXfRLeL2vg5LYJBB7DdcleYCoQ==",
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.41.0.tgz",
"integrity": "sha512-/L3pW48SxrWAlVsKCN0dGLB2bi8Nv8pr5S5ocSM+S0XCn5RCVCXqi8GVtHFsOBBCSeR+u9brV2zno5+mg3S4Aw==",
"cpu": [
"s390x"
],
@ -1578,9 +1578,9 @@
]
},
"node_modules/@rollup/rollup-linux-x64-gnu": {
"version": "4.40.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.40.2.tgz",
"integrity": "sha512-lG7Xa+BmBNwpjmVUbmyKxdQJ3Q6whHjMjzQplOs5Z+Gj7mxPtWakGHqzMqNER68G67kmCX9qX57aRsW5V0VOng==",
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.41.0.tgz",
"integrity": "sha512-XMLeKjyH8NsEDCRptf6LO8lJk23o9wvB+dJwcXMaH6ZQbbkHu2dbGIUindbMtRN6ux1xKi16iXWu6q9mu7gDhQ==",
"cpu": [
"x64"
],
@ -1592,9 +1592,9 @@
]
},
"node_modules/@rollup/rollup-linux-x64-musl": {
"version": "4.40.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.40.2.tgz",
"integrity": "sha512-tD46wKHd+KJvsmije4bUskNuvWKFcTOIM9tZ/RrmIvcXnbi0YK/cKS9FzFtAm7Oxi2EhV5N2OpfFB348vSQRXA==",
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.41.0.tgz",
"integrity": "sha512-m/P7LycHZTvSQeXhFmgmdqEiTqSV80zn6xHaQ1JSqwCtD1YGtwEK515Qmy9DcB2HK4dOUVypQxvhVSy06cJPEg==",
"cpu": [
"x64"
],
@ -1606,9 +1606,9 @@
]
},
"node_modules/@rollup/rollup-win32-arm64-msvc": {
"version": "4.40.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.40.2.tgz",
"integrity": "sha512-Bjv/HG8RRWLNkXwQQemdsWw4Mg+IJ29LK+bJPW2SCzPKOUaMmPEppQlu/Fqk1d7+DX3V7JbFdbkh/NMmurT6Pg==",
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.41.0.tgz",
"integrity": "sha512-4yodtcOrFHpbomJGVEqZ8fzD4kfBeCbpsUy5Pqk4RluXOdsWdjLnjhiKy2w3qzcASWd04fp52Xz7JKarVJ5BTg==",
"cpu": [
"arm64"
],
@ -1620,9 +1620,9 @@
]
},
"node_modules/@rollup/rollup-win32-ia32-msvc": {
"version": "4.40.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.40.2.tgz",
"integrity": "sha512-dt1llVSGEsGKvzeIO76HToiYPNPYPkmjhMHhP00T9S4rDern8P2ZWvWAQUEJ+R1UdMWJ/42i/QqJ2WV765GZcA==",
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.41.0.tgz",
"integrity": "sha512-tmazCrAsKzdkXssEc65zIE1oC6xPHwfy9d5Ta25SRCDOZS+I6RypVVShWALNuU9bxIfGA0aqrmzlzoM5wO5SPQ==",
"cpu": [
"ia32"
],
@ -1634,9 +1634,9 @@
]
},
"node_modules/@rollup/rollup-win32-x64-msvc": {
"version": "4.40.2",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.40.2.tgz",
"integrity": "sha512-bwspbWB04XJpeElvsp+DCylKfF4trJDa2Y9Go8O6A7YLX2LIKGcNK/CYImJN6ZP4DcuOHB4Utl3iCbnR62DudA==",
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.41.0.tgz",
"integrity": "sha512-h1J+Yzjo/X+0EAvR2kIXJDuTuyT7drc+t2ALY0nIcGPbTatNOf0VWdhEA2Z4AAjv6X1NJV7SYo5oCTYRJhSlVA==",
"cpu": [
"x64"
],
@ -3724,9 +3724,9 @@
"license": "MIT"
},
"node_modules/rollup": {
"version": "4.40.2",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.40.2.tgz",
"integrity": "sha512-tfUOg6DTP4rhQ3VjOO6B4wyrJnGOX85requAXvqYTHsOgb2TFJdZ3aWpT8W2kPoypSGP7dZUyzxJ9ee4buM5Fg==",
"version": "4.41.0",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.41.0.tgz",
"integrity": "sha512-HqMFpUbWlf/tvcxBFNKnJyzc7Lk+XO3FGc3pbNBLqEbOz0gPLRgcrlS3UF4MfUrVlstOaP/q0kM6GVvi+LrLRg==",
"dev": true,
"license": "MIT",
"dependencies": {
@ -3740,26 +3740,26 @@
"npm": ">=8.0.0"
},
"optionalDependencies": {
"@rollup/rollup-android-arm-eabi": "4.40.2",
"@rollup/rollup-android-arm64": "4.40.2",
"@rollup/rollup-darwin-arm64": "4.40.2",
"@rollup/rollup-darwin-x64": "4.40.2",
"@rollup/rollup-freebsd-arm64": "4.40.2",
"@rollup/rollup-freebsd-x64": "4.40.2",
"@rollup/rollup-linux-arm-gnueabihf": "4.40.2",
"@rollup/rollup-linux-arm-musleabihf": "4.40.2",
"@rollup/rollup-linux-arm64-gnu": "4.40.2",
"@rollup/rollup-linux-arm64-musl": "4.40.2",
"@rollup/rollup-linux-loongarch64-gnu": "4.40.2",
"@rollup/rollup-linux-powerpc64le-gnu": "4.40.2",
"@rollup/rollup-linux-riscv64-gnu": "4.40.2",
"@rollup/rollup-linux-riscv64-musl": "4.40.2",
"@rollup/rollup-linux-s390x-gnu": "4.40.2",
"@rollup/rollup-linux-x64-gnu": "4.40.2",
"@rollup/rollup-linux-x64-musl": "4.40.2",
"@rollup/rollup-win32-arm64-msvc": "4.40.2",
"@rollup/rollup-win32-ia32-msvc": "4.40.2",
"@rollup/rollup-win32-x64-msvc": "4.40.2",
"@rollup/rollup-android-arm-eabi": "4.41.0",
"@rollup/rollup-android-arm64": "4.41.0",
"@rollup/rollup-darwin-arm64": "4.41.0",
"@rollup/rollup-darwin-x64": "4.41.0",
"@rollup/rollup-freebsd-arm64": "4.41.0",
"@rollup/rollup-freebsd-x64": "4.41.0",
"@rollup/rollup-linux-arm-gnueabihf": "4.41.0",
"@rollup/rollup-linux-arm-musleabihf": "4.41.0",
"@rollup/rollup-linux-arm64-gnu": "4.41.0",
"@rollup/rollup-linux-arm64-musl": "4.41.0",
"@rollup/rollup-linux-loongarch64-gnu": "4.41.0",
"@rollup/rollup-linux-powerpc64le-gnu": "4.41.0",
"@rollup/rollup-linux-riscv64-gnu": "4.41.0",
"@rollup/rollup-linux-riscv64-musl": "4.41.0",
"@rollup/rollup-linux-s390x-gnu": "4.41.0",
"@rollup/rollup-linux-x64-gnu": "4.41.0",
"@rollup/rollup-linux-x64-musl": "4.41.0",
"@rollup/rollup-win32-arm64-msvc": "4.41.0",
"@rollup/rollup-win32-ia32-msvc": "4.41.0",
"@rollup/rollup-win32-x64-msvc": "4.41.0",
"fsevents": "~2.3.2"
}
},

View File

@ -33,6 +33,8 @@ export default {
components: { ListItem, ModalDialogAlbum },
props: {
items: { required: true, type: Object },
load: { default: null, type: Function },
loaded: { default: true, type: Boolean },
mediaKind: { default: '', type: String }
},
emits: ['play-count-changed', 'podcast-deleted'],

View File

@ -22,7 +22,11 @@ import ModalDialogArtist from '@/components/ModalDialogArtist.vue'
export default {
name: 'ListArtists',
components: { ListItem, ModalDialogArtist },
props: { items: { required: true, type: Object } },
props: {
items: { required: true, type: Object },
load: { default: null, type: Function },
loaded: { default: true, type: Boolean }
},
data() {
return { selectedItem: {}, showDetailsModal: false }
},

View File

@ -22,7 +22,11 @@ import ModalDialogComposer from '@/components/ModalDialogComposer.vue'
export default {
name: 'ListComposers',
components: { ListItem, ModalDialogComposer },
props: { items: { required: true, type: Object } },
props: {
items: { required: true, type: Object },
load: { default: null, type: Function },
loaded: { default: true, type: Boolean }
},
data() {
return { selectedItem: {}, showDetailsModal: false }
},

View File

@ -23,7 +23,11 @@ import ModalDialogPlaylist from '@/components/ModalDialogPlaylist.vue'
export default {
name: 'ListPlaylists',
components: { ListItem, ModalDialogPlaylist },
props: { items: { required: true, type: Object } },
props: {
items: { required: true, type: Object },
load: { default: null, type: Function },
loaded: { default: true, type: Boolean }
},
data() {
return { selectedItem: {}, showDetailsModal: false }
},

View File

@ -31,6 +31,8 @@ export default {
expression: { default: '', type: String },
items: { default: null, type: Object },
icon: { default: null, type: String },
load: { default: null, type: Function },
loaded: { default: true, type: Boolean },
showProgress: { default: false, type: Boolean },
uris: { default: '', type: String }
},

View File

@ -1,89 +1,46 @@
<template>
<section class="section pb-0">
<div class="container">
<div class="columns is-centered">
<div class="column is-four-fifths">
<form @submit.prevent="search">
<div class="field">
<div class="control has-icons-left">
<input
v-model="searchStore.query"
class="input is-rounded"
type="text"
:placeholder="$t('page.search.placeholder')"
autocomplete="off"
/>
<mdicon class="icon is-left" name="magnify" size="16" />
</div>
<i18n-t
tag="p"
class="help has-text-centered"
keypath="page.search.help"
scope="global"
>
<template #query>
<code>query:</code>
</template>
<template #help>
<a
href="https://owntone.github.io/owntone-server/smart-playlists/"
target="_blank"
v-text="$t('page.search.expression')"
/>
</template>
</i18n-t>
</div>
</form>
<div class="field is-grouped is-grouped-multiline mt-4">
<div v-for="item in history" :key="item" class="control">
<div class="tags has-addons">
<a class="tag" @click="openSearch(item)" v-text="item" />
<a class="tag is-delete" @click="searchStore.remove(item)" />
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<tabs-search @search-library="search" @search-spotify="searchSpotify" />
<content-with-heading v-for="[type, items] in results" :key="type">
<template #heading>
<pane-title :content="{ title: $t(`page.search.${type}s`) }" />
<content-with-search
:components="components"
:expanded="expanded"
:get-items="getItems"
:history="history"
:results="results"
@search="search"
@search-library="search"
@search-query="openSearch"
@search-spotify="searchSpotify"
@expand="expand"
>
<template #help>
<i18n-t
tag="p"
class="help has-text-centered"
keypath="page.search.help"
scope="global"
>
<template #query>
<code>query:</code>
</template>
<template #help>
<a
href="https://owntone.github.io/owntone-server/smart-playlists/"
target="_blank"
v-text="$t('page.search.expression')"
/>
</template>
</i18n-t>
</template>
<template #content>
<component :is="components[type]" :items="items" />
</template>
<template v-if="!expanded" #footer>
<control-button
v-if="showAllButton(items)"
:button="{
handler: () => expand(type),
title: $t(
`page.search.show-${type}s`,
{ count: $n(items.total) },
items.total
)
}"
/>
<div v-if="!items.total" class="has-text-centered-mobile">
<i v-text="$t('page.search.no-results')" />
</div>
</template>
</content-with-heading>
</content-with-search>
</template>
<script>
import ContentWithHeading from '@/templates/ContentWithHeading.vue'
import ControlButton from '@/components/ControlButton.vue'
import ContentWithSearch from '@/templates/ContentWithSearch.vue'
import { GroupedList } from '@/lib/GroupedList'
import ListAlbums from '@/components/ListAlbums.vue'
import ListArtists from '@/components/ListArtists.vue'
import ListComposers from '@/components/ListComposers.vue'
import ListPlaylists from '@/components/ListPlaylists.vue'
import ListTracks from '@/components/ListTracks.vue'
import PaneTitle from '@/components/PaneTitle.vue'
import TabsSearch from '@/components/TabsSearch.vue'
import library from '@/api/library'
import { useSearchStore } from '@/stores/search'
@ -100,31 +57,21 @@ const PAGE_SIZE = 3,
export default {
name: 'PageSearchLibrary',
components: {
ContentWithHeading,
ControlButton,
ListAlbums,
ListArtists,
ListComposers,
ListPlaylists,
ListTracks,
PaneTitle,
TabsSearch
},
components: { ContentWithSearch },
setup() {
return { searchStore: useSearchStore() }
return {
components: {
album: ListAlbums,
artist: ListArtists,
composer: ListComposers,
playlist: ListPlaylists,
track: ListTracks
},
searchStore: useSearchStore()
}
},
data() {
return {
components: {
album: ListAlbums.name,
artist: ListArtists.name,
audiobook: ListAlbums.name,
composer: ListComposers.name,
playlist: ListPlaylists.name,
podcast: ListAlbums.name,
track: ListTracks.name
},
results: new Map(),
limit: {},
types: SEARCH_TYPES
@ -149,6 +96,9 @@ export default {
this.limit = -1
this.search()
},
getItems(items) {
return items
},
openSearch(query) {
this.searchStore.query = query
this.types = SEARCH_TYPES
@ -196,12 +146,6 @@ export default {
},
searchSpotify() {
this.$router.push({ name: 'search-spotify' })
},
show(type) {
return this.types.includes(type)
},
showAllButton(items) {
return items.total > items.items.length
}
}
}

View File

@ -1,76 +1,25 @@
<template>
<section class="section pb-0">
<div class="container">
<div class="columns is-centered">
<div class="column is-four-fifths">
<form @submit.prevent="search">
<div class="field">
<div class="control has-icons-left">
<input
v-model="searchStore.query"
class="input is-rounded"
type="text"
:placeholder="$t('page.search.placeholder')"
autocomplete="off"
/>
<mdicon class="icon is-left" name="magnify" size="16" />
</div>
</div>
</form>
<div class="field is-grouped is-grouped-multiline mt-4">
<div v-for="item in history" :key="item" class="control">
<div class="tags has-addons">
<a class="tag" @click="openSearch(item)" v-text="item" />
<a class="tag is-delete" @click="searchStore.remove(item)" />
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<tabs-search @search-library="searchLibrary" @search-spotify="search" />
<content-with-heading v-for="[type, items] in results" :key="type">
<template #heading>
<pane-title :content="{ title: $t(`page.search.${type}s`) }" />
</template>
<template #content>
<component
:is="components[type]"
:items="items.items"
:load="searchNext"
:loaded="!expanded"
/>
</template>
<template v-if="!expanded" #footer>
<control-button
v-if="showAllButton(items)"
:button="{
handler: () => expand(type),
title: $t(
`page.search.show-${type}s`,
{ count: $n(items.total) },
items.total
)
}"
/>
<div v-if="!items.total" class="has-text-centered-mobile">
<i v-text="$t('page.search.no-results')" />
</div>
</template>
</content-with-heading>
<content-with-search
:components="components"
:expanded="expanded"
:get-items="getItems"
:history="history"
:results="results"
@search="search"
@search-library="searchLibrary"
@search-query="openSearch"
@search-spotify="search"
@expand="expand"
/>
</template>
<script>
import ContentWithHeading from '@/templates/ContentWithHeading.vue'
import ControlButton from '@/components/ControlButton.vue'
import ContentWithSearch from '@/templates/ContentWithSearch.vue'
import ListAlbumsSpotify from '@/components/ListAlbumsSpotify.vue'
import ListArtistsSpotify from '@/components/ListArtistsSpotify.vue'
import ListPlaylistsSpotify from '@/components/ListPlaylistsSpotify.vue'
import ListTracksSpotify from '@/components/ListTracksSpotify.vue'
import PaneTitle from '@/components/PaneTitle.vue'
import SpotifyWebApi from 'spotify-web-api-js'
import TabsSearch from '@/components/TabsSearch.vue'
import services from '@/api/services'
import { useSearchStore } from '@/stores/search'
@ -80,27 +29,20 @@ const PAGE_SIZE = 3,
export default {
name: 'PageSearchSpotify',
components: {
ControlButton,
ContentWithHeading,
ListAlbumsSpotify,
ListArtistsSpotify,
ListPlaylistsSpotify,
ListTracksSpotify,
PaneTitle,
TabsSearch
},
components: { ContentWithSearch },
setup() {
return { searchStore: useSearchStore() }
return {
components: {
album: ListAlbumsSpotify,
artist: ListArtistsSpotify,
playlist: ListPlaylistsSpotify,
track: ListTracksSpotify
},
searchStore: useSearchStore()
}
},
data() {
return {
components: {
album: ListAlbumsSpotify.name,
artist: ListArtistsSpotify.name,
playlist: ListPlaylistsSpotify.name,
track: ListTracksSpotify.name
},
results: new Map(),
parameters: {},
types: SEARCH_TYPES
@ -128,6 +70,9 @@ export default {
this.parameters.offset = 0
this.search()
},
getItems(items) {
return items.items
},
openSearch(query) {
this.searchStore.query = query
this.types = SEARCH_TYPES
@ -186,12 +131,6 @@ export default {
this.parameters.offset += next.limit
loaded(next.items.length, PAGE_SIZE_EXPANDED)
})
},
show(type) {
return this.types.includes(type)
},
showAllButton(items) {
return items.total > items.items.length
}
}
}

View File

@ -0,0 +1,108 @@
<template>
<section class="section pb-0">
<div class="container">
<div class="columns is-centered">
<div class="column is-four-fifths">
<form @submit.prevent="$emit('search')">
<div class="field">
<div class="control has-icons-left">
<input
v-model="searchStore.query"
class="input is-rounded"
type="text"
:placeholder="$t('page.search.placeholder')"
autocomplete="off"
/>
<mdicon class="icon is-left" name="magnify" size="16" />
</div>
<slot name="help" />
</div>
</form>
<div class="field is-grouped is-grouped-multiline mt-4">
<div v-for="item in history" :key="item" class="control">
<div class="tags has-addons">
<a
class="tag"
@click="$emit('search-query', item)"
v-text="item"
/>
<a class="tag is-delete" @click="searchStore.remove(item)" />
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<tabs-search
@search-library="$emit('search-library')"
@search-spotify="$emit('search-spotify')"
/>
<content-with-heading v-for="[type, items] in results" :key="type">
<template #heading>
<pane-title :content="{ title: $t(`page.search.${type}s`) }" />
</template>
<template #content>
<component
:is="components[type]"
:items="getItems(items)"
:load="load"
:loaded="!expanded"
/>
</template>
<template v-if="!expanded" #footer>
<control-button
v-if="showAllButton(items)"
:button="{
handler: () => $emit('expand', type),
title: $t(
`page.search.show-${type}s`,
{ count: $n(items.total) },
items.total
)
}"
/>
<div v-if="!items.total" class="has-text-centered-mobile">
<i v-text="$t('page.search.no-results')" />
</div>
</template>
</content-with-heading>
</template>
<script>
import ContentWithHeading from '@/templates/ContentWithHeading.vue'
import ControlButton from '@/components/ControlButton.vue'
import PaneTitle from '@/components/PaneTitle.vue'
import TabsSearch from '@/components/TabsSearch.vue'
import { useSearchStore } from '@/stores/search'
export default {
name: 'ContentWithSearch',
components: { ContentWithHeading, ControlButton, PaneTitle, TabsSearch },
props: {
components: { default: null, type: Object },
expanded: { default: false, type: Boolean },
getItems: { default: null, type: Function },
history: { default: null, type: Array },
load: { default: null, type: Function },
results: { default: null, type: Object }
},
emits: [
'expand',
'search',
'search-library',
'search-query',
'search-spotify'
],
setup() {
return {
searchStore: useSearchStore()
}
},
methods: {
showAllButton(items) {
return items.total > items.items.length
}
}
}
</script>