mirror of
https://codeberg.org/Hyperpipe/Hyperpipe
synced 2025-06-27 20:58:01 +02:00
Minor Fixes
This commit is contained in:
parent
44ee558509
commit
2b55ff908f
6 changed files with 21 additions and 14 deletions
|
@ -62,11 +62,9 @@ function parseUrl() {
|
|||
|
||||
switch (loc[3].replace(location.search, '')) {
|
||||
case '':
|
||||
title.value = 'Trending';
|
||||
getExplore();
|
||||
break;
|
||||
case 'search':
|
||||
title.value = '';
|
||||
search.value = loc[4];
|
||||
console.log(search.value);
|
||||
break;
|
||||
|
@ -75,12 +73,10 @@ function parseUrl() {
|
|||
console.log(loc[3]);
|
||||
break;
|
||||
case 'playlist':
|
||||
title.value = '';
|
||||
getAlbum(loc[3]);
|
||||
console.log(loc[3]);
|
||||
break;
|
||||
case 'channel':
|
||||
title.value = '';
|
||||
getArtist(loc[4]);
|
||||
console.log(loc[4]);
|
||||
default:
|
||||
|
@ -464,8 +460,6 @@ onMounted(() => {
|
|||
</header>
|
||||
|
||||
<main class="placeholder">
|
||||
<h1 v-if="title">{{ title }}</h1>
|
||||
|
||||
<KeepAlive>
|
||||
<Search
|
||||
v-if="page == 'home'"
|
||||
|
@ -516,6 +510,7 @@ onMounted(() => {
|
|||
@ended="playNext"
|
||||
autoplay>
|
||||
<source
|
||||
v-if="useStore().getItem('hls') != 'false'"
|
||||
v-for="src in data.audioSrc"
|
||||
:key="src.url"
|
||||
:src="src.url"
|
||||
|
|
|
@ -1,12 +1,20 @@
|
|||
<script setup>
|
||||
import { ref, onUpdated } from 'vue';
|
||||
import PlayBtn from './PlayBtn.vue';
|
||||
|
||||
defineProps(['title', 'desc', 'subs', 'thumbs', 'play']);
|
||||
defineEmits(['playall']);
|
||||
|
||||
const show = ref(-1);
|
||||
show.value = location.pathname.indexOf('/channel/UC');
|
||||
|
||||
onUpdated(() => {
|
||||
show.value = location.pathname.indexOf('/channel/UC');
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="title" class="us-wrap">
|
||||
<div v-if="show == 0 && title" class="us-wrap">
|
||||
<div class="bg-imgfill" :style="'--art: url(' + thumbs[1].url + ');'"></div>
|
||||
<div class="us-main">
|
||||
<h2>{{ title }}</h2>
|
||||
|
|
|
@ -15,11 +15,13 @@ getJson('https://piped-instances.kavin.rocks').then(i => {
|
|||
console.log(i);
|
||||
});
|
||||
|
||||
/*getJson('https://hyperpipe.codeberg.page/api/backend.json').then(i => {
|
||||
hypInstances.value = i
|
||||
getJson('https://raw.codeberg.page/Hyperpipe/pages/api/backend.json').then(
|
||||
i => {
|
||||
hypInstances.value = i;
|
||||
|
||||
console.log(i);
|
||||
});*/
|
||||
console.log(i);
|
||||
},
|
||||
);
|
||||
|
||||
function getBool(val) {
|
||||
return 'bi ' + (val ? 'bi-check2' : 'bi-x-lg');
|
||||
|
|
|
@ -67,6 +67,8 @@ watch(
|
|||
() => props.search,
|
||||
n => {
|
||||
if (n) {
|
||||
Reset();
|
||||
|
||||
n = n.replace(location.search || '', '');
|
||||
|
||||
console.log(n);
|
||||
|
|
|
@ -57,7 +57,7 @@ onMounted(() => {
|
|||
<h4>{{ title }}</h4>
|
||||
<a
|
||||
:href="channel"
|
||||
@click.prevent="$emit('get-artist', channel.replace('/channel', ''))"
|
||||
@click.prevent="$emit('get-artist', channel.replace('/channel/', ''))"
|
||||
class="ign">
|
||||
<i class="ign">{{ author.replaceAll(' - Topic', '') }}</i>
|
||||
</a>
|
||||
|
|
|
@ -2,10 +2,10 @@ export const useStore = () => {
|
|||
try {
|
||||
return window.localStorage;
|
||||
} catch (err) {
|
||||
alert(err);
|
||||
console.error(err);
|
||||
|
||||
const error = i => {
|
||||
alert("Failed to Access '" + i + "' Please Enable localStorage.");
|
||||
console.error("Failed to Access '" + i + "' Please Enable localStorage.");
|
||||
};
|
||||
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue