diff --git a/ui/app/components/Dialog.vue b/ui/app/components/Dialog.vue
index 06dff7e0..06e0a135 100644
--- a/ui/app/components/Dialog.vue
+++ b/ui/app/components/Dialog.vue
@@ -5,7 +5,7 @@
:title="state.current?.opts.title ?? defaultTitle"
:dismissible="true"
:ui="{ content: 'max-w-lg', body: 'space-y-4', footer: 'justify-end gap-2' }"
- @update:open="(open) => !open && onCancel()"
+ @update:open="(open) => !open && cancel()"
@after:enter="focusInput"
>
@@ -63,7 +63,7 @@
{{ state.current?.opts.confirmText ?? 'OK' }}
-
+
{{ (state.current?.opts as PromptOptions | ConfirmOptions)?.cancelText ?? 'Cancel' }}
@@ -121,7 +121,6 @@ const focusInput = async () => {
requestAnimationFrame(focusPrimary);
};
-const onCancel = () => cancel();
const onEnter = () =>
confirm('confirm' === state.current?.type ? selected.value : localInput.value);
diff --git a/ui/app/components/NewDownload.vue b/ui/app/components/NewDownload.vue
index b8136148..a0f28f6e 100644
--- a/ui/app/components/NewDownload.vue
+++ b/ui/app/components/NewDownload.vue
@@ -170,7 +170,7 @@
@@ -1124,7 +1124,6 @@ const hasFormatInConfig = computed(
(): boolean => !!form.value.cli?.match(/(? findPreset(name);
const expand_description = (e: Event) =>
toggleClass(e.target as HTMLElement, ['is-ellipsis', 'is-pre-wrap']);
diff --git a/ui/app/pages/conditions.vue b/ui/app/pages/conditions.vue
index 68b3dd19..7c5b1b07 100644
--- a/ui/app/pages/conditions.vue
+++ b/ui/app/pages/conditions.vue
@@ -63,7 +63,7 @@
icon="i-lucide-refresh-cw"
:loading="isLoading"
:disabled="isLoading"
- @click="() => void reloadContent()"
+ @click="() => void loadContent(page)"
>
Reload
@@ -122,7 +122,7 @@
:disabled="isLoading"
show-edges
:sibling-count="0"
- @update:page="navigatePage"
+ @update:page="loadContent"
size="sm"
/>
@@ -447,7 +447,7 @@
:disabled="isLoading"
show-edges
:sibling-count="0"
- @update:page="navigatePage"
+ @update:page="loadContent"
size="sm"
/>
@@ -648,14 +648,6 @@ const loadContent = async (pageNumber = 1): Promise => {
await syncPageQuery(pageNumber);
};
-const reloadContent = async (): Promise => {
- await loadContent(page.value);
-};
-
-const navigatePage = async (newPage: number): Promise => {
- await loadContent(newPage);
-};
-
const resetEditor = (): void => {
item.value = {};
itemRef.value = null;
diff --git a/ui/app/pages/dl_fields.vue b/ui/app/pages/dl_fields.vue
index 10ceeea3..ebc618d7 100644
--- a/ui/app/pages/dl_fields.vue
+++ b/ui/app/pages/dl_fields.vue
@@ -63,7 +63,7 @@
icon="i-lucide-refresh-cw"
:loading="isLoading"
:disabled="isLoading"
- @click="() => void reloadContent()"
+ @click="() => void loadContent(page)"
>
Reload
@@ -122,7 +122,7 @@
:disabled="isLoading"
show-edges
:sibling-count="0"
- @update:page="navigatePage"
+ @update:page="loadContent"
size="sm"
/>
@@ -399,7 +399,7 @@
:disabled="isLoading"
show-edges
:sibling-count="0"
- @update:page="navigatePage"
+ @update:page="loadContent"
size="sm"
/>
@@ -567,14 +567,6 @@ const loadContent = async (pageNumber = 1): Promise => {
await syncPageQuery(pageNumber);
};
-const reloadContent = async (): Promise => {
- await loadContent(page.value);
-};
-
-const navigatePage = async (newPage: number): Promise => {
- await loadContent(newPage);
-};
-
const resetEditor = (): void => {
item.value = {};
itemRef.value = null;
diff --git a/ui/app/pages/notifications.vue b/ui/app/pages/notifications.vue
index 7ea3aabd..fe9ba388 100644
--- a/ui/app/pages/notifications.vue
+++ b/ui/app/pages/notifications.vue
@@ -76,7 +76,7 @@
icon="i-lucide-refresh-cw"
:loading="isLoading"
:disabled="isLoading"
- @click="() => void reloadContent()"
+ @click="() => void loadContent(page)"
>
Reload
@@ -135,7 +135,7 @@
:disabled="isLoading"
show-edges
:sibling-count="0"
- @update:page="navigatePage"
+ @update:page="loadContent"
size="sm"
/>
@@ -497,7 +497,7 @@
:disabled="isLoading"
show-edges
:sibling-count="0"
- @update:page="navigatePage"
+ @update:page="loadContent"
size="sm"
/>
@@ -706,14 +706,6 @@ const loadContent = async (pageNumber = page.value): Promise => {
await notificationsStore.loadNotifications(pageNumber);
};
-const reloadContent = async (): Promise => {
- await loadContent(page.value);
-};
-
-const navigatePage = async (newPage: number): Promise => {
- await loadContent(newPage);
-};
-
const resetEditor = (): void => {
target.value = defaultState();
targetRef.value = undefined;
diff --git a/ui/app/pages/presets.vue b/ui/app/pages/presets.vue
index 91da8fd7..4f3f3082 100644
--- a/ui/app/pages/presets.vue
+++ b/ui/app/pages/presets.vue
@@ -62,7 +62,7 @@
icon="i-lucide-refresh-cw"
:loading="isLoading"
:disabled="isLoading"
- @click="() => void reloadContent()"
+ @click="() => void presetsStore.loadPresets(1, 1000)"
>
Reload
@@ -553,10 +553,6 @@ const toggleFilterPanel = async (): Promise => {
filterInput.value?.inputRef?.value?.focus?.({ preventScroll: true });
};
-const reloadContent = async (): Promise => {
- await presetsStore.loadPresets(1, 1000);
-};
-
const toggleMasterSelection = (): void => {
if (allSelected.value) {
selectedIds.value = [];
@@ -644,5 +640,5 @@ const calcPath = (path?: string): string => {
return path ? location + '/' + sTrim(path, '/') : location;
};
-onMounted(async () => await reloadContent());
+onMounted(async () => await presetsStore.loadPresets(1, 1000));
diff --git a/ui/app/pages/task_definitions.vue b/ui/app/pages/task_definitions.vue
index fa8a3dc1..370958c2 100644
--- a/ui/app/pages/task_definitions.vue
+++ b/ui/app/pages/task_definitions.vue
@@ -71,7 +71,7 @@
icon="i-lucide-refresh-cw"
:loading="isLoading"
:disabled="isLoading"
- @click="() => void reloadContent()"
+ @click="() => void loadDefinitions(1, 1000)"
>
Reload
@@ -642,10 +642,6 @@ const toggleFilterPanel = async (): Promise => {
filterInput.value?.inputRef?.value?.focus?.({ preventScroll: true });
};
-const reloadContent = async (): Promise => {
- await loadDefinitions(1, 1000);
-};
-
const toggleDisplayStyle = (): void => {
display_style.value = display_style.value === 'list' ? 'grid' : 'list';
};
@@ -837,7 +833,7 @@ const exportDefinition = async (summary: TaskDefinitionSummary): Promise =
onMounted(async () => {
if (!definitions.value.length) {
- await reloadContent();
+ await loadDefinitions(1, 1000);
}
});
diff --git a/ui/app/pages/tasks.vue b/ui/app/pages/tasks.vue
index e05a6570..3104d61f 100644
--- a/ui/app/pages/tasks.vue
+++ b/ui/app/pages/tasks.vue
@@ -62,7 +62,7 @@
icon="i-lucide-refresh-cw"
:loading="isLoading"
:disabled="isLoading"
- @click="() => void reloadContent()"
+ @click="() => void loadContent(page)"
>
Reload
@@ -121,7 +121,7 @@
:disabled="isLoading"
show-edges
:sibling-count="0"
- @update:page="navigatePage"
+ @update:page="loadContent"
size="sm"
/>
@@ -646,7 +646,7 @@
:disabled="isLoading"
show-edges
:sibling-count="0"
- @update:page="navigatePage"
+ @update:page="loadContent"
size="sm"
/>
@@ -1002,14 +1002,6 @@ const loadContent = async (pageNumber = page.value, fromMounted: boolean = false
}
};
-const reloadContent = async (fromMounted: boolean = false) => {
- await loadContent(page.value, fromMounted);
-};
-
-const navigatePage = async (newPage: number): Promise => {
- await loadContent(newPage);
-};
-
const resetForm = (closeForm: boolean = false) => {
task.value = createEmptyTask();
taskRef.value = null;