mirror of
https://codeberg.org/Hyperpipe/Hyperpipe
synced 2025-06-28 13:08:01 +02:00
Fixed:
- Blank custom api url - Collapsing .pl-item without art
This commit is contained in:
parent
2b33070a8a
commit
170b4a1f27
7 changed files with 124 additions and 96 deletions
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { ref, computed, onMounted } from 'vue';
|
||||
|
||||
import { getJson } from '@/scripts/fetch.js';
|
||||
import { SUPPORTED_LOCALES, useI18n } from '@/stores/misc.js';
|
||||
|
@ -53,6 +53,22 @@ function getStoreBool(key, ele) {
|
|||
ele.value = getStore(key) || true;
|
||||
}
|
||||
|
||||
const verifyApi = computed(() =>
|
||||
hypInstances.value
|
||||
.map(i => i.api_url.replace('https://', '').replace('http://'))
|
||||
.includes(getStore('api') || 'hyperpipeapi.onrender.com'),
|
||||
),
|
||||
verifyPipedApi = computed(() =>
|
||||
instances.value
|
||||
.map(i => i.api_url.replace('https://', ''))
|
||||
.includes(getStore('pipedapi') || 'pipedapi.kavin.rocks'),
|
||||
),
|
||||
verifyAuthApi = computed(() =>
|
||||
instances.value
|
||||
.map(i => i.api_url.replace('https://', ''))
|
||||
.includes(getStore('authapi') || 'pipedapi.kavin.rocks'),
|
||||
);
|
||||
|
||||
onMounted(() => {
|
||||
getStoreBool('next', next);
|
||||
});
|
||||
|
@ -143,6 +159,10 @@ onMounted(() => {
|
|||
:value="i.api_url.replace('https://', '').replace('http://', '')">
|
||||
{{ i.name }}
|
||||
</option>
|
||||
|
||||
<option v-if="!verifyApi">
|
||||
{{ getStore('api') || 'hyperpipeapi.onrender.com' }}
|
||||
</option>
|
||||
</select>
|
||||
|
||||
<div class="table-wrap">
|
||||
|
@ -174,9 +194,13 @@ onMounted(() => {
|
|||
<option
|
||||
v-for="i in instances"
|
||||
:key="i.name"
|
||||
:value="i.api_url.replace('https://', '').replace('http://', '')">
|
||||
:value="i.api_url.replace('https://', '')">
|
||||
{{ i.name.replace('Official', 'Default') }}
|
||||
</option>
|
||||
|
||||
<option v-if="!verifyPipedApi">
|
||||
{{ getStore('pipedapi') || 'pipedapi.kavin.rocks' }}
|
||||
</option>
|
||||
</select>
|
||||
|
||||
<h3>{{ t('instances.auth') }}</h3>
|
||||
|
@ -188,9 +212,13 @@ onMounted(() => {
|
|||
<option
|
||||
v-for="i in instances"
|
||||
:key="i.name"
|
||||
:value="i.api_url.replace('https://', '').replace('http://', '')">
|
||||
:value="i.api_url.replace('https://', '')">
|
||||
{{ i.name.replace('Official', 'Default') }}
|
||||
</option>
|
||||
|
||||
<option v-if="!verifyAuthApi">
|
||||
{{ getStore('authapi') || 'pipedapi.kavin.rocks' }}
|
||||
</option>
|
||||
</select>
|
||||
|
||||
<div class="table-wrap">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue