- Shuffle
- Favorities (remote)
- Remove song for remote playlists (WIP)
This commit is contained in:
Shiny Nematoda 2022-09-23 10:14:22 +00:00
parent 04af1a227d
commit 8efa6a6439
No known key found for this signature in database
GPG key ID: 6506D50F5613A42D
10 changed files with 441 additions and 260 deletions

View file

@ -6,7 +6,11 @@ import Modal from './Modal.vue';
import { useRand } from '@/scripts/colors.js';
import { useStore } from '@/scripts/util.js';
import { getJsonAuth, getAuthPlaylists } from '@/scripts/fetch.js';
import {
useAuthCreatePlaylist,
getAuthPlaylists,
getJsonAuth,
} from '@/scripts/fetch.js';
import { useI18n } from '@/stores/misc.js';
import {
@ -121,16 +125,7 @@ const Login = async () => {
},
createPlaylist = async () => {
if (text.value) {
const res = await getJsonAuth('/user/playlists/create', {
method: 'POST',
body: JSON.stringify({
name: `Playlist - ${text.value}`,
}),
headers: {
Authorization: store.auth,
'Content-Type': 'application/json',
},
});
const res = await useAuthCreatePlaylist(text.value);
getPlaylists();
show.new = false;