mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-20 17:53:55 +00:00
added translations and logic fix
This commit is contained in:
@@ -98,6 +98,7 @@ export function SettingsDownloadSources() {
|
||||
showSuccessToast(t("removed_download_sources"));
|
||||
|
||||
getDownloadSources();
|
||||
setIsRemovingDownloadSource(false);
|
||||
setShowConfirmationDeleteAllSourcesModal(false);
|
||||
channel.close();
|
||||
updateRepacks();
|
||||
@@ -151,15 +152,14 @@ export function SettingsDownloadSources() {
|
||||
onClose={handleModalClose}
|
||||
onAddDownloadSource={handleAddDownloadSource}
|
||||
/>
|
||||
|
||||
<ConfirmationModal
|
||||
cancelButtonLabel="Não"
|
||||
confirmButtonLabel="Sim, excluir"
|
||||
descriptionText="Você ira excluir todas as fontes de dowload"
|
||||
cancelButtonLabel={t("cancel_button_confirmation_delete_all_sources")}
|
||||
confirmButtonLabel={t("confirm_button_confirmation_delete_all_sources")}
|
||||
descriptionText={t("description_confirmation_delete_all_sources")}
|
||||
clickOutsideToClose={false}
|
||||
onConfirm={handleRemoveAllDowloadSources}
|
||||
visible={showConfirmationDeleteAllSourcesModal}
|
||||
title={"Excluir todas as fontes de dowload"}
|
||||
title={t("title_confirmation_delete_all_sources")}
|
||||
onClose={() => setShowConfirmationDeleteAllSourcesModal(false)}
|
||||
buttonsIsDisabled={isRemovingDownloadSource}
|
||||
/>
|
||||
@@ -254,7 +254,7 @@ export function SettingsDownloadSources() {
|
||||
disabled={isRemovingDownloadSource}
|
||||
>
|
||||
<XIcon />
|
||||
Remover todas as fontes de dowload
|
||||
{t("button_delete_all_sources")}
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -115,7 +115,7 @@ const deleteDownloadSource = async (id: number) => {
|
||||
});
|
||||
};
|
||||
|
||||
const deleteAllDowloadsSources = async () => {
|
||||
const deleteAllDowloadSources = async () => {
|
||||
await db.transaction("rw", repacksTable, downloadSourcesTable, async () => {
|
||||
await repacksTable.clear();
|
||||
await downloadSourcesTable.clear();
|
||||
@@ -141,7 +141,7 @@ self.onmessage = async (event: MessageEvent<Payload>) => {
|
||||
}
|
||||
|
||||
if (type === "DELETE_ALL_DOWNLOAD_SOURCES") {
|
||||
await deleteAllDowloadsSources();
|
||||
await deleteAllDowloadSources();
|
||||
|
||||
const channel = new BroadcastChannel(`download_sources:delete_all:${data}`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user