Runware/ComfyUI fixes, dashboard links, import action, Leonardo plugin, widget, added status field and test connection button
This commit is contained in:
@@ -33,47 +33,14 @@
|
||||
{{ image?.path }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="relative">
|
||||
<div class="flex items-center gap-2 rounded-full bg-white/80 px-3 py-1.5 text-xs font-medium shadow-sm dark:bg-slate-800/80">
|
||||
<span class="h-2 w-2 rounded-full"
|
||||
:class="aiAvailable ? 'bg-emerald-500' : 'bg-rose-500'"></span>
|
||||
<span class="text-slate-600 dark:text-slate-300">
|
||||
AI {{ aiAvailable ? 'verfügbar' : 'nicht verfügbar' }}
|
||||
</span>
|
||||
<button @click="showAiStatusDetails = !showAiStatusDetails"
|
||||
class="text-slate-400 hover:text-slate-600 dark:hover:text-slate-200">
|
||||
<font-awesome-icon :icon="['fas', 'info-circle']" class="h-3.5 w-3.5"/>
|
||||
</button>
|
||||
</div>
|
||||
<div v-if="showAiStatusDetails"
|
||||
class="absolute right-0 mt-2 w-64 rounded-lg bg-white p-3 shadow-lg dark:bg-slate-800">
|
||||
<div class="space-y-2 text-sm">
|
||||
<div class="flex justify-between">
|
||||
<span class="font-medium">API-Provider Status:</span>
|
||||
<span :class="aiAvailable ? 'text-emerald-600' : 'text-rose-600'">
|
||||
{{ aiAvailable ? 'Online' : 'Offline' }}
|
||||
</span>
|
||||
</div>
|
||||
<div v-if="!aiAvailable" class="text-xs text-slate-500">
|
||||
Einige Funktionen sind derzeit nicht verfügbar
|
||||
</div>
|
||||
<button @click="refreshAiStatus"
|
||||
class="mt-2 w-full rounded-md bg-slate-100 px-2 py-1 text-xs hover:bg-slate-200 dark:bg-slate-700 dark:hover:bg-slate-600">
|
||||
Status aktualisieren
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
class="rounded-full border border-white/20 bg-white/10 p-2 text-slate-900 shadow-sm transition hover:border-rose-400 hover:text-rose-400 focus:outline-none focus-visible:ring-2 focus-visible:ring-rose-400 dark:text-white"
|
||||
@click="$emit('close')"
|
||||
aria-label="Kontextmenü schließen"
|
||||
>
|
||||
<font-awesome-icon :icon="['fas', 'xmark']" class="h-5 w-5" />
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
class="rounded-full border border-white/20 bg-white/10 p-2 text-slate-900 shadow-sm transition hover:border-rose-400 hover:text-rose-400 focus:outline-none focus-visible:ring-2 focus-visible:ring-rose-400 dark:text-white"
|
||||
@click="$emit('close')"
|
||||
aria-label="Kontextmenü schließen"
|
||||
>
|
||||
<font-awesome-icon :icon="['fas', 'xmark']" class="h-5 w-5" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div v-if="!showStyleSelectorView" class="space-y-3">
|
||||
@@ -200,13 +167,10 @@ const shouldShowDownload = computed(() => {
|
||||
|
||||
const showStyleSelectorView = ref(false);
|
||||
const aiAvailable = ref(false);
|
||||
const aiStatus = ref({});
|
||||
const showAiStatusDetails = ref(false);
|
||||
|
||||
const checkAiStatus = async () => {
|
||||
try {
|
||||
const response = await axios.get('/api/ai-status');
|
||||
aiStatus.value = response.data;
|
||||
aiAvailable.value = response.data.some(provider => provider.available);
|
||||
} catch (error) {
|
||||
console.error('Error checking AI status:', error);
|
||||
@@ -214,11 +178,6 @@ const checkAiStatus = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
const refreshAiStatus = async () => {
|
||||
await checkAiStatus();
|
||||
showAiStatusDetails.value = false;
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
checkAiStatus();
|
||||
// Check every 5 minutes
|
||||
|
||||
Reference in New Issue
Block a user