ui: fixes

This commit is contained in:
Andras Bacsai
2022-09-23 20:01:30 +00:00
parent 4abe9c6fb2
commit 2d8888ae9b
13 changed files with 205 additions and 165 deletions

View File

@@ -21,12 +21,11 @@
<script lang="ts">
export let application: any;
import { page } from '$app/stores';
import DeleteIcon from '$lib/components/DeleteIcon.svelte';
import { del, get } from '$lib/api';
import { t } from '$lib/translations';
import { appSession, status } from '$lib/store';
import { errorNotification, handlerNotFoundLoad } from '$lib/common';
import Tooltip from '$lib/components/Tooltip.svelte';
import { errorNotification } from '$lib/common';
import { goto } from '$app/navigation';
const { id } = $page.params;
let forceDelete = false;
@@ -36,7 +35,7 @@
$status.application.initialLoading = true;
try {
await del(`/applications/${id}`, { id, force });
return await window.location.assign(`/`);
return await goto('/')
} catch (error) {
if (error.message.startsWith(`Command failed: SSH_AUTH_SOCK=/tmp/coolify-ssh-agent.pid`)) {
forceDelete = true;