refactor: reorder arguments in web ui

This commit is contained in:
2026-03-22 03:23:09 +02:00
parent d7984c12f0
commit 5e090cebdb
61 changed files with 547 additions and 578 deletions

View File

@@ -26,10 +26,10 @@ import { useRepository } from "hooks/useRepository";
import type { RepositoryId } from "models/RepositoryId";
export interface UsePackageActionsResult {
handleReload: () => void;
handleUpdate: () => Promise<void>;
handleRefreshDatabase: () => Promise<void>;
handleReload: () => void;
handleRemove: () => Promise<void>;
handleUpdate: () => Promise<void>;
}
export function usePackageActions(
@@ -63,7 +63,7 @@ export function usePackageActions(
}
};
const handleReload: () => void = () => {
const handleReload = (): void => {
if (currentRepository !== null) {
invalidate(currentRepository);
}
@@ -80,11 +80,11 @@ export function usePackageActions(
const handleRefreshDatabase = (): Promise<void> => performAction(async (repository): Promise<string> => {
await client.service.servicePackageUpdate(repository, {
packages: [],
refresh: true,
aur: false,
local: false,
manual: false,
packages: [],
refresh: true,
});
return "Pacman database update has been requested";
}, "Could not update pacman databases");
@@ -100,9 +100,9 @@ export function usePackageActions(
};
return {
handleReload,
handleUpdate,
handleRefreshDatabase,
handleReload,
handleRemove,
handleUpdate,
};
}