mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
[feature-136] add warning for models breaks (due to openxr)
This commit is contained in:
@@ -12,7 +12,9 @@
|
||||
"delete": "Löschen",
|
||||
"accept": "Akzeptieren",
|
||||
"refuse": "Ablehnen",
|
||||
"apply": "Übernehmen"
|
||||
"apply": "Übernehmen",
|
||||
"copy": "Kopieren",
|
||||
"copied": "Kopiert!"
|
||||
},
|
||||
"nav-bar":{
|
||||
"add-version": "Version Hinzufügen",
|
||||
@@ -831,6 +833,10 @@
|
||||
"go-to-mods": "Gehe zu Mods",
|
||||
"not-remind": "Erinnere mich nicht"
|
||||
},
|
||||
"prevent-for-models-breaks": {
|
||||
"title": "Gebrochene Modelle",
|
||||
"desc": "Seit dem Update des BeatSaber-Motors sind Modelle für diese Version nicht mehr funktional."
|
||||
},
|
||||
"export-success": {
|
||||
"title": "Export abgeschlossen 🎉"
|
||||
}
|
||||
|
||||
@@ -12,7 +12,9 @@
|
||||
"delete": "Delete",
|
||||
"accept": "Accept",
|
||||
"refuse": "Refuse",
|
||||
"apply": "Apply"
|
||||
"apply": "Apply",
|
||||
"copy": "Copy",
|
||||
"copied": "Copied!"
|
||||
},
|
||||
"nav-bar":{
|
||||
"add-version": "Add a version",
|
||||
@@ -831,6 +833,10 @@
|
||||
"go-to-mods": "Go to mods",
|
||||
"not-remind": "Do not remind me"
|
||||
},
|
||||
"prevent-for-models-breaks": {
|
||||
"title": "Broken models",
|
||||
"desc": "Since the BeatSaber engine update, models are no longer functional for this version."
|
||||
},
|
||||
"export-success": {
|
||||
"title": "Export completed 🎉"
|
||||
}
|
||||
|
||||
@@ -12,7 +12,9 @@
|
||||
"delete": "Borrar",
|
||||
"accept": "Aceptar",
|
||||
"refuse": "Rechazar",
|
||||
"apply": "Aplicar"
|
||||
"apply": "Aplicar",
|
||||
"copy": "Copiar",
|
||||
"copied": "¡Copiado!"
|
||||
},
|
||||
"nav-bar":{
|
||||
"add-version": "Agregar una versión",
|
||||
@@ -830,6 +832,10 @@
|
||||
"go-to-mods": "Ir a mods",
|
||||
"not-remind": "No volver a recordarme"
|
||||
},
|
||||
"prevent-for-models-breaks": {
|
||||
"title": "Modelos rotos",
|
||||
"desc": "Desde la actualización del motor de BeatSaber, los modelos ya no son funcionales para esta versión."
|
||||
},
|
||||
"export-success": {
|
||||
"title": "Exportación completada 🎉"
|
||||
}
|
||||
|
||||
@@ -832,6 +832,10 @@
|
||||
"go-to-mods": "Aller aux mods",
|
||||
"not-remind": "Ne plus me rappeler"
|
||||
},
|
||||
"prevent-for-models-breaks":{
|
||||
"title": "Modèles cassés",
|
||||
"desc": "Depuis la mise à jour du moteur de BeatSaber, les modèles ne sont plus fonctionnels pour cette version."
|
||||
},
|
||||
"export-success": {
|
||||
"title": "Export terminé 🎉"
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import { useOnUpdate } from "renderer/hooks/use-on-update.hook";
|
||||
import { NotificationService } from "renderer/services/notification.service";
|
||||
import { ConfigurationService } from "renderer/services/configuration.service";
|
||||
import { useTranslation } from "renderer/hooks/use-translation.hook";
|
||||
import { gte, lt } from "semver";
|
||||
|
||||
export function ModelsPanel({version, isActive, goToMods}: {version?: BSVersion, isActive: boolean, goToMods?: () => void}) {
|
||||
|
||||
@@ -44,6 +45,16 @@ export function ModelsPanel({version, isActive, goToMods}: {version?: BSVersion,
|
||||
});
|
||||
}, [isActive]);
|
||||
|
||||
useOnUpdate(() => {
|
||||
if(!isActive || !version || lt(version.BSVersion, "1.29.4")){ return; }
|
||||
if(config.get("not-remind-models-breaks")){ return; }
|
||||
notification.notifyWarning({ title: "models.notifications.prevent-for-models-breaks.title", desc: "models.notifications.prevent-for-models-breaks.desc", actions: [
|
||||
{id: "0", title: "models.notifications.prevent-for-mods.not-remind", cancel: true}
|
||||
], duration: 12_000 }).then(res => {
|
||||
if(res === "0"){ config.set("not-remind-models-breaks", true); }
|
||||
});
|
||||
}, [isActive, version])
|
||||
|
||||
const exportModels = () => {
|
||||
const selectedModels = modelsGridRefs.map(ref =>(ref.current?.getSelectedModels() as BsmLocalModel[])).flat()
|
||||
modelsManager.exportModels(selectedModels, version);
|
||||
|
||||
Reference in New Issue
Block a user