mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 106584cf84 | |||
| 40fdc8ea18 | |||
| d18acda324 | |||
| f30a3f6c82 | |||
| 0da0685ca3 | |||
| 87236ec119 | |||
| 2b31a480a1 | |||
| 4bc2870f3b | |||
| abad7dd090 | |||
| f846a44f74 | |||
| 33271bddfa | |||
| 001f033142 | |||
| e1d0473bbc | |||
| 18627b5686 | |||
| 03a6bbede7 | |||
| a68458c762 | |||
| 2427865cf0 | |||
| a118ec2013 | |||
| 8733a1f6c7 | |||
| 5ed8574a4f | |||
| 5aa491135d | |||
| 06a738a9b7 | |||
| 0a0639225a | |||
| ecb9b9e097 |
+4
-1
@@ -29,7 +29,10 @@ Hello! We’re delighted that you’re interested in contributing to **BSManager
|
||||
### Before You Begin
|
||||
|
||||
1. **[Fork the repository][fork]** and **clone** your fork locally.
|
||||
2. **Install the required Node.js version** (we recommend using [Volta](https://volta.sh/) to manage Node versions).
|
||||
2. **Install the required tools (Node, etc)** (we recommend using [mise](https://mise.jdx.dev/) to manage tool versions).
|
||||
```bash
|
||||
mise install
|
||||
```
|
||||
3. **Install project dependencies**:
|
||||
```bash
|
||||
npm install
|
||||
|
||||
@@ -955,5 +955,50 @@
|
||||
"ReleaseImg": "https://clan.fastly.steamstatic.com/images/32055887/b5b3f993a2a00861db9fdfb2eed68018e5d012ba.png",
|
||||
"ReleaseDate": "1769692187",
|
||||
"year": "2026"
|
||||
},
|
||||
{
|
||||
"BSVersion": "1.42.2",
|
||||
"BSManifest": "9067042658303247735",
|
||||
"OculusBinaryId": "25217144241292017",
|
||||
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/536626281230369168",
|
||||
"ReleaseImg": "https://clan.fastly.steamstatic.com/images/32055887/1161f8316767615d2fbe863673cace231c6d2b6f.png",
|
||||
"ReleaseDate": "1770303705",
|
||||
"year": "2026"
|
||||
},
|
||||
{
|
||||
"BSVersion": "1.42.3",
|
||||
"BSManifest": "5798847223913166210",
|
||||
"OculusBinaryId": "25563181170021654",
|
||||
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/511860284166506401",
|
||||
"ReleaseImg": "https://clan.fastly.steamstatic.com/images/32055887/c48686febbf5a5c753dc232c4cde48652231b667.png",
|
||||
"ReleaseDate": "1774534379",
|
||||
"year": "2026"
|
||||
},
|
||||
{
|
||||
"BSVersion": "1.43.0",
|
||||
"BSManifest": "6499880290663953435",
|
||||
"OculusBinaryId": "25964224259917341",
|
||||
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/692008075043799325",
|
||||
"ReleaseImg": "https://clan.fastly.steamstatic.com/images/32055887/79767d59028f454d63c4425a7bfd90913b59b546.png",
|
||||
"ReleaseDate": "1777467723",
|
||||
"year": "2026"
|
||||
},
|
||||
{
|
||||
"BSVersion": "1.44.0",
|
||||
"BSManifest": "4180431244915746363",
|
||||
"OculusBinaryId": "26135279289478503",
|
||||
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/690884711519617603",
|
||||
"ReleaseImg": "https://clan.fastly.steamstatic.com/images/32055887/335654acc1a5066bb634486a4834368097c84983.png",
|
||||
"ReleaseDate": "1779973295",
|
||||
"year": "2026"
|
||||
},
|
||||
{
|
||||
"BSVersion": "1.44.1",
|
||||
"BSManifest": "7621452421350879947",
|
||||
"OculusBinaryId": "26497783233228105",
|
||||
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/703272148131643814",
|
||||
"ReleaseImg": "https://clan.fastly.steamstatic.com/images/32055887/30fd358099eb07fe22e429cdf64380d7c2ae28dc.png",
|
||||
"ReleaseDate": "1782392653",
|
||||
"year": "2026"
|
||||
}
|
||||
]
|
||||
+13
-14
@@ -12,7 +12,10 @@
|
||||
"username": "Z3t4"
|
||||
},
|
||||
{
|
||||
"username": "Rhythm Shade"
|
||||
"username": "Xero"
|
||||
},
|
||||
{
|
||||
"username": "🎵Shade"
|
||||
},
|
||||
{
|
||||
"username": "aatame3",
|
||||
@@ -35,9 +38,6 @@
|
||||
"username": "Reflected Chop",
|
||||
"type": "gold"
|
||||
},
|
||||
{
|
||||
"username": "Sk4venger"
|
||||
},
|
||||
{
|
||||
"username": "Jesper Norsted"
|
||||
},
|
||||
@@ -45,6 +45,9 @@
|
||||
"username": "bosspie",
|
||||
"type": "diamond"
|
||||
},
|
||||
{
|
||||
"username": "CamVR the goat"
|
||||
},
|
||||
{
|
||||
"username": "bones",
|
||||
"type": "gold"
|
||||
@@ -55,25 +58,21 @@
|
||||
{
|
||||
"username": "minefox54"
|
||||
},
|
||||
{
|
||||
"username": "Elysee Buthidi",
|
||||
"type": "gold"
|
||||
},
|
||||
{
|
||||
"username": "Tindux",
|
||||
"type": "diamond"
|
||||
},
|
||||
{
|
||||
"username": "Einherjar",
|
||||
"type": "diamond"
|
||||
},
|
||||
{
|
||||
"username": "Daniel"
|
||||
},
|
||||
{
|
||||
"username": "lethal_loops"
|
||||
"username": "Eric McCoy",
|
||||
"type": "gold"
|
||||
},
|
||||
{
|
||||
"username": "egg"
|
||||
"username": "Moenker"
|
||||
},
|
||||
{
|
||||
"username": "Melissa Avery-Weir"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -179,9 +179,6 @@
|
||||
"description-plural": "Diese Version enthält {nb} veraltete Mods. Möchten Sie sie aktualisieren?",
|
||||
"dont-remind-me": "Nicht mehr daran erinnern",
|
||||
"update": "Aktualisieren"
|
||||
},
|
||||
"third-party-mod-source-not-avaliable": {
|
||||
"description": "Die Drittanbieter-Datenquelle „{name}“ ist nicht verfügbar. Bitte wechseln Sie in den Einstellungen zurück zu BeatMods und versuchen Sie es erneut."
|
||||
}
|
||||
},
|
||||
"drop-zone": {
|
||||
@@ -287,11 +284,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"mod-repos": {
|
||||
"title": "Modulquelle",
|
||||
"description": "Wähle eine andere Quelle als BeatMods.",
|
||||
"website": "Webseite"
|
||||
},
|
||||
"patreon": {
|
||||
"title": "BSManager Unterstützen 💖",
|
||||
"description": "Unterstütze das Projekt und helfe uns, BSManager kontinuierlich zu verbessern.",
|
||||
|
||||
@@ -179,9 +179,6 @@
|
||||
"description-plural": "This version has {nb} outdated mods. Do you want to update them?",
|
||||
"dont-remind-me": "Don't remind me",
|
||||
"update": "Update"
|
||||
},
|
||||
"third-party-mod-source-not-avaliable": {
|
||||
"description": "The third party mod source \"{name}\" is not avaliable. Please switch to BeatMods at setthings and try again."
|
||||
}
|
||||
},
|
||||
"drop-zone": {
|
||||
@@ -287,11 +284,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"mod-repos": {
|
||||
"title": "Mod Source",
|
||||
"description": "Choose a source other than BeatMods.",
|
||||
"website": "website"
|
||||
},
|
||||
"patreon": {
|
||||
"title": "Support BSManager 💖",
|
||||
"description": "Support the project and help us to provide continuous improvements to BSManager.",
|
||||
|
||||
@@ -179,9 +179,6 @@
|
||||
"description-plural": "Esta versión tiene {nb} mods desactualizados. ¿Quieres actualizarlos?",
|
||||
"dont-remind-me": "No me lo recuerdes",
|
||||
"update": "Actualizar"
|
||||
},
|
||||
"third-party-mod-source-not-avaliable": {
|
||||
"description": "La fuente de datos de terceros \"{name}\" no está disponible. Vuelve a BeatMods en la configuración e inténtalo de nuevo."
|
||||
}
|
||||
},
|
||||
"drop-zone": {
|
||||
@@ -287,11 +284,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"mod-repos": {
|
||||
"title": "Fuente del módulo",
|
||||
"description": "Elija una fuente distinta a BeatMods.",
|
||||
"website": "sitio web"
|
||||
},
|
||||
"patreon": {
|
||||
"title": "Apoya BSManager 💖",
|
||||
"description": "Apoya el proyecto y ayúdanos a proporcionar mejoras continuas a BSManager.",
|
||||
|
||||
@@ -179,9 +179,6 @@
|
||||
"description-plural": "Cette version contient {nb} mods obsolètes. Voulez-vous les mettre à jour ?",
|
||||
"dont-remind-me": "Ne plus me rappeler",
|
||||
"update": "Mettre à jour"
|
||||
},
|
||||
"third-party-mod-source-not-avaliable": {
|
||||
"description": "La source de données tierce « {name} » est indisponible. Veuillez revenir à Beatmods dans les paramètres et réessayer."
|
||||
}
|
||||
},
|
||||
"drop-zone": {
|
||||
@@ -287,11 +284,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"mod-repos": {
|
||||
"title": "Source du module",
|
||||
"description": "Choisissez une autre source que BeatMods.",
|
||||
"website": "site web"
|
||||
},
|
||||
"patreon": {
|
||||
"title": "Soutenir BSManager 💖",
|
||||
"description": "Soutiens le projet et aide-nous à fournir des améliorations continues à BSManager.",
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
"copied": "Copiato!",
|
||||
"confirm": "Conferma",
|
||||
"choose-folder": "Scegli cartella",
|
||||
"unknown": "È accaduto un errore sconosciuto ¯\\_(ツ)_/¯",
|
||||
"unknown": "Si è verificato un errore sconosciuto ¯\\_(ツ)_/¯",
|
||||
"warning": "Attenzione",
|
||||
"continue": "Continua",
|
||||
"shared": "Condivisi",
|
||||
@@ -55,9 +55,9 @@
|
||||
"launch-mods": {
|
||||
"oculus": "Modalita Oculus",
|
||||
"oculus-description": "Se stai usando Beat Saber via Steam, questa opzione ti consente di usare il composer VR di Oculus mentre bypassi SteamVR, per un potenziale aumento di performance. Questo non è richiesto per usare i visori Oculus.",
|
||||
"desktop": "Modalita FPFC",
|
||||
"desktop": "Modalità FPFC",
|
||||
"desktop-description": "La modalità FPFC (First Person Flying Controller) consente di usare i pulsanti WASD e il mouse per navigare nel menu del gioco. Questo rende i test molto più facili, perchè non devi indossare il tuo visore!",
|
||||
"debug": "Modalita Debug",
|
||||
"debug": "Modalità Debug",
|
||||
"debug-description": "Abilita la finestra di uscita del log per IPA. Questo mostrerà la console di debug che lo mod usano.",
|
||||
"outdated-tippy": "Questa versione è obsoleta, e alcune mod o funzioni non potrebbero più funzionare correttamente. Consigliamo di usare la versione raccomandata ({recommendedVersion}) di Beat Saber per godere delle ultime funzioni e bugfix.",
|
||||
"advanced-launch": {
|
||||
@@ -66,7 +66,7 @@
|
||||
"create-launch-option": "Crea un'opzione di lancio"
|
||||
},
|
||||
"skipsteam": "Salta Steam",
|
||||
"skipsteam-description": "Ferma Steam da aprirsi automaticamente con Beat Saber, abilitalo se stai usando un VR runtime differente come WiVRn o Monado con cui SteamVR potrebbe interferire.",
|
||||
"skipsteam-description": "Impedisce a Steam di aprirsi automaticamente con Beat Saber, abilitalo se stai usando un VR runtime differente come WiVRn o Monado con cui SteamVR potrebbe interferire.",
|
||||
"map-editor": "Map Editor",
|
||||
"map-editor-description": "Avvia il map editor di Beat Saber ufficiale invece del gioco.",
|
||||
"proton-logs": "Log di Proton",
|
||||
@@ -142,7 +142,7 @@
|
||||
"status": {
|
||||
"no-wineprefix": "Impossibile trovare il percorso del WINEPREFIX di BSManager. Per favore avvia prima Beat Saber in BSManager.",
|
||||
"beatmods-down": "Beatmods non è attualmente raggiungibile. Riprova più tardi. Se il problema persiste, informaci su {links}.",
|
||||
"unknown": "È accaduto un errore sconosciuto ¯\\_(ツ)_/¯"
|
||||
"unknown": "Si è verificato un errore sconosciuto ¯\\_(ツ)_/¯"
|
||||
},
|
||||
"buttons": {
|
||||
"more-infos": "Più info",
|
||||
@@ -163,8 +163,8 @@
|
||||
}
|
||||
},
|
||||
"mod-item": {
|
||||
"this-is-a-large-mod": "Questo è un mod grande!",
|
||||
"this-is-a-very-large-mod": "Questo è un mod molto grande!"
|
||||
"this-is-a-large-mod": "Questa è una mod grande!",
|
||||
"this-is-a-very-large-mod": "Questa è una mod molto grande!"
|
||||
}
|
||||
},
|
||||
"notifications": {
|
||||
@@ -174,14 +174,11 @@
|
||||
},
|
||||
"outdated-mods": {
|
||||
"title": "Mod obsoleto",
|
||||
"title-plural": "Mod obsoleti",
|
||||
"description": "Il mod {name} è obsoleto. Vuoi aggiornarlo?",
|
||||
"description-plural": "Questa versione ha {nb} mod obsoleti. Vuoi aggiornarli?",
|
||||
"title-plural": "Mod obsolete",
|
||||
"description": "La mod {name} è obsoleta. Vuoi aggiornarla?",
|
||||
"description-plural": "Questa versione ha {nb} mod obsolete. Vuoi aggiornarle?",
|
||||
"dont-remind-me": "Non ricordarmelo",
|
||||
"update": "Aggiorna"
|
||||
},
|
||||
"third-party-mod-source-not-avaliable": {
|
||||
"description": "La fonte dati di terze parti \"{name}\" non è disponibile. Torna a BeatMods nelle impostazioni e riprova."
|
||||
}
|
||||
},
|
||||
"drop-zone": {
|
||||
@@ -287,11 +284,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"mod-repos": {
|
||||
"title": "Sorgente del modulo",
|
||||
"description": "Scegli una fonte diversa da BeatMods.",
|
||||
"website": "sito web"
|
||||
},
|
||||
"patreon": {
|
||||
"title": "Sostieni BSManager 💖",
|
||||
"description": "Supporta il progetto e aiutaci a provvedere continui miglioramenti a BSManager.",
|
||||
@@ -325,7 +317,7 @@
|
||||
"modal": {
|
||||
"title": "Riavvio Necessario",
|
||||
"body": "Cambiare l'impostazione dell'accelerazione hardware causerà un riavvio di BSManager. Sei sicuro di voler procedere?",
|
||||
"confirm-btn": "Si, sono sicuro"
|
||||
"confirm-btn": "Sì, sono sicuro"
|
||||
},
|
||||
"error-notification": {
|
||||
"message": "C'è stato un errore, impossibile disattivare l'accelerazione hardware."
|
||||
@@ -337,7 +329,7 @@
|
||||
"modal": {
|
||||
"title": "Permesso Symlink",
|
||||
"body": "Quando crei dei Symlink, BSManager richiederà accesso amministrativo o la modalità sviluppatore sul tuo sistema. Sei sicuro di voler continuare?",
|
||||
"confirm-btn": "Si, sono sicuro"
|
||||
"confirm-btn": "Sì, sono sicuro"
|
||||
},
|
||||
"error-notification": {
|
||||
"message": "C'è stato un errore, impossibile cambiare le impostazioni di Symlinks."
|
||||
@@ -379,7 +371,7 @@
|
||||
"file-not-supported": "File non supportato"
|
||||
},
|
||||
"msg": {
|
||||
"operation-running": "Attendi che l'operazione corrente finisca, poi, prova di nuovo.",
|
||||
"operation-running": "Attendi che l'operazione corrente finisca, poi riprova.",
|
||||
"no-internet": "Controlla la tua connessione e riprova.",
|
||||
"file-not-supported": "Solo i file {types} sono supportati."
|
||||
}
|
||||
@@ -484,7 +476,7 @@
|
||||
"transfer-failed": "Trasferimento fallito 😕"
|
||||
},
|
||||
"descs": {
|
||||
"COPY_TO_SUBPATH": "La cartella di destinazione non puo essere una sotto cartella della cartella di origine.",
|
||||
"COPY_TO_SUBPATH": "La cartella di destinazione non puo essere una sottocartella della cartella di origine.",
|
||||
"restore-linked-folders": "C'è stato un errore durante il ripristino delle cartelle condivise. Puoi sempre ripristinarle manualmente via il menu 'Cartelle Condivise' nella pagina delle versioni."
|
||||
}
|
||||
}
|
||||
@@ -536,7 +528,7 @@
|
||||
"SKIPPING_STEAM_LAUNCH": "Saltando l'avvio di Steam..."
|
||||
},
|
||||
"msg": {
|
||||
"BS_LAUNCHING": "Non scordardi ti riscaldarti 😉",
|
||||
"BS_LAUNCHING": "Non scordarti di riscaldarti 😉",
|
||||
"STEAM_LAUNCHING": "Beat Saber si avvierà automaticamente dopo Steam.",
|
||||
"SKIPPING_STEAM_LAUNCH": "Spero che sai cosa stai facendo :)"
|
||||
}
|
||||
@@ -766,7 +758,7 @@
|
||||
"password": {
|
||||
"label": "Password",
|
||||
"placeholder": "Inserisci la password",
|
||||
"max-length-warning": "La password eccede i 64 caratteri! Se la password è invalida, prova ad entrare con solo i primi 64 caretteri."
|
||||
"max-length-warning": "La password eccede i 64 caratteri! Se la password è invalida, prova ad entrare con solo i primi 64 caratteri."
|
||||
},
|
||||
"qr": {
|
||||
"label": "O con un codice QR",
|
||||
@@ -1332,7 +1324,7 @@
|
||||
},
|
||||
"dateformat": {
|
||||
"dayNames": ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab", "Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"],
|
||||
"monthNames": ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic", "Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Augosto", "Settembre", "Ottobre", "Novembre", "Dicembre"],
|
||||
"monthNames": ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic", "Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"],
|
||||
"timeNames": ["a", "p", "am", "pm", "A", "P", "AM", "PM"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,9 +179,6 @@
|
||||
"description-plural": "このバージョンには古いModが{nb}個あります。更新しますか?",
|
||||
"dont-remind-me": "もう知らせない",
|
||||
"update": "更新する"
|
||||
},
|
||||
"third-party-mod-source-not-avaliable": {
|
||||
"description": "サードパーティのデータソース「{name}」は利用できません。設定でBeatModsに切り替えて、もう一度お試しください。"
|
||||
}
|
||||
},
|
||||
"drop-zone": {
|
||||
@@ -287,11 +284,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"mod-repos": {
|
||||
"title": "モジュールソース",
|
||||
"description": "BeatMods以外のソースを選択してください。",
|
||||
"website": "Webサイト"
|
||||
},
|
||||
"patreon": {
|
||||
"title": "BSManagerをサポートする 💖",
|
||||
"description": "プロジェクトをサポートし、BSManagerの継続的な応援にご協力ください!",
|
||||
|
||||
@@ -179,9 +179,6 @@
|
||||
"description-plural": "이 버전에는 {nb}개의 구식 모드가 있습니다. 업데이트하시겠습니까?",
|
||||
"dont-remind-me": "다시는 알리지 않기",
|
||||
"update": "업데이트"
|
||||
},
|
||||
"third-party-mod-source-not-avaliable": {
|
||||
"description": "타사 데이터 소스 \"{name}\"을 사용할 수 없습니다. 설정에서 BeatMods로 다시 전환한 후 다시 시도해 주세요."
|
||||
}
|
||||
},
|
||||
"drop-zone": {
|
||||
@@ -287,11 +284,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"mod-repos": {
|
||||
"title": "모듈 소스",
|
||||
"description": "BeatMods 이외의 소스를 선택하세요.",
|
||||
"website": "웹사이트"
|
||||
},
|
||||
"patreon": {
|
||||
"title": "BSManager를 지원하기 💖",
|
||||
"description": "프로젝트를 지원하고 BSManager의 지속적인 응원을 부탁드립니다!",
|
||||
|
||||
@@ -179,9 +179,6 @@
|
||||
"description-plural": "Esta versão possui {nb} mods desatualizados. Deseja atualizá-los?",
|
||||
"dont-remind-me": "Não me lembre",
|
||||
"update": "Atualizar"
|
||||
},
|
||||
"third-party-mod-source-not-avaliable": {
|
||||
"description": "A fonte de dados de terceiros \"{name}\" está indisponível. Por favor, volte para BeatMods nas configurações e tente novamente."
|
||||
}
|
||||
},
|
||||
"drop-zone": {
|
||||
@@ -287,11 +284,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"mod-repos": {
|
||||
"title": "Fonte do módulo",
|
||||
"description": "Escolha uma fonte diferente de BeatMods.",
|
||||
"website": "site"
|
||||
},
|
||||
"patreon": {
|
||||
"title": "Apoie BSManager 💖",
|
||||
"description": "Apoie o projeto e nos ajude a continuar trazendo melhorias para o BSManager.",
|
||||
|
||||
@@ -179,9 +179,6 @@
|
||||
"description-plural": "В этой версии есть {nb} устаревших модов. Хотите их обновить?",
|
||||
"dont-remind-me": "Не напоминать мне",
|
||||
"update": "Обновить"
|
||||
},
|
||||
"third-party-mod-source-not-avaliable": {
|
||||
"description": "Сторонний источник данных \"{name}\" недоступен. Пожалуйста, переключитесь обратно на BeatMods в настройках и попробуйте снова."
|
||||
}
|
||||
},
|
||||
"drop-zone": {
|
||||
@@ -287,11 +284,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"mod-repos": {
|
||||
"title": "Исходный код модуля",
|
||||
"description": "Выберите источник, отличный от BeatMods.",
|
||||
"website": "веб-сайт"
|
||||
},
|
||||
"patreon": {
|
||||
"title": "Поддержи BSManager 💖",
|
||||
"description": "Поддержи проект, чтобы мы могли дальше улучшать BSManager.",
|
||||
|
||||
@@ -179,9 +179,6 @@
|
||||
"description-plural": "Ang bersyon na ito ay may {nb} lipas na mga mod. Gusto mo bang i-update ang mga ito?",
|
||||
"dont-remind-me": "Huwag akong paalalahanan",
|
||||
"update": "I-update"
|
||||
},
|
||||
"third-party-mod-source-not-avaliable": {
|
||||
"description": "Hindi magagamit ang third-party data source na \"{name}\". Bumalik sa BeatMods sa mga setting at subukang muli."
|
||||
}
|
||||
},
|
||||
"drop-zone": {
|
||||
@@ -287,11 +284,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"mod-repos": {
|
||||
"title": "Pinagmulan ng modyul",
|
||||
"description": "Pumili ng ibang mapagkukunan maliban sa BeatMods.",
|
||||
"website": "website"
|
||||
},
|
||||
"patreon": {
|
||||
"title": "Supportahan ang BSManager 💖",
|
||||
"description": "Suportahan ang proyekto at tulungan kami na magbigay ng patuloy na mga pagdagdag ng feature sa BSManager.",
|
||||
|
||||
@@ -179,9 +179,6 @@
|
||||
"description-plural": "Ця версія має {nb} застаріл(-ий/-і/-их) мод(-и/-ів). Ви хочете оновити їх?",
|
||||
"dont-remind-me": "Не нагадувати",
|
||||
"update": "Оновити"
|
||||
},
|
||||
"third-party-mod-source-not-avaliable": {
|
||||
"description": "Джерело даних стороннього розробника \"{name}\" недоступне. Будь ласка, поверніться до BeatMods у налаштуваннях і спробуйте ще раз."
|
||||
}
|
||||
},
|
||||
"drop-zone": {
|
||||
@@ -287,11 +284,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"mod-repos": {
|
||||
"title": "Джерело модуля",
|
||||
"description": "Виберіть джерело, відмінне від BeatMods.",
|
||||
"website": "вебсайт"
|
||||
},
|
||||
"patreon": {
|
||||
"title": "Підтримайте BSManager 💖",
|
||||
"description": "Підтримайте проєкт і допоможіть нам продовжувати вдосконалювати BSManager.",
|
||||
|
||||
@@ -179,9 +179,6 @@
|
||||
"description-plural": "此版本有 {nb} 個過時的模組。您想更新它們嗎?",
|
||||
"dont-remind-me": "不要提醒我",
|
||||
"update": "更新"
|
||||
},
|
||||
"third-party-mod-source-not-avaliable": {
|
||||
"description": "第三方資料來源「{name}」不可用,請在設定中切換回BeatMods再試。"
|
||||
}
|
||||
},
|
||||
"drop-zone": {
|
||||
@@ -287,11 +284,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"mod-repos": {
|
||||
"title": "模組來源",
|
||||
"description": "選擇一個除BeatMods之外的來源",
|
||||
"website": "網站"
|
||||
},
|
||||
"patreon": {
|
||||
"title": "支持 BSManager 💖",
|
||||
"description": "支持該項目並幫助我們持續改進 BSManager。",
|
||||
|
||||
@@ -179,9 +179,6 @@
|
||||
"description-plural": "此版本有 {nb} 个过时的模组。您想更新它们吗?",
|
||||
"dont-remind-me": "不要提醒我",
|
||||
"update": "更新"
|
||||
},
|
||||
"third-party-mod-source-not-avaliable": {
|
||||
"description": "第三方数据源“{name}”不可用,请在设置中切换回BeatMods再试。"
|
||||
}
|
||||
},
|
||||
"drop-zone": {
|
||||
@@ -287,11 +284,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"mod-repos": {
|
||||
"title": "模组源",
|
||||
"description": "选择一个除BeatMods之外的源",
|
||||
"website": "网站"
|
||||
},
|
||||
"patreon": {
|
||||
"title": "支持 BSManager 💖",
|
||||
"description": "支持该项目并帮助我们持续改进 BSManager。",
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -17,6 +17,7 @@ const config = {
|
||||
win: {
|
||||
signtoolOptions: {
|
||||
signingHashAlgorithms: ["sha256"],
|
||||
certificateSha1: "d55f8cda15bd9cba76ea796b9504860b16c7f46e",
|
||||
},
|
||||
target: [
|
||||
"nsis",
|
||||
|
||||
+3
-5
@@ -2,7 +2,7 @@
|
||||
"name": "bs-manager",
|
||||
"description": "Manage maps, mods and more for Beat Saber",
|
||||
"main": "./.erb/dll/main.bundle.dev.js",
|
||||
"version": "1.5.4",
|
||||
"version": "1.5.6",
|
||||
"scripts": {
|
||||
"build-rust-scripts": "tsx ./.erb/scripts/build-rust-scripts.js",
|
||||
"build": "concurrently \"npm run build:main\" \"npm run build:renderer\"",
|
||||
@@ -20,7 +20,8 @@
|
||||
"start:renderer": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack serve --config ./.erb/configs/webpack.config.renderer.dev.ts",
|
||||
"test": "jest ./src/__tests__/**/*.test.ts",
|
||||
"test:unit": "jest ./src/__tests__/unit",
|
||||
"publish": "npm run build && electron-builder -c.win.certificateSha1=206941d969c4fa8a0e04d9427def361e13b02fd0 --config electron-builder.config.js --publish always --win --x64",
|
||||
"build:win": "npm run build && electron-builder --config electron-builder.config.js --publish never --win --x64",
|
||||
"publish": "npm run build && electron-builder --config electron-builder.config.js --publish always --win --x64",
|
||||
"publish:linux": "npm run build && electron-builder --config electron-builder.config.js --publish never --linux --x64",
|
||||
"publish:flatpak": "npm run build && env DEBUG='@malept/flatpak-bundler' npx electron-builder --config electron-builder.config.js --publish never --linux flatpak",
|
||||
"update:patreon": "tsx ./.erb/scripts/update-patreon.js"
|
||||
@@ -247,8 +248,5 @@
|
||||
".erb/dll/**"
|
||||
],
|
||||
"logLevel": "quiet"
|
||||
},
|
||||
"volta": {
|
||||
"node": "24.11.1"
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "bs-manager",
|
||||
"version": "1.5.4",
|
||||
"version": "1.5.6",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "bs-manager",
|
||||
"version": "1.5.4",
|
||||
"version": "1.5.6",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bs-manager",
|
||||
"version": "1.5.4",
|
||||
"version": "1.5.6",
|
||||
"description": "BSManager",
|
||||
"main": "./dist/main/main.js",
|
||||
"author": {
|
||||
|
||||
@@ -19,7 +19,5 @@ export const HTTP_STATUS_CODES = constants;
|
||||
|
||||
// Linux related stuff
|
||||
|
||||
export const PROTON_BINARY_PREFIX = "proton";
|
||||
export const WINE_BINARY_PREFIX = path.join("files", "bin", "wine64");
|
||||
export const IS_FLATPAK = process.env.container === "flatpak";
|
||||
|
||||
|
||||
@@ -39,17 +39,3 @@ ipc.on("bs-mods.beatmods-up", (_, reply) => {
|
||||
const beatMods = BeatModsApiService.getInstance();
|
||||
reply(from(beatMods.isUp()));
|
||||
})
|
||||
|
||||
ipc.on("bs-mods.mod-repo.get-repo-list", (_, reply) => {
|
||||
const beatMods = BeatModsApiService.getInstance();
|
||||
reply(from(beatMods.getModRepoList()));
|
||||
})
|
||||
ipc.on("bs-mods.mod-repo.get-name", (_, reply) => {
|
||||
const beatMods = BeatModsApiService.getInstance();
|
||||
reply(from(beatMods.getSelectedModRepoAsync()));
|
||||
})
|
||||
|
||||
ipc.on("bs-mods.mod-repo.select-name", (args, reply) => {
|
||||
const beatMods = BeatModsApiService.getInstance();
|
||||
reply(from(beatMods.selectModRepo(args)));
|
||||
})
|
||||
@@ -48,7 +48,9 @@ export class OculusLauncherService extends AbstractLauncherService implements St
|
||||
}
|
||||
|
||||
// Make sure Oculus is running
|
||||
await this.oculus.startOculus().catch(err => log.error("Error while starting Oculus", err));
|
||||
await this.oculus.startOculus().catch(err => log.error("Error while starting Oculus", err)).catch(err => {
|
||||
log.warn("Unable to start Oculus client. Force launch.", err);
|
||||
});
|
||||
|
||||
let env: Record<string, string> = {
|
||||
...process.env,
|
||||
@@ -57,7 +59,7 @@ export class OculusLauncherService extends AbstractLauncherService implements St
|
||||
env: parsedEnv,
|
||||
cmdlet, args,
|
||||
} = parseLaunchOptions(launchOptions.command, {
|
||||
commandReplacement: exePath,
|
||||
commandReplacement: `"${exePath}"`,
|
||||
});
|
||||
env = this.mergeEnvVariables(env, parsedEnv);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import fs from "fs-extra";
|
||||
import log from "electron-log";
|
||||
import path from "path";
|
||||
import { BS_APP_ID, BS_EXECUTABLE, IS_FLATPAK, PROTON_BINARY_PREFIX, WINE_BINARY_PREFIX } from "main/constants";
|
||||
import { BS_APP_ID, BS_EXECUTABLE, IS_FLATPAK } from "main/constants";
|
||||
import { InstallationLocationService } from "./installation-location.service";
|
||||
import { StaticConfigurationService } from "./static-configuration.service";
|
||||
import { CustomError } from "shared/models/exceptions/custom-error.class";
|
||||
@@ -22,10 +22,19 @@ export class LinuxService {
|
||||
return LinuxService.instance;
|
||||
}
|
||||
|
||||
private readonly PROTON_BINARY_PREFIX = "proton";
|
||||
// Use "wine64" instead of "wine"
|
||||
// https://github.com/Zagrios/bs-manager/pull/586#issuecomment-2449228826
|
||||
private readonly WINE_BINARY_PREFIXES = [
|
||||
path.join("files", "bin", "wine64"),
|
||||
path.join("files", "lib", "wine", "x86_64-unix", "wine64"),
|
||||
];
|
||||
|
||||
private readonly installLocationService: InstallationLocationService;
|
||||
private readonly staticConfig: StaticConfigurationService;
|
||||
|
||||
private nixOS: boolean | undefined;
|
||||
private winePath = "";
|
||||
|
||||
private constructor() {
|
||||
this.installLocationService = InstallationLocationService.getInstance();
|
||||
@@ -55,7 +64,7 @@ export class LinuxService {
|
||||
}
|
||||
const protonPath = path.join(
|
||||
this.staticConfig.get("proton-folder"),
|
||||
PROTON_BINARY_PREFIX
|
||||
this.PROTON_BINARY_PREFIX
|
||||
);
|
||||
if (!fs.pathExistsSync(protonPath)) {
|
||||
throw CustomError.fromError(
|
||||
@@ -93,6 +102,7 @@ export class LinuxService {
|
||||
"SteamEnv": "1",
|
||||
// Fix reflections in Monado
|
||||
"OXR_PARALLEL_VIEWS": "1",
|
||||
"OXR_NO_TEXTURE_SOURCE_ALPHA": "1",
|
||||
};
|
||||
|
||||
if (launchOptions.launchMods?.includes(LaunchMods.PROTON_LOGS)) {
|
||||
@@ -112,27 +122,53 @@ export class LinuxService {
|
||||
protonFolder = this.staticConfig.get("proton-folder");
|
||||
}
|
||||
|
||||
const protonPath = path.join(protonFolder, PROTON_BINARY_PREFIX);
|
||||
const winePath = path.join(protonFolder, WINE_BINARY_PREFIX);
|
||||
return fs.pathExistsSync(protonPath) && fs.pathExistsSync(winePath);
|
||||
// Check if the proton binary exists
|
||||
const protonPath = path.join(protonFolder, this.PROTON_BINARY_PREFIX);
|
||||
if (!fs.pathExistsSync(protonPath)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if any wine64 here exists
|
||||
for (const winePath of this.WINE_BINARY_PREFIXES) {
|
||||
if (fs.pathExistsSync(path.join(protonFolder, winePath))) {
|
||||
// Reset this, in the case where the user reselects a new proton folder
|
||||
this.winePath = "";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public getWinePath(): string {
|
||||
if (this.winePath) {
|
||||
return this.winePath;
|
||||
}
|
||||
|
||||
if (!this.staticConfig.has("proton-folder")) {
|
||||
throw new Error("proton-folder variable not set");
|
||||
}
|
||||
|
||||
const winePath = path.join(
|
||||
this.staticConfig.get("proton-folder"),
|
||||
WINE_BINARY_PREFIX
|
||||
);
|
||||
if (!fs.pathExistsSync(winePath)) {
|
||||
const protonFolder = this.staticConfig.get("proton-folder");
|
||||
let winePath = "";
|
||||
for (const prefixes of this.WINE_BINARY_PREFIXES) {
|
||||
winePath = path.join(protonFolder, prefixes);
|
||||
if (!fs.pathExistsSync(winePath)) {
|
||||
winePath = "";
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (winePath === "") {
|
||||
throw new Error(`"${winePath}" binary file not found`);
|
||||
}
|
||||
|
||||
this.winePath = winePath;
|
||||
return winePath;
|
||||
}
|
||||
|
||||
// Should be different from winePath, this is the "WINEPREFIX" env var
|
||||
// that points to the wine windows files directory
|
||||
public getWinePrefixPath(): string {
|
||||
const compatDataPath = this.getCompatDataPath();
|
||||
return fs.existsSync(compatDataPath)
|
||||
|
||||
@@ -3,47 +3,18 @@ import { BbmFullMod, BbmMod, BbmModVersion, BbmPlatform } from "../../../shared/
|
||||
import { RequestService } from "../request.service";
|
||||
import { BsStore } from "../../../shared/models/bs-store.enum";
|
||||
import log from "electron-log"
|
||||
import { StaticConfigurationService } from "../static-configuration.service";
|
||||
import { ModRepo } from "shared/models/mods/repo.model";
|
||||
|
||||
export class BeatModsApiService {
|
||||
private static instance: BeatModsApiService;
|
||||
|
||||
private readonly staticConfig: StaticConfigurationService;
|
||||
|
||||
private readonly requestService: RequestService;
|
||||
|
||||
private static readonly MOD_REPO_LIST:ModRepo[] = [
|
||||
{
|
||||
id: "beatmods",
|
||||
mods_repo_url: "https://beatmods.com",
|
||||
mods_repo_api_url: "https://beatmods.com/api",
|
||||
display_name: "BeatMods",
|
||||
website: "https://beatmods.com"
|
||||
},
|
||||
{
|
||||
id: "beatsabercn",
|
||||
mods_repo_url: "https://beatmods.bsaber.cn",
|
||||
mods_repo_api_url: "https://beatmods.bsaber.cn/api",
|
||||
display_name: "CN中文镜像源",
|
||||
website: "https://beatmods.bsaber.cn/front/mods"
|
||||
}
|
||||
];
|
||||
|
||||
private selectedModRepo: ModRepo = BeatModsApiService.MOD_REPO_LIST.find(repo => repo.default) || BeatModsApiService.MOD_REPO_LIST[0];
|
||||
|
||||
public getSelectedModRepo(): ModRepo {
|
||||
return this.selectedModRepo;
|
||||
}
|
||||
public readonly MODS_REPO_URL = "https://beatmods.com";
|
||||
private readonly MODS_REPO_API_URL = `${this.MODS_REPO_URL}/api`;
|
||||
|
||||
private readonly versionModsCache = new Map<string, BbmFullMod[]>();
|
||||
private readonly modsHashCache = new Map<string, BbmModVersion>();
|
||||
|
||||
private resetCache(){
|
||||
this.versionModsCache.clear();
|
||||
this.modsHashCache.clear();
|
||||
}
|
||||
|
||||
public static getInstance(): BeatModsApiService {
|
||||
if (!BeatModsApiService.instance) {
|
||||
BeatModsApiService.instance = new BeatModsApiService();
|
||||
@@ -52,49 +23,23 @@ export class BeatModsApiService {
|
||||
}
|
||||
|
||||
private constructor() {
|
||||
this.staticConfig = StaticConfigurationService.getInstance();
|
||||
this.requestService = RequestService.getInstance();
|
||||
|
||||
const repoId = this.staticConfig.get("selected-mod-repo");
|
||||
if(repoId){
|
||||
this.selectedModRepo = BeatModsApiService.MOD_REPO_LIST.find(repo => repo.id === repoId) || BeatModsApiService.MOD_REPO_LIST[0];
|
||||
}
|
||||
}
|
||||
|
||||
public async isUp(): Promise<boolean> {
|
||||
try {
|
||||
// The data in status can be dropped
|
||||
await this.requestService.getJSON<{}>(`${this.getSelectedModRepo().mods_repo_api_url}/status`);
|
||||
await this.requestService.getJSON<{}>(`${this.MODS_REPO_API_URL}/status`);
|
||||
return true;
|
||||
} catch (error) {
|
||||
log.error(`Could not connect to ${this.selectedModRepo.mods_repo_api_url}`, error);
|
||||
log.error("Could not connect to beatmods", error);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private getVersionModsUrl(version: BSVersion): string {
|
||||
const platform: BbmPlatform = version.oculus || version.metadata?.store === BsStore.OCULUS ? BbmPlatform.OculusPC : BbmPlatform.SteamPC;
|
||||
return `${this.getSelectedModRepo().mods_repo_api_url}/mods?status=verified&gameVersion=${version.BSVersion}&gameName=BeatSaber&platform=${platform}`;
|
||||
}
|
||||
|
||||
public async getModRepoList():Promise<ModRepo[]>{
|
||||
return BeatModsApiService.MOD_REPO_LIST;
|
||||
}
|
||||
|
||||
public async getSelectedModRepoAsync():Promise<ModRepo>{
|
||||
return this.getSelectedModRepo();
|
||||
}
|
||||
public async selectModRepo(repoId:string): Promise<boolean>{
|
||||
const selectedRepo = BeatModsApiService.MOD_REPO_LIST.find(repo => repo.id === repoId);
|
||||
|
||||
if(!selectedRepo){
|
||||
return false;
|
||||
}
|
||||
|
||||
this.selectedModRepo = selectedRepo;
|
||||
this.staticConfig.set("selected-mod-repo", repoId);
|
||||
this.resetCache()
|
||||
return true;
|
||||
return `${this.MODS_REPO_API_URL}/mods?status=verified&gameVersion=${version.BSVersion}&gameName=BeatSaber&platform=${platform}`;
|
||||
}
|
||||
|
||||
private updateModsHashCache(mods: BbmModVersion[]): void {
|
||||
@@ -131,7 +76,7 @@ export class BeatModsApiService {
|
||||
}
|
||||
|
||||
return this.requestService.getJSON<{ modVersions: BbmModVersion[] }>(
|
||||
`${this.getSelectedModRepo().mods_repo_api_url}/hashlookup?hash=${hash}`
|
||||
`${this.MODS_REPO_API_URL}/hashlookup?hash=${hash}`
|
||||
).then(({ data }) => {
|
||||
this.updateModsHashCache(data?.modVersions ?? []);
|
||||
return data?.modVersions?.at(0);
|
||||
|
||||
@@ -128,7 +128,7 @@ export class BsModsManagerService {
|
||||
}
|
||||
|
||||
private async downloadZip(zipUrl: string): Promise<BsmZipExtractor> {
|
||||
zipUrl = new URL(zipUrl, this.beatModsApi.getSelectedModRepo().mods_repo_url).href;
|
||||
zipUrl = new URL(zipUrl, this.beatModsApi.MODS_REPO_URL).href;
|
||||
|
||||
log.info("Download mod zip", zipUrl);
|
||||
|
||||
|
||||
@@ -105,8 +105,12 @@ export class OculusService {
|
||||
return null;
|
||||
}
|
||||
|
||||
public oculusRunning(): Promise<boolean> {
|
||||
return isProcessRunning("OculusClient");
|
||||
public async oculusRunning(): Promise<boolean> {
|
||||
if (await isProcessRunning("OculusClient")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return isProcessRunning("Client"); // new name of oculus client
|
||||
}
|
||||
|
||||
public async startOculus(): Promise<void>{
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
import ElectronStore from "electron-store";
|
||||
import { pathExistsSync } from "fs-extra";
|
||||
import path from "path";
|
||||
import { PROTON_BINARY_PREFIX, WINE_BINARY_PREFIX } from "main/constants";
|
||||
import { Observable, Subject } from "rxjs";
|
||||
import { CustomError } from "shared/models/exceptions/custom-error.class";
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
import { AutoUpdate } from "shared/models/config";
|
||||
|
||||
@@ -40,16 +36,6 @@ export class StaticConfigurationService {
|
||||
}
|
||||
|
||||
public async set<K extends StaticConfigKeys>(key: K, value: StaticConfigKeyValues[K]): Promise<void> {
|
||||
// Validate the setters
|
||||
switch (key) {
|
||||
case "proton-folder":
|
||||
this.validateProtonFolder(value as string);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
this.store.set(key, value);
|
||||
|
||||
if (this.watchers[key]) {
|
||||
@@ -57,16 +43,6 @@ export class StaticConfigurationService {
|
||||
}
|
||||
}
|
||||
|
||||
// Setters with validation
|
||||
|
||||
private validateProtonFolder(protonFolder: string): void {
|
||||
const protonPath = path.join(protonFolder, PROTON_BINARY_PREFIX);
|
||||
const winePath = path.join(protonFolder, WINE_BINARY_PREFIX);
|
||||
if (!pathExistsSync(protonPath) || !pathExistsSync(winePath)) {
|
||||
throw new CustomError("Invalid proton folder path", "invalid-folder");
|
||||
}
|
||||
}
|
||||
|
||||
public delete<K extends StaticConfigKeys>(key: K): void {
|
||||
this.store.delete(key);
|
||||
}
|
||||
@@ -92,7 +68,6 @@ export interface StaticConfigKeyValues {
|
||||
"use-system-proxy": boolean;
|
||||
"last-version-launched": BSVersion;
|
||||
"auto-update": AutoUpdate;
|
||||
"selected-mod-repo": string;
|
||||
|
||||
// Linux Specific static configs
|
||||
"proton-folder": string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { forwardRef, LegacyRef, useEffect, useImperativeHandle, useRef, useState } from "react";
|
||||
import { forwardRef, LegacyRef, useImperativeHandle, useRef, useState } from "react";
|
||||
import { BsmIconType, BsmIcon } from "../svgs/bsm-icon.component";
|
||||
import { BsmButton, BsmButtonType } from "./bsm-button.component";
|
||||
import { useTranslation } from "renderer/hooks/use-translation.hook";
|
||||
@@ -32,25 +32,14 @@ type Props = {
|
||||
children?: JSX.Element;
|
||||
text?: string;
|
||||
textClassName?: string;
|
||||
maxVisibleItems?: number;
|
||||
};
|
||||
|
||||
export const BsmDropdownButton = forwardRef(({ className, classNames, buttonColor, items, align, withBar = true, icon = "settings", buttonClassName, menuTranslationY, children, text, textClassName, maxVisibleItems }: Props, fowardRed) => {
|
||||
export const BsmDropdownButton = forwardRef(({ className, classNames, buttonColor, items, align, withBar = true, icon = "settings", buttonClassName, menuTranslationY, children, text, textClassName }: Props, fowardRed) => {
|
||||
const [expanded, setExpanded] = useState(false);
|
||||
const t = useTranslation();
|
||||
const ref = useRef(fowardRed);
|
||||
useClickOutside(ref, () => setExpanded(false));
|
||||
|
||||
const itemRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
const [itemHeight, setItemHeight] = useState<number>();
|
||||
const maxHeight = itemHeight && maxVisibleItems ? itemHeight * maxVisibleItems + 8 : undefined;
|
||||
useEffect(() => {
|
||||
if (itemRef.current) {
|
||||
setItemHeight(itemRef.current.offsetHeight);
|
||||
}
|
||||
}, [items]);
|
||||
|
||||
useImperativeHandle(
|
||||
fowardRed,
|
||||
() => ({
|
||||
@@ -84,13 +73,13 @@ export const BsmDropdownButton = forwardRef(({ className, classNames, buttonColo
|
||||
})();
|
||||
|
||||
return (
|
||||
<div ref={ref as unknown as LegacyRef<HTMLDivElement>} className={cn(className, classNames?.mainContainer)} >
|
||||
<div ref={ref as unknown as LegacyRef<HTMLDivElement>} className={cn(className, classNames?.mainContainer)}>
|
||||
<BsmButton onClick={() => setExpanded(!expanded)} className={cn(buttonClassName ?? defaultButtonClassName, classNames?.button)} icon={icon} active={expanded} textClassName={textClassName} onClickOutside={handleClickOutside} withBar={withBar} text={text} typeColor={buttonColor} iconClassName={classNames?.iconClassName}/>
|
||||
<div className={cn(`py-1 w-fit absolute cursor-pointer top-[calc(100%-4px)] rounded-md bg-inherit text-sm text-gray-800 dark:text-gray-200 shadow-md shadow-black transition-[scale] duration-150 ease-in-out ${alignClass} overflow-y-auto scrollbar-thin `, classNames?.itemsContainer)} style={{ scale: expanded ? "1" : "0", translate: `0 ${menuTranslationY}`, maxHeight}}>
|
||||
<div className={cn(`py-1 w-fit absolute cursor-pointer top-[calc(100%-4px)] rounded-md bg-inherit text-sm text-gray-800 dark:text-gray-200 shadow-md shadow-black transition-[scale] duration-150 ease-in-out ${alignClass}`, classNames?.itemsContainer)} style={{ scale: expanded ? "1" : "0", translate: `0 ${menuTranslationY}` }}>
|
||||
{items?.map(
|
||||
(i, index) =>
|
||||
i =>
|
||||
i && (
|
||||
<div ref={index === 0 ? itemRef : undefined} key={crypto.randomUUID()} onClick={() => { setExpanded(() => false); i.onClick?.()}} className="flex w-full px-3 py-2 hover:backdrop-brightness-150">
|
||||
<div key={crypto.randomUUID()} onClick={() => { setExpanded(() => false); i.onClick?.()}} className="flex w-full px-3 py-2 hover:backdrop-brightness-150">
|
||||
{i.icon && <BsmIcon icon={i.icon} className="h-5 w-5 mr-1 text-inherit" />}
|
||||
<span className="w-max">{t(i.text)}</span>
|
||||
</div>
|
||||
|
||||
@@ -23,7 +23,6 @@ import { Dropzone } from "renderer/components/shared/dropzone.component";
|
||||
import { ModsGridStatus } from "shared/models/mods/mod-ipc.model";
|
||||
import { BsmLink } from "renderer/components/shared/bsm-link.component";
|
||||
import { DISCORD_URL, GITHUB_URL } from "shared/constants";
|
||||
import { ModRepo } from "shared/models/mods/repo.model";
|
||||
|
||||
export type ModsSlideRef = {
|
||||
loadMods: () => Promise<void>;
|
||||
@@ -56,8 +55,6 @@ export const ModsSlide = forwardRef<ModsSlideRef, Props>(({ version, isActive, o
|
||||
const downloadRef = useRef(null);
|
||||
const [downloadWith, setDownloadWidth] = useState(0);
|
||||
|
||||
const [selectedModRepo, setSelectedModRepo] = useState(null as ModRepo)
|
||||
|
||||
const modsToCategoryMap = (mods: BbmFullMod[]): Map<BbmCategories, BbmFullMod[]> => {
|
||||
if (!mods) {
|
||||
return new Map<BbmCategories, BbmFullMod[]>();
|
||||
@@ -221,10 +218,6 @@ export const ModsSlide = forwardRef<ModsSlideRef, Props>(({ version, isActive, o
|
||||
loadMods
|
||||
}), [version]);
|
||||
|
||||
useEffect(()=>{
|
||||
modsManager.getSelectedModRepo().then(repo=>setSelectedModRepo(repo));
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
let isCancelled = false;
|
||||
|
||||
@@ -291,18 +284,6 @@ export const ModsSlide = forwardRef<ModsSlideRef, Props>(({ version, isActive, o
|
||||
|
||||
const renderStatus = () => {
|
||||
if (gridStatus === ModsGridStatus.BEATMODS_DOWN) {
|
||||
if(selectedModRepo && selectedModRepo.id !== "beatmods"){
|
||||
return <ModStatus image={BeatConflictImg}>
|
||||
<span className="text-xl text-center px-2 mt-3 italic">
|
||||
{
|
||||
t("pages.version-viewer.mods.notifications.third-party-mod-source-not-avaliable.description",
|
||||
{name:selectedModRepo ? selectedModRepo.display_name : "null"}
|
||||
)
|
||||
}
|
||||
</span>
|
||||
</ModStatus>
|
||||
}
|
||||
|
||||
return <ModStatus image={BeatConflictImg}>
|
||||
<span className="text-xl text-center px-2 mt-3 italic">
|
||||
{te("pages.version-viewer.mods.status.beatmods-down", {links: (<>
|
||||
|
||||
@@ -12,9 +12,9 @@ export function useClickOutside(ref: MutableRefObject<any>, handler: ComponentPr
|
||||
}
|
||||
};
|
||||
|
||||
document.addEventListener("mousedown", handleClickOutside);
|
||||
document.addEventListener("click", handleClickOutside);
|
||||
return () => {
|
||||
document.removeEventListener("mousedown", handleClickOutside);
|
||||
document.removeEventListener("click", handleClickOutside);
|
||||
};
|
||||
}, [ref]);
|
||||
}
|
||||
|
||||
@@ -49,8 +49,6 @@ import { AutoUpdaterService } from "renderer/services/auto-updater.service";
|
||||
import { OculusDownloaderService } from "renderer/services/bs-version-download/oculus-downloader.service";
|
||||
import { DISCORD_URL } from "shared/constants";
|
||||
import { AutoUpdate } from "shared/models/config";
|
||||
import { BsModsManagerService } from "renderer/services/bs-mods-manager.service";
|
||||
import { ModRepo } from "shared/models/mods/repo.model";
|
||||
|
||||
export function SettingsPage() {
|
||||
|
||||
@@ -71,7 +69,6 @@ export function SettingsPage() {
|
||||
const versionLinker = useService(VersionFolderLinkerService);
|
||||
const staticConfig = useService(StaticConfigurationService);
|
||||
const installationLocationService = useService(InstallationLocationService);
|
||||
const bsModManagerService = useService(BsModsManagerService);
|
||||
const autoUpdater = useService(AutoUpdaterService);
|
||||
|
||||
const { firstColor, secondColor } = useThemeColor();
|
||||
@@ -103,8 +100,6 @@ export function SettingsPage() {
|
||||
const [playlistsDeepLinkEnabled, setPlaylistsDeepLinkEnabled] = useState(false);
|
||||
const [modelsDeepLinkEnabled, setModelsDeepLinkEnabled] = useState(false);
|
||||
const [hasDownloaderSession, setHasDownloaderSession] = useState(false);
|
||||
const [modRepoList, setModRepoList] = useState([] as ModRepo[]);
|
||||
const [modRepo, setModRepo] = useState("");
|
||||
const appVersion = useObservable(() => autoUpdater.getAppVersion());
|
||||
|
||||
useEffect(() => {
|
||||
@@ -114,15 +109,6 @@ export function SettingsPage() {
|
||||
playlistsManager.isDeepLinksEnabled().then(enabled => setPlaylistsDeepLinkEnabled(() => enabled));
|
||||
modelsManager.isDeepLinksEnabled().then(enabled => setModelsDeepLinkEnabled(() => enabled));
|
||||
|
||||
|
||||
bsModManagerService.getModRepoList().then(list =>{
|
||||
setModRepoList(list);
|
||||
bsModManagerService.getSelectedModRepo().then(repo => {
|
||||
setModRepo(repo.id);
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
staticConfig.get("proton-folder").then(setProtonFolder);
|
||||
}, []);
|
||||
|
||||
@@ -171,13 +157,6 @@ export function SettingsPage() {
|
||||
i18nService.setLanguage(item.value);
|
||||
};
|
||||
|
||||
const handleChangeModRepo = (repo: RadioItem<string>) => {
|
||||
bsModManagerService.selectModRepo(repo.value).then(result=>{
|
||||
if(result){
|
||||
setModRepo(repo.value)
|
||||
}
|
||||
})
|
||||
}
|
||||
const setDefaultProtonFolder = async () => {
|
||||
if (!progressBarService.require()) {
|
||||
return;
|
||||
@@ -529,17 +508,6 @@ export function SettingsPage() {
|
||||
<SettingRadioArray items={languagesItems} selectedItemValue={languageSelected} onItemSelected={handleChangeLanguage} columnCount={2} />
|
||||
</SettingContainer>
|
||||
|
||||
<SettingContainer title="pages.settings.mod-repos.title" description="pages.settings.mod-repos.description">
|
||||
<SettingRadioArray items={modRepoList.map((repo,index)=>({
|
||||
id:index,
|
||||
value: repo.id,
|
||||
text: repo.display_name,
|
||||
icon: repo.website ?
|
||||
<BsmButton onClick={()=>linkOpener.open(repo.website, false)} className="px-2 font-bold italic text-sm rounded-md" text="pages.settings.mod-repos.website" withBar={false} />
|
||||
: null
|
||||
}))} selectedItemValue={modRepo} onItemSelected={handleChangeModRepo} />
|
||||
</SettingContainer>
|
||||
|
||||
<SettingContainer title="pages.settings.patreon.title" description="pages.settings.patreon.description">
|
||||
<div className="flex gap-2">
|
||||
<BsmButton color="#ef4444" className="flex w-fit rounded-md h-8 px-2 font-bold py-1 whitespace-nowrap !text-white" text="pages.settings.patreon.buttons.support" withBar={false} onClick={openSupportPage} />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Observable, BehaviorSubject, throwError, of, lastValueFrom, from } from "rxjs";
|
||||
import { Observable, BehaviorSubject, throwError, of, lastValueFrom } from "rxjs";
|
||||
import { catchError, map, tap } from "rxjs/operators";
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
import { IpcService } from "./ipc.service";
|
||||
@@ -10,7 +10,6 @@ import { BbmFullMod, BbmModVersion } from "shared/models/mods/mod.interface";
|
||||
import { logRenderError } from "renderer";
|
||||
import { ModsGridStatus } from "shared/models/mods/mod-ipc.model";
|
||||
import { LinuxService } from "./linux.service";
|
||||
import { ModRepo } from "shared/models/mods/repo.model";
|
||||
|
||||
export class BsModsManagerService {
|
||||
private static instance: BsModsManagerService;
|
||||
@@ -227,18 +226,4 @@ export class BsModsManagerService {
|
||||
return ModsGridStatus.OK;
|
||||
}
|
||||
|
||||
public async getModRepoList(): Promise<ModRepo[]> {
|
||||
return lastValueFrom(this.ipcService.sendV2("bs-mods.mod-repo.get-repo-list")).catch(() => [] as ModRepo[]);
|
||||
}
|
||||
|
||||
public async getSelectedModRepo(): Promise<ModRepo> {
|
||||
return lastValueFrom(this.ipcService.sendV2("bs-mods.mod-repo.get-name").pipe(
|
||||
catchError(() => from(this.getModRepoList()).pipe(map(list => list.find(repo => repo.default) || list[0])))
|
||||
));
|
||||
}
|
||||
|
||||
public async selectModRepo(name:string): Promise<boolean> {
|
||||
return lastValueFrom(this.ipcService.sendV2("bs-mods.mod-repo.select-name", name)).catch(() => false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ import { StaticConfigGetIpcRequestResponse, StaticConfigKeys, StaticConfigSetIpc
|
||||
import { BbmFullMod, BbmModVersion, ExternalMod } from "../mods/mod.interface";
|
||||
import { OculusDownloadInfo } from "main/services/bs-version-download/bs-oculus-downloader.service";
|
||||
import { UpdateInfo } from "electron-updater";
|
||||
import { ModRepo } from "../mods/repo.model";
|
||||
|
||||
export type IpcReplier<T> = (data: Observable<T>) => void;
|
||||
|
||||
@@ -91,9 +90,6 @@ export interface IpcChannelMapping {
|
||||
"bs-mods.uninstall-mods": { request: { mods: BbmFullMod[]; version: BSVersion }, response: Progression };
|
||||
"bs-mods.uninstall-all-mods": { request: BSVersion, response: Progression };
|
||||
"bs-mods.beatmods-up": { request: void, response: boolean };
|
||||
"bs-mods.mod-repo.get-repo-list": { request: void, response: ModRepo[]};
|
||||
"bs-mods.mod-repo.get-name": { request: void, response: ModRepo};
|
||||
"bs-mods.mod-repo.select-name": { request: string, response: boolean};
|
||||
|
||||
/* ** bs-playlist-ipcs ** */
|
||||
"one-click-install-playlist": { request: string, response: Progression<DownloadPlaylistProgressionData> };
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
export interface ModRepo {
|
||||
id: string
|
||||
mods_repo_url: string
|
||||
mods_repo_api_url: string
|
||||
display_name: string
|
||||
website?: string
|
||||
default?: boolean
|
||||
}
|
||||
Reference in New Issue
Block a user