diff --git a/assets/jsons/translations/de.json b/assets/jsons/translations/de.json
index 2d66696a1..36e6e2edb 100644
--- a/assets/jsons/translations/de.json
+++ b/assets/jsons/translations/de.json
@@ -105,7 +105,8 @@
"latest": "Neueste",
"description": "Beschreibung",
"dropdown": {
- "uninstall-all": "Alle deinstallieren"
+ "uninstall-all": "Alle deinstallieren",
+ "unselect-all": "Alle abwählen"
}
}
},
diff --git a/assets/jsons/translations/en.json b/assets/jsons/translations/en.json
index 304dd20d5..b778c7e32 100644
--- a/assets/jsons/translations/en.json
+++ b/assets/jsons/translations/en.json
@@ -105,7 +105,8 @@
"latest": "Latest",
"description": "Description",
"dropdown": {
- "uninstall-all": "Uninstall all"
+ "uninstall-all": "Uninstall all",
+ "unselect-all": "Unselect all"
}
}
},
diff --git a/assets/jsons/translations/es.json b/assets/jsons/translations/es.json
index d1f67abbd..966574d58 100644
--- a/assets/jsons/translations/es.json
+++ b/assets/jsons/translations/es.json
@@ -105,7 +105,8 @@
"latest": "Último",
"description": "Descripción",
"dropdown": {
- "uninstall-all": "Desinstalar todos"
+ "uninstall-all": "Desinstalar todos",
+ "unselect-all": "Deseleccionar todo"
}
}
},
diff --git a/assets/jsons/translations/fr.json b/assets/jsons/translations/fr.json
index a9ba810af..720e56d70 100644
--- a/assets/jsons/translations/fr.json
+++ b/assets/jsons/translations/fr.json
@@ -105,7 +105,8 @@
"latest": "Récent",
"description": "Description",
"dropdown": {
- "uninstall-all": "Tout désinstaller"
+ "uninstall-all": "Tout désinstaller",
+ "unselect-all": "Tout désélectionner"
}
}
},
diff --git a/assets/jsons/translations/ja.json b/assets/jsons/translations/ja.json
index c74d68fc3..8ba85b8bc 100644
--- a/assets/jsons/translations/ja.json
+++ b/assets/jsons/translations/ja.json
@@ -105,7 +105,8 @@
"latest": "最新",
"description": "說明",
"dropdown": {
- "uninstall-all": "全てアンインストールする"
+ "uninstall-all": "全てアンインストールする",
+ "unselect-all": "すべて選択解除"
}
}
},
diff --git a/assets/jsons/translations/ko.json b/assets/jsons/translations/ko.json
index 7940f85e7..0b9ca3949 100644
--- a/assets/jsons/translations/ko.json
+++ b/assets/jsons/translations/ko.json
@@ -105,7 +105,8 @@
"latest": "최신",
"description": "설명",
"dropdown": {
- "uninstall-all": "모두 제거"
+ "uninstall-all": "모두 제거",
+ "unselect-all": "모두 선택 해제"
}
}
},
diff --git a/assets/jsons/translations/ru.json b/assets/jsons/translations/ru.json
index 14b62d0b5..f52fb4248 100644
--- a/assets/jsons/translations/ru.json
+++ b/assets/jsons/translations/ru.json
@@ -105,7 +105,8 @@
"latest": "Latest",
"description": "Описание",
"dropdown": {
- "uninstall-all": "Удалить всё"
+ "uninstall-all": "Удалить всё",
+ "unselect-all": "Снять все выделения"
}
}
},
diff --git a/assets/jsons/translations/zh-tw.json b/assets/jsons/translations/zh-tw.json
index 1ae45a3fa..512c7e920 100644
--- a/assets/jsons/translations/zh-tw.json
+++ b/assets/jsons/translations/zh-tw.json
@@ -105,7 +105,8 @@
"latest": "最新",
"description": "描述",
"dropdown": {
- "uninstall-all": "全部移除"
+ "uninstall-all": "全部移除",
+ "unselect-all": "取消全選"
}
}
},
diff --git a/assets/jsons/translations/zh.json b/assets/jsons/translations/zh.json
index 96870dadc..8ce5c85ae 100644
--- a/assets/jsons/translations/zh.json
+++ b/assets/jsons/translations/zh.json
@@ -105,7 +105,8 @@
"latest": "最新",
"description": "描述",
"dropdown": {
- "uninstall-all": "全部卸载"
+ "uninstall-all": "全部卸载",
+ "unselect-all": "取消全选"
}
}
},
diff --git a/src/renderer/components/svgs/bsm-icon.component.tsx b/src/renderer/components/svgs/bsm-icon.component.tsx
index 829563e13..5d3336129 100644
--- a/src/renderer/components/svgs/bsm-icon.component.tsx
+++ b/src/renderer/components/svgs/bsm-icon.component.tsx
@@ -65,9 +65,10 @@ import { SongDetailDiffCharactertistic } from "shared/models/maps/song-details-c
import { CleanIcon } from "./icons/clean-icon.component";
import { BrowseIcon } from "./icons/browse-icon.component";
import { AddFileIcon } from "./icons/add-file-icon.component";
+import { CancelIcon } from "./icons/cancel-icon.component";
-export type BsmIconType = SongDetailDiffCharactertistic | ("settings" | "trash" | "favorite" | "folder" | "bsNote" | "check" | "three-dots" | "twitch" | "eye" | "play" | "checkCircleIcon" | "discord" | "info" | "eye-cross" | "terminal" | "desktop" | "oculus" | "add" | "cross" | "task" | "github" | "close" | "thumbUpFill" | "timerFill" | "pause" | "twitter" | "sync" | "chevron-top" | "copy" | "steam" | "edit" | "export" | "patreon" | "search" | "bsMapDifficulty" | "link" | "unlink" | "download" | "filter" | "mee6" | "volume-up" | "volume-off" | "volume-down" | "shortcut" | "backup-restore" | "web-site" | "clean" | "browse" | "add-file" | "fr-FR-flag" | "es-ES-flag" | "en-US-flag" | "en-EN-flag" | "de-DE-flag" | "ru-RU-flag" | "zh-CN-flag" | "zh-TW-flag" | "ja-JP-flag" | "ko-KR-flag");
+export type BsmIconType = SongDetailDiffCharactertistic | ("settings" | "trash" | "favorite" | "folder" | "bsNote" | "check" | "three-dots" | "twitch" | "eye" | "play" | "checkCircleIcon" | "discord" | "info" | "eye-cross" | "terminal" | "desktop" | "oculus" | "add" | "cross" | "task" | "github" | "close" | "thumbUpFill" | "timerFill" | "pause" | "twitter" | "sync" | "chevron-top" | "copy" | "steam" | "edit" | "export" | "patreon" | "search" | "bsMapDifficulty" | "link" | "unlink" | "download" | "filter" | "mee6" | "volume-up" | "volume-off" | "volume-down" | "shortcut" | "backup-restore" | "web-site" | "clean" | "browse" | "add-file" | "cancel" | "fr-FR-flag" | "es-ES-flag" | "en-US-flag" | "en-EN-flag" | "de-DE-flag" | "ru-RU-flag" | "zh-CN-flag" | "zh-TW-flag" | "ja-JP-flag" | "ko-KR-flag");
export const BsmIcon = memo(({ className, icon, style }: { className?: string; icon: BsmIconType; style?: CSSProperties }) => {
// TODO : Very ugly very messy, need to find a better way to do this
@@ -276,6 +277,10 @@ export const BsmIcon = memo(({ className, icon, style }: { className?: string; i
return ;
}
+ if(icon === "cancel"){
+ return ;
+ }
+
return ;
diff --git a/src/renderer/components/svgs/icons/cancel-icon.component.tsx b/src/renderer/components/svgs/icons/cancel-icon.component.tsx
new file mode 100644
index 000000000..c197637cd
--- /dev/null
+++ b/src/renderer/components/svgs/icons/cancel-icon.component.tsx
@@ -0,0 +1,9 @@
+import { createSvgIcon } from "../svg-icon.type";
+
+export const CancelIcon = createSvgIcon((props, ref) => {
+ return (
+
+ )
+})
diff --git a/src/renderer/components/version-viewer/slides/mods/mods-grid.component.tsx b/src/renderer/components/version-viewer/slides/mods/mods-grid.component.tsx
index c67e1472a..e498b33ef 100644
--- a/src/renderer/components/version-viewer/slides/mods/mods-grid.component.tsx
+++ b/src/renderer/components/version-viewer/slides/mods/mods-grid.component.tsx
@@ -16,9 +16,10 @@ type Props = {
disabled?: boolean;
uninstallMod?: (mods: Mod) => void;
uninstallAllMods?: () => void;
+ unselectAllMods?: () => void;
};
-export function ModsGrid({ modsMap, installed, modsSelected, onModChange, moreInfoMod, onWantInfos, disabled, uninstallMod, uninstallAllMods }: Props) {
+export function ModsGrid({ modsMap, installed, modsSelected, onModChange, moreInfoMod, onWantInfos, disabled, uninstallMod, uninstallAllMods, unselectAllMods }: Props) {
const [filter, setFilter] = useState("");
const [filterEnabled, setFilterEnabled] = useState(false);
@@ -66,7 +67,10 @@ export function ModsGrid({ modsMap, installed, modsSelected, onModChange, moreIn
{t("pages.version-viewer.mods.mods-grid.header-bar.latest")}
{t("pages.version-viewer.mods.mods-grid.header-bar.description")}
- uninstallAllMods?.() }]} />
+ unselectAllMods?.() },
+ { text: "pages.version-viewer.mods.mods-grid.header-bar.dropdown.uninstall-all", icon: "trash", onClick: () => uninstallAllMods?.() }
+ ]} />
{Array.from(modsMap.keys()).map(
diff --git a/src/renderer/components/version-viewer/slides/mods/mods-slide.component.tsx b/src/renderer/components/version-viewer/slides/mods/mods-slide.component.tsx
index 50cbb46b1..93f7e7521 100644
--- a/src/renderer/components/version-viewer/slides/mods/mods-slide.component.tsx
+++ b/src/renderer/components/version-viewer/slides/mods/mods-slide.component.tsx
@@ -133,6 +133,10 @@ export function ModsSlide({ version, onDisclamerDecline }: { version: BSVersion;
})
};
+ const unselectAllMods = () => {
+ setModsSelected(() => []);
+ }
+
const loadMods = (): Promise => {
if (os.isOffline) {
return Promise.resolve();
@@ -209,7 +213,18 @@ export function ModsSlide({ version, onDisclamerDecline }: { version: BSVersion;
return (
<>
-
+