mirror of
https://codeberg.org/Hyperpipe/Hyperpipe
synced 2025-06-28 05:08:00 +02:00
Delete remote playlists
+ minor ui changes
This commit is contained in:
parent
33fc79a736
commit
fb121317ee
9 changed files with 62 additions and 16 deletions
|
@ -4,7 +4,7 @@ import { defineStore } from 'pinia';
|
|||
import { useNav } from '@/stores/misc.js';
|
||||
|
||||
import { getJsonPiped, getJsonHyp, getJsonAuth } from '@/scripts/fetch.js';
|
||||
import { useRoute } from '@/scripts/util.js';
|
||||
import { useVerifyAuth, useRoute } from '@/scripts/util.js';
|
||||
|
||||
export const useResults = defineStore('results', () => {
|
||||
const items = ref({}),
|
||||
|
@ -39,10 +39,7 @@ export const useResults = defineStore('results', () => {
|
|||
|
||||
async function getAlbum(e) {
|
||||
const hash = new URLSearchParams(e.substring(e.indexOf('?'))).get('list'),
|
||||
isAuth =
|
||||
/[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}/.test(
|
||||
hash,
|
||||
),
|
||||
isAuth = useVerifyAuth(hash),
|
||||
path = '/playlists/' + hash,
|
||||
json = isAuth ? await getJsonAuth(path) : await getJsonPiped(path);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue