Compare commits

..

558 Commits

Author SHA1 Message Date
MathieuG-P 5c70a7d974 bumb version 2023-03-15 16:24:16 +01:00
MathieuG-P da8bae8582 Merge pull request #182 from Zagrios/hotfix/steamvr-restore-conflict-on-fast-bs-reboot
[hotfix] steamvr restoration conflict on fast bs reboot
2023-03-15 16:23:44 +01:00
MathieuG-P 4cce24e275 [hotfix] clear timeout on steamvr restoration 2023-03-15 16:22:02 +01:00
MathieuG-P 18f2f18e41 Merge pull request #181 from Zagrios/feature/disable-steamvr-when-desktop-mode
Feature/disable steamvr when desktop mode
2023-03-14 00:28:37 +01:00
MathieuG-P ec3c6ce26e fix vbs regidit not find script 2023-03-14 00:26:53 +01:00
MathieuG-P 9862dfa78d force not launch steamvr when desktop mode 2023-03-13 23:55:22 +01:00
MathieuG-P e3f91ea593 Merge pull request #180 from Zagrios/hotfix/backup-userdata-on-link
[hotfix] create backup of userdata folder when linking
2023-03-13 15:34:37 +01:00
MathieuG-P 509b2cd9b9 [hotfix] create backup of userdata folder when linking 2023-03-13 15:33:39 +01:00
MathieuG-P 1b54d86324 bumb version 2023-03-13 01:55:58 +01:00
MathieuG-P 425b2ecdb1 Merge pull request #179 from Zagrios/feature/custom-launch-options/177
feature/custom-launch-options/177
2023-03-13 01:36:22 +01:00
MathieuG-P 3b973e1597 [feature-177] add possibility to add additional arguments 2023-03-13 01:34:51 +01:00
MathieuG-P 86d2781e67 [feature-177] remove useless stuff in settings 2023-03-13 01:33:25 +01:00
MathieuG-P 5d10f139a9 Merge pull request #176 from Zagrios/feature/share-custom-folders/155
feature/share-custom-folders/155
2023-03-12 21:32:34 +01:00
MathieuG-P 9b5a1711ce share custom folder finished 2023-03-12 03:58:51 +01:00
MathieuG-P 646ec820a5 [feature-155] start share folder ui 2023-03-08 01:13:13 +01:00
MathieuG-P a144a308f6 Merge pull request #175 from Zagrios/bugfix/color-selection-overlapp-when-scroll/174
[bugfix-174] pass color chooser form fixed to absolute position
2023-03-06 23:57:47 +01:00
MathieuG-P 07818cf8f2 [bugfix-174] pass color chooser form fixed to absolute position 2023-03-06 23:55:24 +01:00
MathieuG-P ccbcc8296d change oculus mode description 2023-03-04 22:38:58 +01:00
MathieuG-P bea435439e remove console log 2023-03-04 22:17:08 +01:00
MathieuG-P d9ff78c21d Merge pull request #171 from Zagrios/bugfix/light-theme-issues/168
[bugfix-168] fix light theme issues
2023-03-04 22:15:03 +01:00
MathieuG-P 14a4bf3408 [bugfix-168] fix light theme issues 2023-03-04 22:02:58 +01:00
MathieuG-P 172d7e4578 Merge pull request #170 from Zagrios/hotfix/dotnet-notif-not-appear-sometimes
Hotfix/dotnet notif not appear sometimes
2023-03-04 21:48:18 +01:00
MathieuG-P 5986cf7a15 [hotfix] change methode to check dotnet 6 2023-03-04 21:18:51 +01:00
MathieuG-P a5e4b745ef fix dotnet notif not appear sometimes 2023-03-04 19:28:01 +01:00
MathieuG-P 4cd538fe21 Merge pull request #169 from Zagrios/feature/volume-control/154
feature/volume-control/154
2023-03-04 13:42:34 +01:00
MathieuG-P c406dfee79 [feature-154] volume slider finished 2023-03-04 13:41:48 +01:00
MathieuG-P 8a168d20b3 [feature] sound control in title bar 2023-03-03 23:59:57 +01:00
MathieuG-P b16f7150e8 [feature] add volume control 2023-03-03 01:46:28 +01:00
MathieuG-P c4319f1c6c Merge pull request #167 from Zagrios/hotfix/use-apply-translation
[hotfix] use apply translation
2023-03-03 00:17:34 +01:00
MathieuG-P d9003fa07b [hotfix] use apply translation 2023-03-03 00:15:33 +01:00
MathieuG-P eb2235e017 Merge pull request #166 from Zagrios/bugfix/change-oculus-mode-description/162
[bugfix] change oculus mode description
2023-03-02 09:30:16 +01:00
MathieuG-P 1e784c243b [bugfix] change oculus mode description 2023-03-02 09:20:18 +01:00
MathieuG-P 23e9b52af2 [hotfix] we dont remeber steam session anymore 2023-03-02 00:47:16 +01:00
MathieuG-P e42ac4eca3 bumb version 2023-03-02 00:41:32 +01:00
MathieuG-P 622595a7a0 Merge pull request #165 from Zagrios/bugfix/mods-three-dots-menu-glitch-when-no-mods/152
[bugfix] fix mods menu glitch when no mods
2023-03-02 00:38:42 +01:00
MathieuG-P 556ca1b1e6 fix mods menu glitch when no mods 2023-03-02 00:37:47 +01:00
MathieuG-P cef4f22305 Merge pull request #164 from Zagrios/feature/add-credentials-informations
[FEATURE] add credentials informations
2023-03-02 00:20:24 +01:00
MathieuG-P ee1dd7b21f add credentials informations 2023-03-02 00:19:06 +01:00
MathieuG-P 487b73a859 Merge pull request #161 from Zagrios/bugfix/maps-loding-optimization/144
[bugfix] maps loding optimization (partial)
2023-03-01 23:28:49 +01:00
MathieuG-P a56fdde0e7 add log + use allSettled 2023-03-01 23:26:48 +01:00
MathieuG-P 99f91d25c3 Merge branch 'master' of https://github.com/Zagrios/bs-manager 2023-03-01 21:54:45 +01:00
MathieuG-P 8579b0697d nothing 2023-03-01 21:54:41 +01:00
MathieuG-P f0761c8359 Merge pull request #160 from Zagrios/hotfix/pause-song-on-map-preview
[hotfix] pause song on map preview
2023-03-01 21:44:27 +01:00
MathieuG-P b1833721d0 pause song on map preview 2023-03-01 21:43:07 +01:00
MathieuG-P aba099e15a Merge pull request #159 from Zagrios/hotfix/cant-enable-oculus-mode-with-desktop-mode
[hotfix] cant-enable-oculus-mode-with-desktop-mode
2023-03-01 21:34:08 +01:00
MathieuG-P d25c0cced5 [hotfix] cant-enable-oculus-mode-with-desktop-mode 2023-03-01 21:33:09 +01:00
MathieuG-P bc4f6304db Merge pull request #158 from Zagrios/hotfix/output-console-not-show-with-debug-mode
[hotfix] open debug console when launch BS with debug mode
2023-03-01 21:04:26 +01:00
MathieuG-P 4357454b14 [hotfix] open debug console when launch BS with debug mode 2023-03-01 21:02:06 +01:00
MathieuG-P 528abbcaa3 Merge pull request #153 from legoandmars/master
Change 'Mod' -> 'Mode' in english launch options
2023-03-01 13:23:46 +01:00
legoandmars 9bcc605e00 Change 'Mod' -> 'Mode' 2023-02-28 16:43:04 -08:00
MathieuG-P f7e3b9ae9d Merge pull request #151 from Zagrios/bugfix/bug-header-of-maps-tab-not-translated/150
bugfix/fix-shared-maps-page-title-not-translated/150
2023-03-01 01:07:25 +01:00
MathieuG-P 1b963a99c1 fix shared maps page title not translated 2023-03-01 01:05:55 +01:00
MathieuG-P 363cc3cc5e reduce maps loading by 40% from micro optimization 2023-03-01 00:52:42 +01:00
MathieuG-P 8307a975ea bumb version 2023-02-28 23:39:48 +01:00
MathieuG-P f5ecdfca60 Merge pull request #149 from Zagrios/hotfix/error-download-version-space-in-path
[HOTFIX] fix error when space in path when download a version
2023-02-28 23:38:36 +01:00
MathieuG-P 5bb92d804b fix erreur when space in path when download a version 2023-02-28 23:37:40 +01:00
MathieuG-P 5b4b962015 Merge branch 'master' of https://github.com/Zagrios/bs-manager 2023-02-28 19:17:38 +01:00
MathieuG-P b43cfdd70b add 1.28.0 2023-02-28 19:17:35 +01:00
MathieuG-P 77350a823e Merge pull request #146 from Zagrios/feature/readme-update
Feature/readme update
2023-02-28 11:14:08 +01:00
MathieuG-P 5844aea281 Update FUNDING.yml 2023-02-28 11:12:34 +01:00
Gaëtan Gerard 8af5d8c3e4 Remove BSM Support 2023-02-28 09:58:00 +01:00
Gaëtan Gerard f0f3721ec5 Merge pull request #145 from Zagrios/master
rebase
2023-02-28 09:57:24 +01:00
MathieuG-P 5641c25cc1 bumb version 2023-02-24 01:12:46 +01:00
MathieuG-P c1b32c2fc3 Merge pull request #143 from Zagrios/hotfix/little-fix-en-translation
[HOTFIX] fix unlink maps EN translation
2023-02-24 01:10:58 +01:00
MathieuG-P dc70d2889f fix unlink maps EN translation 2023-02-24 01:10:15 +01:00
MathieuG-P 6b2879d9dc bumb version 2023-02-21 01:39:17 +01:00
MathieuG-P 19e842d721 Merge pull request #142 from Zagrios/hotfix/oneclick-map-not-install-map-in-unlinked-versions
hotfix/oneclick-map-not-install-map-in-unlinked-versions
2023-02-21 01:29:43 +01:00
MathieuG-P 8d28c3cfc8 oneclick map not install map in unlinked versions 2023-02-21 01:28:42 +01:00
MathieuG-P baec206bf3 Merge pull request #141 from Zagrios/bugfix/oneclick-not-work-when-no-versions/139
bugfix/oneclick-not-work-when-no-versions/139
2023-02-21 01:03:23 +01:00
MathieuG-P 3aacd7575b fix oneclick map not work when no BS versions intalled 2023-02-21 01:00:39 +01:00
MathieuG-P d739245e70 Merge pull request #140 from Zagrios/bugfix/ram-usage-maps-list/138
bugfix/ram-usage-maps-list/138
2023-02-21 00:43:56 +01:00
MathieuG-P c88d93b0ab maps optimisation finished + new ipc system + maps progress bars now accurate 2023-02-21 00:33:33 +01:00
MathieuG-P 64280509b0 huge maps deletion and export speed improvement + optimize map component update rate 2023-02-17 01:26:16 +01:00
MathieuG-P a7e81cfa8a virtual scroll maps list resize work 2023-02-16 00:30:23 +01:00
MathieuG-P 2620354888 init virtual scroll maps list 2023-02-15 00:50:49 +01:00
MathieuG-P 61a8790448 bumb version 2023-02-06 22:03:34 +01:00
MathieuG-P 5b4af58baa Merge pull request #135 from Zagrios/hotfix/remove-model-downloader-from-default-mods
hotfix/remove-model-download-from-default-mods
2023-02-06 21:43:42 +01:00
MathieuG-P 6cd3c65362 Merge pull request #134 from Zagrios/hotfix/disable-support-button
hotfix/disable-support-button
2023-02-06 21:41:59 +01:00
MathieuG-P 211a3b9a39 disable support button + fix button hightlight even if disabled + fix click exec even if disabled 2023-02-06 21:37:17 +01:00
MathieuG-P a4fd92a014 remove ModelDownload from default mods 2023-02-06 21:14:40 +01:00
Gaëtan Gerard 295d0f90ba Merge pull request #133 from Synaelle/patch-1
Correction d'orthographe
2023-02-02 21:49:29 +01:00
Synaelle 5592242963 Correction d'orthographe
J'ai corrigé la majorité des fautes que j'ai pu trouvé, ainsi que les problèmes de cohérence dans la mention du jeu. C'est à dire que des fois le jeu est appelé BeatSaber et des fois Beat Saber.
2023-02-02 15:12:47 +01:00
MathieuG-P 0212f3ba26 Merge pull request #132 from 0xAuthenticity/master
Update default-configuration.config.ts
2023-01-28 14:55:56 +01:00
0xAuthenticity 36521a2b1b Update default-configuration.config.ts 2023-01-28 02:23:42 -05:00
MathieuG-P 571a4f23ea re-enable web installer 2023-01-26 00:09:30 +01:00
MathieuG-P 2b9829d57a bumb version 2023-01-25 23:46:55 +01:00
MathieuG-P 2f6ea39f79 Merge pull request #131 from Zagrios/hotfix/file-verification-download-a-version
hotfix/file-verification-download-a-version
2023-01-25 23:45:11 +01:00
MathieuG-P 8e33214fd0 re-add file verification 2023-01-25 23:44:38 +01:00
MathieuG-P 310dfb94c2 Merge pull request #130 from Zagrios/hotfix/disable-web-installer-for-update
hotfix/disable-web-installer-for-update
2023-01-25 20:54:13 +01:00
MathieuG-P 39e2a54e1e Merge pull request #129 from Zagrios/bugfix/selected-effect-missing-available-versions/127
bugfix/selected-effect-missing-available-versions/127
2023-01-25 20:51:02 +01:00
MathieuG-P 829cace7b9 add selected in glowEffect condition 2023-01-25 20:29:08 +01:00
MathieuG-P e82afa7e22 disable web installer for auto update 2023-01-25 20:23:52 +01:00
MathieuG-P 5e64ce16f4 add web installer 2023-01-25 00:02:08 +01:00
MathieuG-P 2154d90759 Merge branch 'master' of https://github.com/Zagrios/bs-manager 2023-01-24 23:42:15 +01:00
MathieuG-P d889c85b4a bumb version 2023-01-24 23:42:12 +01:00
MathieuG-P cc4d033db2 Merge pull request #126 from Zagrios/hotfix/no-more-files-verification-from-available-versions-list
hotfix/no-more-files-verification-from-available-versions-list
2023-01-24 22:57:45 +01:00
MathieuG-P 1cfef9f607 no more verification in available versions list 2023-01-24 22:55:25 +01:00
MathieuG-P bbd26d1c12 Merge pull request #125 from Zagrios/hotfix/icon-cuts-white-with-stroke
hotfix/icon-cuts-white-with-stroke
2023-01-24 22:07:31 +01:00
MathieuG-P 72f0c22e88 add stroke to cuts and cuts are always white 2023-01-24 22:06:29 +01:00
Gaëtan Gerard 72daaeee0e Merge pull request #124 from Zagrios/master
Rebase branch
2023-01-24 09:26:10 +01:00
MathieuG-P 26765c45c7 bumb version 2023-01-23 02:21:36 +01:00
MathieuG-P 2afcaa46f9 Merge pull request #122 from Zagrios/feature/import-external-version/121
feature/import-external-version/121
2023-01-23 02:17:42 +01:00
MathieuG-P 3c5b2a2eed add loading maps 2023-01-23 02:15:52 +01:00
MathieuG-P 0ff8e865aa possibility to import version + cpu usage optimization 2023-01-23 00:56:49 +01:00
MathieuG-P 2d60acce51 update readme and add credits 2023-01-21 15:08:35 +01:00
MathieuG-P 53fb197585 Merge pull request #120 from Zagrios/feature/readme-update
Feature/readme update
2023-01-20 01:09:01 +01:00
Gaëtan Gerard 3c11f5a0a1 Update README.md 2023-01-20 00:47:41 +01:00
Gaëtan Gerard bef27b4ac5 Update README.md 2023-01-20 00:39:41 +01:00
Gaëtan Gerard 0d0cfa1b4e Update README.md 2023-01-20 00:35:44 +01:00
Gaëtan Gerard 286f4aa68d Update README.md
Co-authored-by: MathieuG-P <40181755+Zagrios@users.noreply.github.com>
2023-01-20 00:35:16 +01:00
Gaëtan Gerard 58f563ed61 Update README.md
Co-authored-by: MathieuG-P <40181755+Zagrios@users.noreply.github.com>
2023-01-20 00:32:33 +01:00
Gaëtan Gerard 523575e43c Update README.md
Co-authored-by: MathieuG-P <40181755+Zagrios@users.noreply.github.com>
2023-01-20 00:24:54 +01:00
Gaëtan Gerard 414017930e Update README.md
Co-authored-by: MathieuG-P <40181755+Zagrios@users.noreply.github.com>
2023-01-20 00:19:44 +01:00
Gaëtan Gerard 01550557fb Update README.md 2023-01-20 00:15:57 +01:00
Gaëtan Gerard cdfb957203 Update README.md 2023-01-20 00:10:07 +01:00
Shido c647099f60 remove "the tool" 2023-01-19 23:54:43 +01:00
Shido 8899017a37 Update README.md 2023-01-19 23:52:01 +01:00
Gaëtan Gerard c8b983fd76 Update README.md 2023-01-19 21:58:30 +01:00
Gaëtan Gerard 24ad6b6a1d Update README.md 2023-01-19 21:50:24 +01:00
Gaëtan Gerard ee9e23ef2c Update README.md 2023-01-19 21:39:17 +01:00
Gaëtan Gerard 3125009e80 Update README.md 2023-01-19 21:32:24 +01:00
Shido b23e211e11 remove (WIP) 2023-01-19 15:52:53 +01:00
Shido 2cc9b342b7 remove useless file 2023-01-19 15:50:55 +01:00
Shido 085a74a6b3 Merge branch 'feature/readme-update' of https://github.com/Zagrios/bs-manager into feature/readme-update 2023-01-19 15:49:22 +01:00
Shido f6159a863c fix BSM link 2023-01-19 15:49:20 +01:00
Gaëtan Gerard 4430138e77 Update README.md 2023-01-19 15:45:02 +01:00
Gaëtan Gerard 04eca2cbc0 "bot" -> "bottom" 2023-01-19 13:36:47 +01:00
Shido c8d47f8e67 Merge branch 'feature/readme-update' of https://github.com/Zagrios/bs-manager into feature/readme-update 2023-01-19 13:29:09 +01:00
Shido f7da6fdb63 fix link issue 2023-01-19 13:29:07 +01:00
Gaëtan Gerard 2466bb6d4c fix One Click .mov 2023-01-19 12:50:11 +01:00
Gaëtan Gerard 5f293e38b6 adding .mov for OneClick 2023-01-19 11:51:56 +01:00
Gaëtan Gerard 08ce0b1da3 fix .mov name 2023-01-18 22:19:36 +01:00
Gaëtan Gerard e12aa7e695 Adding .MOV 2023-01-18 22:16:35 +01:00
Shido c92a32a503 Improve readme 2023-01-18 22:14:18 +01:00
Shido 56fdfdca49 Merge branch 'feature/readme-update' of https://github.com/Zagrios/bs-manager into feature/readme-update 2023-01-18 02:17:33 +01:00
Shido b2510645e5 Improve readme 2023-01-18 02:17:32 +01:00
MathieuG-P b5a08584a0 bumb version 2023-01-17 23:02:45 +01:00
MathieuG-P 78568cd235 Merge pull request #118 from Zagrios/bugfix/can-clone-with-same-name/113
bugfix/can-clone-with-same-name/113
2023-01-17 22:58:25 +01:00
MathieuG-P 8e86d4a7c5 change versions file system 2023-01-17 22:57:43 +01:00
Gaëtan Gerard 6322ff2dd5 fix .mov 2023-01-17 21:47:26 +01:00
Shido 89c3b93ba6 manageVersions .mov test 2023-01-17 21:45:03 +01:00
Shido 580dea6b44 Update manageVersions preview 2023-01-17 21:39:27 +01:00
Shido b203adc66f fix preview 2023-01-17 21:29:17 +01:00
MathieuG-P 7a2639f772 Merge pull request #117 from Zagrios/bugfix/wrong-placement-tooltip-version/115
bugfix/wrong-placement-tooltip-version/115
2023-01-17 20:28:43 +01:00
MathieuG-P 535430d0c5 better version tooltip 2023-01-17 20:28:14 +01:00
Shido a0c9c88e0e Update preview 2023-01-17 20:13:11 +01:00
Shido 4b7610f39f fix tool name 2023-01-17 18:52:30 +01:00
Shido a06e903c5c adding "Customize your instances" in Table of contents 2023-01-17 00:10:37 +01:00
Shido f79f46269f Adding "One-Click" text 2023-01-17 00:08:53 +01:00
MathieuG-P b82ddc1c59 Merge pull request #110 from Zagrios/hotfix/fix-tab-navigation
hotfix/fix-tab-navigation
2023-01-16 21:24:02 +01:00
MathieuG-P f4dc6ab838 fix tab navigation 2023-01-16 21:23:28 +01:00
MathieuG-P 62dde63206 Merge pull request #109 from Zagrios/hotfix/improve-nav-bar-static-button
hotfix/improve-nav-bar-static-button
2023-01-16 20:58:24 +01:00
MathieuG-P 5c034013fe improve nav-bar static buttons 2023-01-16 20:57:38 +01:00
MathieuG-P 23717c15d1 Create SECURITY.md 2023-01-14 22:15:00 +01:00
MathieuG-P 09acc3ccaa bump version 2023-01-13 03:20:37 +01:00
MathieuG-P 7c3f4f6a64 Merge pull request #106 from Zagrios/hotfix/bsm-icon-black-spark-on-light-theme
hotfix/bsm-icon-black-spark-on-light-theme
2023-01-13 03:03:22 +01:00
MathieuG-P 8dc48b20cb black spark bsm icon on light theme 2023-01-13 03:02:16 +01:00
MathieuG-P 165b17e034 Merge pull request #105 from Zagrios/hotfix/redirect-on-available-versions-on-delete-uninstall-version
hotfix/redirect-on-available-versions-on-delete-uninstall-version
2023-01-13 02:54:29 +01:00
MathieuG-P 4255e2ad85 redirect on available versions page on uninstall last version 2023-01-13 02:54:03 +01:00
MathieuG-P 16b7c1ed76 Merge pull request #104 from Zagrios/bugfix/pending-and-download-button-overlap/99
bugfix/pending-and-download-button-overlap/99
2023-01-13 02:41:09 +01:00
MathieuG-P d179bde348 fix overlapping download button and pending spinner 2023-01-13 02:40:24 +01:00
MathieuG-P e2234b19ea Merge pull request #102 from Zagrios/bugfix/cant-manage-versions/101
fix error libsFolders not iterable
2023-01-13 01:01:12 +01:00
MathieuG-P 45259f304b fix error libsFolders not iterable 2023-01-13 00:59:11 +01:00
MathieuG-P 220c7940a8 Merge pull request #98 from Zagrios/feature/add-info-launch-mod/11
feature/add-info-launch-mod/11
2023-01-11 23:53:19 +01:00
MathieuG-P 9665dbcb4e add info to launch mod 2023-01-11 23:51:40 +01:00
Gaëtan 423a17070c update gif Mods 2023-01-11 20:47:13 +01:00
MathieuG-P 8d88b59e3d bump version 2023-01-10 22:19:24 +01:00
MathieuG-P ae9d1dfc9b Merge pull request #97 from Zagrios/bugfix/unglow-apply-when-no-filter-change/90
bugfix/unglow-apply-when-no-filter-change/90
2023-01-10 22:06:27 +01:00
MathieuG-P 6930df940f compare first and new filter to know if changes 2023-01-10 22:05:25 +01:00
MathieuG-P fd523f4017 Merge pull request #95 from Zagrios/bugfix/error-when-no-internet/87
bugfix/error-when-no-internet/87
2023-01-10 21:38:02 +01:00
MathieuG-P 4c8f903256 handle no internet for mods and maps 2023-01-10 21:37:26 +01:00
MathieuG-P d2ba6aadc1 Merge pull request #94 from Zagrios/bugfix/infinite-map-loading/91
bugfix/infinite-map-loading/91
2023-01-10 20:21:34 +01:00
MathieuG-P 0023066e32 add text when no maps found 2023-01-10 20:21:00 +01:00
MathieuG-P 39bcf63e3c Merge pull request #93 from Zagrios/bugfix/supporter-button-not-work/89
bugfix/supporter-button-not-work/89
2023-01-10 20:05:41 +01:00
MathieuG-P 656f32e755 fix supporters not open + add missing key 2023-01-10 20:05:07 +01:00
MathieuG-P f66279980b Merge pull request #92 from Zagrios/bugfix/map-preview-behind-maps-download/88
bugfix/map-preview-behind-maps-download/88
2023-01-10 19:58:15 +01:00
MathieuG-P 1f65841e62 fix iframe view z index + rename iframe view file 2023-01-10 19:57:39 +01:00
Gaëtan 0422e7fee8 add customize version section 2023-01-10 14:55:12 +01:00
Gaëtan 7fdf165d57 update gif manageVersion 2023-01-10 14:54:56 +01:00
Gaëtan 31d1b8536d test gif 2023-01-10 14:30:28 +01:00
Gaëtan Gerard 20ac0ef7da gif test loading 2023-01-10 14:10:07 +01:00
Gaëtan a72c849693 Update Gif manageVersion 2023-01-10 14:01:19 +01:00
Gaëtan 48f3bf53ca Remove RoadMap 2023-01-10 10:35:50 +01:00
Gaëtan e78a1189b0 Update Badge Shield 2023-01-10 10:35:12 +01:00
MathieuG-P 955d6420b3 bumb version 2023-01-09 20:31:11 +01:00
MathieuG-P f773e419d5 Merge pull request #86 from Zagrios/feature/switch-patreon-to-mee6/83
feature/switch-patreon-to-mee6/83
2023-01-09 20:26:48 +01:00
MathieuG-P 08bceff27a switch patreon to mee6 2023-01-09 20:25:04 +01:00
MathieuG-P aacf09aebc Merge pull request #85 from Zagrios/bugfix/settings-close-button-stuck/84
bugfix/settings-close-button-stuck/84
2023-01-09 19:53:42 +01:00
MathieuG-P 0ad02979e7 fix height 2023-01-09 19:53:03 +01:00
MathieuG-P b33839c7a2 Merge pull request #82 from Zagrios/feature/add-twitter-button/81
feature/add-twitter-button/81
2023-01-09 15:42:05 +01:00
MathieuG-P 4d5fca4b18 add twitter button 2023-01-09 15:37:43 +01:00
MathieuG-P 598049a49f Update CODE_OF_CONDUCT.md 2023-01-08 19:14:56 +01:00
MathieuG-P e0f9b44f4d Update FUNDING.yml 2023-01-08 19:13:11 +01:00
MathieuG-P 13ffd76459 Update CONTRIBUTING.md 2023-01-07 23:42:32 +01:00
MathieuG-P 5eae7eab10 Create CONTRIBUTING.md 2023-01-07 23:38:51 +01:00
MathieuG-P bc855990c8 Create CODE_OF_CONDUCT.md 2023-01-07 23:01:07 +01:00
MathieuG-P 55d643be1c Create pull_request_template.md 2023-01-07 22:40:01 +01:00
MathieuG-P 1e726be44d add funding 2023-01-07 00:54:05 +01:00
MathieuG-P 648ea4be67 Merge pull request #80 from Zagrios/feature/add-map-owned-indicator/34
feature/add-map-owned-indicator/34
2023-01-06 22:46:43 +01:00
MathieuG-P 030d70e5c3 Merge pull request #79 from Zagrios/hotfix/color-customization-not-work
hotfix/color-customization-not-work
2023-01-06 22:45:50 +01:00
MathieuG-P 4a7c47fb5c add owned indicator + remove useless props 2023-01-06 22:44:41 +01:00
MathieuG-P b404122960 repair on change functions 2023-01-06 22:23:01 +01:00
MathieuG-P 9d075d79c8 Merge pull request #78 from Zagrios/hotfix/fix-notification-strange-disappearing
hotfix/fix-notification-strange-disappearing
2023-01-06 18:12:20 +01:00
MathieuG-P 4e1847c12d fix strange disappearing 2023-01-06 18:11:05 +01:00
MathieuG-P de2f7882b3 Merge pull request #77 from Zagrios/feature/enable-all-oneclick-in-once/57
feature/enable-all-oneclicks/57
2023-01-06 16:52:48 +01:00
MathieuG-P 28b6241255 add select all to toogle oneClicks 2023-01-06 16:51:23 +01:00
MathieuG-P 3358efac88 Merge pull request #74 from Zagrios/feature/ux-toogle-oneclick/72
feature/ux-toogle-onclick/72
2023-01-05 22:38:24 +01:00
MathieuG-P c7069494a9 toogle oneclick on click list item 2023-01-05 22:37:38 +01:00
MathieuG-P b98826612b Merge pull request #73 from Zagrios/bugfix/shadow-hidden-notification-still-visible/71
bugfix/shadow-hidden-notification-still-visible/71
2023-01-05 22:07:41 +01:00
MathieuG-P 5ef8443217 shadow no longer visible after exit 2023-01-05 22:06:24 +01:00
MathieuG-P 5e03039633 Merge pull request #70 from Zagrios/hotfix/close-filter-on-apply
hotfix/close-filter-on-apply
2023-01-04 21:55:39 +01:00
MathieuG-P f13375ea40 Merge branch 'master' into hotfix/close-filter-on-apply 2023-01-04 21:55:06 +01:00
MathieuG-P b5d0a9156b Merge pull request #69 from Zagrios/hotfix/missing-translation-filter-panel
hotfix/missing-translation-filter
2023-01-04 21:52:43 +01:00
MathieuG-P 46e79baae6 close filter on apply 2023-01-04 21:47:43 +01:00
MathieuG-P 55e51461a7 add missing translation 2023-01-04 21:24:57 +01:00
MathieuG-P c086b805a9 change version 2023-01-04 20:51:01 +01:00
MathieuG-P ffaef60f9a Merge pull request #68 from Zagrios/hotfix/change-work-in-progress-text
hotfix/change-work-in-progress-text
2023-01-04 20:47:01 +01:00
MathieuG-P 556a217e41 work in progress to coming soon 2023-01-04 20:46:04 +01:00
MathieuG-P a91ccd49db Merge pull request #67 from Zagrios/feature/remember-choice-delete-map-modal/66
feature/remember-choice-delete-map-modal/66
2023-01-04 20:42:27 +01:00
MathieuG-P e42fffbee7 add remember choice option on delete single map 2023-01-04 20:40:41 +01:00
Gaëtan 1209d8e32a raneme tools 2023-01-04 05:17:06 +01:00
Gaëtan b89da81989 Update img and gif 2023-01-04 05:15:38 +01:00
MathieuG-P 171f17a7e0 Merge pull request #65 from Zagrios/bugfix/notification-not-disappear/56
bugfix/notification-not-disappear/56
2023-01-03 23:24:08 +01:00
MathieuG-P 149b5195ca change notification animation 2023-01-03 23:20:31 +01:00
MathieuG-P b10eb982cd Merge pull request #64 from Zagrios/bugfix/notifications-behind-maps-modal/61
bugfix/notifications-behind-maps-modal/61
2023-01-03 22:34:30 +01:00
MathieuG-P f44c4e66a0 change z indexes 2023-01-03 22:33:19 +01:00
MathieuG-P c99bdbb8d0 Merge pull request #63 from Zagrios/bugfix/map-above-filter-panel/60
bugfix/map-above-filter-panel/60
2023-01-03 22:18:20 +01:00
MathieuG-P ccc8c5c7c1 fix z index bug 2023-01-03 22:17:38 +01:00
MathieuG-P 8dbb39a001 Merge pull request #62 from Zagrios/bugfix/filter-too-complex-to-apply/59
bugfix/filter too complex to apply/59
2023-01-03 22:04:49 +01:00
MathieuG-P 80a6a2049e add optionnal apply button 2023-01-03 22:03:27 +01:00
MathieuG-P 9b62c27afa not used here but will be usefull 2023-01-03 22:02:55 +01:00
MathieuG-P 20ffd88a3a change version 2023-01-01 13:07:03 +01:00
MathieuG-P 0f0c114710 Merge pull request #55 from Zagrios/feature/Moving-config-file/27
Feature/moving config file/27
2023-01-01 10:06:30 +01:00
MathieuG-P b922c47fc2 config rework 2022-12-31 22:52:45 +01:00
MathieuG-P f0110dcbb8 remove config changes AND fix bug on clone version with linked maps 2022-12-31 22:51:55 +01:00
MathieuG-P ff0d5f535b Merge branch 'master' into feature/Moving-config-file/27 2022-12-31 20:40:41 +01:00
MathieuG-P 0f5ca9647d Merge pull request #54 from Zagrios/feature/dotnet-alert/53
[Feature] Alert if dotnet is not installed
2022-12-30 23:39:43 +01:00
MathieuG-P 1e26c366f8 too much warnings when connection is unstable 2022-12-30 23:36:02 +01:00
MathieuG-P 74aa8defae little tweak 2022-12-30 23:01:52 +01:00
MathieuG-P d013641e53 alert if dotnet not present 2022-12-30 23:01:32 +01:00
Gaëtan Gerard b0a5cbc74e Merge pull request #52 from Zagrios/master
merge master
2022-12-30 05:42:16 +01:00
Gaëtan a6d8bedde2 Improved consistency of text 2022-12-30 05:41:09 +01:00
Gaëtan e9824e86f4 fix one click 2022-12-30 05:39:05 +01:00
Gaëtan 220837d2fb remove <sumary> 2022-12-30 05:38:29 +01:00
Gaëtan 1bfdcb732a set icon to 250x250 2022-12-30 05:37:34 +01:00
Gaëtan 9865f91b6d fix link table of contents 2022-12-30 05:35:20 +01:00
Gaëtan 838b1b3b93 fix separator 2022-12-30 05:33:43 +01:00
Gaëtan 0f7a30992d Adding "how to install?" 2022-12-30 05:31:16 +01:00
Gaëtan 1c2c997b6b adding "Having problems?" 2022-12-30 05:28:59 +01:00
Gaëtan bbbaeb86d0 Update link + fix text 2022-12-30 05:17:52 +01:00
MathieuG-P 9ca9207e02 Merge pull request #51 from Zagrios/hotfix/remove-uwu-stuff
hotfix/remove useless uwu stuff
2022-12-29 23:53:49 +01:00
MathieuG-P 0ae11ddc8c remove useless uwu stuff 2022-12-29 23:52:59 +01:00
MathieuG-P a13c7313d6 Merge branch 'master' of https://github.com/Zagrios/bs-manager 2022-12-29 23:38:40 +01:00
MathieuG-P 804c2d7c19 add cert sha 2022-12-29 23:38:35 +01:00
MathieuG-P 1a58243141 Merge pull request #50 from Zagrios/feature/mods-disclaimer/44
feature/add-mods-disclaimer/44
2022-12-29 16:53:55 +01:00
MathieuG-P 574b1fe414 add mods disclaimer 2022-12-29 16:53:15 +01:00
MathieuG-P d127f3b6e7 Merge pull request #49 from Zagrios/hotfix/link-maps-by-default
hotfix/link-maps-by-default
2022-12-29 15:13:09 +01:00
MathieuG-P 2b14f52db9 just try to link maps after download a BS version 2022-12-29 15:10:48 +01:00
MathieuG-P 4143912ef2 Merge pull request #48 from Zagrios/feature/notification-enable-oneclick/47
feature/add-notification-to-enable-oneclick-if-not/47
2022-12-29 13:32:50 +01:00
MathieuG-P 45cbecb21e add notification to enable OneClicks if not 2022-12-29 12:22:35 +01:00
MathieuG-P a8189f28b5 Merge pull request #46 from Zagrios/feature/add-discord-button/43
feature/add-dicord-button/43
2022-12-29 11:10:38 +01:00
MathieuG-P d626ed67f9 add discord button in settings 2022-12-29 11:07:10 +01:00
Gaëtan Gerard 34921b166e Merge branch 'master' into Readme-Update 2022-12-29 06:05:15 +01:00
Gaëtan f9b10a1174 Update Discord Link 2022-12-29 06:03:05 +01:00
Gaëtan 6b20fa8f7b fix "roadmap" 2022-12-29 06:00:07 +01:00
Gaëtan bc5fb017cf change "Contributing" emplacement 2022-12-29 05:59:35 +01:00
Gaëtan Gerard ce82f53568 fix "Main Developer" and "Support Developer" 2022-12-29 05:56:31 +01:00
Gaëtan 4f5ef38d1b remove contact 2022-12-29 05:54:03 +01:00
Gaëtan 26e2ed5bbf remove License and acknowledgments 2022-12-29 05:52:45 +01:00
Gaëtan a5d42f3687 Add Contributing 2022-12-29 05:50:06 +01:00
Gaëtan 811e49327a Add Roadmap (wait img) 2022-12-29 05:49:32 +01:00
Gaëtan a8bb34c2d8 Adding all desct usage 2022-12-29 05:48:55 +01:00
Gaëtan 13b426eca6 test multilangue 2022-12-29 05:07:21 +01:00
MathieuG-P b1347b063d Merge pull request #42 from Zagrios/feature/improve-custom-version-design/9
feature/improve-custom-version-nav-bar-ui/9
2022-12-28 23:37:38 +01:00
MathieuG-P caaacf868a improve text sizing AND better tooltip 2022-12-28 23:32:33 +01:00
MathieuG-P 99cf6b8945 Merge pull request #41 from Zagrios/hotfix/light-theme-maps-management
hotfix/light theme maps management
2022-12-28 22:31:19 +01:00
MathieuG-P 2aa9d8afb5 implement light theme for maps-management 2022-12-28 22:30:28 +01:00
MathieuG-P 37dce9769e fix translation 2022-12-28 22:30:11 +01:00
MathieuG-P cdd6d77fc4 deep link enabler light theme 2022-12-28 21:48:27 +01:00
MathieuG-P 0ce21036a7 Merge pull request #40 from Zagrios/feature/swipe-notification-to-close/29
feature/swipe-notification-to-close/29
2022-12-28 21:43:50 +01:00
MathieuG-P f7fd662fef handle swipe to right to close notification 2022-12-28 21:40:55 +01:00
MathieuG-P 46687e5068 Merge pull request #39 from Zagrios/feature/add-splitter-under-versions-list/32
feature/add-splitter-under-versions-list/32
2022-12-28 20:52:42 +01:00
MathieuG-P 9c5cf5160a add spliter under versions and little css styles change 2022-12-28 20:51:12 +01:00
MathieuG-P d391e13f66 Merge pull request #38 from Zagrios/hotfix/install-version-process-was-not-killed
hotfix/fix get main window from windows service
2022-12-28 20:42:49 +01:00
MathieuG-P df166f3dd0 fix get main window from windows service 2022-12-28 20:39:11 +01:00
MathieuG-P 0cc5f8cbb1 Merge pull request #37 from Zagrios/feature/lunch-steam-from-bsm/20
feature/launch-steam-from-bsm/20
2022-12-28 20:31:51 +01:00
MathieuG-P 06622c4088 add button to lunch steam when steam is not running 2022-12-28 20:30:10 +01:00
MathieuG-P a8ca0b26b3 Merge pull request #36 from Zagrios/bugfix/outdated-mod-not-detected-as-outdated/28
bugfix/outdated mod not detected as outdate/28
2022-12-28 19:10:07 +01:00
MathieuG-P c15696a5b8 mod version properly comparated now 2022-12-28 19:05:27 +01:00
MathieuG-P 249caa1a82 Merge pull request #35 from Zagrios/feature/maps-management
feature/maps management
2022-12-28 18:46:37 +01:00
MathieuG-P fab45876bf nothing 2022-12-28 15:35:31 +01:00
MathieuG-P fdb381ca6c Merge branch 'master' into feature/maps-management 2022-12-28 15:34:23 +01:00
MathieuG-P 392d2656a3 fix on play map was selected 2022-12-28 15:06:32 +01:00
MathieuG-P 9ba8af438d fix styles 2022-12-28 14:54:34 +01:00
MathieuG-P 65b2a5c385 download maps button when no maps 2022-12-28 01:38:58 +01:00
MathieuG-P 61a3685d6c sanitize models filename 2022-12-27 00:50:15 +01:00
MathieuG-P a1aeab1d90 remove console logs and useless stuff 2022-12-27 00:11:29 +01:00
MathieuG-P 4cb9482e27 fix fake items in dropdown 2022-12-26 21:50:41 +01:00
MathieuG-P 5d62c6c0e9 download on double click PLUS little fixes 2022-12-26 21:23:10 +01:00
MathieuG-P 6bfe735b60 remove translate todos 2022-12-26 21:04:28 +01:00
MathieuG-P 7d919e9dcf remove force deeplink 2022-12-26 21:03:05 +01:00
MathieuG-P 4293fd9d1b missing return 2022-12-26 21:02:21 +01:00
MathieuG-P af69c821a7 add oneClick system notifications translations 2022-12-26 20:48:36 +01:00
MathieuG-P 36eca807ad add deep link notifications translations 2022-12-26 14:44:04 +01:00
MathieuG-P b217fcf9c0 better handle deep link error 2022-12-26 14:17:27 +01:00
MathieuG-P ef202e33ec add notification and system notification 2022-12-26 00:09:52 +01:00
MathieuG-P 89ac6077be update framer-motion 2022-12-25 22:43:41 +01:00
MathieuG-P 80412e536e no need types for uuid 2022-12-25 22:38:27 +01:00
MathieuG-P c8e4812967 use crypto api for uuid 2022-12-25 22:33:32 +01:00
MathieuG-P b9850effca fix duplicated key 2022-12-25 22:29:58 +01:00
MathieuG-P e9286822ab fix bad indentation 2022-12-25 22:25:06 +01:00
MathieuG-P 9d7cd708c7 deep-links models fully work AND add translations 2022-12-25 22:18:28 +01:00
MathieuG-P c674fce0c0 advancement on onclick install model AND fix circual dependency 2022-12-25 01:04:36 +01:00
MathieuG-P 2aed523480 advancement on oneClick model AND lazy loading react windows 2022-12-24 18:19:59 +01:00
MathieuG-P 7f5a297b87 fix link 2022-12-24 12:59:14 +01:00
MathieuG-P 6c5190eacb initiate model-saber support 2022-12-24 01:18:02 +01:00
MathieuG-P 6f6da723e7 fix delete maps not delete when version is not linked 2022-12-23 22:03:12 +01:00
MathieuG-P b9fda11d34 clean unsubscribe 2022-12-23 21:54:54 +01:00
MathieuG-P 2931b58276 clean 2022-12-23 21:53:07 +01:00
MathieuG-P 68fd4111ad window not closing at the end 2022-12-23 21:52:54 +01:00
MathieuG-P 698eab012f we can now enable deep links for playlists 2022-12-23 21:52:34 +01:00
MathieuG-P e18caca70f one click install playlist working 2022-12-23 00:29:15 +01:00
MathieuG-P d556350eef advencement on oneclick playlists 2022-12-22 00:57:06 +01:00
MathieuG-P 16aa65afed create one click install playlist window 2022-12-20 17:38:45 +01:00
MathieuG-P 7e10d28d28 advence on oneclic playlist 2022-12-20 15:57:26 +01:00
MathieuG-P 58faea04a3 start playlists management 2022-12-20 03:00:51 +01:00
MathieuG-P ee95df202d move maps service 2022-12-20 00:20:37 +01:00
MathieuG-P bd2038cc79 fix warning 2022-12-19 23:58:29 +01:00
MathieuG-P 31183473ab add todo 2022-12-19 23:57:58 +01:00
MathieuG-P 605a383963 fix object desctory when oneClick window close 2022-12-19 03:38:06 +01:00
MathieuG-P 802d0533c8 disable force deep-link 2022-12-19 02:46:23 +01:00
MathieuG-P a886ccb981 tweak log 2022-12-19 02:44:47 +01:00
MathieuG-P b8abe30e39 fix white border AND little tweak 2022-12-19 02:41:12 +01:00
MathieuG-P b8e2bb73f5 increase speed fake progress bar 2022-12-19 02:40:11 +01:00
MathieuG-P 714837286f handle deepLink from score saber AND try fix white border 2022-12-19 01:55:20 +01:00
MathieuG-P a786be653c remove console log 2022-12-19 01:54:50 +01:00
MathieuG-P bdfb7a156f oneclick install map from bsv now work 2022-12-18 03:41:53 +01:00
MathieuG-P c626b850c9 handle enable and disable map deep links 2022-12-17 01:24:37 +01:00
Gaëtan 5a5d31f9ac corretif timestamp 2022-12-13 22:25:23 +01:00
Gaëtan 16db775379 github is broken 2022-12-13 22:24:32 +01:00
Gaëtan b2f76d7aaa change and separe data config.json 2022-12-13 22:21:35 +01:00
Gaëtan Gerard 383f065d1b corretif 1.27 2022-12-13 22:19:18 +01:00
Gaëtan Gerard 3216eddde6 add 1.27 2022-12-13 22:18:30 +01:00
Gaëtan 77ab238863 Config congiguration.service.ts 2022-12-13 11:05:12 +01:00
MathieuG-P ca5c86dbf1 create sevice to manage deep links 2022-12-12 23:35:57 +01:00
Gaëtan 9fbf81f8f2 init change 2022-12-12 22:14:06 +01:00
MathieuG-P 0372f7a1d5 remove console log 2022-12-12 22:01:00 +01:00
MathieuG-P 79ecaf3d15 remove dead code 2022-12-12 21:55:26 +01:00
MathieuG-P 31d8925615 move beat-saver service in main 2022-12-12 21:53:43 +01:00
MathieuG-P 9050d84b03 add site icons for OneClick installs 2022-12-12 21:53:03 +01:00
MathieuG-P 4d0cc4a6fe start of oneclick installs 2022-12-12 02:43:23 +01:00
MathieuG-P 91f7179d5e fix github button style 2022-12-12 00:28:35 +01:00
MathieuG-P d22fb0dcf4 fix translation 2022-12-12 00:03:01 +01:00
MathieuG-P 3f0b6c2db7 add little cross on all modals 2022-12-11 23:37:59 +01:00
MathieuG-P 66f113ae45 add proper filter icon 2022-12-11 23:37:41 +01:00
MathieuG-P efe03f41b9 fix translation 2022-12-11 23:37:05 +01:00
MathieuG-P 055d8b2bcc add all translations 2022-12-11 23:11:23 +01:00
MathieuG-P 6b724d8040 uninstall react tooltip 2022-12-11 23:11:05 +01:00
MathieuG-P b983467cfc change add and link button styles 2022-12-11 13:48:45 +01:00
MathieuG-P d378312dbd add some french translations 2022-12-11 02:20:25 +01:00
MathieuG-P 55e7145ba2 lazy load map images 2022-12-10 17:19:46 +01:00
MathieuG-P 77f6db9b6c change add map button style 2022-12-10 17:19:32 +01:00
MathieuG-P 47474f5c11 add comms 2022-12-10 15:50:10 +01:00
MathieuG-P 3db5cb70b7 optimise map filter check 2022-12-10 15:49:26 +01:00
MathieuG-P 87c37b18d3 fix observable never complete if error 2022-12-10 15:39:26 +01:00
MathieuG-P 160efbfafd no add maps button when offline 2022-12-10 15:38:54 +01:00
MathieuG-P 3be2100160 playlist tab wip 2022-12-10 15:29:33 +01:00
MathieuG-P c4d942eb2e search on sort change AND add search text 2022-12-10 01:29:46 +01:00
MathieuG-P 1ca62ba2f5 handle translation AND onChange reture string 2022-12-10 01:29:23 +01:00
MathieuG-P c5f871d810 remove useless import 2022-12-10 01:28:49 +01:00
MathieuG-P e0d70bd882 change import export MapsPage 2022-12-10 00:15:09 +01:00
MathieuG-P 7423df43c5 fix error for shared maps 2022-12-09 23:56:43 +01:00
MathieuG-P 8cb78e8550 fix styles 2022-12-09 23:56:34 +01:00
MathieuG-P 4308ba5125 fix text style 2022-12-09 23:46:20 +01:00
MathieuG-P 02753999f1 fix add map and link buttons AND fix tag filters set undefined 2022-12-09 23:29:09 +01:00
MathieuG-P 702486020f wrong map style and type 2022-12-09 23:25:05 +01:00
MathieuG-P 6b12b7bc74 fix wrong map style and type 2022-12-09 23:23:20 +01:00
MathieuG-P 5bf674d782 we can export all or specific maps 2022-12-08 00:09:59 +01:00
MathieuG-P 6df2c98955 we can now delete mutliple maps at the same time 2022-12-07 23:10:59 +01:00
MathieuG-P 77bc6236f8 create iframe view and fix preview map 2022-12-07 20:58:46 +01:00
MathieuG-P 57e0c73a31 fix rerendering AND fix downloader map folder name 2022-12-07 01:33:24 +01:00
MathieuG-P f038ae79fb maps and playlists panel are always in one block 2022-12-06 23:32:25 +01:00
MathieuG-P 63775a5e99 fix bug 2022-12-06 23:31:50 +01:00
MathieuG-P 8930009398 we can now download maps from bsaver 2022-12-06 00:52:37 +01:00
MathieuG-P 9dce72250e close on escape 2022-12-06 00:52:06 +01:00
MathieuG-P 0ea41da41c we can now see maps from bsaver 2022-12-05 03:19:05 +01:00
MathieuG-P 36c1eb20fc memoize map item 2022-12-05 03:18:33 +01:00
MathieuG-P 341e8aed99 create download maps modal 2022-12-04 01:08:18 +01:00
MathieuG-P abdc05298b prepare for maps downloading 2022-11-30 23:35:02 +01:00
MathieuG-P b7db145517 add cache for maps details 2022-11-30 00:48:55 +01:00
Gaëtan dceb09ec36 Update img 2022-11-28 23:11:43 +01:00
MathieuG-P 57ab0b9ff2 translate map actions modals 2022-11-28 22:40:45 +01:00
Gaëtan Gerard 398494c320 Merge pull request #25 from Zagrios/update-link-feature-and-report-bug
Updated link "report a bug" and "feature request"
2022-11-28 22:21:48 +01:00
Gaëtan Gerard 43e4a0866c Updated link "report a bug" and "feature request" 2022-11-28 22:19:02 +01:00
MathieuG-P 4e64ae93c2 add progress bar for link unlink and delete maps 2022-11-28 21:14:24 +01:00
MathieuG-P eec011d9f0 single maps deletion finished 2022-11-28 21:13:57 +01:00
Gaëtan Gerard 08b0a5c689 Merge pull request #21 from Zagrios/Issue-Templates-Update
Update issue templates
2022-11-28 11:19:56 +01:00
Gaëtan Gerard 21dee2ec57 Update issue templates 2022-11-28 10:48:52 +01:00
MathieuG-P c172b1ed81 add link unlink maps modals AND start maps deletion 2022-11-28 02:30:02 +01:00
MathieuG-P 69918d0f3f npm i 2022-11-27 23:49:53 +01:00
MathieuG-P d390050183 can now link and unlink version maps 2022-11-26 23:29:50 +01:00
MathieuG-P 31f38820d2 delete useless log 2022-11-24 01:18:18 +01:00
MathieuG-P 8372d3bed9 add linked unlinked maps indication 2022-11-24 01:18:08 +01:00
MathieuG-P 46f5f9486c map filter and search works 2022-11-22 00:21:22 +01:00
MathieuG-P 1e6351aaf9 fix label 2022-11-21 22:31:24 +01:00
MathieuG-P f9edf33097 progress on filter panel 2022-11-21 00:05:20 +01:00
MathieuG-P f815695298 add filters panel (partial) 2022-11-20 00:54:30 +01:00
MathieuG-P bbbbf50551 update tailwindcss 2022-11-19 15:31:17 +01:00
MathieuG-P 0c74e9683b npm i 2022-11-19 15:21:51 +01:00
MathieuG-P b1b4d13dfc Merge branch 'master' into feature/maps-management 2022-11-19 15:18:51 +01:00
MathieuG-P 5860ab8eb9 . 2022-11-19 15:12:17 +01:00
MathieuG-P a4af268720 add registry in npm config file 2022-11-19 15:12:02 +01:00
MathieuG-P 092b7fbd77 add 1.26.0 2022-11-18 17:09:56 +01:00
MathieuG-P 58c8c32a58 we are no longer blocked if error occur durring update downloading 2022-11-17 23:50:13 +01:00
MathieuG-P 69c4202899 Merge branch 'master' of https://github.com/Zagrios/bs-manager 2022-11-17 23:42:52 +01:00
MathieuG-P 43cc008011 add version number on log file 2022-11-17 23:42:41 +01:00
MathieuG-P 821e487c93 prototype of maps searchbar 2022-11-17 00:07:46 +01:00
MathieuG-P 42e9c2ed58 remove saturation 2022-11-16 23:32:12 +01:00
MathieuG-P 6ea7f45d40 remove saturation 2022-11-16 23:28:10 +01:00
MathieuG-P 5c2edcf558 no preview available when no mapId 2022-11-16 23:27:41 +01:00
MathieuG-P 3333924511 delete comment 2022-11-16 23:27:24 +01:00
Gaëtan d200444d75 Merge branch 'master' of https://github.com/Zagrios/bs-manager 2022-11-15 22:13:06 +01:00
MathieuG-P 82b33fbf95 maps navbar in panel 2022-11-15 22:11:48 +01:00
MathieuG-P c985fd09bd css fix 2022-11-14 23:04:52 +01:00
MathieuG-P c312b6ede8 only maps and not maps and playlists 2022-11-14 23:04:44 +01:00
MathieuG-P e76adf7a5f stop propagation on click 2022-11-14 23:04:27 +01:00
MathieuG-P 7dae0bf77f create empty maps toolbar 2022-11-14 23:04:14 +01:00
MathieuG-P ed9bc0c3a8 can select maps and fix blur issue on translate 2022-11-14 23:03:19 +01:00
Gaëtan 9d6638c35e add services 2022-11-14 15:27:41 +01:00
MathieuG-P 5ba670505b add info and optimize rendering 2022-11-14 00:24:43 +01:00
MathieuG-P ef000b7eda add maps and playlists list to versions 2022-11-14 00:23:07 +01:00
MathieuG-P cfda3830db fix css issue 2022-11-14 00:22:43 +01:00
MathieuG-P f0cf76a5fe VisibilitySensor was causing unwanted destroy 2022-11-14 00:18:46 +01:00
MathieuG-P ce7438825b Update feature_request.md 2022-11-13 19:43:37 +01:00
MathieuG-P 0d0ed47455 Update bug_report.md 2022-11-13 19:41:13 +01:00
MathieuG-P 8217a577a0 missing icons and add difficulties 2022-11-13 02:14:53 +01:00
MathieuG-P 4c36f2321a npm run audit fix 2022-11-12 14:48:03 +01:00
MathieuG-P 4223a17341 play song and add data to map item 2022-11-11 02:43:30 +01:00
MathieuG-P 6bb99ace5c add bsm icon png 2022-11-10 13:25:15 +01:00
MathieuG-P de86519282 add map data 2022-11-10 00:52:59 +01:00
MathieuG-P 3a30e5fbc9 right type 2022-11-10 00:52:47 +01:00
MathieuG-P 68ee96b8e3 change map item style 2022-11-09 22:55:15 +01:00
MathieuG-P cf78b2b21d add song author 2022-11-09 22:55:07 +01:00
MathieuG-P e89199fec3 Update README.md 2022-11-09 12:37:34 +01:00
MathieuG-P 0a5c158657 get maps details from bsaver api 2022-11-09 00:46:01 +01:00
MathieuG-P 46766ec0ff Merge pull request #18 from Zagrios/Update-Tailwind
Update tailwind setup
2022-11-08 22:49:45 +01:00
MathieuG-P 300fad0010 add type tailwind 2022-11-08 22:41:44 +01:00
MathieuG-P 84450419c1 scroll by mouse position 2022-11-08 22:39:00 +01:00
Gaëtan Gerard fd5c14a1bd Update Tailwind 2022-11-08 16:39:14 +01:00
MathieuG-P cd8dae5976 maps managment advancement 2022-11-07 17:09:19 +01:00
MathieuG-P 5e2dd10035 fully load local maps, and prepare bsaver map infos 2022-11-06 01:38:31 +01:00
MathieuG-P df4df8add1 for system file link protocol 2022-11-06 01:35:58 +01:00
MathieuG-P 4544ee5622 maps nav bar active when on maps page 2022-11-06 01:35:29 +01:00
MathieuG-P dd7bc3556d maps models 2022-11-06 01:33:29 +01:00
MathieuG-P 788b7598b0 add protocol to support system file link 2022-11-06 01:33:03 +01:00
MathieuG-P a4f4eb5558 off some rules 2022-11-06 01:32:35 +01:00
MathieuG-P 43cdcbf765 add maps and playlist slide 2022-11-01 23:04:39 +01:00
MathieuG-P 2a9d7f3a15 maps manager service prototype 2022-11-01 23:04:28 +01:00
MathieuG-P 5c5e6c7439 hover effect more generic 2022-11-01 23:04:13 +01:00
MathieuG-P 322faa6a92 create page of shared maps and playlists 2022-11-01 18:42:15 +01:00
MathieuG-P 701e91462d fix fill-rule 2022-10-31 23:19:29 +01:00
MathieuG-P 2b34d643a9 add missing translations 2022-10-31 23:17:38 +01:00
MathieuG-P 4a7949fd2a modal system lot impoved and simpler to use 2022-10-31 23:04:42 +01:00
MathieuG-P 47fce8a6dd Merge pull request #17 from Zagrios/feature/oculus-installation-detection
Feature/oculus installation detection
2022-10-31 20:46:02 +01:00
MathieuG-P 4d6d3cf4f8 remove useless imports 2022-10-31 20:28:44 +01:00
MathieuG-P 26236ba024 add transltations 2022-10-31 20:26:08 +01:00
MathieuG-P dcb932859b fix steam running check even if it's oculus version 2022-10-31 20:22:28 +01:00
MathieuG-P a9646209e1 oculus detection complete 2022-10-30 22:40:18 +01:00
MathieuG-P 6ce7bc94df update changelog 2022-10-28 14:54:26 +02:00
MathieuG-P 5b82f4c162 detection of oculus beat saber installation 2022-10-26 01:13:12 +02:00
MathieuG-P 5dc72a76ba fix auto update, versions wrongly comparated 2022-10-23 22:39:04 +02:00
MathieuG-P 58172606f3 add missing translations 2022-10-23 21:15:28 +02:00
MathieuG-P 6e07adb990 fix cannot read installed version when steam is not installed 2022-10-23 21:03:32 +02:00
MathieuG-P 4abf0e9ec4 add 1.25.1 2022-10-23 20:33:13 +02:00
MathieuG-P 269e6de18b fix return undefined 2022-10-20 00:53:15 +02:00
MathieuG-P fdf8351adf some html optimizations 2022-10-20 00:52:56 +02:00
MathieuG-P fbf2fff618 remove console logs 2022-10-19 22:50:46 +02:00
MathieuG-P 0dfdba702d use link opener service everywhere 2022-10-19 22:46:28 +02:00
MathieuG-P 4f41cd2cf3 Merge pull request #16 from Zagrios/feature/close-button-settings/5
feature/add-close-button-settings
2022-10-17 15:45:17 +02:00
MathieuG-P 6d2e3412d4 add close button in settings page 2022-10-17 15:43:36 +02:00
MathieuG-P fa200abb1d Merge pull request #15 from Zagrios/feature/add-contribution-actions/3
feature/add-contribution-actions
2022-10-17 01:14:39 +02:00
MathieuG-P 513aef87fc add contribution actions 2022-10-17 01:10:43 +02:00
MathieuG-P 9fbceb1fe4 use custom image component for slideshow 2022-10-15 18:46:48 +02:00
MathieuG-P 594a71ee36 fix buttons looses custom color 2022-10-15 18:33:58 +02:00
MathieuG-P 7242c233f6 Merge pull request #14 from Zagrios/bugfix/achieve-launch-bs-multiple-times/1
not launch when lunch state is set
2022-10-15 18:25:39 +02:00
MathieuG-P 47314ffbfa not launch when lunch state is set 2022-10-15 18:23:46 +02:00
MathieuG-P 7f37433819 Merge pull request #13 from Zagrios/bugfix/placeholder-not-visible-light-theme/6
Bugfix/placeholder not visible light theme/6
2022-10-15 13:21:31 +02:00
MathieuG-P 69ea65f758 little shorthand 2022-10-15 13:15:30 +02:00
MathieuG-P 11b89eab9f avoid text color override 2022-10-15 13:14:29 +02:00
MathieuG-P dd108d73e2 add text color for dark and light theme 2022-10-15 13:14:15 +02:00
MathieuG-P 3d73ace19d Merge pull request #12 from Zagrios/bugfix/nav-bar-version-item-download-bug-white-theme/7
color for dark and light theme
2022-10-15 11:30:07 +02:00
MathieuG-P f1c879f811 color for dark and light theme 2022-10-15 11:24:31 +02:00
MathieuG-P 47e1c58acf useless import 2022-10-12 21:05:44 +02:00
MathieuG-P 911ef41d60 html optimisation and add styles 2022-10-12 20:42:39 +02:00
MathieuG-P 93fc420974 Merge pull request #10 from Zagrios/Update-mods-required
Update Required mods interface
2022-10-12 12:23:45 +02:00
Gaëtan 6076483b38 Updated 2022-10-11 23:55:15 +02:00
MathieuG-P dc0d5661b6 add log for tests 2022-10-11 22:24:43 +02:00
MathieuG-P 55e94c9e5d double click to check uncheck mod 2022-10-11 22:20:32 +02:00
MathieuG-P d6b7480283 fix blurry text on hover mod item 2022-10-11 21:28:37 +02:00
MathieuG-P f7bd0f85f6 bsmanager version bumb 2022-10-10 21:19:53 +02:00
MathieuG-P bd40bf6519 version properly comparated 2022-10-10 21:19:35 +02:00
MathieuG-P c628d88957 add spaces 2022-10-09 21:08:13 +02:00
MathieuG-P 6d0a205f5a add 1.25.0 2022-10-09 21:05:17 +02:00
MathieuG-P 5c478979e9 Merge branch 'mods-management' 2022-10-09 21:01:00 +02:00
MathieuG-P 417e538df6 remove console logs 2022-10-09 20:52:58 +02:00
MathieuG-P 573da853d7 add logs 2022-10-09 17:43:24 +02:00
MathieuG-P 3c7731be19 delete useless file 2022-10-09 17:26:33 +02:00
MathieuG-P 51487406fe use better markups 2022-10-09 17:24:23 +02:00
MathieuG-P cf53ab43c8 add optional labels for progress-bar 2022-10-09 17:12:36 +02:00
MathieuG-P 7952615920 delete zip after extraction 2022-10-09 16:09:50 +02:00
MathieuG-P 8c2292eae7 Merge branch 'master' of https://github.com/Zagrios/bs-legacy-manager 2022-10-05 23:43:20 +02:00
MathieuG-P 2207eca28d add supporter 2022-10-05 23:43:13 +02:00
MathieuG-P 5e12baa35f add translations 2022-10-05 23:24:59 +02:00
Gaëtan Gerard 1b2136ffb9 Update README.md 2022-10-05 22:16:25 +02:00
Gaëtan Gerard 416cf41841 test 2022-10-05 21:59:57 +02:00
Gaëtan Gerard 3940a0a06c Update README.md 2022-10-05 21:44:47 +02:00
Gaëtan Gerard 6a987126c8 Add files via upload 2022-10-05 21:43:21 +02:00
Gaëtan Gerard 7b28255ffa Delete wip.gif 2022-10-05 21:43:03 +02:00
Gaëtan Gerard a4f68ebc8b correctif shield issue 2022-10-05 15:12:58 +02:00
Gaëtan Gerard b7adfacfd1 begin usage 2022-10-05 15:07:58 +02:00
Gaëtan Gerard df20e0dfb5 Add files via upload 2022-10-05 14:56:11 +02:00
Gaëtan Gerard ee03a90f02 Built With 2022-10-05 11:52:19 +02:00
Gaëtan Gerard 383d917e25 Built With 2022-10-05 11:51:11 +02:00
Gaëtan Gerard e15d4c45d4 About The Project 2022-10-05 10:53:53 +02:00
MathieuG-P 840ff225f8 manage install uninstall results and errors 2022-10-04 23:03:03 +02:00
Gaëtan Gerard 6077e51203 beginning of About The Project 2022-10-04 16:26:30 +02:00
Gaëtan Gerard 079dc32429 Update README.md 2022-10-04 16:09:04 +02:00
Gaëtan Gerard 01ef77832d Update README.md 2022-10-04 16:05:49 +02:00
Gaëtan Gerard d29e6d39f5 Update README.md 2022-10-04 12:56:12 +02:00
MathieuG-P 4e7865e312 add modal for uninstall all mods 2022-10-04 02:16:55 +02:00
MathieuG-P 4702f67767 remove useless console.log 2022-10-04 01:49:13 +02:00
MathieuG-P 9d2ec1166e install mods & uninstall mod & uninstall all mods & ligth theme & some modals 2022-10-03 00:56:20 +02:00
MathieuG-P 337697fafb execute bsipa if installing mod is bsipa 2022-10-02 02:54:20 +02:00
MathieuG-P a43e238905 we can now download and install mods from the back-end 2022-10-01 02:56:15 +02:00
Gaëtan Gerard d253d7aad0 Update issue templates
Add template for issue
2022-09-30 14:03:16 +02:00
MathieuG-P e75cd44872 remove useless classes 2022-09-29 00:28:00 +02:00
MathieuG-P e76912004a fix blurry text du from scale in checkbox 2022-09-29 00:27:52 +02:00
MathieuG-P af95b24005 fix glowing invisible 2022-09-28 23:14:58 +02:00
MathieuG-P 21d61ecaa7 Create LICENSE 2022-09-28 22:37:06 +02:00
MathieuG-P 98dccb1831 add mods loader and get installed mods finished 2022-09-28 00:39:44 +02:00
MathieuG-P e8cd849623 detect installed BSIPA ands mods (partialy) 2022-09-26 23:50:17 +02:00
MathieuG-P 45ceae3b07 delete state on destroy 2022-09-26 21:25:04 +02:00
MathieuG-P cd11f8a39f fix dependency checkment, add mod more infos 2022-09-25 22:51:21 +02:00
MathieuG-P e9c5c21698 fix rounded progress-bar 2022-09-25 15:19:24 +02:00
MathieuG-P 90de63c35f add checkbox 2022-09-24 22:33:46 +02:00
MathieuG-P fbb2eca661 partial ui for mods 2022-09-23 17:07:45 +02:00
MathieuG-P 7c2309c620 Merge branch 'master' into mods-management 2022-09-19 19:18:17 +02:00
MathieuG-P 3b854d94a6 Merge branch 'master' of https://github.com/Zagrios/bs-legacy-manager 2022-09-19 12:33:56 +02:00
MathieuG-P ad51f88358 css class for rounded scrollbar no more needed 2022-09-19 12:33:53 +02:00
MathieuG-P 347e84247d fix scrollbar invisible 2022-09-19 12:20:20 +02:00
MathieuG-P acb9990dfb update tailwind-scrollbar 2022-09-19 12:19:58 +02:00
MathieuG-P d5a0a295eb Delete codeql-analysis.yml 2022-09-19 11:51:54 +02:00
MathieuG-P c619d4a608 Create codeql-analysis.yml 2022-09-19 11:44:36 +02:00
MathieuG-P a16fcacd69 update dependencies 2022-09-19 11:40:38 +02:00
MathieuG-P 93e4d22623 create changelog 2022-09-19 11:05:49 +02:00
MathieuG-P 93dd11d5a2 update readme 2022-09-19 01:52:47 +02:00
MathieuG-P 0702c0db18 v0.1.0 2022-09-19 01:52:27 +02:00
MathieuG-P d491b24149 can now get mods from beat-mods api 2022-09-17 11:47:02 +02:00
254 changed files with 36278 additions and 4776 deletions
+1
View File
@@ -4,6 +4,7 @@
"global-require": "off",
"import/no-dynamic-require": "off",
"prettier/prettier": 0,
"no-await-in-loop": "off",
"import/prefer-default-export": "off",
"no-empty-function": "off",
"@typescript-eslint/no-empty-function": "off",
+28 -36
View File
@@ -10,6 +10,7 @@ import ReactRefreshWebpackPlugin from '@pmmmwh/react-refresh-webpack-plugin';
import baseConfig from './webpack.config.base';
import webpackPaths from './webpack.paths';
import checkNodeEnv from '../scripts/check-node-env';
import { AppWindow } from "../../src/shared/models/window-manager/app-window.model"
// When an ESLint server is running, we can't set the NODE_ENV so we'll check if it's
// at the dev webpack config is not accidentally run in a production environment
@@ -39,6 +40,22 @@ if (
execSync('npm run postinstall');
}
const getHtmlPageOptions = (page: AppWindow): HtmlWebpackPlugin.Options => {
return {
filename: path.join(page),
template: path.join(webpackPaths.srcRendererPath, page.replace(".html", ".ejs")),
minify: {
collapseWhitespace: true,
removeAttributeQuotes: true,
removeComments: true,
},
isBrowser: false,
env: process.env.NODE_ENV,
isDevelopment: process.env.NODE_ENV !== 'production',
nodeModules: webpackPaths.appNodeModulesPath,
}
}
const configuration: webpack.Configuration = {
devtool: 'inline-source-map',
@@ -76,14 +93,6 @@ const configuration: webpack.Configuration = {
},
},
'sass-loader',
{
loader: 'postcss-loader',
options: {
postcssOptions: {
plugins: [require('tailwindcss'), require('autoprefixer')],
},
},
},
],
include: /\.module\.s?(c|a)ss$/,
},
@@ -96,8 +105,12 @@ const configuration: webpack.Configuration = {
{
loader: 'postcss-loader',
options: {
postcssOptions: {
plugins: [require('tailwindcss'), require('autoprefixer')],
postcssOptions: {
plugins:
[
require('tailwindcss'),
require('autoprefixer'),
]
},
},
},
@@ -151,33 +164,12 @@ const configuration: webpack.Configuration = {
new ReactRefreshWebpackPlugin(),
new HtmlWebpackPlugin({
filename: path.join('index.html'),
template: path.join(webpackPaths.srcRendererPath, 'index.ejs'),
minify: {
collapseWhitespace: true,
removeAttributeQuotes: true,
removeComments: true,
},
isBrowser: false,
env: process.env.NODE_ENV,
isDevelopment: process.env.NODE_ENV !== 'production',
nodeModules: webpackPaths.appNodeModulesPath,
}),
new HtmlWebpackPlugin(getHtmlPageOptions("index.html")),
new HtmlWebpackPlugin(getHtmlPageOptions("launcher.html")),
new HtmlWebpackPlugin(getHtmlPageOptions("oneclick-download-map.html")),
new HtmlWebpackPlugin(getHtmlPageOptions("oneclick-download-playlist.html")),
new HtmlWebpackPlugin(getHtmlPageOptions("oneclick-download-model.html")),
new HtmlWebpackPlugin({
filename: path.join('launcher.html'),
template: path.join(webpackPaths.srcRendererPath, 'launcher.ejs'),
minify: {
collapseWhitespace: true,
removeAttributeQuotes: true,
removeComments: true,
},
isBrowser: false,
env: process.env.NODE_ENV,
isDevelopment: process.env.NODE_ENV !== 'production',
nodeModules: webpackPaths.appNodeModulesPath,
})
],
node: {
+29 -32
View File
@@ -14,6 +14,7 @@ import baseConfig from './webpack.config.base';
import webpackPaths from './webpack.paths';
import checkNodeEnv from '../scripts/check-node-env';
import deleteSourceMaps from '../scripts/delete-source-maps';
import { AppWindow } from "../../src/shared/models/window-manager/app-window.model"
checkNodeEnv('production');
deleteSourceMaps();
@@ -25,6 +26,23 @@ const devtoolsConfig =
}
: {};
const getHtmlPageOptions = (page: AppWindow): HtmlWebpackPlugin.Options => {
return {
filename: path.join(page),
template: path.join(webpackPaths.srcRendererPath, page.replace(".html", ".ejs")),
minify: {
collapseWhitespace: true,
removeAttributeQuotes: true,
removeComments: true,
},
isBrowser: false,
env: process.env.NODE_ENV,
isDevelopment: process.env.NODE_ENV !== 'production',
nodeModules: webpackPaths.appNodeModulesPath,
}
}
const configuration: webpack.Configuration = {
...devtoolsConfig,
@@ -58,14 +76,6 @@ const configuration: webpack.Configuration = {
},
},
'sass-loader',
{
loader: 'postcss-loader',
options: {
postcssOptions: {
plugins: [require('tailwindcss'), require('autoprefixer')],
},
},
},
],
include: /\.module\.s?(c|a)ss$/,
},
@@ -78,8 +88,12 @@ const configuration: webpack.Configuration = {
{
loader: 'postcss-loader',
options: {
postcssOptions: {
plugins: [require('tailwindcss'), require('autoprefixer')],
postcssOptions: {
plugins:
[
require('tailwindcss'),
require('autoprefixer'),
]
},
},
},
@@ -132,29 +146,12 @@ const configuration: webpack.Configuration = {
analyzerMode: process.env.ANALYZE === 'true' ? 'server' : 'disabled',
}),
new HtmlWebpackPlugin({
filename: 'index.html',
template: path.join(webpackPaths.srcRendererPath, 'index.ejs'),
minify: {
collapseWhitespace: true,
removeAttributeQuotes: true,
removeComments: true,
},
isBrowser: false,
isDevelopment: process.env.NODE_ENV !== 'production',
}),
new HtmlWebpackPlugin(getHtmlPageOptions("index.html")),
new HtmlWebpackPlugin(getHtmlPageOptions("launcher.html")),
new HtmlWebpackPlugin(getHtmlPageOptions("oneclick-download-map.html")),
new HtmlWebpackPlugin(getHtmlPageOptions("oneclick-download-playlist.html")),
new HtmlWebpackPlugin(getHtmlPageOptions("oneclick-download-model.html")),
new HtmlWebpackPlugin({
filename: 'launcher.html',
template: path.join(webpackPaths.srcRendererPath, 'launcher.ejs'),
minify: {
collapseWhitespace: true,
removeAttributeQuotes: true,
removeComments: true,
},
isBrowser: false,
isDevelopment: process.env.NODE_ENV !== 'production',
})
],
};
+6 -1
View File
@@ -10,6 +10,8 @@ module.exports = {
"global-require": 0,
"import/prefer-default-export": "off",
"no-empty-function": "off",
"no-await-in-loop": "off",
"no-continue": "off",
"@typescript-eslint/no-empty-function": "off",
'@typescript-eslint/lines-between-class-members': "off",
"class-methods-use-this": "off",
@@ -30,7 +32,10 @@ module.exports = {
"@typescript-eslint/no-throw-literal": "off",
"@typescript-eslint/no-unused-expressions": "off",
"no-param-reassign": "off",
"no-useless-escape": "off"
"no-useless-escape": "off",
"jsx-a11y/no-noninteractive-element-interactions": "off",
"no-async-promise-executor": "off",
"new-cap": "off"
},
parserOptions: {
ecmaVersion: 2020,
+1 -1
View File
@@ -1 +1 @@
patreon: bsmanager
@@ -0,0 +1,31 @@
---
name: "[BUG] Bug report"
about: Create a report to help us improve
title: "[BUG] : "
labels: bug
assignees: Zagrios
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.
@@ -0,0 +1,20 @@
---
name: "[FEAT.] Feature request"
about: Suggest an idea for this project
title: "[FEAT.] : "
labels: enhancement
assignees: Zagrios
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
+1
View File
@@ -0,0 +1 @@
registry=https://registry.npmjs.org/
+16
View File
@@ -0,0 +1,16 @@
## [0.2.0](https://github.com/Zagrios/bs-manager/releases/tag/v0.2.0) (October 23, 2022)
### Features
- Mods management fully implementd [5c47897](https://github.com/Zagrios/bs-manager/commit/5c478979e96b14dd54a3889e551c163ece701b4a)
- Add close button in settings page #5
- Add GitHub and contribution actions in settings page #3
### Fixes
- Lunch Beat Saber multiple times #1
- Placeholders and some texts not with light theme #6
- Wrong background color when version is downloading #7
- Add missing translations [5817260](https://github.com/Zagrios/bs-manager/commit/58172606f3f4731c90c9aa838fb89ac95458e032)
- Error when loading downloaded versions when Steam is not installed [6e07adb](https://github.com/Zagrios/bs-manager/commit/6e07adb990f78073dd68c2b9cf6209562bb4bf2b)
## [0.1.0](https://github.com/Zagrios/bs-manager/releases/tag/v0.1.0) (September 19, 2022)
- Initial public release
+132
View File
@@ -0,0 +1,132 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at contact@bsmanager.io.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series of
actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within the
community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].
[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
+32
View File
@@ -0,0 +1,32 @@
## Contributing
[code-of-conduct]: CODE_OF_CONDUCT.md
[fork]: https://github.com/Zagrios/bs-manager/fork
[pr]: https://github.com/Zagrios/bs-manager/compare
[style]: https://github.com/basarat/typescript-book/blob/master/docs/styleguide/styleguide.md
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
Please note that this project is released with a [Contributor Code of Conduct][code-of-conduct]. By participating in this project you agree to abide by its terms.
## Issues and PRs
If you have suggestions for how this project could be improved, or want to report a bug, open an issue! We'd love all and any contributions. If you have questions, too, we'd love to hear them.
We'd also love PRs. If you're thinking of a large PR, we advise opening up an issue first to talk about it, though! Look at the links below if you're not sure how to open a PR.
## Submitting a pull request
1. [Fork][fork] and clone the repository.
1. Configure and install the dependencies: `npm install`.
1. Create a new branch following naming convention: `git checkout -b (feature|bufix|hotfix)/(short-description)(/issue-id)`.
1. Make your change, test, and make sure BSManager work fine.
1. Push to your fork and [submit a pull request][pr].
1. Pat your self on the back and wait for your pull request to be reviewed and merged.
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
- Follow the [style guide][style] which is using standard.
- Keep your changes as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
Work in Progress pull requests are also welcome to get feedback early on, or if there is something blocked you.
+335 -17
View File
@@ -1,21 +1,339 @@
The MIT License (MIT)
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (c) 2015-present Electron React Boilerplate
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Preamble
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
+235 -68
View File
@@ -1,76 +1,243 @@
<p align="center">
<a href="https://github.com/RiskiVR/BSLegacyLauncher">
<img src="https://raw.githubusercontent.com/Zagrios/bs-manager/master/resources/readme/icon.svg" alt="logo" width="250px"/>
</a>
<h3 align="center">BSManager</h3>
<p align="center">Simple and fancy tools that alow you to download, launch and manage BeatSaber versions, Maps and Mods easily and quickly.</p>
</p>
<a name="readme-top"></a>
<p align="center">
<img src="https://github.com/Zagrios/bs-manager/blob/master/resources/readme/beat-running.png?raw=true" width="130"/>
</p>
<!-- PROJECT SHIELDS -->
<!--
*** I'm using markdown "reference style" links for readability.
*** Reference links are enclosed in brackets [ ] instead of parentheses ( ).
*** See the bottom of this document for the declaration of the reference variables
*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.
*** https://www.markdownguide.org/basic-syntax/#reference-style-links
-->
<details open="open">
<summary>
<h2>Table of Contents</h2>
</summary>
<ol>
<li>
<a href="#about-the-project">About The Project</a>
<ul><li><a href="#built-with">Built With</a></li></ul>
</li>
<li><a href="#how-to-use">How To Use</a></li>
<li><a href="#having-problems">Having problems?</a></li>
<li><a href="#acknowledgements">Acknowledgements</a></li>
</ol>
</details>
<h2 id="about-the-project">About The Project</h2>
<p>
Have you ever wanted to switch between multiple BeatSaber version? To have a specific version for you and your friends, or for personal use and Streaming use? Have you ever wanted to manage easily <b>Maps</b> and <b>Mods</b> between versions? All of that in one place? <b>Then this program is made for you!</b>
<br/><br/>
BSManager is designed to download any BeatSaber version from Steam's depots, and launch it within the same program!<br>
- You can install as many versions as you want, customize them to quickly differentiate them, clone them to separate the additional contents of the same version!<br>
- You can clone and launch your Steam version from the program!<br/><br/>
<b>In the near future</b><br/>
- You can Create a master Maps folder and link it across all versions!<br/>
- You can download Maps with "OneClick"!<br/>
- You can download Maps from BSManager!<br/>
- You can download and manage Mods for each versions!<br/>
- And even more!
</p>
<h3 id="built-with">Built With</h3>
<!-- TITLE -->
<div align="center">
<a href="https://github.com/Zagrios/bs-manager">
<img src="resources/readme/icon.svg" alt="Logo" width="250" height="250">
</a>
<br><br>
<h2><b>BSManager</b></h2>
<i>(Beat Saber Manager)</i>
<br><br>
<span>
Download, manage and customize your versions of Beat Saber with a simple click!
</span>
<br>
<span>
<a href="https://github.com/Zagrios/bs-manager/issues/new?assignees=Zagrios&labels=bug&template=-bug--bug-report.md&title=%5BBUG%5D+%3A+">Report Bug</a>
·
<a href="https://github.com/Zagrios/bs-manager/issues/new?assignees=Zagrios&labels=enhancement&template=-feat---feature-request.md&title=%5BFEAT.%5D+%3A+">Request Feature</a>
·
<a href="https://github.com/Zagrios/bs-manager/security/policy">Report a security vulnerability</a>
</span>
</div>
<!-- BADGES -->
---
<br>
<div align="center" >
<a href="https://github.com/Zagrios/bs-manager/stargazers"><img src ="https://img.shields.io/github/stars/Zagrios/bs-manager?style=for-the-badge" alt="Stargazers"/></a>
<a href="https://github.com/Zagrios/bs-manager/network/members"><img src ="https://img.shields.io/github/forks/Zagrios/bs-manager?style=for-the-badge" alt="Forks"/></a>
<a href="https://github.com/Zagrios/bs-manager/blob/master/LICENSE"><img src ="https://img.shields.io/github/license/Zagrios/bs-manager?style=for-the-badge" alt="License"/></a>
<a href="https://github.com/Zagrios/bs-manager/graphs/contributors"><img src ="https://img.shields.io/github/contributors/Zagrios/bs-manager?style=for-the-badge" alt="Contributors"/></a>
<a href="https://github.com/Zagrios/bs-manager/issues"><img alt="GitHub issues" src="https://img.shields.io/github/issues/Zagrios/bs-manager?style=for-the-badge"></a>
<br>
<a href="https://discord.gg/uSqbHVpKdV"><img src ="https://img.shields.io/badge/-DISCORD-5865f2?style=for-the-badge&logo=discord&logoColor=ffffff" alt="discord"/></a>
<!--<a href="https://mee6.xyz/fr/m/bsmanager"><img src ="https://img.shields.io/badge/-🥰%20Support%20BSM-EC4546?style=for-the-badge" alt="Donation"/></a>-->
<a href="https://twitter.com/BSManager_"><img src ="https://img.shields.io/badge/-Twitter-F5F8FA?style=for-the-badge&logo=Twitter" alt="Twitter"/></a>
<br>
[<a href="#readme-bot">Go to bottom</a>]
</div>
---
<!-- TABLE OF CONTENTS -->
<b>Table of Contents</b>
<ul>
<li>
<a href="https://github.com/electron-react-boilerplate/electron-react-boilerplate">Electron React Boilerplate</a>
</li>
<li>
<a href="https://github.com/SteamRE/DepotDownloader">DepotDownloader</a>
</li>
<li>
<a href="#about-the-project">About The Project</a>
<ul>
<li><a href="#built-with">Built With</a></li>
</ul>
</li>
<li><a href="#usage">Usage</a></li>
<ul>
<li><a href="#how-to-install">How to install?</a></li>
<li><a href="#manage-versions">Manage Versions</a></li>
<li><a href="#customize-your-versions">Customize your versions</a></li>
<li><a href="#install-mods">Install Mods</a></li>
<li><a href="#install-maps">Install Maps</a></li>
<li><a href="#one-click">One Click</a></li>
<li><a href="#having-problems">Having problems?</a></li>
</ul>
<li><a href="#credits">Credits</a></li>
<li><a href="#contributing">Contributing</a></li>
</ul>
<h2 id="how-to-use">How To Use</h2>
<ul>
<li>
Download the latest release from <a href="https://github.com/Zagrios/bs-manager/releases">Releases</a>.
</li>
<li>Execute the installer and BSManager will start itself.</li>
<li>Once its done if you want to download a version, select a version and download it!</li>
<li>From the version page you can choose launch options, launch the version, and more from the dropdown menu!</li>
</ul>
<!-- ABOUT THE PROJECT -->
<div align="center">
<h1> </h1>
<h1><b>About The Project</b></h1>
</div>
<div>
<a href="https://github.com/Zagrios/bs-manager">BSManager</a> was created to unify and improve the two most used Apps in the community (<a href="https://github.com/RiskiVR/BSLegacyLauncher">BS legacy launcher</a> and <a href="https://github.com/Assistant/ModAssistant">Mod Assistant</a>).
<br><br>
<h4><a href="https://github.com/Zagrios/bs-manager">BSManager</a> will allow you to:</h4>
<ul>
<li><b>Manage multiple BeatSaber versions</b>, designed for people who need to play on different versions or have multiple profiles for the same version.</li>
<li><b>Download your maps in the same way</b>, in addition to that, depending on your choice, maps are not version dependent. so you will be able to find your maps whatever version you are using without having to transfer them.</li>
<li><b>Install your mods in one click</b>, just like <a href="https://github.com/Assistant/ModAssistant">Mod Assistant</a>, <a href="https://github.com/Zagrios/bs-manager">BSManager</a> will allow you to install your mods quickly and securely depending on the version you choose.</li>
<li><b>Customize your interface</b>, we know that some of you like to customize your interfaces to the maximum. That's why <a href="https://github.com/Zagrios/bs-manager">BSManager</a> brings you peace of mind on this point, you can change the name of the versions, their color, and you can even change the color of the logo! Of course, a dark theme has been added to protect your eyes at night.</li>
</ul>
</div>
<br>
<div align="center">
<img src="resources/readme/preview.png" alt="preview">
</div>
<br>
<h2 id="having-problems">Having problems?</h2>
<p>
See the <a href="https://github.com/Zagrios/bs-manager/issues">open issues</a> for a list of known issues, from there you can create a new issue for the problem you have!
Otherwise you can add on to existing issues if one matches what you're encountering.
</p>
<h2 id="acknowledgements">Acknowledgement</h2>
<ul>
<li><a href="https://github.com/Zagrios">Zagrios</a> (Mathieu GRIES) - Founder, Lead Developer & Project Lead</li>
<li><a href="https://github.com/Iluhadesu">Iluhadesu</a> - Custom DepotDownloader Developer</li>
<li><a href="https://github.com/GaetanGrd">Gaëtan Gerard</a> - Main Alpha Tester</li>
</ul>
<p align="center">
<img src="https://github.com/Zagrios/bs-manager/blob/master/resources/readme/beat-conflict.png?raw=true" width="130"/>
</p>
<!--BUILT WITH-->
<div>
<h2><b>Built With</b></h2>
<ul>
<li>
<a href="https://electron-react-boilerplate.js.org/"><img src="https://img.shields.io/badge/-Electron%20React%20Boilerplate-black?style=for-the-badge&logo=Electron" alt="Electron React Boilerplate"></a>
</li>
<li>
<a href="https://github.com/SteamRE/DepotDownloader"><img src="https://img.shields.io/badge/-Depot%20Downloader-2a475e?style=for-the-badge&logo=steam" alt="Depot Downloader"></a>
</li>
<li>
<a href="https://rxjs.dev/"><img src="https://img.shields.io/badge/-RxJs-purple?style=for-the-badge&logo=ReactiveX" alt="RxJs"></a>
</li>
<li>
<a href="https://tailwindcss.com/"><img src="https://img.shields.io/badge/-Tailwind%20CSS-white?style=for-the-badge&logo=Tailwind%20CSS" alt="TailWind CSS"></a>
</li>
</ul>
</div>
<br>
<!--USAGE-->
<div align="center">
<h1> </h1>
<h1><b>Usage</b></h1>
</div>
<!--HOW TO INSTALL?-->
<div>
<h2><b>How to install?</b></h2>
<ul>
<li>Download the <a href="https://github.com/Zagrios/bs-manager/releases/latest">latest release</a> from <a href="https://github.com/Zagrios/bs-manager/releases">Releases</a>.</li>
<li>Execute the installer and <a href="../..">BSManager</a> will start itself.</li>
<li>Once its done if you want to download a version, select a version and download it! </li>
<li>From the version page you can choose options, launch the version, and more!</li>
</div>
<br>
<!--MANAGE VERSIONS-->
<div>
<h2><b>Manage Versions</b></h2>
<span>
<a href="https://github.com/Zagrios/bs-manager">BSManager</a> allows you to manage your versions of Beat Saber. It gives you the ability to download any version of Beat Saber as long as you have a Steam account that already owns the game. Using <a href="https://github.com/Zagrios/bs-manager">BSManager</a>, you can easily manage and update your collection of Beat Saber versions.
</span>
</div>
<br>
<div align="center">
https://user-images.githubusercontent.com/40648115/213008824-25cfdda3-6350-42dc-aa53-2132b4b8e838.mov
</div>
<!--CUSTOM UR VERSIONS-->
<div>
<h2><b>Customize your versions</b></h2>
<span>
<a href="https://github.com/Zagrios/bs-manager">BSManager</a> will allow you to completely customize each of your downloaded versions, you can change the color of the icon, choose a name for the version and finally install your mods,maps and other contents according to the Beat Saber version!
</span>
</div>
<br>
<div align="center">
https://user-images.githubusercontent.com/40648115/213296794-74a1e20b-12dc-44ec-a67f-e25d7010bd3d.mov
</div>
<!--INSTALL MODS-->
<div>
<h2><b>Install Mods</b></h2>
<span>
<a href="https://github.com/Zagrios/bs-manager">BSManager</a> allows you to manage Beat Saber mods in a quick and easy way. It uses the <a href="https://beatmods.com/#/">BeatMod API</a> to allow you to install, update or uninstall mods for each version of your collection. So the app can help you manage them efficiently.
</span>
</div>
<br>
<div align="center">
https://user-images.githubusercontent.com/40648115/213296816-bdaafc90-da76-4835-8d83-9ac6a4e1c549.mov
</div>
<!--INSTALL MAPS-->
<div>
<h2><b>Install Maps</b></h2>
<span>
In addition to managing mods, <a href="https://github.com/Zagrios/bs-manager">BSManager</a> allows you to manage and organize custom beatmaps existing on <a href="https://beatsaver.com">Beat Saver</a>, a popular site for sharing custom beatmaps for beat Saber. Moreover the app allow you to share your maps across all your versions.
</span>
</div>
<br>
<div align="center">
https://user-images.githubusercontent.com/40648115/213296838-f775fe83-866d-4764-a7d0-648dbb8ec983.mov
</div>
<!--ONE CLICK-->
<div>
<h2><b>One Click</b></h2>
<span>
The "One-Click" feature of <a href="https://github.com/Zagrios/bs-manager">BSManager</a> is an incredibly convenient feature for Beat Saber users. It allows easy and quick installation of models, maps and playlists for all versions of Beat Saber you own.
</span>
</div>
<br>
<div align="center">
https://user-images.githubusercontent.com/40648115/213435051-7feb815d-f32b-4135-b095-ef49726a836c.mov
</div>
<!--HAVING PROBLEMS?-->
<div>
<h2><b>Having problems?</b></h2>
<span>
See the <a href="https://github.com/Zagrios/bs-manager/issues">open issues</a> to show the list of known issues, from there you can create a new issue for your problem!
</span>
</div>
<br><br><br>
<!-- Credits -->
<div>
<h1><b>Credits</b></h1>
<ul>
<li><a href="https://github.com/Zagrios">Zagrios</a> - Founder & Lead Developer</li>
<li><a href="https://github.com/Iluhadesu">Iluhadesu</a> - Project Team & Developpement help</li>
<li><a href="https://github.com/GaetanGrd">GaetanGrd</a> - Project Team & Developpement help</li>
<li><a href="https://github.com/cheddZy">cheddZy</a> - Icon creator</li>
</ul>
</div>
<!-- Contributing -->
<br>
<!--CONTRIBUTING-->
<div>
<h1><b>Contributing</b></h1>
<p>
If you'd like to contribute, check out the <a href="https://github.com/Zagrios/bs-manager/blob/master/CONTRIBUTING.md">contributing guide</a>
</p>
<p>Thank you to all the people who already contributed to BSManager!</p>
<div>
<a href="https://github.com/Zagrios/bs-manager/graphs/contributors">
<img src="https://contrib.rocks/image?repo=Zagrios/bs-manager" />
</a>
</div>
</div>
<br>
<div align="right">
[<a href="#readme-top">Return to top</a>]
</div>
<h1> </h1>
<a name="readme-bot"></a>
+9
View File
@@ -0,0 +1,9 @@
# Reporting Security Issues
If you discover a security issue in BSManager, please report it by sending an
email to [contact@bsmanager.io](mailto:contact@bsmanager.io).
This will allow us to assess the risk, and make a fix available before we add a
bug report to the GitHub repository.
Thanks for helping make BSManager safe for everyone.
Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

@@ -0,0 +1,14 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" version="1.1" viewBox="0 0 717.2 717.2" xml:space="preserve">
<style type="text/css">
.st0{fill:url(#SVGID_1_);}
</style>
<linearGradient id="SVGID_1_" x1="61.604" x2="647.04" y1="373.65" y2="373.06" gradientTransform="matrix(1 .0010142 -.0010142 1 4.6349 -15.227)" gradientUnits="userSpaceOnUse">
<stop style="stop-color:#DC2DE2" offset=".010541"/>
<stop style="stop-color:#972DE2" offset=".3269"/>
<stop style="stop-color:#8F28E2" offset=".4648"/>
<stop style="stop-color:#7A1BE1" offset=".6756"/>
<stop style="stop-color:#5706E0" offset=".9318"/>
<stop style="stop-color:#4D00E0" offset="1"/>
</linearGradient>
<path class="st0" d="m565.85 141.83c-19.8 11.3-37 22.3-55.2 31.1-14.1 6.8-28.8 4.5-42.4-3.6-29.4-17.4-58.9-34.5-88.2-52-12.9-7.7-25.7-9.5-39-1.9-50.3 28.9-100.6 58-150.8 87.1-8.8 5.1-9.2 10 0 15.3 52 30.2 103.9 60.4 155.7 91 10.9 6.4 20.4 4.2 30.2-1.5 68.7-39.9 137.4-79.8 206.1-119.7 5.3-3.1 10.5-6.2 16-9 19.3-9.8 25.3-10.1 36.2 8.3 8.5 14.2 15.2 31.8 15.7 48.1 1.8 64.6 1.1 129.3 1 193.9 0 22.4-0.1 44.8-1.5 67.1-1 20.4-12.2 38.9-29.8 49.2-55.9 33.5-112.6 65.7-169 98.3-2.8 0.9-5.8 1.6-8.7 2 1-24.6 0.4-47.9 4.3-70.5 1.6-9.2 12-18.8 20.8-24.3 31.5-19.8 63.8-38.3 96.3-56.3 11.3-6.3 15-13.9 14.9-26.8-0.7-58-0.2-116-0.2-174 0-12.7-5.1-16.3-16.2-10-52.1 29.9-104.2 59.9-155.7 90.9-5.5 3.3-9.9 13.4-9.9 20.3-0.6 65.7 0.2 131.4 0.4 197.2 0.1 22.9-0.1 45.8-0.4 68.7-0.1 11.5-4.9 19.4-17 21.9-20.7 4.3-40.3 3-59-8-67.7-39.5-134.6-79.5-202.9-117.2-35.7-19.7-52.4-47.2-51.7-87.8 0.9-58 0.4-116.1 0.5-174.2-0.2-1.9 0.5-3.8 1.4-10.2 25.3 21 61.8 24.5 70.5 60.3 3.8 15.4 1.4 32.4 1.6 48.7 0.3 26 0 52 1.3 77.9 0.3 6.1 4 14.8 8.8 17.7 52.9 31.5 106.6 62.1 159.9 92.9 3.5 1.3 7.1 2.3 10.8 2.9 0.6-17.9 1.4-34.4 1.5-50.9 0.1-47.4 0.4-94.7-0.7-142.1-1-7.8-5.3-14.8-11.8-19.1-61.5-36.7-123.7-72.6-185.8-108.7-16.2-9.5-33-18.3-48.5-28.9-5-4.2-7.6-10.5-7.2-17 3.7-21.4 16.8-40 35.6-50.8 71.6-41.3 143-82.6 214.4-123.9 27.1-15.7 54.2-16 81.3-0.4 52.5 30.4 104.9 60.9 157.3 91.4 2.1 1.2 4.1 2.9 9.1 6.6z" style="fill:url(#SVGID_1_)"/>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

+40
View File
@@ -477,5 +477,45 @@
"ReleaseImg": "https://cdn.akamai.steamstatic.com/steamcommunity/public/images/clans//32055887/82c29d674bc57596102a6b815f66e956f217e658.png",
"ReleaseDate": "1661864214",
"year": "2022"
},
{
"BSVersion": "1.25.0",
"BSManifest": "4529582051007915041",
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/3312985013538143172",
"ReleaseImg": "https://cdn.akamai.steamstatic.com/steamcommunity/public/images/clans//32055887/54ac649877eca25a2a6449662337e2c63c51bbcf.png",
"ReleaseDate": "1665068529",
"year": "2022"
},
{
"BSVersion": "1.25.1",
"BSManifest": "7372469314660649150",
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/5346361068670142187",
"ReleaseImg": "https://cdn.cloudflare.steamstatic.com/steamcommunity/public/images/clans//32055887/52cbd15b5e226f509e051565f6e4935eb0e44e2c.png",
"ReleaseDate": "1665673269",
"year": "2022"
},
{
"BSVersion": "1.26.0",
"BSManifest": "3634450655207470002",
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/3414318646334948892",
"ReleaseImg": "https://cdn.akamai.steamstatic.com/steamcommunity/public/images/clans//32055887/d18ad9d7f45a5cc2a467d75f0bdf9d32b9141b14.png",
"ReleaseDate": "1667923560",
"year": "2022"
},
{
"BSVersion": "1.27.0",
"BSManifest": "3485516174915301618",
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/3629368753553708497",
"ReleaseImg": "https://cdn.akamai.steamstatic.com/steamcommunity/public/images/clans//32055887/d9ed8771498be7fc83721aaaaa5b15a08fbeadb1.png",
"ReleaseDate": "1670943003",
"year": "2022"
},
{
"BSVersion": "1.28.0",
"BSManifest": "7463243155526905423",
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/3666530358620442392",
"ReleaseImg": "https://cdn.akamai.steamstatic.com/steamcommunity/public/images/clans//32055887/8f978bbf292810004bca12523e76be8a7eec8c4e.png",
"ReleaseDate": "1677593822",
"year": "2023"
}
]
+3 -1
View File
@@ -1 +1,3 @@
[]
[
{"username": "Shidorien"}
]
+706 -256
View File
@@ -1,279 +1,729 @@
{
"misc":{
"download": "Download",
"verify": "Verify",
"launch": "Launch",
"mods": "Mods",
"maps": "Maps",
"cancel": "Cancel"
},
"pages":{
"version-viewer":{
"launch-mods":{
"oculus": "Oculus Mod",
"desktop": "Desktop Mod",
"debug": "Debug Mod"
},
"dropdown":{
"open-folder": "Open folder",
"verify-files": "Verify files",
"clone": "Clone",
"edit": "Edit",
"uninstall": "Uninstall"
}
},
"available-versions":{
"title": "Select a version",
"steam-release":"Release page"
},
"settings":{
"steam":{
"title":"Steam",
"description":"If you log out of Steam, you will have to log back in to download a new version of Beat Saber.",
"logout":"Log out"
},
"appearance":{
"title":"Appearance",
"description":"Choose the two main colours of BSManager.",
"reset":"Reset",
"sub-title":"Theme",
"themes":{
"dark":"Dark",
"light": "Light",
"os": "Sync with computer"
}
},
"installation-folder":{
"title":"Installation folder",
"description":"Change the default folder for Beat Saber versions and other upcoming features.",
"choose-folder":"Choose folder"
},
"language":{
"title":"Language",
"description":"Select a language.",
"languages":{
"en-EN": "English, UK",
"en-US": "English, US",
"fr-FR": "Français",
"es-ES": "Español",
"translated":{
"en-EN": "English, United Kingdom",
"en-US": "English, USA",
"fr-FR": "French",
"es-ES": "Spanish"
}
}
},
"patreon":{
"title":"Support BSManager 💖",
"description": "Support the project and help us to provide continuous improvements to BSManager.",
"buttons":{
"support": "Support BSManager",
"supporters":"Supporters 👀"
}
}
}
},
"notifications":{
"types":{
"error": "🚨 Error",
"warning": "⚠️ Warning",
"success": "🎉 Success"
},
"shared":{
"errors":{
"titles":{
"operation-running": "Operation running"
"misc": {
"download": "Download",
"verify": "Verify",
"launch": "Launch",
"mods": "Mods",
"maps": "Maps",
"playlists": "Playlists",
"models": "Models",
"cancel": "Cancel",
"delete": "Delete",
"accept": "Accept",
"refuse": "Refuse",
"apply": "Apply"
},
"nav-bar":{
"add-version": "Add a version",
"settings": "Settings"
},
"pages": {
"shared-maps":{
"title": "Shared maps"
},
"version-viewer": {
"launch-mods": {
"oculus": "Oculus Mode",
"oculus-description": "If you are using Beat Saber via Steam, it allows you to use Oculus's VR composer without passing by SteamVR, to gain performances This is not necessary for using Oculus headsets.",
"desktop": "Desktop Mode",
"desktop-description": "This allows you to use WASD and the mouse to navigate around the menu in game. This makes testing much easier, because you don't have to put on your headset!",
"debug": "Debug Mode",
"debug-description": "Enables the output log window for IPA. This will show the debug console that mods use.",
"advanced-launch": {
"button": "Advanced launch",
"placeholder": "Additional arguments ex: --revert; --nowait"
}
},
"msg":{
"operation-running": "Wait for the end of the current operation then start again."
"maps": {
"title": "Shared maps",
"search-bar": {
"search-placeholder": "Search a map",
"filters-btn": "Filters",
"dropdown": {
"export-maps": "Export maps",
"delete-maps": "Delete maps"
}
},
"tabs": {
"maps": {
"actions": {
"add-maps": {
"text": "Add"
},
"link-maps": {
"tooltips": {
"link": "Link maps",
"unlink": "Unlink maps"
}
}
},
"empty-maps":{
"text":"No maps",
"button":"Download maps"
}
}
}
},
"mods": {
"loading-mods": "Loading mods...",
"no-internet": "No internet",
"buttons": {
"more-infos": "More info",
"install-or-update": "Install or update"
},
"mods-grid": {
"header-bar": {
"name": "Name",
"installed": "Installed",
"latest": "Latest",
"description": "Description",
"dropdown": {
"uninstall-all": "Uninstall all"
}
}
}
},
"dropdown": {
"open-folder": "Open folder",
"verify-files": "Verify files",
"clone": "Clone",
"edit": "Edit",
"uninstall": "Uninstall",
"shared-folders": "Shared Folders"
}
},
"available-versions": {
"title": "Select a version",
"steam-release": "Release page",
"dropdown": {
"refresh": "Refresh list",
"import-version" :"Import a version"
}
},
"settings": {
"steam": {
"title": "Steam",
"description": "If you log out of Steam, you will have to log back in to download a new version of Beat Saber.",
"logout": "Log out"
},
"appearance": {
"title": "Appearance",
"description": "Choose the two main colours of BSManager.",
"reset": "Reset",
"sub-title": "Theme",
"themes": {
"dark": "Dark",
"light": "Light",
"os": "Sync with computer"
}
},
"installation-folder": {
"title": "Installation folder",
"description": "Change the default folder for Beat Saber versions and other upcoming features.",
"choose-folder": "Choose folder"
},
"additional-content": {
"title": "Additional content",
"description": "Additional content allows you to customize BeatSaber!",
"deep-links": {
"sub-title": "OneClick installations"
}
},
"language": {
"title": "Language",
"description": "Select a language.",
"languages": {
"en-EN": "English, UK",
"en-US": "English, US",
"fr-FR": "Français",
"es-ES": "Español",
"translated": {
"en-EN": "English, United Kingdom",
"en-US": "English, USA",
"fr-FR": "French",
"es-ES": "Spanish"
}
}
},
"patreon": {
"title": "Support BSManager 💖",
"description": "Support the project and help us to provide continuous improvements to BSManager.",
"buttons": {
"support": "Support BSManager 🥰",
"supporters": "Supporters 👀"
},
"view": {
"no-supporters": "No supporter yet",
"sponsors": "Sponsors",
"supporters": "Supporters"
}
},
"discord": {
"description": "Join the BSManager community by following us on our social media!"
},
"contribution": {
"description": "Suggest new features or report a bug to help improve BSManager!",
"buttons": {
"request-features": "Request a feature",
"report-bug": "Report a bug",
"open-logs": "Open logs"
}
}
}
},
"bs-download":{
"success":{
"titles":{
"download-success": "Download complete",
"verification-finished":"Verification complete"
},
"notifications": {
"types": {
"error": "🚨 Error",
"warning": "⚠️ Warning",
"success": "🎉 Success"
},
"common": {
"msg": {
"error-occurred": "An error has occurred"
}
},
"warnings":{
"msg":{
"ManifestChecksum": "The previously downloaded manifest does not match the new 🤔",
"ConnectionTimeout": "Your internet connection seems unstable 🥶",
"ConnectionLost": "The connection has been lost, try again...",
"ConnectionError": "Unable to connect to Steam, retry...",
"Unknown": "Something strange has happened 🤔 Your connection is probably unstable."
},
"shared": {
"errors": {
"titles": {
"operation-running": "Operation running",
"no-internet": "No internet"
},
"msg": {
"operation-running": "Wait for the end of the current operation then start again.",
"no-internet": "Check your connection and try again."
}
}
},
"errors":{
"msg":{
"Password": "Password is invalid.",
"InvalidCredentials": "Your e-mail or password is invalid 😴",
"InvalidPassword": "Your password is invalid 😕",
"NoManifest": "No manifest was found",
"DirectoryCreate": "Unable to install the necessary folders.",
"NotAvailableApp": "Are you trying to download BeatSaber when you don't have it ? 🤣",
"DepotNotFound": "Unable to download BeatSaber 😥 try again later 😕",
"NotCompleted": "The download could not complete ¯\\_(ツ)_/¯",
"InvalidManifest": "Unable to download BeatSaber 😥 try again later 😕",
"NoValidKey": "Unable to download BeatSaber 😥 try again later 😕",
"NoManifestCode": "Unable to download BeatSaber 😥 try again later 😕",
"401": "Steam doesn't seem to want to let us download BeatSaber 😢",
"404": "Unable to contact Steam servers.",
"Unknown": "An unknown error occurred ¯\\_(ツ)_/¯",
"NoServer": "Unable to contact Steam servers.",
"NotAllowed": "Apparently you are not allowed to download BeatSaber 🥱",
"ConnectionTimeout": "Cannot connect to Steam 😕",
"SteamLib": "If you have this error, report the bug on GitHub with the logs pls.",
"ConnectionError": "Unable to connect to Steam after 10 tries 🤯",
"LicenceError": "Unable to get the list of licenses.",
"verification-failed": "Verification failed, try again later.",
"RateLimitExceeded": "You've tried too many times, wait a while and try again later.",
"AlreadyDownloading": "A download is already in progress",
"no-internet": "No internet connection."
},
"bs-download": {
"success": {
"titles": {
"download-success": "Download complete",
"verification-finished": "Verification complete"
}
},
"warnings": {
"msg": {
"ManifestChecksum": "The previously downloaded manifest does not match the new 🤔",
"ConnectionTimeout": "Your internet connection seems unstable 🥶",
"ConnectionLost": "The connection has been lost, try again...",
"ConnectionError": "Unable to connect to Steam, retry...",
"Unknown": "Something strange has happened 🤔 Your connection is probably unstable."
}
},
"errors": {
"titles":{
"dotnet-required": ".NET 6 Required"
},
"msg": {
"401": "Steam doesn't seem to want to let us download BeatSaber 😢",
"404": "Unable to contact Steam servers.",
"Password": "Password is invalid.",
"InvalidCredentials": "Your e-mail or password is invalid 😴",
"InvalidPassword": "Your password is invalid 😕",
"NoManifest": "No manifest was found",
"DirectoryCreate": "Unable to install the necessary folders.",
"NotAvailableApp": "Are you trying to download BeatSaber when you don't have it ? 🤣",
"DepotNotFound": "Unable to download BeatSaber 😥 try again later 😕",
"NotCompleted": "The download could not complete ¯\\_(ツ)_/¯",
"InvalidManifest": "Unable to download BeatSaber 😥 try again later 😕",
"NoValidKey": "Unable to download BeatSaber 😥 try again later 😕",
"NoManifestCode": "Unable to download BeatSaber 😥 try again later 😕",
"Unknown": "An unknown error occurred ¯\\_(ツ)_/¯",
"NoServer": "Unable to contact Steam servers.",
"NotAllowed": "Apparently you are not allowed to download BeatSaber 🥱",
"ConnectionTimeout": "Cannot connect to Steam 😕",
"SteamLib": "If you have this error, report the bug on GitHub with the logs pls.",
"ConnectionError": "Unable to connect to Steam after 10 tries 🤯",
"LicenceError": "Unable to get the list of licenses.",
"verification-failed": "Verification failed, try again later.",
"RateLimitExceeded": "You've tried too many times, wait a while and try again later.",
"AlreadyDownloading": "A download is already in progress",
"no-internet": "No internet connection.",
"dotnet-required": ".NET 6 Runtime must be installed in order to download a version of BeatSaber. Download it by clicking the button below."
},
"actions":{
"download-dotnet": "Download .NET 6"
}
}
}
},
"settings":{
"move-folder":{
},
"bs-import-version":{
"success":{
"titles":{
"transfer-finished":"Transfer complete"
}
"start-import": {
"title": "Import in progress 👌",
"desc": "The import may take several minutes depending on your configuration."
},
"imported": {
"title": "Imported version 🎉"
}
},
"errors":{
"titles":{
"transfer-failed":"Transfer failed 😕"
}
"import-error":{
"desc": "Check that the selected folder is a BeatSaber installation."
}
}
},
"steam":{
"success":{
"titles":{
"logout": "Disconnected from Steam."
}
}
}
},
"bs-launch":{
"success":{
"titles":{
"launching": "Launching...🚀"
}
},
"errors":{
"titles":{
"UNABLE_TO_LAUNCH": "Unable to launch",
"STEAM_NOT_RUNNING": "Steam is not running",
"BS_ALREADY_RUNNING": "BeatSaber already running",
"EXE_NOT_FINDED": "Missing files",
"EXIT": "Abrupt stop"
},
"settings": {
"move-folder": {
"success": {
"titles": {
"transfer-finished": "Transfer complete"
}
},
"errors": {
"titles": {
"transfer-failed": "Transfer failed 😕"
}
}
},
"msg":{
"STEAM_NOT_RUNNING": "Steam must be running to launch BeatSaber.",
"BS_ALREADY_RUNNING": "Close BeatSaber before launching it again.",
"EXE_NOT_FINDED": "Some files seem to be missing, try to verify the files.",
"EXIT": "BeatSaber stopped abruptly, tries to check the files."
}
}
},
"custom-version":{
"errors":{
"titles":{
"CantEditSteam": "Unable to edit",
"CantRename": "Renaming impossible",
"VersionAlreadExist": "This version already exists",
"CantClone": "Cloning impossible"
"steam": {
"success": {
"titles": {
"logout": "Disconnected from Steam."
}
}
},
"msg":{
"CantEditSteam": "You can't edit the Steam version. You can clone it though."
"additional-content":{
"deep-link": {
"select-all": "Select all",
"activation":{
"success":{
"title":"OneClick activated!",
"description":"OneClick installations have been activated."
},
"error":{
"description":"Unable to activate OneClick installations."
}
},
"deactivation":{
"success":{
"title":"OneClick deactivated!",
"description":"OneClick installations have been deactivated."
},
"error":{
"description":"An unknown error occurred."
}
},
"check-all-enabled":{
"title": "OneClick Disabled",
"description": "One or more OneClick installations are disabled. Go to settings to enable them.",
"actions":{
"settings": "Settings",
"not-remind": "Do not remind me"
}
}
}
}
},
"success":{
"titles":{
"CloningFinished": "Cloning complete 🎉"
}
}
}
},
"modals":{
"guard":{
"title": "Steam Guard",
"inputs":{
"guard-code":{
"label": "Guard Code",
"placeholder": "Enter your Guard code"
}
},
"buttons":{
"submit": "Login"
}
},
"steam-login":{
"title": "Steam Login",
"inputs":{
"username":{
"label": "Username",
"placeholder": "Enter your username"
},
"bs-launch": {
"success": {
"titles": {
"launching": "Launching...🚀"
}
},
"password":{
"label": "Password",
"placeholder": "Enter your password"
},
"stay":{
"label": "Stay connected"
"errors": {
"titles": {
"UNABLE_TO_LAUNCH": "Unable to launch",
"STEAM_NOT_RUNNING": "Steam is not running",
"OCULUS_NOT_RUNNING": "Oculus is not running",
"BS_ALREADY_RUNNING": "BeatSaber already running",
"EXE_NOT_FINDED": "Missing files",
"EXIT": "Abrupt stop"
},
"msg": {
"STEAM_NOT_RUNNING": "Steam must be running to launch BeatSaber.",
"OCULUS_NOT_RUNNING": "Oculus must be running to launch BeatSaber.",
"BS_ALREADY_RUNNING": "Close BeatSaber before launching it again.",
"EXE_NOT_FINDED": "Some files seem to be missing, try to verify the files.",
"EXIT": "BeatSaber stopped abruptly, tries to check the files."
},
"actions":{
"STEAM_NOT_RUNNING": "Launch Steam"
}
}
},
"buttons":{
"submit": "Login"
}
},
"bs-uninstall":{
"title": "Uninstall",
"description": "Are you sure you want to uninstall BeatSaber {version} ? You will have to download it again to play it.",
"buttons":{
"submit": "Uninstall"
}
},
"install-folder":{
"title": "Installation folder",
"description": "Changing the default installation folder will result in moving all installed data to the new folder.",
"buttons":{
"submit": "Choose folder"
}
},
"edit-version":{
"title": "Edit the version",
"buttons":{
"submit": "Edit"
}
},
"clone-version":{
"title": "Clone version",
"description": "Cloning the version allows you to separate additional BeatSaber content between two versions.",
"buttons":{
"submit": "Clone"
}
}
},
"auto-update":{
"checking": "Checking for updates",
"downloading": "Downloading updates"
},
"dateformat":{
},
"steam":{
"steam-launching":{
"title": "Steam is launching!",
"description": "Steam may take some time to launch depending on your configuration."
}
},
"custom-version": {
"errors": {
"titles": {
"CantEditSteam": "Unable to edit",
"CantRename": "Renaming impossible",
"VersionAlreadExist": "This version already exists",
"CantClone": "Cloning impossible"
},
"msg": {
"CantEditSteam": "You can't edit the Steam version. You can clone it though."
}
},
"success": {
"titles": {
"CloningFinished": "Cloning complete 🎉"
}
}
},
"mods": {
"install-mods": {
"titles": {
"success": "Mods installed 🎉",
"warning": "Mods installed 🤔"
},
"msg": {
"success": "All mods have been installed.",
"warning": "One or more mods could not be installed.",
"errors": {
"no-mods": "No mods to install.",
"cannot-install-bsipa": "BSIPA installation failed 😨"
}
}
},
"uninstall-mod": {
"titles": {
"success": "Mod uninstalled 🎉"
},
"msg": {
"errors": {
"no-mods": "This mod isn't installed 😑"
}
}
},
"uninstall-all-mods": {
"titles": {
"success": "Mods uninstalled 🎉"
},
"msg": {
"success": "All mods have been uninstalled.",
"errors": {
"no-mods": "No mod is installed in this version 😑"
}
}
}
},
"maps":{
"one-click-install":{
"success":"Map installation complete",
"error":"An error occurred while installing the map"
}
},
"playlists":{
"one-click-install":{
"success":"Playlist installation complete",
"error":"An error occurred while installing the playlist"
}
},
"models":{
"one-click-install":{
"success":"Model installation complete",
"error":"An error occurred while installing the model"
}
},
"shared-folder": {
"info": {
"userdata-backup-created":{
"title": "Backup created",
"msg": "Sharing the 'UserData' folder can generate errors, in case of problems unlink the folder to restore the backup"
}
}
}
},
"modals": {
"misc":{
"remember-my-choice": "Remember my choice"
},
"guard": {
"title": "Steam Guard",
"inputs": {
"guard-code": {
"label": "Guard Code",
"placeholder": "Enter your Guard code"
}
},
"buttons": {
"submit": "Login"
}
},
"steam-login": {
"title": "Steam Login",
"inputs": {
"username": {
"label": "Username",
"placeholder": "Enter your username"
},
"password": {
"label": "Password",
"placeholder": "Enter your password"
},
"stay": {
"label": "Stay connected"
}
},
"why-credentials": "Why do you need my credentials ?",
"buttons": {
"submit": "Login"
}
},
"steam-credentials":{
"title": "Steam Credentials",
"p-1": "The credentials are only used to download the game because steam need to verify that you paid the game in order to be allowed to download it. They aren't saved and directly passed to DepotDownloader. If you don't want to enter your credentials you can follow this tutorial :",
"p-2": "and then click on the gear icon in the top right corner and select \"Import a version\", select the folder where beat saber has been downloaded (If you follow the tutorial above you should have the correct location)"
},
"bs-import-version":{
"title": "Import a version",
"description": "Imports a version of BeatSaber to use with BSManager. The import will copy the selected BeatSaber installation folder to the BSManager versions folder.",
"buttons":{
"submit": "Import a version"
}
},
"bs-uninstall": {
"title": "Uninstall",
"description": "Are you sure you want to uninstall BeatSaber {version} ? You will have to download it again to play it.",
"buttons": {
"submit": "Uninstall"
}
},
"install-folder": {
"title": "Installation folder",
"description": "Changing the default installation folder will result in moving all installed data to the new folder.",
"buttons": {
"submit": "Choose folder"
}
},
"edit-version": {
"title": "Edit the version",
"buttons": {
"submit": "Edit"
}
},
"clone-version": {
"title": "Clone version",
"description": "Cloning the version allows you to separate additional BeatSaber content between two versions.",
"inputs": {
"name": {
"label": "Name",
"placeholder": "Version name"
},
"color": {
"label": "Color"
}
},
"buttons": {
"submit": "Clone"
}
},
"uninstall-mod": {
"title": "Uninstall",
"description": "Are you sure you want to uninstall {mod}? It could cause other installed mods to malfunction.",
"description-bsipa": "Are you sure you want to uninstall BSIPA? After that all installed mods will not work anymore."
},
"uninstall-all-mods": {
"title": "Uninstalling mods",
"description": "Are you sure you want to uninstall all the mods from version {version}? This operation cannot be undone."
},
"maps-actions": {
"delete-maps": {
"title": {
"single": "Delete the map?",
"multiple": "Delete maps ?"
},
"desc": {
"single": "Are you sure you want to delete the map {name}?",
"multiple": "Are you sure you want to delete all {nb} maps?"
},
"info": {
"desc": {
"single": "This map is part of the shared maps",
"multiple": "These maps are part of the shared maps"
},
"title": {
"single": "This map will also be removed from versions using shared maps",
"multiple": "These maps will also be removed from versions using shared maps"
}
}
},
"link-maps": {
"title": "Link maps",
"desc": "Linking maps allows to share maps between all versions. Once linked, this version will benefit from the shared maps",
"info": "Adding and deleting maps will also be shared",
"keep-maps": {
"label": "Keep maps",
"title": "Keep maps will move the maps of the current version to the shared maps folder. Otherwise they will be lost"
},
"valid-btn": "Link maps"
},
"unlink-maps": {
"title": "Unlink maps",
"desc": "Please note that unlinking maps will not allow the use of shared maps for this version.",
"keep-maps": {
"label": "Keep maps",
"title": "Keeping the maps will create a copy of the shared maps for the current version. Otherwise, no map will be kept for this version."
},
"valid-btn": "Unlink maps"
}
},
"download-maps": {
"search-btn": "Search",
"loading-maps": "Loading maps...",
"no-maps-found": "No maps found",
"no-internet": "No internet"
},
"mods-disclaimer":{
"title": "disclaimer",
"p-1": "By choosing to use mods, you understand that:",
"li-1": "You may experience problems that don't exist in the vanilla game. 99.9% of bugs, crashes, and lag are due to mods.",
"li-2": "Mods are subject to being broken by updates and that's normal - be patient and respectful when this happens, as modders are volunteers with real lives.",
"li-3": "Beat Games aren't purposefully trying to break mods. They wish to work on the codebase and sometimes this breaks mods, but they are not out to kill mods.",
"p-2": "Do not attack the game developers for issues related to mods, and vice versa - modders and game developers are two separate groups. Just don't be a jerk ok."
},
"shared-folders":{
"title": "Shared Folders",
"description": "Link BeatSaber folders to synchronize their contents with shared folders in other versions. Note that deleting content will also be shared.",
"buttons": {
"add-folder": "Add Folder",
"link-folder": "Link Folder",
"unlink-folder": "Unlink Folder"
}
}
},
"maps": {
"map-filter-panel": {
"duration": "Duration",
"tags": "tags",
"specificities": "general",
"requirements": "requirements"
},
"map-types": {
"accuracy": "accuracy",
"balanced": "balanced",
"challenge": "challenge",
"dancestyle": "dance",
"fitness": "fitness",
"speed": "speed",
"tech": "tech"
},
"map-styles": {
"dance": "dance",
"swing": "swing",
"nightcore": "nightcore",
"folk": "folk",
"family": "family",
"ambient": "ambient",
"funk": "funk",
"jazz": "jazz",
"soul": "soul",
"speedcore": "speedcore",
"punk": "punk",
"rb": "r&b",
"holiday": "holiday",
"vocaloid": "vocaloid",
"jrock": "j-rock",
"trance": "trance",
"drumbass": "drum & bass",
"comedy": "comedy",
"instrumental": "instrumental",
"hardcore": "hardcore",
"kpop": "k-pop",
"indie": "indie",
"techno": "techno",
"house": "house",
"game": "video game",
"film": "film",
"alt": "alternative",
"dubstep": "dubstep",
"metal": "metal",
"anime": "anime",
"hiphop": "hiphop",
"jpop": "j-pop",
"rock": "rock",
"pop": "pop",
"electronic": "electronic",
"classical-orchestral": "Classical & Orchestral"
},
"map-specificities": {
"automapper": "AI",
"ranked": "ranked",
"curated": "curated",
"verified": "verified",
"fullSpread": "full spread"
},
"difficulties": {
"Easy": "easy",
"Normal": "normal",
"Hard": "hard",
"Expert": "expert",
"ExpertPlus": "expert+"
},
"map-item": {
"by": "By {songAutor}",
"mapped-by": "mapped by"
}
},
"beat-saver": {
"maps-sorts": {
"Latest": "Latest",
"Relevance": "Relevance",
"Rating": "Rating",
"Curated": "Curated"
}
},
"auto-update": {
"checking": "Checking for updates",
"downloading": "Downloading updates"
},
"dateformat": {
"dayNames": [
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
"Sun",
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat",
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
],
"monthNames": [
"Jan", "Feb", "Mar", "Apr", "May", "June", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec",
"January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"June",
"Jul",
"Aug",
"Sept",
"Oct",
"Nov",
"Dec",
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
],
"timeNames": [
"a", "p", "am", "pm", "A", "P", "AM", "PM"
"a",
"p",
"am",
"pm",
"A",
"P",
"AM",
"PM"
]
}
}
}
+705 -256
View File
@@ -1,279 +1,728 @@
{
"misc":{
"download": "Descargar",
"verify": "Verificar",
"launch": "Lanzar",
"mods": "Mods",
"maps": "Maps",
"cancel": "Cancelar"
},
"pages":{
"version-viewer":{
"launch-mods":{
"oculus": "Oculus Mod",
"desktop": "Desktop Mod",
"debug": "Debug Mod"
},
"dropdown":{
"open-folder": "Abrir la carpeta",
"verify-files": "Verificar los archivos",
"clone": "Clonar",
"edit": "Editar",
"uninstall": "Desinstalar"
}
},
"available-versions":{
"title": "Seleccione una versión",
"steam-release":"Publicación Página"
},
"settings":{
"steam":{
"title":"Steam",
"description":"Si sales de Steam, tendrás que volver a entrar para descargar una nueva versión de Beat Saber.",
"logout":"Desconectar"
},
"appearance":{
"title":"Apariencia",
"description":"Elija los dos colores principales de BSManager.",
"reset":"Reiniciar",
"sub-title":"Tema",
"themes":{
"dark":"Oscuro",
"light": "Claro",
"os": "Sincronizar con ordenador"
}
},
"installation-folder":{
"title":"Carpeta de instalación",
"description":"Cambia la carpeta por defecto para las versiones de Beat Saber y otras características próximas.",
"choose-folder":"Elija la carpeta"
},
"language":{
"title":"Idioma",
"description":"Selecciona un idioma.",
"languages":{
"en-EN": "English, UK",
"en-US": "English, US",
"fr-FR": "Français",
"es-ES": "Español",
"translated":{
"en-EN": "Inglés, Reino Unido",
"en-US": "Inglés, Estados Unidos",
"fr-FR": "Francés",
"es-ES": "Español"
}
}
},
"patreon":{
"title":"Apoyo BSManager 💖",
"description": "Apoye el proyecto y ayúdenos a proporcionar mejoras continuas a BSManager.",
"buttons":{
"support": "Apoyo BSManager",
"supporters":"Apoyos 👀"
}
}
}
},
"notifications":{
"types":{
"error": "🚨 Error",
"warning": "⚠️ Advertencia",
"success": "🎉 Éxito"
},
"shared":{
"errors":{
"titles":{
"operation-running": "Operación en curso"
"misc": {
"download": "Descargar",
"verify": "Verificar",
"launch": "Lanzar",
"mods": "Mods",
"maps": "Mapas",
"playlists": "Playlists",
"models": "Modelos",
"cancel": "Cancelar",
"delete": "Borrar",
"accept": "Aceptar",
"refuse": "Rechazar",
"apply": "Aplicar"
},
"nav-bar":{
"add-version": "Agregar una versión",
"settings": "Ajustes"
},
"pages": {
"shared-maps":{
"title": "Mapas comunes"
},
"version-viewer": {
"launch-mods": {
"oculus": "Oculus Mod",
"oculus-description": "Si estás usando Beat Saber a través de Steam, te permite usar el compositor VR de Oculus sin pasar por SteamVR, para ganar prestaciones. Esto no es necesario para usar auriculares Oculus.",
"desktop": "Desktop Mod",
"desktop-description": "Esto te permite usar WASD y el mouse para navegar por el menú en juego. Esto hace que las pruebas sean mucho más fáciles, ¡porque no tienes que ponerte el auricular!",
"debug": "Debug Mod",
"debug-description": "Habilita la ventana de registro de salida para IPA. Esto mostrará la consola de depuración que usan los mods.",
"advanced-launch": {
"button": "Lanzamiento avanzado",
"placeholder": "Argumentos adicionales ej: --revert; --no-wait"
}
},
"msg":{
"operation-running": "Espere a que termine la operación actual y vuelva a empezar."
"maps": {
"search-bar": {
"search-placeholder": "Buscar en un mapa",
"filters-btn": "Filtros",
"dropdown": {
"export-maps": "Exportar mapas",
"delete-maps": "Borrar mapas"
}
},
"tabs": {
"maps": {
"actions": {
"add-maps": {
"text": "Añadir"
},
"link-maps": {
"tooltips": {
"link": "Vincular los mapas",
"unlink": "Desatar los mapas"
}
}
},
"empty-maps":{
"text":"No hay mapas",
"button":"Descargar mapas"
}
}
}
},
"mods": {
"loading-mods": "Cargando mods...",
"no-internet": "Sin internet",
"buttons": {
"more-infos": "Más información",
"install-or-update": "Instalar o actualizar"
},
"mods-grid": {
"header-bar": {
"name": "Nombre",
"installed": "Instalado",
"latest": "Último",
"description": "Descripción",
"dropdown": {
"uninstall-all": "Desinstalar todos"
}
}
}
},
"dropdown": {
"open-folder": "Abrir la carpeta",
"verify-files": "Verificar los archivos",
"clone": "Clonar",
"edit": "Editar",
"uninstall": "Desinstalar",
"shared-folders": "Carpetas Compartidas"
}
},
"available-versions": {
"title": "Seleccione una versión",
"steam-release": "Publicación Página",
"dropdown": {
"refresh": "Actualizar la lista",
"import-version" :"Importar una versión"
}
},
"settings": {
"steam": {
"title": "Steam",
"description": "Si sales de Steam, tendrás que volver a entrar para descargar una nueva versión de Beat Saber.",
"logout": "Desconectar"
},
"appearance": {
"title": "Apariencia",
"description": "Elija los dos colores principales de BSManager.",
"reset": "Reiniciar",
"sub-title": "Tema",
"themes": {
"dark": "Oscuro",
"light": "Claro",
"os": "Sincronizar con ordenador"
}
},
"installation-folder": {
"title": "Carpeta de instalación",
"description": "Cambia la carpeta por defecto para las versiones de Beat Saber y otras características próximas.",
"choose-folder": "Elija la carpeta"
},
"additional-content": {
"title": "Contenido adicional",
"description": "¡El contenido adicional te permite personalizar BeatSaber!",
"deep-links": {
"sub-title": "Instalaciones OneClick"
}
},
"language": {
"title": "Idioma",
"description": "Selecciona un idioma.",
"languages": {
"en-EN": "English, UK",
"en-US": "English, US",
"fr-FR": "Français",
"es-ES": "Español",
"translated": {
"en-EN": "Inglés, Reino Unido",
"en-US": "Inglés, Estados Unidos",
"fr-FR": "Francés",
"es-ES": "Español"
}
}
},
"patreon": {
"title": "Apoyo BSManager 💖",
"description": "Apoye el proyecto y ayúdenos a proporcionar mejoras continuas a BSManager.",
"buttons": {
"support": "Apoyo BSManager 🥰",
"supporters": "Apoyos 👀"
},
"view": {
"no-supporters": "Todavía no hay apoyos",
"sponsors": "Patrocinadores",
"supporters": "Apoyos"
}
},
"discord": {
"description": "¡Únete a la comunidad de BSManager siguiéndonos en nuestras redes sociales!"
},
"contribution": {
"description": "¡Sugiera nuevas características o reporte un error para ayudar a mejorar BSManager!",
"buttons": {
"request-features": "Proponer una funcionalidad",
"report-bug": "Informar de un error",
"open-logs": "Abrir los registros"
}
}
}
},
"bs-download":{
"success":{
"titles":{
"download-success": "Descargar completo",
"verification-finished":"Verificación completa"
},
"notifications": {
"types": {
"error": "🚨 Error",
"warning": "⚠️ Advertencia",
"success": "🎉 Éxito"
},
"common": {
"msg": {
"error-occurred": "Se ha producido un error"
}
},
"warnings":{
"msg":{
"ManifestChecksum": "El manifiesto descargado anteriormente no coincide con el nuevo 🤔",
"ConnectionTimeout": "Su conexión a Internet parece inestable 🥶",
"ConnectionLost": "Se ha perdido la conexión, inténtelo de nuevo...",
"ConnectionError": "No se puede conectar a Steam, reintentar...",
"Unknown": "Algo extraño ha ocurrido 🤔 Tu conexión es probablemente inestable."
},
"shared": {
"errors": {
"titles": {
"operation-running": "Operación en curso",
"no-internet": "Sin internet"
},
"msg": {
"operation-running": "Espere a que termine la operación actual y vuelva a empezar.",
"no-internet": "Comprueba tu conexión a Internet e inténtalo de nuevo."
}
}
},
"errors":{
"msg":{
"Password": "La contraseña es inválida.",
"InvalidCredentials": "Su correo electrónico o contraseña no son válidos 😴",
"InvalidPassword": "Su contraseña no es válida 😕",
"NoManifest": "No se ha encontrado el manifiesto",
"DirectoryCreate": "No se pueden instalar las carpetas necesarias.",
"NotAvailableApp": "¿Intentas descargar BeatSaber cuando no lo tienes? 🤣",
"DepotNotFound": "No se puede descargar BeatSaber 😥 inténtalo más tarde 😕",
"NotCompleted": "La descarga no pudo completarse ¯\\_(ツ)_/¯",
"InvalidManifest": "No se puede descargar BeatSaber 😥 inténtalo más tarde 😕",
"NoValidKey": "No se puede descargar BeatSaber 😥 inténtalo más tarde 😕",
"NoManifestCode": "No se puede descargar BeatSaber 😥 inténtalo más tarde 😕",
"401": "Parece que Steam no quiere dejarnos descargar BeatSaber 😢",
"404": "No se puede contactar con los servidores de Steam",
"Unknown": "Se ha producido un error desconocido ¯\\_(ツ)_/¯",
"NoServer": "No se puede contactar con los servidores de Steam.",
"NotAllowed": "Aparentemente no tienes permiso para descargar BeatSaber 🥱",
"ConnectionTimeout": "No se puede conectar a Steam 😕",
"SteamLib": "Si tienes este error, reporta el bug en GitHub con los logs por favor.",
"ConnectionError": "No se puede conectar a Steam después de 10 intentos 🤯",
"LicenceError": "No se puede obtener la lista de licencias.",
"verification-failed": "Verificación fallida, inténtelo más tarde.",
"RateLimitExceeded": "Lo has intentado demasiadas veces, espera un poco y vuelve a intentarlo más tarde.",
"AlreadyDownloading": "La descarga ya está en curso",
"no-internet": "Sin conexión a Internet."
},
"bs-download": {
"success": {
"titles": {
"download-success": "Descargar completo",
"verification-finished": "Verificación completa"
}
},
"warnings": {
"msg": {
"ManifestChecksum": "El manifiesto descargado anteriormente no coincide con el nuevo 🤔",
"ConnectionTimeout": "Su conexión a Internet parece inestable 🥶",
"ConnectionLost": "Se ha perdido la conexión, inténtelo de nuevo...",
"ConnectionError": "No se puede conectar a Steam, reintentar...",
"Unknown": "Algo extraño ha ocurrido 🤔 Tu conexión es probablemente inestable."
}
},
"errors": {
"titles":{
"dotnet-required": ".NET 6 Requerido"
},
"msg": {
"401": "Parece que Steam no quiere dejarnos descargar BeatSaber 😢",
"404": "No se puede contactar con los servidores de Steam",
"Password": "La contraseña es inválida.",
"InvalidCredentials": "Su correo electrónico o contraseña no son válidos 😴",
"InvalidPassword": "Su contraseña no es válida 😕",
"NoManifest": "No se ha encontrado el manifiesto",
"DirectoryCreate": "No se pueden instalar las carpetas necesarias.",
"NotAvailableApp": "¿Intentas descargar BeatSaber cuando no lo tienes? 🤣",
"DepotNotFound": "No se puede descargar BeatSaber 😥 inténtalo más tarde 😕",
"NotCompleted": "La descarga no pudo completarse ¯\\_(ツ)_/¯",
"InvalidManifest": "No se puede descargar BeatSaber 😥 inténtalo más tarde 😕",
"NoValidKey": "No se puede descargar BeatSaber 😥 inténtalo más tarde 😕",
"NoManifestCode": "No se puede descargar BeatSaber 😥 inténtalo más tarde 😕",
"Unknown": "Se ha producido un error desconocido ¯\\_(ツ)_/¯",
"NoServer": "No se puede contactar con los servidores de Steam.",
"NotAllowed": "Aparentemente no tienes permiso para descargar BeatSaber 🥱",
"ConnectionTimeout": "No se puede conectar a Steam 😕",
"SteamLib": "Si tienes este error, reporta el bug en GitHub con los logs por favor.",
"ConnectionError": "No se puede conectar a Steam después de 10 intentos 🤯",
"LicenceError": "No se puede obtener la lista de licencias.",
"verification-failed": "Verificación fallida, inténtelo más tarde.",
"RateLimitExceeded": "Lo has intentado demasiadas veces, espera un poco y vuelve a intentarlo más tarde.",
"AlreadyDownloading": "La descarga ya está en curso",
"no-internet": "Sin conexión a Internet.",
"dotnet-required": "Se debe instalar el tiempo de ejecución de .NET 6 para descargar una versión de BeatSaber. Descárguelo haciendo clic en el botón de abajo."
},
"actions":{
"download-dotnet": "Descargar .NET 6"
}
}
}
},
"settings":{
"move-folder":{
},
"bs-import-version":{
"success":{
"titles":{
"transfer-finished":"Transferencia completa"
}
"start-import": {
"title": "Importación en curso 👌",
"desc": "La importación puede tardar varios minutos dependiendo de su configuración."
},
"imported": {
"title": "Versión importada 🎉"
}
},
"errors":{
"titles":{
"transfer-failed":"Transferencia fallida 😕"
}
"import-error":{
"desc": "Compruebe que la carpeta seleccionada es una instalación de BeatSaber."
}
}
},
"steam":{
"success":{
"titles":{
"logout": "Desconectado de Steam."
}
}
}
},
"bs-launch":{
"success":{
"titles":{
"launching": "Lanzamiento...🚀"
}
},
"errors":{
"titles":{
"UNABLE_TO_LAUNCH": "No se puede lanzar",
"STEAM_NOT_RUNNING": "Steam no funciona",
"BS_ALREADY_RUNNING": "BeatSaber ya está en marcha",
"EXE_NOT_FINDED": "Archivos perdidos",
"EXIT": "Parada abrupta"
},
"settings": {
"move-folder": {
"success": {
"titles": {
"transfer-finished": "Transferencia completa"
}
},
"errors": {
"titles": {
"transfer-failed": "Transferencia fallida 😕"
}
}
},
"msg":{
"STEAM_NOT_RUNNING": "Para iniciar BeatSaber es necesario que Steam esté en funcionamiento.",
"BS_ALREADY_RUNNING": "Cierra BeatSaber antes de volver a lanzarlo.",
"EXE_NOT_FINDED": "Parece que faltan algunos archivos, intente verificar los archivos.",
"EXIT": "BeatSaber se detuvo abruptamente, trata de revisar los archivos."
}
}
},
"custom-version":{
"errors":{
"titles":{
"CantEditSteam": "Imposible editar",
"CantRename": "El renombramiento es imposible",
"VersionAlreadExist": "Esta versión ya existe",
"CantClone": "Clonación imposible"
"steam": {
"success": {
"titles": {
"logout": "Desconectado de Steam."
}
}
},
"msg":{
"CantEditSteam": "No puedes editar la versión de Steam. Sin embargo, puedes clonarla."
"additional-content":{
"deep-link": {
"select-all": "Seleccionar todo",
"activation":{
"success":{
"title":"¡OneClick activado!",
"description":"Las instalaciones OneClick han sido activadas."
},
"error":{
"description":"No se pueden activar las instalaciones OneClick."
}
},
"deactivation":{
"success":{
"title":"¡OneClick desactivado!",
"description":"Las instalaciones OneClick han sido desactivadas."
},
"error":{
"description":"Ocurrió un error desconocido."
}
},
"check-all-enabled":{
"title": "OneClick deshabilitado",
"description": "Una o más instalaciones de OneClick están deshabilitadas. Vaya a la configuración para habilitarlas.",
"actions":{
"settings": "Ajustes",
"not-remind": "No volver a recordarme"
}
}
}
}
},
"success":{
"titles":{
"CloningFinished": "Clonación completa 🎉"
}
}
}
},
"modals":{
"guard":{
"title": "Steam Guard",
"inputs":{
"guard-code":{
"label": "Guard Código",
"placeholder": "Introduzca su código Guard"
}
},
"buttons":{
"submit": "Conéctate"
}
},
"steam-login":{
"title": "Steam Conectar",
"inputs":{
"username":{
"label": "Nombre de usuario",
"placeholder": "Introduzca su nombre de usuario"
},
"bs-launch": {
"success": {
"titles": {
"launching": "Lanzamiento...🚀"
}
},
"password":{
"label": "Contraseña",
"placeholder": "Introduzca su contraseña"
},
"stay":{
"label": "Manténgase conectado"
"errors": {
"titles": {
"UNABLE_TO_LAUNCH": "No se puede lanzar",
"STEAM_NOT_RUNNING": "Steam no funciona",
"OCULUS_NOT_RUNNING": "Oculus no funciona",
"BS_ALREADY_RUNNING": "BeatSaber ya está en marcha",
"EXE_NOT_FINDED": "Archivos perdidos",
"EXIT": "Parada abrupta"
},
"msg": {
"STEAM_NOT_RUNNING": "Para iniciar BeatSaber es necesario que Steam esté en funcionamiento.",
"OCULUS_NOT_RUNNING": "Oculus debe estar funcionando para lanzar BeatSaber.",
"BS_ALREADY_RUNNING": "Cierra BeatSaber antes de volver a lanzarlo.",
"EXE_NOT_FINDED": "Parece que faltan algunos archivos, intente verificar los archivos.",
"EXIT": "BeatSaber se detuvo abruptamente, trata de revisar los archivos."
},
"actions":{
"STEAM_NOT_RUNNING": "Iniciar Steam"
}
}
},
"buttons":{
"submit": "Inicio de sesión"
}
},
"bs-uninstall":{
"title": "Desinstalar",
"description": "¿Estás seguro de que quieres desinstalar BeatSaber {version}? Tendrás que descargarlo de nuevo para poder jugar.",
"buttons":{
"submit": "Desinstalar"
}
},
"install-folder":{
"title": "Instalación Carpeta",
"description": "Al cambiar la carpeta de instalación por defecto, se moverán todos los datos instalados a la nueva carpeta.",
"buttons":{
"submit": "Elija la carpeta"
}
},
"edit-version":{
"title": "Editar la versión",
"buttons":{
"submit": "Editar"
}
},
"clone-version":{
"title": "Versión clonada",
"description": "La clonación de la versión le permite separar el contenido adicional de BeatSaber entre dos versiones.",
"buttons":{
"submit": "Clonar"
}
}
},
"auto-update":{
"checking": "Comprobar las actualizaciones",
"downloading": "Descargar actualizaciones"
},
"dateformat":{
},
"steam":{
"steam-launching":{
"title": "¡Steam se está iniciando!",
"description": "Steam puede tardar un poco en iniciarse dependiendo de tu configuración."
}
},
"custom-version": {
"errors": {
"titles": {
"CantEditSteam": "Imposible editar",
"CantRename": "El renombramiento es imposible",
"VersionAlreadExist": "Esta versión ya existe",
"CantClone": "Clonación imposible"
},
"msg": {
"CantEditSteam": "No puedes editar la versión de Steam. Sin embargo, puedes clonarla."
}
},
"success": {
"titles": {
"CloningFinished": "Clonación completa 🎉"
}
}
},
"mods": {
"install-mods": {
"titles": {
"success": "Mods instalados 🎉",
"warning": "Mods instalados 🤔"
},
"msg": {
"success": "Todos los mods han sido instalados.",
"warning": "No se han podido instalar uno o más mods.",
"errors": {
"no-mods": "No hay que instalar mods.",
"cannot-install-bsipa": "La instalación de BSIPA falló 😨"
}
}
},
"uninstall-mod": {
"titles": {
"success": "Mod desinstalado 🎉"
},
"msg": {
"errors": {
"no-mods": "Este mod no está instalado 😑"
}
}
},
"uninstall-all-mods": {
"titles": {
"success": "Mods desinstalados 🎉"
},
"msg": {
"success": "Todos los mods han sido desinstalados.",
"errors": {
"no-mods": "No se instala ningún mod en esta versión 😑"
}
}
}
},
"maps":{
"one-click-install":{
"success":"Instalación del mapa completada",
"error":"Se produjo un error durante la instalación del mapa"
}
},
"playlists":{
"one-click-install":{
"success":"Instalación de la lista de reproducción completada",
"error":"Se produjo un error durante la instalación de la lista de reproducción"
}
},
"models":{
"one-click-install":{
"success":"Instalación del modelo completada",
"error":"Se produjo un error durante la instalación del modelo"
}
},
"shared-folder": {
"info": {
"userdata-backup-created":{
"title": "Backup creado",
"msg": "Compartir la carpeta 'UserData' puede generar errores, en caso de problemas desvincular la carpeta para restaurar la copia de seguridad"
}
}
}
},
"modals": {
"misc":{
"remember-my-choice": "Recordar mi elección"
},
"guard": {
"title": "Steam Guard",
"inputs": {
"guard-code": {
"label": "Guard Código",
"placeholder": "Introduzca su código Guard"
}
},
"buttons": {
"submit": "Conéctate"
}
},
"steam-login": {
"title": "Steam Conectar",
"inputs": {
"username": {
"label": "Nombre de usuario",
"placeholder": "Introduzca su nombre de usuario"
},
"password": {
"label": "Contraseña",
"placeholder": "Introduzca su contraseña"
},
"stay": {
"label": "Manténgase conectado"
}
},
"why-credentials": "¿Por qué necesitas mis credenciales?",
"buttons": {
"submit": "Inicio de sesión"
}
},
"steam-credentials":{
"title": "Steam Credentials",
"p-1": "Las credenciales sólo se utilizan para descargar el juego porque steam necesita verificar que has pagado el juego para que se te permita descargarlo. No se guardan y se pasan directamente a DepotDownloader. Si no quieres introducir tus credenciales puedes seguir este tutorial :",
"p-2": "y, a continuación, haga clic en el icono de engranaje en la esquina superior derecha y seleccione \"Importar una versión\", seleccione la carpeta donde se ha descargado beat saber (Si usted sigue el tutorial anterior debe tener la ubicación correcta)"
},
"bs-import-version":{
"title": "Importar una versión",
"description": "Importa una versión de BeatSaber para usar con BSManager. La importación copiará la carpeta de instalación seleccionada de BeatSaber en la carpeta de versiones de BSManager.",
"buttons":{
"submit": "Importar una versión"
}
},
"bs-uninstall": {
"title": "Desinstalar",
"description": "¿Estás seguro de que quieres desinstalar BeatSaber {version}? Tendrás que descargarlo de nuevo para poder jugar.",
"buttons": {
"submit": "Desinstalar"
}
},
"install-folder": {
"title": "Instalación Carpeta",
"description": "Al cambiar la carpeta de instalación por defecto, se moverán todos los datos instalados a la nueva carpeta.",
"buttons": {
"submit": "Elija la carpeta"
}
},
"edit-version": {
"title": "Editar la versión",
"buttons": {
"submit": "Editar"
}
},
"clone-version": {
"title": "Versión clonada",
"description": "La clonación de la versión le permite separar el contenido adicional de BeatSaber entre dos versiones.",
"inputs": {
"name": {
"label": "Nombre",
"placeholder": "Nombre de la versión"
},
"color": {
"label": "Color"
}
},
"buttons": {
"submit": "Clonar"
}
},
"uninstall-mod": {
"title": "Desinstalar",
"description": "¿Estás seguro de que quieres desinstalar {mod}? Podría provocar el mal funcionamiento de otros mods instalados.",
"description-bsipa": "¿Estás seguro de que quieres desinstalar BSIPA? Después de eso, todos los mods instalados dejarán de funcionar."
},
"uninstall-all-mods": {
"title": "Desinstalación de mods",
"description": "¿Estás seguro de que quieres desinstalar todos los mods de la versión {version}? Esta operación no se puede deshacer."
},
"maps-actions": {
"delete-maps": {
"title": {
"single": "¿Borrar el mapa?",
"multiple": "¿Eliminar mapas?"
},
"desc": {
"single": "¿Estás seguro de que quieres eliminar el mapa {name}?",
"multiple": "¿Seguro que quieres eliminar los {nb} mapas?"
},
"info": {
"desc": {
"single": "Este mapa es parte de los mapas compartidos",
"multiple": "Estos mapas son parte de los mapas compartidos"
},
"title": {
"single": "Este mapa también se eliminará de las versiones que usan mapas compartidos.",
"multiple": "Estos mapas también se eliminarán de las versiones que usan mapas compartidos."
}
}
},
"link-maps": {
"title": "Vincular mapas",
"desc": "La vinculación de mapas permite compartir mapas entre todas las versiones. Una vez vinculada, esta versión se beneficiará de los mapas compartidos",
"info": "También se compartirá la adición y eliminación de mapas.",
"keep-maps": {
"label": "Mantener mapas",
"title": "Mantener mapas moverá los mapas de la versión actual a la carpeta de mapas compartidos. De lo contrario, se perderán"
},
"valid-btn": "Vincular mapas"
},
"unlink-maps": {
"title": "Desvincular mapas",
"desc": "Tenga en cuenta que desvincular mapas no permitirá el uso de mapas compartidos para esta versión.",
"keep-maps": {
"label": "Mantener mapas",
"title": "Mantener los mapas creará una copia de los mapas compartidos para la versión actual. De lo contrario, no se mantendrá ningún mapa para esta versión."
},
"valid-btn": "Desvincular mapas"
}
},
"download-maps": {
"search-btn": "buscar",
"loading-maps": "Cargando mapas...",
"no-maps-found": "No se encontraron mapas",
"no-internet": "Sin internet"
},
"mods-disclaimer":{
"title": "descargo de responsabilidad",
"p-1": "Al elegir usar mods, entiendes y aceptas que:",
"li-1": "Es posible que encuentres problemas que no existen en el juego base. El 99,9% de los errores, bloqueos y ralentizaciones son debidos a los mods.",
"li-2": "Es probable que los mods dejen de funcionar debido a las actualizaciones y eso es normal. Sé paciente y respetuoso cuando suceda esto, ya que los modders son voluntarios y tienen una vida.",
"li-3": "Beat Games no está intencionalmente tratando de romper los mods. Quieren mejorar el juego base y a veces esto rompe los mods, pero no es su objetivo matar a los mods.",
"p-2": "No ataques a los desarrolladores por problemas relacionados con los mods y viceversa. Los modders y los desarrolladores son dos grupos distintos. No seas tonto, ¿de acuerdo?"
},
"shared-folders":{
"title": "Carpetas Compartidas",
"description": "Enlace las carpetas de BeatSaber para sincronizar su contenido con las carpetas compartidas en otras versiones. Tenga en cuenta que la eliminación de contenido también se compartirá.",
"buttons": {
"add-folder": "Añadir Carpeta",
"link-folder": "Enlazar Carpeta",
"unlink-folder": "Desenlazar Carpeta"
}
}
},
"maps": {
"map-filter-panel": {
"duration": "Duración",
"tags": "tags",
"specificities": "general",
"requirements": "requisitos"
},
"map-types": {
"accuracy": "precisión",
"balanced": "equilibrado",
"challenge": "desafío",
"dancestyle": "baile",
"fitness": "fitness",
"speed": "speed",
"tech": "tec"
},
"map-styles": {
"dance": "baile",
"swing": "swing",
"nightcore": "nightcore",
"folk": "folk",
"family": "familia",
"ambient": "ambiente",
"funk": "funk",
"jazz": "jazz",
"soul": "soul",
"speedcore": "speedcore",
"punk": "punk",
"rb": "r&b",
"holiday": "vacaciones",
"vocaloid": "vocaloid",
"jrock": "j-rock",
"trance": "trance",
"drumbass": "drum & bass",
"comedy": "comedia",
"instrumental": "instrumental",
"hardcore": "hardcore",
"kpop": "k-pop",
"indie": "indie",
"techno": "tecno",
"house": "house",
"game": "videojuego",
"film": "film",
"alt": "alternativa",
"dubstep": "dubstep",
"metal": "metal",
"anime": "anime",
"hiphop": "hiphop",
"jpop": "j-pop",
"rock": "rock",
"pop": "pop",
"electronic": "electrónico",
"classical-orchestral": "Clásico y orquestal"
},
"map-specificities": {
"automapper": "IA",
"ranked": "rankado",
"curated": "recomendado",
"verified": "verificado",
"fullSpread": "panel completo"
},
"difficulties": {
"Easy": "fácil",
"Normal": "normal",
"Hard": "difícil",
"Expert": "experto",
"ExpertPlus": "experto+"
},
"map-item": {
"by": "Por {songAutor}",
"mapped-by": "mapeado por"
}
},
"beat-saver": {
"maps-sorts": {
"Latest": "Última",
"Relevance": "Relevancia",
"Rating": "Notas",
"Curated": "Recomendado"
}
},
"auto-update": {
"checking": "Comprobar las actualizaciones",
"downloading": "Descargar actualizaciones"
},
"dateformat": {
"dayNames": [
"Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb",
"Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"
"Dom",
"Lun",
"Mar",
"Mié",
"Jue",
"Vie",
"Sáb",
"Domingo",
"Lunes",
"Martes",
"Miércoles",
"Jueves",
"Viernes",
"Sábado"
],
"monthNames": [
"Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic",
"Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio",
"Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"
"Ene",
"Feb",
"Mar",
"Abr",
"May",
"Jun",
"Jul",
"Ago",
"Sep",
"Oct",
"Nov",
"Dic",
"Enero",
"Febrero",
"Marzo",
"Abril",
"Mayo",
"Junio",
"Julio",
"Agosto",
"Septiembre",
"Octubre",
"Noviembre",
"Diciembre"
],
"timeNames": [
"a", "p", "am", "pm", "A", "P", "AM", "PM"
"a",
"p",
"am",
"pm",
"A",
"P",
"AM",
"PM"
]
}
}
}
+705 -256
View File
@@ -1,279 +1,728 @@
{
"misc":{
"download": "Télécharger",
"verify": "Vérifier",
"launch": "Lancer",
"mods": "Modes",
"maps": "Maps",
"cancel": "Annuler"
},
"pages":{
"version-viewer":{
"launch-mods":{
"oculus": "Mode Oculus",
"desktop": "Mode Bureau",
"debug": "Mode Debug"
},
"dropdown":{
"open-folder": "Ouvrir le dossier",
"verify-files": "Vérifier les fichiers",
"clone": "Cloner",
"edit": "Editer",
"uninstall": "Désinstaller"
}
},
"available-versions":{
"title": "Choisi une version",
"steam-release":"Notes de version"
},
"settings":{
"steam":{
"title":"Steam",
"description":"Si tu te déconnectes de Steam, tu devras te reconnecter pour télécharger une nouvelle version de Beat Saber.",
"logout":"Déconnexion"
},
"appearance":{
"title":"Apparence",
"description":"Choisi les deux couleurs principales de BSManager.",
"reset":"Réinitialiser",
"sub-title":"Thème",
"themes":{
"dark":"Sombre",
"light": "Clair",
"os": "Synchroniser avec l'ordinateur"
}
},
"installation-folder":{
"title":"Dossier d'installation",
"description":"Change le dossier par défaut pour les versions de Beat Saber et d'autres fonctionnalités à venir.",
"choose-folder":"Choisir un dossier"
},
"language":{
"title":"Langage",
"description":"Sélectionne un langage.",
"languages":{
"en-EN": "English, UK",
"en-US": "English, US",
"fr-FR": "Français",
"es-ES": "Español",
"translated":{
"en-EN": "Anglais, Royaume-Uni",
"en-US": "Anglais, États-Unis",
"fr-FR": "Français",
"es-ES": "Espagnol"
}
}
},
"patreon":{
"title":"Soutenir BSManager 💖",
"description": "Soutien le projet et aide-nous à fournir des améliorations continues à BSManager.",
"buttons":{
"support": "Soutenir BSManager",
"supporters":"Supporteurs 👀"
}
}
}
},
"notifications":{
"types":{
"error": "🚨 Erreur",
"warning": "⚠️ Attention",
"success": "🎉 Succès"
},
"shared":{
"errors":{
"titles":{
"operation-running": "Opération en cours"
"misc": {
"download": "Télécharger",
"verify": "Vérifier",
"launch": "Lancer",
"mods": "Mods",
"maps": "Maps",
"playlists": "Playlists",
"models": "Modèles",
"cancel": "Annuler",
"delete": "Supprimer",
"accept": "Accepter",
"refuse": "Refuser",
"apply": "Appliquer"
},
"nav-bar":{
"add-version": "Ajouter une version",
"settings": "Paramètres"
},
"pages": {
"shared-maps":{
"title": "Maps partagées"
},
"version-viewer": {
"launch-mods": {
"oculus": "Mode Oculus",
"oculus-description": "Si vous utilisez Beat Saber via Steam, cela vous permet d'utiliser le compositeur VR d'Oculus sans passer par SteamVR, pour gagner en performances. Ceci n'est pas nécessaire pour utiliser les casques Oculus.",
"desktop": "Mode Bureau",
"desktop-description": "Cela vous permet d'utiliser WASD et la souris pour naviguer dans le menu en jeu. Cela rend les tests beaucoup plus faciles, car vous n'avez pas à mettre votre casque!",
"debug": "Mode Debug",
"debug-description": "Active la fenêtre de log pour IPA. Cela affichera la console de débogage utilisée par les mods.",
"advanced-launch": {
"button": "Lancement avancé",
"placeholder": "Arguments supplémentaires ex: --revert; --nowait"
}
},
"msg":{
"operation-running": "Attend la fin de l'opération en cours puis recommences."
"maps": {
"search-bar": {
"search-placeholder": "Rechercher une map",
"filters-btn": "Filtres",
"dropdown": {
"export-maps": "Exporter les maps",
"delete-maps": "Supprimer les maps"
}
},
"tabs": {
"maps": {
"actions": {
"add-maps": {
"text": "Ajouter"
},
"link-maps": {
"tooltips": {
"link": "Lier les maps",
"unlink": "Délier les maps"
}
}
},
"empty-maps":{
"text":"Aucune map",
"button":"Télécharger des maps"
}
}
}
},
"mods": {
"loading-mods": "Chargement des mods...",
"no-internet": "Pas d'internet",
"buttons": {
"more-infos": "Plus d'infos",
"install-or-update": "Installer ou mettre à jour"
},
"mods-grid": {
"header-bar": {
"name": "Nom",
"installed": "Installé",
"latest": "Récent",
"description": "Description",
"dropdown": {
"uninstall-all": "Tout désinstaller"
}
}
}
},
"dropdown": {
"open-folder": "Ouvrir le dossier",
"verify-files": "Vérifier les fichiers",
"clone": "Cloner",
"edit": "Editer",
"uninstall": "Désinstaller",
"shared-folders": "Dossiers Partagés"
}
},
"available-versions": {
"title": "Choisis une version",
"steam-release": "Notes de version",
"dropdown": {
"refresh": "Rafraichir la liste",
"import-version" :"Importer une version"
}
},
"settings": {
"steam": {
"title": "Steam",
"description": "Si tu te déconnectes de Steam, tu devras te reconnecter pour télécharger une nouvelle version de Beat Saber.",
"logout": "Déconnexion"
},
"appearance": {
"title": "Apparence",
"description": "Choisis les deux couleurs principales de BSManager.",
"reset": "Réinitialiser",
"sub-title": "Thème",
"themes": {
"dark": "Sombre",
"light": "Clair",
"os": "Synchroniser avec l'ordinateur"
}
},
"installation-folder": {
"title": "Dossier d'installation",
"description": "Change le dossier par défaut pour les versions de Beat Saber et d'autres fonctionnalités à venir.",
"choose-folder": "Choisir un dossier"
},
"additional-content": {
"title": "Contenus additionnels",
"description": "Les contenus additionnels te permettent de personaliser Beat Saber!",
"deep-links": {
"sub-title": "Installations OneClick"
}
},
"language": {
"title": "Langage",
"description": "Sélectionne un langage.",
"languages": {
"en-EN": "English, UK",
"en-US": "English, US",
"fr-FR": "Français",
"es-ES": "Español",
"translated": {
"en-EN": "Anglais, Royaume-Uni",
"en-US": "Anglais, États-Unis",
"fr-FR": "Français",
"es-ES": "Espagnol"
}
}
},
"patreon": {
"title": "Soutenir BSManager 💖",
"description": "Soutiens le projet et aide-nous à fournir des améliorations continues à BSManager.",
"buttons": {
"support": "Soutenir BSManager 🥰",
"supporters": "Supporteurs 👀"
},
"view": {
"no-supporters": "Pas encore de supporteurs",
"sponsors": "Sponsors",
"supporters": "Supporteurs"
}
},
"discord":{
"description": "Prends part à la communauté de BSManager en nous suivant sur nos réseaux sociaux !"
},
"contribution": {
"description": "Propose de nouvelles fonctionnalités ou signale un bug pour contribuer à l'amélioration de BSManager !",
"buttons": {
"request-features": "Proposer une fonctionnalité",
"report-bug": "Signaler un bug",
"open-logs": "Ouvrir les logs"
}
}
}
},
"bs-download":{
"success":{
"titles":{
"download-success": "Téléchargement terminé",
"verification-finished":"Vérification terminée"
},
"notifications": {
"types": {
"error": "🚨 Erreur",
"warning": "⚠️ Attention",
"success": "🎉 Succès"
},
"common": {
"msg": {
"error-occurred": "Une erreur s'est produite"
}
},
"warnings":{
"msg":{
"ManifestChecksum": "Le manifest télécharger précédemment ne correspond pas au nouveau 🤔",
"ConnectionTimeout": "Ta connexion internet semble instable 🥶",
"ConnectionLost": "La connexion a été perdue, retentative...",
"ConnectionError": "Impossible de se connecter à Steam, retentative...",
"Unknown": "Quelque chose d'étrange c'est produit 🤔 Votre connexion est surement instable."
},
"shared": {
"errors": {
"titles": {
"operation-running": "Opération en cours",
"no-internet": "Pas d'internet"
},
"msg": {
"operation-running": "Attends la fin de l'opération en cours puis recommence.",
"no-internet": "Verifie ta connexion internet et recommence."
}
}
},
"errors":{
"msg":{
"Password": "Le mot de passe est invalide.",
"InvalidCredentials": "Ton e-mail ou mot de passe est invalide 😴",
"InvalidPassword": "Ton mot de passe est invalide 😕",
"NoManifest": "Aucun manifest n'a été trouvé.",
"DirectoryCreate": "Impossible d'installer les dossiers nécessaires.",
"NotAvailableApp": "Tu essayes de télécharger BeatSaber alors que tu ne l'as pas ? 🤣",
"DepotNotFound": "Impossible de télécharger BeatSaber 😥 réessaye plus tard 😕",
"NotCompleted": "Le téléchargement n'a pas pu se terminer ¯\\_(ツ)_/¯",
"InvalidManifest": "Impossible de télécharger BeatSaber 😥 réessaye plus tard 😕",
"NoValidKey": "Impossible de télécharger BeatSaber 😥 réessaye plus tard 😕",
"NoManifestCode": "Impossible de télécharger BeatSaber 😥 réessaye plus tard 😕",
"401": "Steam semble pas vouloir nous laisser télécharger BeatSaber 😢",
"404": "Impossible de contacter les serveurs de Steam.",
"Unknown": "Une erreur inconnue c'est produite ¯\\_(ツ)_/¯",
"NoServer": "Impossible de contacter les serveurs de Steam.",
"NotAllowed": "Apparemment tu n'es pas autorisé à télécharger BeatSaber 🥱",
"ConnectionTimeout": "Impossible de se connecter à Steam 😕",
"SteamLib": "Si tu à cette erreur, report le bug sur GitHub avec les logs stp.",
"ConnectionError": "Impossible de se connecter à Steam après 10 essais 🤯",
"LicenceError": "Impossible d'obtenir la liste des licences.",
"verification-failed": "La vérification a échoué, réessaye plus tard.",
"RateLimitExceeded": "Tu as essayé trop de fois attend un peu et recommence plus tard.",
"AlreadyDownloading": "Un téléchargement est déjà en cours",
"no-internet": "Pas de connexion internet."
},
"bs-download": {
"success": {
"titles": {
"download-success": "Téléchargement terminé",
"verification-finished": "Vérification terminée"
}
},
"warnings": {
"msg": {
"ManifestChecksum": "Le manifest téléchargé précédemment ne correspond pas au nouveau 🤔",
"ConnectionTimeout": "Ta connexion internet semble instable 🥶",
"ConnectionLost": "La connexion a été perdue, nouvelle tentative...",
"ConnectionError": "Impossible de se connecter à Steam, nouvelle tentative...",
"Unknown": "Quelque chose d'étrange s'est produit 🤔 Votre connexion est surement instable."
}
},
"errors": {
"titles":{
"dotnet-required": ".NET 6 Requis"
},
"msg": {
"401": "Steam ne semble pas vouloir nous laisser télécharger Beat Saber 😢",
"404": "Impossible de contacter les serveurs de Steam.",
"Password": "Le mot de passe est invalide.",
"InvalidCredentials": "Ton e-mail ou mot de passe est invalide 😴",
"InvalidPassword": "Ton mot de passe est invalide 😕",
"NoManifest": "Aucun manifest n'a été trouvé.",
"DirectoryCreate": "Impossible d'installer les dossiers nécessaires.",
"NotAvailableApp": "Tu essayes de télécharger Beat Saber alors que tu ne l'as pas ? 🤣",
"DepotNotFound": "Impossible de télécharger Beat Saber 😥 réessaye plus tard 😕",
"NotCompleted": "Le téléchargement n'a pas pu se terminer ¯\\_(ツ)_/¯",
"InvalidManifest": "Impossible de télécharger Beat Saber 😥 réessaye plus tard 😕",
"NoValidKey": "Impossible de télécharger Beat Saber 😥 réessaye plus tard 😕",
"NoManifestCode": "Impossible de télécharger Beat Saber 😥 réessaye plus tard 😕",
"Unknown": "Une erreur inconnue s'est produite ¯\\_(ツ)_/¯",
"NoServer": "Impossible de contacter les serveurs de Steam.",
"NotAllowed": "Apparemment tu n'es pas autorisé à télécharger Beat Saber 🥱",
"ConnectionTimeout": "Impossible de se connecter à Steam 😕",
"SteamLib": "Si tu as cette erreur, signale le bug sur GitHub avec les logs stp.",
"ConnectionError": "Impossible de se connecter à Steam après 10 essais 🤯",
"LicenceError": "Impossible d'obtenir la liste des licences.",
"verification-failed": "La vérification a échoué, réessaye plus tard.",
"RateLimitExceeded": "Tu as essayé trop de fois attends un peu et recommence plus tard.",
"AlreadyDownloading": "Un téléchargement est déjà en cours",
"no-internet": "Pas de connexion internet.",
"dotnet-required": ".NET 6 Runtime doit être installé pour pouvoir télécharger une version de Beat Saber. Télécharge-le en cliquant sur le bouton ci-dessous."
},
"actions":{
"download-dotnet": "Télécharger .NET 6"
}
}
}
},
"settings":{
"move-folder":{
},
"bs-import-version":{
"success":{
"titles":{
"transfer-finished":"Transfert terminé 👌"
}
"start-import": {
"title": "Importation en cours 👌",
"desc": "L'importation peut durer plusieurs minutes selon votre configuration."
},
"imported": {
"title": "Version importée 🎉"
}
},
"errors":{
"titles":{
"transfer-failed":"Le transfert a échoué 😕"
}
"import-error":{
"desc": "Vérifier que le dossier sélectionné est une installation de Beat Saber."
}
}
},
"steam":{
"success":{
"titles":{
"logout": "Déconnecté de Steam."
}
}
}
},
"bs-launch":{
"success":{
"titles":{
"launching": "Lancement...🚀"
}
},
"errors":{
"titles":{
"UNABLE_TO_LAUNCH": "Lancement impossible",
"STEAM_NOT_RUNNING": "Steam n'est pas lancé",
"BS_ALREADY_RUNNING": "BeatSaber est déjà lancé",
"EXE_NOT_FINDED": "Fichiers manquants",
"EXIT": "Arrêt brutal"
},
"settings": {
"move-folder": {
"success": {
"titles": {
"transfer-finished": "Transfert terminé 👌"
}
},
"errors": {
"titles": {
"transfer-failed": "Le transfert a échoué 😕"
}
}
},
"msg":{
"STEAM_NOT_RUNNING": "Steam doit être en cours d'exécution pour lancer BeatSaber.",
"BS_ALREADY_RUNNING": "Ferme BeatSaber avant de le lancer à nouveau.",
"EXE_NOT_FINDED": "Quelques fichiers semblent manquants. Essaye de vérifier les fichiers.",
"EXIT": "BeatSaber s'est arrêté brusquement, essaye de vérifier les fichiers."
}
}
},
"custom-version":{
"errors":{
"titles":{
"CantEditSteam": "Edition impossible",
"CantRename": "Renommage impossible",
"VersionAlreadExist": "Cette version existe déjà",
"CantClone": "Clonage impossible"
"steam": {
"success": {
"titles": {
"logout": "Déconnecté de Steam."
}
}
},
"msg":{
"CantEditSteam": "Tu ne peut pas éditer la version Steam. Tu peut la cloner par contre."
"additional-content":{
"deep-link": {
"select-all": "Tout sélectionner",
"activation":{
"success":{
"title":"OneClick activé !",
"description":"Les installations OneClick ont été activées."
},
"error":{
"description":"Impossible d'activer les installations OneClick."
}
},
"deactivation":{
"success":{
"title":"OneClick désactivé !",
"description":"Les installations OneClick ont été désactivées."
},
"error":{
"description":"Une erreur inconnue s'est produite."
}
},
"check-all-enabled":{
"title": "OneClick désactivée(s)",
"description": "Une ou plusieurs installations OneClick sont désactivées. Rendez-vous dans les paramètres pour les activer.",
"actions":{
"settings": "Paramètres",
"not-remind": "Ne plus me rappeler"
}
}
}
}
},
"success":{
"titles":{
"CloningFinished": "Clonage terminer 🎉"
}
}
}
},
"modals":{
"guard":{
"title": "Steam Guard",
"inputs":{
"guard-code":{
"label": "Code Guard",
"placeholder": "Entre ton code Guard"
}
},
"buttons":{
"submit": "Se connecter"
}
},
"steam-login":{
"title": "Connexion Steam",
"inputs":{
"username":{
"label": "Nom d'utilisateur",
"placeholder": "Entre ton nom d'utilisateur"
},
"bs-launch": {
"success": {
"titles": {
"launching": "Lancement...🚀"
}
},
"password":{
"label": "Mot de passe",
"placeholder": "Entre ton mot de passe"
},
"stay":{
"label": "Rester connecté"
"errors": {
"titles": {
"UNABLE_TO_LAUNCH": "Lancement impossible",
"STEAM_NOT_RUNNING": "Steam n'est pas lancé",
"OCULUS_NOT_RUNNING": "Oculus n'est pas lancé",
"BS_ALREADY_RUNNING": "Beat Saber est déjà lancé",
"EXE_NOT_FINDED": "Fichiers manquants",
"EXIT": "Arrêt brutal"
},
"msg": {
"STEAM_NOT_RUNNING": "Steam doit être en cours d'exécution pour lancer Beat Saber.",
"OCULUS_NOT_RUNNING": "Oculus doit être en cours d'exécution pour lancer Beat Saber.",
"BS_ALREADY_RUNNING": "Ferme Beat Saber avant de le lancer à nouveau.",
"EXE_NOT_FINDED": "Quelques fichiers semblent manquants. Essaye de vérifier les fichiers.",
"EXIT": "BeatSaber s'est arrêté brusquement, essaye de vérifier les fichiers."
},
"actions":{
"STEAM_NOT_RUNNING": "Lancer Steam"
}
}
},
"buttons":{
"submit": "Se connecter"
}
},
"bs-uninstall":{
"title": "Désinstaller",
"description": "Est tu sûr de vouloir désinstaller BeatSaber {version} ? Tu vas devoir la retélécharger pour y jouer.",
"buttons":{
"submit": "Désinstaller"
}
},
"install-folder":{
"title": "Dossier d'installation",
"description": "Changer le dossier d'installation par défaut, va engendrer le déplacement de toutes les données installer vers le nouveau dossier.",
"buttons":{
"submit": "Choisir un dossier"
}
},
"edit-version":{
"title": "Editer la version",
"buttons":{
"submit": "Editer"
}
},
"clone-version":{
"title": "Cloner la version",
"description": "Cloner la version te permet de séparer les contenus additionnels de BeatSaber entre deux mêmes versions.",
"buttons":{
"submit": "Cloner"
}
}
},
"auto-update":{
"checking": "Vérification des mises à jour",
"downloading": "Téléchargement des mises à jour"
},
"dateformat":{
},
"steam":{
"steam-launching":{
"title": "Steam se lance !",
"description": "Steam peut mettre quelque temps à se lancer selon votre configuration."
}
},
"custom-version": {
"errors": {
"titles": {
"CantEditSteam": "Edition impossible",
"CantRename": "Renommage impossible",
"VersionAlreadExist": "Cette version existe déjà",
"CantClone": "Clonage impossible"
},
"msg": {
"CantEditSteam": "Tu ne peux pas éditer la version Steam. Tu peux la cloner par contre."
}
},
"success": {
"titles": {
"CloningFinished": "Clonage terminé 🎉"
}
}
},
"mods": {
"install-mods": {
"titles": {
"success": "Mods installés 🎉",
"warning": "Mods installés 🤔"
},
"msg": {
"success": "Tous les mods ont été installés.",
"warning": "Un ou plusieurs mods n'ont pas pu être installés.",
"errors": {
"no-mods": "Aucun mod à installer.",
"cannot-install-bsipa": "L'installation de BSIPA à échoué 😨"
}
}
},
"uninstall-mod": {
"titles": {
"success": "Mod désintallé 🎉"
},
"msg": {
"errors": {
"no-mods": "Ce mod n'est pas installé 😑"
}
}
},
"uninstall-all-mods": {
"titles": {
"success": "Mods désintallés 🎉"
},
"msg": {
"success": "Tous les mods ont été désintallés.",
"errors": {
"no-mods": "Aucun mod n'est installé dans dans cette version 😑"
}
}
}
},
"maps":{
"one-click-install":{
"success":"Installation de la map terminée",
"error":"Une erreur s'est produite lors de l'installation de la map"
}
},
"playlists":{
"one-click-install":{
"success":"Installation de la playlist terminée",
"error":"Une erreur s'est produite lors de l'installation de la playlist"
}
},
"models":{
"one-click-install":{
"success":"Installation du modèle terminée",
"error":"Une erreur s'est produite lors de l'installation du modèle"
}
},
"shared-folder":{
"info": {
"userdata-backup-created":{
"title": "Sauvegarde créée",
"msg": "Le partage du dossier 'UserData' peut générer des erreurs, en cas de soucis déliez le dossier pour restaurer la sauvegarde"
}
}
}
},
"modals": {
"misc":{
"remember-my-choice": "Se souvenir de mon choix"
},
"guard": {
"title": "Steam Guard",
"inputs": {
"guard-code": {
"label": "Code Guard",
"placeholder": "Entre ton code Guard"
}
},
"buttons": {
"submit": "Se connecter"
}
},
"steam-login": {
"title": "Connexion Steam",
"inputs": {
"username": {
"label": "Nom d'utilisateur",
"placeholder": "Entre ton nom d'utilisateur"
},
"password": {
"label": "Mot de passe",
"placeholder": "Entre ton mot de passe"
},
"stay": {
"label": "Rester connecté"
}
},
"why-credentials": "Pourquoi mes identifiants sont nécessaires ?",
"buttons": {
"submit": "Se connecter"
}
},
"steam-credentials":{
"title": "Steam Credentials",
"p-1": "Les informations d'identification ne sont utilisées que pour télécharger le jeu, car Steam doit vérifier que vous avez payé le jeu afin d'être autorisé à le télécharger. Ils ne sont pas sauvegardés et transmis directement à DepotDownloader. Si vous ne voulez pas entrer vos informations d'identification, vous pouvez suivre ce tutoriel :",
"p-2": "puis cliquez sur l'icône de l'engrenage dans le coin supérieur droit et sélectionnez \"Importer une version\", sélectionnez le dossier où beat saber a été téléchargé (Si vous suivez le tutoriel ci-dessus, vous devriez avoir le bon emplacement)."
},
"bs-import-version":{
"title": "Importer une version",
"description": "Importe une version de BeatSaber pour profiter des fonctionnalités de BSManager. L'importation copiera le dossier d'installation de BeatSaber sélectionné dans le dossier de versions de BSManager.",
"buttons":{
"submit": "Importer une version"
}
},
"bs-uninstall": {
"title": "Désinstaller",
"description": "Es-tu sûr de vouloir désinstaller Beat Saber {version} ? Tu vas devoir la retélécharger pour y jouer.",
"buttons": {
"submit": "Désinstaller"
}
},
"install-folder": {
"title": "Dossier d'installation",
"description": "Changer le dossier d'installation par défaut, cela va engendrer le déplacement de toutes les données installer vers le nouveau dossier.",
"buttons": {
"submit": "Choisir un dossier"
}
},
"edit-version": {
"title": "Editer la version",
"buttons": {
"submit": "Editer"
}
},
"clone-version": {
"title": "Cloner la version",
"description": "Cloner la version te permet de séparer les contenus additionnels de BeatSaber entre deux mêmes versions.",
"inputs": {
"name": {
"label": "Nom",
"placeholder": "Nom de la version"
},
"color": {
"label": "Couleur"
}
},
"buttons": {
"submit": "Cloner"
}
},
"uninstall-mod": {
"title": "Désinstaller",
"description": "Es-tu sûr de vouloir désinstaller {mod} ? Cela pourrait faire dysfonctionner d'autres mods installés.",
"description-bsipa": "Es-tu sûr de vouloir désinstaller BSIPA ? Après cela, tous les mods installés ne fonctionneront plus."
},
"uninstall-all-mods": {
"title": "Désinstaller les mods",
"description": "Es-tu sûr de vouloir désinstaller tous les mods de la version {version} ? Cette opération ne pourra pas être annulée."
},
"maps-actions": {
"delete-maps": {
"title": {
"single": "Supprimer la map ?",
"multiple": "Supprimer les maps ?"
},
"desc": {
"single": "Es-tu sur de vouloir supprimer la map {name} ?",
"multiple": "Es-tu sur de vouloir supprimer les {nb} maps ?"
},
"info": {
"desc": {
"single": "Cette map fait partie des maps partagées",
"multiple": "Ces maps font parties des maps partagées"
},
"title": {
"single": "Cette map sera également supprimée des versions utilisant les maps partagées",
"multiple": "Ces maps seront égalements supprimées des versions utilisant les maps partagées"
}
}
},
"link-maps": {
"title": "Lier les maps",
"desc": "La liaison des maps permet de partager les maps entre toute les version. Une fois liée, cette version profitera des maps partagées",
"info": "L'ajout et la suppression de maps sera également partagé",
"keep-maps": {
"label": "Conserver les maps",
"title": "Conserver les maps déplacera les maps de la version actuelle dans le dossier des maps partagées. Dans le cas contraire elles seront perdues"
},
"valid-btn": "Lier les maps"
},
"unlink-maps": {
"title": "Délier les maps",
"desc": "Attention, délier les maps ne permettra plus l'utilisation des maps paratagées pour cette version.",
"keep-maps": {
"label": "Conserver les maps",
"title": "Conserver les maps créera une copie des maps partagées pour la version actuelle. Dans le cas contraire, aucune map ne sera conservée pour cette version."
},
"valid-btn": "Délier les maps"
}
},
"download-maps": {
"search-btn": "Rechercher",
"loading-maps": "Chargement des maps...",
"no-maps-found": "Aucune map trouvée",
"no-internet": "Pas d'internet"
},
"mods-disclaimer":{
"title": "avis de non-responsabilité",
"p-1": "En choisissant d'utiliser des mods, vous comprenez et acceptez que :",
"li-1": "Vous pouvez rencontrer des problèmes qui n'existent pas dans le jeu de base. 99.9% des bugs, plantages et ralentissements sont dus aux mods.",
"li-2": "Les mods sont susceptibles de ne plus fonctionner à cause des mises à jour et c'est normal - soyez patient et respectueux lorsque cela se produit, parce que les moddeurs sont bénévoles et ont une vie.",
"li-3": "Beat Games ne cherche pas volontairement à casser les mods. Ils souhaitent améliorer la base du jeu et parfois cela casse les mods, mais ce n'est pas dans leur objectif de tuer les mods.",
"p-2": "N'attaquez pas les développeurs pour des problèmes relatifs aux mods, et inversement - les moddeurs et les développeurs sont deux groupes distincts. Ne soyez pas idiots, d'accord ?"
},
"shared-folders":{
"title": "Dossiers Partagés",
"description": "Liez les dossiers de BeatSaber pour synchroniser leurs contenus avec les dossiers partagés des autres versions. Notez que la suppression de contenu sera également partagée.",
"buttons": {
"add-folder": "Ajouter un dossier",
"link-folder": "Lier le dossier",
"unlink-folder": "Délier le dossier"
}
}
},
"maps": {
"map-filter-panel": {
"duration": "Durée",
"tags": "tags",
"specificities": "général",
"requirements": "requis"
},
"map-types": {
"accuracy": "précision",
"balanced": "équilibrée",
"challenge": "challenge",
"dancestyle": "dance",
"fitness": "fitness",
"speed": "vitesse",
"tech": "tech"
},
"map-styles": {
"dance": "dance",
"swing": "swing",
"nightcore": "nightcore",
"folk": "folk",
"family": "famille",
"ambient": "ambiante",
"funk": "funk",
"jazz": "jazz",
"soul": "soul",
"speedcore": "speedcore",
"punk": "punk",
"rb": "r&b",
"holiday": "vacance",
"vocaloid": "vocaloid",
"jrock": "j-rock",
"trance": "trance",
"drumbass": "drum & bass",
"comedy": "comédie",
"instrumental": "instrumental",
"hardcore": "hardcore",
"kpop": "k-pop",
"indie": "indé",
"techno": "techno",
"house": "house",
"game": "jeu vidéo",
"film": "film",
"alt": "alternative",
"dubstep": "dubstep",
"metal": "metal",
"anime": "anime",
"hiphop": "hiphop",
"jpop": "j-pop",
"rock": "rock",
"pop": "pop",
"electronic": "éléctronique",
"classical-orchestral": "Classique & Orchestral"
},
"map-specificities": {
"automapper": "IA",
"ranked": "classée",
"curated": "recommandée",
"verified": "vérifiée",
"fullSpread": "panel complet"
},
"difficulties": {
"Easy": "facile",
"Normal": "normal",
"Hard": "difficile",
"Expert": "expert",
"ExpertPlus": "expert+"
},
"map-item": {
"by": "Par {songAutor}",
"mapped-by": "mappée par"
}
},
"beat-saver": {
"maps-sorts": {
"Latest": "Dernière",
"Relevance": "Pertinence",
"Rating": "Notes",
"Curated": "Recommandée"
}
},
"auto-update": {
"checking": "Vérification des mises à jour",
"downloading": "Téléchargement des mises à jour"
},
"dateformat": {
"dayNames": [
"Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam",
"Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"
"Dim",
"Lun",
"Mar",
"Mer",
"Jeu",
"Ven",
"Sam",
"Dimanche",
"Lundi",
"Mardi",
"Mercredi",
"Jeudi",
"Vendredi",
"Samedi"
],
"monthNames": [
"Jan", "Fév", "Mar", "Avr", "Mai", "Jun", "Juil", "Aou", "Sept", "Oct", "Nov", "Déc",
"Janvier", "Février", "Mars", "Avril", "Mai", "Juin",
"Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"
"Jan",
"Fév",
"Mar",
"Avr",
"Mai",
"Jun",
"Juil",
"Aou",
"Sept",
"Oct",
"Nov",
"Déc",
"Janvier",
"Février",
"Mars",
"Avril",
"Mai",
"Juin",
"Juillet",
"Août",
"Septembre",
"Octobre",
"Novembre",
"Décembre"
],
"timeNames": [
"a", "p", "am", "pm", "A", "P", "AM", "PM"
"a",
"p",
"am",
"pm",
"A",
"P",
"AM",
"PM"
]
}
}
}
+22607 -2664
View File
File diff suppressed because it is too large Load Diff
+32 -12
View File
@@ -74,9 +74,11 @@
},
"win": {
"target": [
"nsis"
"nsis",
"nsis-web"
],
"icon": "assets/favicon.ico"
"icon": "assets/favicon.ico",
"certificateSha1": "f3363a89b084f8f6b616babea3c91f9d79e15000"
},
"linux": {
"target": [
@@ -153,11 +155,11 @@
"@types/jest": "^27.5.2",
"@types/node": "17.0.23",
"@types/react": "^17.0.48",
"@types/react-dom": "^17.0.17",
"@types/react-dom": "^18.0.10",
"@types/react-outside-click-handler": "^1.3.1",
"@types/react-test-renderer": "^17.0.2",
"@types/terser-webpack-plugin": "^5.0.4",
"@types/uuid": "^8.3.4",
"@types/use-double-click": "^1.0.1",
"@types/webpack-bundle-analyzer": "^4.4.2",
"@types/webpack-env": "^1.18.0",
"@typescript-eslint/eslint-plugin": "^5.34.0",
@@ -169,10 +171,10 @@
"core-js": "^3.24.1",
"cross-env": "^7.0.3",
"css-loader": "^6.7.1",
"css-minimizer-webpack-plugin": "^3.4.1",
"css-minimizer-webpack-plugin": "^4.1.0",
"detect-port": "^1.3.0",
"electron": "^20.0.3",
"electron-builder": "^23.3.3",
"electron-builder": "^23.6.0",
"electron-devtools-installer": "^3.2.0",
"electron-notarize": "^1.2.1",
"electron-rebuild": "^3.2.9",
@@ -199,6 +201,7 @@
"postcss": "^8.4.16",
"postcss-loader": "^6.2.1",
"prettier": "^2.7.1",
"ps-scrollbar-tailwind": "0.0.1",
"react-refresh": "^0.12.0",
"react-refresh-typescript": "^2.0.7",
"react-test-renderer": "^18.2.0",
@@ -206,8 +209,8 @@
"sass": "^1.54.5",
"sass-loader": "^12.6.0",
"style-loader": "^3.3.1",
"tailwind-scrollbar": "^1.3.1",
"tailwindcss": "^3.1.8",
"tailwind-scrollbar": "^2.0.1",
"tailwindcss": "^3.2.4",
"terser-webpack-plugin": "^5.3.5",
"ts-jest": "^27.1.5",
"ts-loader": "^9.3.0",
@@ -222,6 +225,10 @@
},
"dependencies": {
"@node-steam/vdf": "^2.2.0",
"@tippyjs/react": "^4.2.6",
"@types/react-virtualized-auto-sizer": "^1.0.1",
"@types/react-window": "^1.8.5",
"@types/recursive-readdir": "^2.2.1",
"archiver": "^5.3.1",
"dateformat": "^5.0.3",
"dot-prop": "^7.2.0",
@@ -229,19 +236,32 @@
"electron-log": "^4.4.8",
"electron-store": "^8.1.0",
"electron-updater": "^5.2.4",
"framer-motion": "^7.2.1",
"fast-deep-equal": "^3.1.3",
"framer-motion": "^8.0.2",
"fs-extra": "^10.1.0",
"history": "^5.3.0",
"is-online": "^9.0.1",
"md5-file": "^5.0.0",
"node-fetch": "^3.3.0",
"node-stream-zip": "^1.15.0",
"react": "^18.2.0",
"react-colorful": "^5.6.1",
"react-dom": "^18.2.0",
"react-fitty": "^1.0.1",
"react-outside-click-handler": "^1.3.0",
"react-range": "^1.8.14",
"react-router-dom": "^6.3.0",
"react-virtualized-auto-sizer": "^1.0.7",
"react-window": "^1.8.8",
"recursive-readdir": "^2.2.3",
"regedit": "^5.1.1",
"rfdc": "^1.3.0",
"rxjs": "^7.5.6",
"sanitize-filename": "^1.6.3",
"semver": "^7.3.8",
"tailwind-scrollbar-hide": "^1.1.7",
"uuid": "^8.3.2"
"tailwindcss-scoped-groups": "^2.0.0",
"use-delayed-state": "^1.2.0",
"use-double-click": "^1.0.5",
"use-fit-text": "^2.4.0"
},
"devEngines": {
"node": ">=14.x",
+6
View File
@@ -0,0 +1,6 @@
const tailwindcss = require("tailwindcss");
const autoprefixer = require("autoprefixer");
module.exports = {
plugins: [tailwindcss, autoprefixer],
};
+60
View File
@@ -0,0 +1,60 @@
<!--
Please use the content below as a template for your pull request.
Feel free to remove sections which do not make sense.
-->
## Scope
<!-- Brief description of WHAT youre doing and WHY. -->
[closes TICKET-###](https://link-to-your-ticket)
## Implementation
<!--
Some description of HOW you achieved it. Perhaps give a high level description of the program flow. Did you need to refactor something? What tradeoffs did you take? Are there things in here which youd particularly like people to pay close attention to?
-->
## Screenshots
| before | after |
| ------ | ----- |
| | |
## How to Test
<!--
A straightforward scenario of how to test your changes could help colleagues that are not familiar with the part of the code that you are changing but want to see it in action. This section can include a description or step-by-step instructions of how to get to the state of v2 that your change affects.
A "How To Test" section can look something like this:
- Sign in with a user with tracks
- Activate `show_awesome_cat_gifs` feature (add `?feature.show_awesome_cat_gifs=1` to your URL)
- You should see a GIF with cats dancing
-->
## Emoji Guide
**For reviewers: Emojis can be added to comments to call out blocking versus non-blocking feedback.**
E.g: Praise, minor suggestions, or clarifying questions that dont block merging the PR.
> 🟢 Nice refactor!
> 🟡 Why was the default value removed?
E.g: Blocking feedback must be addressed before merging.
> 🔴 This change will break something important
| | | |
| --- | --- | --- |
| Blocking | 🔴 ❌ 🚨 | RED |
| Non-blocking | 🟡 💡 🤔 💭 | Yellow, thinking, etc |
| Praise | 🟢 💚 😍 👍 🙌 | Green, hearts, positive emojis, etc |
+1229 -11
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "BSManager",
"version": "0.0.8",
"name": "bs-manager",
"version": "1.1.0-alpha.2",
"description": "A foundation for scalable desktop apps",
"main": "./dist/main/main.js",
"author": {
Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 965 KiB

+1 -1
View File
@@ -1,6 +1,6 @@
import '@testing-library/jest-dom';
import { render } from '@testing-library/react';
import App from '../renderer/App';
import App from '../renderer/windows/App';
describe('App', () => {
it('should render', () => {
+4
View File
@@ -1,3 +1,7 @@
export const BS_EXECUTABLE = "Beat Saber.exe";
export const OCULUS_BS_DIR = "hyperbolic-magnetism-beat-saber"
export const BS_APP_ID = "620980";
export const BS_DEPOT = "620981";
export const APP_NAME = "BSManager";
export const STEAMVR_APP_ID = "250820";
+7
View File
@@ -0,0 +1,7 @@
export function splitIntoChunk<T = unknown>(arr: T[], chunkSize: number): T[][] {
const resArr = [];
for(let i = 0; i < arr.length; i += chunkSize){
resArr.push(arr.slice(i, i + chunkSize));
}
return resArr;
}
+89
View File
@@ -0,0 +1,89 @@
import { move } from "fs-extra";
import { access, mkdir, rm, readdir, unlink, lstat, readlink } from "fs/promises";
import path from "path";
import { Observable } from "rxjs";
import log from "electron-log"
export async function pathExist(path: string): Promise<boolean> {
try{
await access(path);
return true;
}catch(e){
return false;
}
}
export async function ensureFolderExist(path: string): Promise<void> {
if(await pathExist(path)){ return Promise.resolve(); }
return mkdir(path, {recursive: true}).catch(log.error).then(() => {});
}
export async function deleteFolder(folderPath: string): Promise<void> {
if(!(await pathExist(folderPath))){ return; }
return rm(folderPath, {recursive: true, force: true});
}
export async function unlinkPath(path: string): Promise<void>{
if(!(await pathExist(path))){ return; }
return unlink(path);
}
export async function getFoldersInFolder(folderPath: string): Promise<string[]> {
if(!(await pathExist(folderPath))){ return []; }
const files = await readdir(folderPath, {withFileTypes: true});
const promises = files.map(async file => {
if(file.isDirectory()){ return path.join(folderPath, file.name); }
if(!file.isSymbolicLink()){ return undefined; }
try{
const targetPath = await readlink(path.join(folderPath, file.name));
return (await lstat(targetPath)).isDirectory() ? path.join(folderPath, file.name) : undefined;
}catch(e){
return undefined;
}
});
return (await Promise.all(promises)).filter(folder => folder);
}
export function moveFolderContent(src: string, dest: string): Observable<Progression>{
const progress: Progression = { current: 0, total: 0 };
return new Observable<Progression>(subscriber => {
subscriber.next(progress);
(async () => {
const srcExist = await pathExist(src);
if(!srcExist){ return subscriber.complete(); }
ensureFolderExist(dest);
const files = await readdir(src, {encoding: "utf-8"});
progress.total = files.length;
const promises = files.map(async file => {
const srcFullPath = path.join(src, file);
const destFullPath = path.join(dest, file);
if(await pathExist(destFullPath)){
progress.current++;
return subscriber.next(progress);
}
await move(srcFullPath, destFullPath);
progress.current++;
subscriber.next(progress);
});
Promise.allSettled(promises).then(() => subscriber.complete());
})();
});
}
export interface Progression<T = unknown>{
total: number;
current: number;
extra?: T;
}
+9
View File
@@ -0,0 +1,9 @@
export function isValidUrl(url: string): boolean{
try{
new URL(url);
return true;
}
catch(e){
return false;
}
}
+51
View File
@@ -0,0 +1,51 @@
import { ipcMain } from "electron";
import { UtilsService } from "../services/utils.service";
import { IpcRequest } from "shared/models/ipc";
import { SearchParams } from "shared/models/maps/beat-saver.model";
import { BeatSaverService } from "../services/thrid-party/beat-saver/beat-saver.service";
import log from "electron-log";
ipcMain.on("bsv-search-map", async (event, request: IpcRequest<SearchParams>) => {
const utlis = UtilsService.getInstance();
const bsvService = BeatSaverService.getInstance();
bsvService.searchMaps(request.args).then(maps => {
utlis.ipcSend(request.responceChannel, {success: true, data: maps});
}).catch(e => {
utlis.ipcSend(request.responceChannel, {success: false, error: e});
})
});
ipcMain.on("bsv-get-map-details-from-hashs", async (event, request: IpcRequest<string[]>) => {
const utlis = UtilsService.getInstance();
const bsvService = BeatSaverService.getInstance();
bsvService.getMapDetailsFromHashs(request.args).then(maps => {
utlis.ipcSend(request.responceChannel, {success: true, data: maps});
}).catch(e => {
log.error(e);
utlis.ipcSend(request.responceChannel, {success: false, error: e});
})
});
ipcMain.on("bsv-get-map-details-by-id", async (event, request: IpcRequest<string>) => {
const utlis = UtilsService.getInstance();
const bsvService = BeatSaverService.getInstance();
bsvService.getMapDetailsById(request.args).then(maps => {
utlis.ipcSend(request.responceChannel, {success: true, data: maps});
}).catch(e => {
utlis.ipcSend(request.responceChannel, {success: false, error: e});
})
});
ipcMain.on("bsv-get-playlist-details-by-id", async (event, request: IpcRequest<string>) => {
const utlis = UtilsService.getInstance();
const bsvService = BeatSaverService.getInstance();
bsvService.getPlaylistPage(request.args).then(maps => {
utlis.ipcSend(request.responceChannel, {success: true, data: maps});
}).catch(e => {
utlis.ipcSend(request.responceChannel, {success: false, error: e});
})
});
+21 -9
View File
@@ -1,10 +1,10 @@
import { ipcMain } from 'electron';
import { BSVersion } from 'shared/bs-version.interface';
import { BSInstallerService, DownloadEventType } from '../services/bs-installer.service';
import { BSInstallerService, DownloadEventType, DownloadInfo } from '../services/bs-installer.service';
import { IpcRequest } from 'shared/models/ipc';
import { InstallationLocationService } from '../services/installation-location.service';
import { UtilsService } from '../services/utils.service';
import { BsmException } from 'shared/models/bsm-exception.model';
import { LocalMapsManagerService } from '../services/additional-content/local-maps-manager.service';
export interface InitDownloadInfoInterface {
@@ -17,15 +17,17 @@ export interface InitDownloadInfoInterface {
stay: boolean
}
export interface DownloadInfo {
bsVersion: BSVersion,
username: string,
password?: string,
stay?: boolean
}
ipcMain.on('is-dotnet-6-installed', async (event, request: IpcRequest<void>) => {
const installer = BSInstallerService.getInstance();
const utils = UtilsService.getInstance();
installer.isDotNet6Installed().then(installed => {
utils.ipcSend(request.responceChannel, {success: true, data: installed});
});
});
ipcMain.on('bs-download.start', async (event, request: IpcRequest<DownloadInfo>) => {
BSInstallerService.getInstance().downloadBsVersion(request.args).then(res => {
BSInstallerService.getInstance().downloadBsVersion(request.args).then(async res => {
await LocalMapsManagerService.getInstance().linkVersionMaps(request.args.bsVersion, true).catch(e => {});
UtilsService.getInstance().ipcSend(request.responceChannel, {success: true, data: res});
}).catch(e => {
UtilsService.getInstance().ipcSend(request.responceChannel, {success: false, data: e});
@@ -55,4 +57,14 @@ ipcMain.on('bs-download.set-installation-folder', (event, request: IpcRequest<st
});
})
ipcMain.on('bs-download.import-version', (event, request: IpcRequest<string>) => {
const utils = UtilsService.getInstance();
const installer = BSInstallerService.getInstance();
installer.importVersion(request.args).catch(e => {
utils.ipcSend(request.responceChannel, {success: false, error: e});
}).then(() => {
utils.ipcSend(request.responceChannel, {success: true});
});
})
-1
View File
@@ -10,7 +10,6 @@ ipcMain.on('bs-launch.launch', (event, request: IpcRequest<LauchOption>) => {
const utilsService = UtilsService.getInstance();
launcherService.launch(request.args).then(res => {
console.log("BEAT SABER LANCER");
utilsService.ipcSend(request.responceChannel, {success: true, data: res});
}).catch((err: BsmException) => {
utilsService.ipcSend(request.responceChannel, {success: false, error: err});
+124
View File
@@ -0,0 +1,124 @@
import { LocalMapsManagerService } from "../services/additional-content/local-maps-manager.service";
import { UtilsService } from "../services/utils.service";
import { BSVersion } from "shared/bs-version.interface";
import { IpcRequest } from "shared/models/ipc";
import { BsmLocalMap } from "shared/models/maps/bsm-local-map.interface";
import { BsvMapDetail } from "shared/models/maps";
import { IpcService } from "../services/ipc.service";
import { from } from "rxjs";
const ipc = IpcService.getInstance();
ipc.on('load-version-maps', async (request: IpcRequest<BSVersion>, reply) => {
const localMaps = LocalMapsManagerService.getInstance();
reply(localMaps.getMaps(request.args));
});
ipc.on("verion-have-maps-linked", async (request: IpcRequest<BSVersion>) => {
const utils = UtilsService.getInstance();
const maps = LocalMapsManagerService.getInstance();
utils.ipcSend<boolean>(request.responceChannel, {success: true, data: await maps.versionIsLinked(request.args)});
});
ipc.on("link-version-maps", async (request: IpcRequest<{version: BSVersion, keepMaps: boolean}>) => {
const utils = UtilsService.getInstance();
const maps = LocalMapsManagerService.getInstance();
maps.linkVersionMaps(request.args.version, request.args.keepMaps).then(() => {
utils.ipcSend<void>(request.responceChannel, {success: true});
}).catch(err => {
utils.ipcSend<void>(request.responceChannel, {success: true, error: err});
});
});
ipc.on("unlink-version-maps", async (request: IpcRequest<{version: BSVersion, keepMaps: boolean}>) => {
const utils = UtilsService.getInstance();
const maps = LocalMapsManagerService.getInstance();
maps.unlinkVersionMaps(request.args.version, request.args.keepMaps).then(() => {
utils.ipcSend<void>(request.responceChannel, {success: true});
}).catch(err => {
utils.ipcSend<void>(request.responceChannel, {success: true, error: err});
});
});
ipc.on("delete-maps", async (request: IpcRequest<BsmLocalMap[]>, reply) => {
const maps = LocalMapsManagerService.getInstance();
reply(maps.deleteMaps(request.args));
});
ipc.on("export-maps", async (request: IpcRequest<{version: BSVersion, maps: BsmLocalMap[], outPath: string}>, reply) => {
const maps = LocalMapsManagerService.getInstance();
reply(await maps.exportMaps(request.args.version, request.args.maps, request.args.outPath));
});
ipc.on("download-map", async (request: IpcRequest<{map: BsvMapDetail, version: BSVersion}>, reply) => {
const maps = LocalMapsManagerService.getInstance();
reply(from(maps.downloadMap(request.args.map, request.args.version)))
});
ipc.on("one-click-install-map", async (request: IpcRequest<BsvMapDetail>) => {
const utils = UtilsService.getInstance();
const maps = LocalMapsManagerService.getInstance();
maps.oneClickDownloadMap(request.args).then(() => {
utils.ipcSend(request.responceChannel, {success: true});
}).catch(err => {
utils.ipcSend(request.responceChannel, {success: false, error: err});
});
});
ipc.on("register-maps-deep-link", async (request: IpcRequest<void>) => {
const maps = LocalMapsManagerService.getInstance();
const utils = UtilsService.getInstance();
try{
const res = maps.enableDeepLinks();
utils.ipcSend(request.responceChannel, {success: true, data: res});
}
catch(e){
utils.ipcSend(request.responceChannel, {success: false});
}
});
ipc.on("unregister-maps-deep-link", async (request: IpcRequest<void>) => {
const maps = LocalMapsManagerService.getInstance();
const utils = UtilsService.getInstance();
try{
const res = maps.disableDeepLinks();
utils.ipcSend(request.responceChannel, {success: true, data: res});
}
catch(e){
utils.ipcSend(request.responceChannel, {success: false});
}
});
ipc.on("is-map-deep-links-enabled", async (request: IpcRequest<void>) => {
const maps = LocalMapsManagerService.getInstance();
const utils = UtilsService.getInstance();
try{
const res = maps.isDeepLinksEnabled();
utils.ipcSend(request.responceChannel, {success: true, data: res});
}
catch(e){
utils.ipcSend(request.responceChannel, {success: false});
}
});
ipc.on("get-version-maps-path", async (req: IpcRequest<BSVersion>, reply) => {
const maps = LocalMapsManagerService.getInstance();
reply(from(maps.getMapsFolderPath(req.args)));
});
+61
View File
@@ -0,0 +1,61 @@
import { ipcMain } from "electron";
import { UtilsService } from "../services/utils.service";
import { IpcRequest } from "shared/models/ipc";
import { MSModel } from "shared/models/model-saber/model-saber.model";
import { LocalModelsManagerService } from "../services/additional-content/local-models-manager.service";
ipcMain.on("one-click-install-model", async (event, request: IpcRequest<MSModel>) => {
const utils = UtilsService.getInstance();
const models = LocalModelsManagerService.getInstance();
models.oneClickDownloadModel(request.args).then(() => {
utils.ipcSend(request.responceChannel, {success: true});
}).catch(e => {
utils.ipcSend(request.responceChannel, {success: false, error: e});
})
});
ipcMain.on("register-models-deep-link", async (event, request: IpcRequest<void>) => {
const maps = LocalModelsManagerService.getInstance();
const utils = UtilsService.getInstance();
try{
const res = maps.enableDeepLinks();
utils.ipcSend(request.responceChannel, {success: true, data: res});
}
catch(e){
utils.ipcSend(request.responceChannel, {success: false});
}
});
ipcMain.on("unregister-models-deep-link", async (event, request: IpcRequest<void>) => {
const maps = LocalModelsManagerService.getInstance();
const utils = UtilsService.getInstance();
try{
const res = maps.disableDeepLinks();
utils.ipcSend(request.responceChannel, {success: true, data: res});
}
catch(e){
utils.ipcSend(request.responceChannel, {success: false});
}
});
ipcMain.on("is-models-deep-links-enabled", async (event, request: IpcRequest<void>) => {
const maps = LocalModelsManagerService.getInstance();
const utils = UtilsService.getInstance();
try{
const res = maps.isDeepLinksEnabled();
utils.ipcSend(request.responceChannel, {success: true, data: res});
}
catch(e){
utils.ipcSend(request.responceChannel, {success: false});
}
});
+68
View File
@@ -0,0 +1,68 @@
import { ipcMain } from "electron";
import { BsModsManagerService } from "../services/mods/bs-mods-manager.service";
import { UtilsService } from "../services/utils.service";
import { BSVersion } from "shared/bs-version.interface";
import { IpcRequest } from "shared/models/ipc";
import { Mod } from "shared/models/mods/mod.interface";
import { InstallModsResult } from "shared/models/mods";
import log from "electron-log";
ipcMain.on("get-available-mods", (event, request: IpcRequest<BSVersion>) => {
const utils = UtilsService.getInstance();
const modsManager = BsModsManagerService.getInstance();
modsManager.getAvailableMods(request.args).then(mods => {
utils.ipcSend(request.responceChannel, {success: true, data: mods});
}).catch(err =>{
utils.ipcSend(request.responceChannel, {success: false});
log.error("ipc", "get-available-mods", err, request);
});
});
ipcMain.on("get-installed-mods", (event, request: IpcRequest<BSVersion>) => {
const utils = UtilsService.getInstance();
const modsManager = BsModsManagerService.getInstance();
modsManager.getInstalledMods(request.args).then(mods => {
utils.ipcSend(request.responceChannel, {success: true, data: mods});
}).catch(err => {
utils.ipcSend(request.responceChannel, {success: false});
log.error("ipc", "get-installed-mods", err, request);
});
});
ipcMain.on("install-mods", (event, request: IpcRequest<{mods: Mod[], version: BSVersion}>) => {
const utils = UtilsService.getInstance();
const modsManager = BsModsManagerService.getInstance();
modsManager.installMods(request.args.mods, request.args.version).then(nbInstalled => {
utils.ipcSend<InstallModsResult>(request.responceChannel, {success: true, data: nbInstalled})
}).catch(err => {
utils.ipcSend(request.responceChannel, {success: false, error: err});
log.error("ipc", "install-mods", err, request);
})
});
ipcMain.on("uninstall-mods", (event, request: IpcRequest<{mods: Mod[], version: BSVersion}>) => {
const utils = UtilsService.getInstance();
const modsManager = BsModsManagerService.getInstance();
modsManager.uninstallMods(request.args.mods, request.args.version).then(nbInstalled => {
utils.ipcSend(request.responceChannel, {success: true, data: nbInstalled})
}).catch(err => {
utils.ipcSend(request.responceChannel, {success: false, error: err});
log.error("ipc", "uninstall-mods", err, request);
})
});
ipcMain.on("uninstall-all-mods", (event, request: IpcRequest<BSVersion>) => {
const utils = UtilsService.getInstance();
const modsManager = BsModsManagerService.getInstance();
modsManager.uninstallAllMods(request.args).then(nbInstalled => {
utils.ipcSend(request.responceChannel, {success: true, data: nbInstalled})
}).catch(err => {
utils.ipcSend(request.responceChannel, {success: false, error: err});
log.error("ipc", "uninstall-all-mods", err, request);
})
});
+61
View File
@@ -0,0 +1,61 @@
import { ipcMain } from "electron";
import { IpcRequest } from "shared/models/ipc";
import { LocalPlaylistsManagerService } from "../services/additional-content/local-playlists-manager.service";
import { UtilsService } from "../services/utils.service";
ipcMain.on("one-click-install-playlist", async (event, request: IpcRequest<string>) => {
const utils = UtilsService.getInstance();
const playlists = LocalPlaylistsManagerService.getInstance();
playlists.oneClickInstallPlaylist(request.args).then(() => {
utils.ipcSend(request.responceChannel, {success: true});
}).catch(e => {
utils.ipcSend(request.responceChannel, {success: false, error: e});
});
});
ipcMain.on("register-playlists-deep-link", async (event, request: IpcRequest<void>) => {
const maps = LocalPlaylistsManagerService.getInstance();
const utils = UtilsService.getInstance();
try{
const res = maps.enableDeepLinks();
utils.ipcSend(request.responceChannel, {success: true, data: res});
}
catch(e){
utils.ipcSend(request.responceChannel, {success: false});
}
});
ipcMain.on("unregister-playlists-deep-link", async (event, request: IpcRequest<void>) => {
const maps = LocalPlaylistsManagerService.getInstance();
const utils = UtilsService.getInstance();
try{
const res = maps.disableDeepLinks();
utils.ipcSend(request.responceChannel, {success: true, data: res});
}
catch(e){
utils.ipcSend(request.responceChannel, {success: false});
}
});
ipcMain.on("is-playlists-deep-links-enabled", async (event, request: IpcRequest<void>) => {
const maps = LocalPlaylistsManagerService.getInstance();
const utils = UtilsService.getInstance();
try{
const res = maps.isDeepLinksEnabled();
utils.ipcSend(request.responceChannel, {success: true, data: res});
}
catch(e){
utils.ipcSend(request.responceChannel, {success: false});
}
});
+99 -5
View File
@@ -2,14 +2,20 @@ import { ipcMain } from 'electron';
import { UtilsService } from '../services/utils.service';
import { BSVersionLibService } from '../services/bs-version-lib.service'
import { BSVersion } from 'shared/bs-version.interface';
import path from 'path';
import { exec } from 'child_process';
import { SteamService } from '../services/steam.service';
import { BS_APP_ID } from '../constants';
import { IpcRequest } from 'shared/models/ipc';
import { BSLocalVersionService } from '../services/bs-local-version.service';
import { InstallationLocationService } from '../services/installation-location.service';
import { BsmException } from 'shared/models/bsm-exception.model';
import { IpcService } from '../services/ipc.service';
import { from } from 'rxjs';
import path from 'path';
import { pathExist } from '../helpers/fs.helpers';
import { FolderLinkerService, LinkOptions } from '../services/folder-linker.service';
import { LocalMapsManagerService } from '../services/additional-content/local-maps-manager.service';
import { readJSON, writeJSON } from 'fs-extra';
import log from "electron-log"
const ipc = IpcService.getInstance();
ipcMain.on('bs-version.get-version-dict', (event, req: IpcRequest<void>) => {
BSVersionLibService.getInstance().getAvailableVersions().then(versions => {
@@ -30,7 +36,7 @@ ipcMain.on('bs-version.installed-versions', async (event, req: IpcRequest<void>)
ipcMain.on("bs-version.open-folder", async (event, req: IpcRequest<BSVersion>) => {
const localVersionService = BSLocalVersionService.getInstance();
const versionFolder = await localVersionService.getVersionPath(req.args);
UtilsService.getInstance().pathExist(versionFolder) && exec(`start "" "${versionFolder}"`);
(await pathExist(versionFolder)) && exec(`start "" "${versionFolder}"`);
});
ipcMain.on("bs-version.edit", async (event, req: IpcRequest<{version: BSVersion, name: string, color: string}>) => {
@@ -48,3 +54,91 @@ ipcMain.on("bs-version.clone", async (event, req: IpcRequest<{version: BSVersion
UtilsService.getInstance().ipcSend(req.responceChannel, {success: false, error});
});
});
ipc.on("get-version-full-path", async (req: IpcRequest<BSVersion>, reply) => {
const localVersions = BSLocalVersionService.getInstance();
reply(from(
localVersions.getVersionPath(req.args)
));
});
ipc.on("relative-version-path-to-full", async (req: IpcRequest<{version: BSVersion, relative: string}>, reply) => {
path.isAbsolute(req.args.relative) && reply(from(Promise.resolve(req.args.relative)));
const localVersions = BSLocalVersionService.getInstance();
const promise = localVersions.getVersionPath(req.args.version).catch(() => null).then(versionPath => {
return path.join(versionPath, req.args.relative);
});
reply(from(promise));
});
ipc.on("full-version-path-to-relative", async (req: IpcRequest<{version: BSVersion, fullPath: string}>, reply) => {
const localVersions = BSLocalVersionService.getInstance();
const promise = localVersions.getVersionPath(req.args.version).catch(() => null).then(versionPath => {
return path.relative(versionPath, req.args.fullPath);
});
reply(from(promise));
});
ipc.on("get-linked-folders", async (req: IpcRequest<BSVersion>, reply) => {
const localVersions = BSLocalVersionService.getInstance();
reply(from(localVersions.getLinkedFolders(req.args)));
});
ipc.on("link-folder", async (req: IpcRequest<{ folder: string, options?: LinkOptions}>, reply) => {
req.args.options ??= {};
const linker = FolderLinkerService.getInstance();
const relativeMapsFolder = path.join(LocalMapsManagerService.LEVELS_ROOT_FOLDER, LocalMapsManagerService.CUSTOM_LEVELS_FOLDER)
if(req.args.folder.includes(relativeMapsFolder)){
return reply(from(linker.linkFolder(req.args.folder, {keepContents: req.args.options?.keepContents, intermediateFolder: LocalMapsManagerService.SHARED_MAPS_FOLDER})));
}
if(req.args.folder.includes("UserData")){
req.args.options = { ...req.args.options, backup: true };
}
const res = from(linker.linkFolder(req.args.folder, req.args.options));
const jsonIPAPath = path.join(req.args.folder, "Beat Saber IPA.json");
if(!(await pathExist(jsonIPAPath))){ return reply(res); }
await res.toPromise();
try{
const ipaData = (await readJSON(jsonIPAPath)) ?? {} as any;
ipaData["YeetMods"] = false;
await writeJSON(jsonIPAPath, ipaData, {spaces: 4});
}catch(e){
log.error("Disable YeetMods", e);
}
reply(res);
});
ipc.on("unlink-folder", async (req: IpcRequest<{ folder: string, options?: LinkOptions}>, reply) => {
req.args.options ??= {};
const linker = FolderLinkerService.getInstance();
const relativeMapsFolder = path.join(LocalMapsManagerService.LEVELS_ROOT_FOLDER, LocalMapsManagerService.CUSTOM_LEVELS_FOLDER)
if(req.args.folder.includes(relativeMapsFolder)){
return reply(from(linker.unlinkFolder(req.args.folder, {...req.args.options, intermediateFolder: LocalMapsManagerService.SHARED_MAPS_FOLDER})));
}
if(req.args.folder.includes("UserData")){
req.args.options = { ...req.args.options, backup: true };
}
reply(from(linker.unlinkFolder(req.args.folder, req.args.options)));
});
+6 -1
View File
@@ -3,7 +3,12 @@ import './os-controls-ipcs';
import './bs-launcher-ipcs';
import './bs-version-ipcs';
import './bs-uninstall-ipcs';
import './map-ipcs';
import './supporters-ipcs';
import './launcher-ipcs';
import './window-manager-ipcs';
import './bs-mods-ipcs';
import './bs-maps-ipcs';
import './beat-saver-ipcs';
import './bs-playlist-ipcs';
import './model-saber.ipcs';
import './bs-model-ipcs';
-13
View File
@@ -1,13 +0,0 @@
import { ipcMain} from 'electron';
import { MapService } from '../services/map.service';
import { UtilsService } from '../services/utils.service';
import { IpcRequest } from 'shared/models/ipc';
import { ExportVersionMapsOption } from 'shared/models/maps/export-version-maps.model';
ipcMain.on("map.export-version", (event, request: IpcRequest<ExportVersionMapsOption>) => {
const utils = UtilsService.getInstance();
const mapService = MapService.getInstance();
mapService.exportVersionMaps(request.args.version, request.args.path).then(() => {
utils.ipcSend(request.responceChannel, {success: true});
}).catch(() => utils.ipcSend(request.responceChannel, {success: false, error: {title: "", msg: ""}}));
});
+15
View File
@@ -0,0 +1,15 @@
import { ipcMain } from "electron";
import { IpcRequest } from "shared/models/ipc";
import { ModelSaberService } from "../services/thrid-party/model-saber/model-saber.service";
import { UtilsService } from "../services/utils.service";
ipcMain.on("ms-get-model-by-id", async (event, request: IpcRequest<string|number>) => {
const utils = UtilsService.getInstance();
const ms = ModelSaberService.getInstance();
ms.getModelById(request.args).then(model => {
utils.ipcSend(request.responceChannel, {success: true, data: model});
}).catch(e => {
utils.ipcSend(request.responceChannel, {success: false, error: e});
})
});
+50 -9
View File
@@ -1,40 +1,52 @@
import { ipcMain, shell, dialog, app } from 'electron';
import { UtilsService } from '../services/utils.service';
import { IpcRequest } from 'shared/models/ipc';
import { SystemNotificationOptions } from 'shared/models/notification/system-notification.model';
import { NotificationService } from '../services/notification.service';
import { SteamService } from '../services/steam.service';
import { IpcService } from '../services/ipc.service';
import { from } from 'rxjs';
import { fstat, lstat } from 'fs';
import { pathExist } from '../helpers/fs.helpers';
// TODO IMPROVE WINDOW CONTROL BY USING WINDOW SERVICE
const ipc = IpcService.getInstance();
ipcMain.on('window.close', async () => {
const utils = UtilsService.getInstance();
utils.getMainWindow()?.close();
utils.getMainWindows("index.html")?.close();
});
ipcMain.on('window.maximize', async () => {
const utils = UtilsService.getInstance();
utils.getMainWindow()?.maximize();
utils.getMainWindows("index.html")?.maximize();
});
ipcMain.on('window.minimize', async () => {
const utils = UtilsService.getInstance();
utils.getMainWindow()?.minimize();
utils.getMainWindows("index.html")?.minimize();
});
ipcMain.on('window.reset', async () => {
const utils = UtilsService.getInstance();
utils.getMainWindow()?.restore();
utils.getMainWindows("index.html")?.restore();
});
ipcMain.on('new-window', async (event, request: IpcRequest<string>) => {
shell.openExternal(request.args);
});
ipcMain.on('choose-folder', async (event, request: IpcRequest<void>) => {
dialog.showOpenDialog({properties: ['openDirectory']}).then(res => {
UtilsService.getInstance().ipcSend(request.responceChannel, {success: true, data: res});
});
ipc.on('choose-folder', async (req: IpcRequest<string>, reply) => {
reply(
from(dialog.showOpenDialog({properties: ['openDirectory'], defaultPath: req.args ?? ""}))
)
});
ipcMain.on("window.progression", async (event, request: IpcRequest<number>) => {
const utils = UtilsService.getInstance();
utils.getMainWindow().setProgressBar(request.args / 100);
utils.getMainWindows("index.html")?.setProgressBar(request.args / 100);
});
ipcMain.on('save-file', async (event, request: IpcRequest<{filename?: string, filters?: Electron.FileFilter[]}>) => {
@@ -48,3 +60,32 @@ ipcMain.on('save-file', async (event, request: IpcRequest<{filename?: string, fi
ipcMain.on("current-version", async (event, request: IpcRequest<void>) => {
UtilsService.getInstance().ipcSend(request.responceChannel, {success: true, data: app.getVersion()});
});
ipcMain.on("open-logs", async (event, request: IpcRequest<void>) => {
shell.openPath(app.getPath("logs"));
});
ipcMain.on("notify-system", async (event, request: IpcRequest<SystemNotificationOptions>) => {
NotificationService.getInstance().notify(request.args)
});
ipcMain.on("open-steam", async (event, request: IpcRequest<void>) => {
const steam = SteamService.getInstance();
const utils = UtilsService.getInstance();
steam.openSteam().then(res => {
utils.ipcSend(request.responceChannel, {success: true, data: res});
}).catch((e) => {
utils.ipcSend(request.responceChannel, {success: false, error: e});
});
});
ipc.on("is-folder-symlink", async (req: IpcRequest<string>, reply) => {
const promise = new Promise<boolean>(async resolve => {
if(!(await pathExist(req.args))){ return resolve(false); }
lstat(req.args, (err, stats) => {
if(err){ return resolve(false); }
resolve(stats.isSymbolicLink());
});
});
reply(from(promise));
});
+15
View File
@@ -2,6 +2,9 @@ import { ipcMain } from "electron";
import { WindowManagerService } from "../services/window-manager.service";
import { IpcRequest } from "shared/models/ipc";
import { AppWindow } from "shared/models/window-manager/app-window.model";
import { BSLauncherService } from "../services/bs-launcher.service";
const launcher = BSLauncherService.getInstance();
ipcMain.on("open-window-then-close-all", async (event, request: IpcRequest<AppWindow>) => {
const windowManager = WindowManagerService.getInstance();
@@ -9,4 +12,16 @@ ipcMain.on("open-window-then-close-all", async (event, request: IpcRequest<AppWi
windowManager.openWindow(request.args).then(window => {
windowManager.closeAllWindows(request.args);
});
});
ipcMain.on("close-all-windows", async (event, request: IpcRequest<AppWindow>) => {
await launcher.restoreSteamVR();
const windowManager = WindowManagerService.getInstance();
windowManager.closeAllWindows(request.args);
});
ipcMain.on("close-windows", async (event, request: IpcRequest<AppWindow[]>) => {
await launcher.restoreSteamVR();
const windowManager = WindowManagerService.getInstance();
windowManager.close(...request.args);
});
+58 -20
View File
@@ -9,28 +9,29 @@
* `./src/main.js` using webpack. This gives us some performance wins.
*/
import path from 'path';
import { app } from 'electron';
import { app, protocol } from 'electron';
import log from 'electron-log';
import './ipcs';
import { UtilsService } from './services/utils.service';
import { WindowManagerService } from './services/window-manager.service';
export const PRELOAD_PATH = app.isPackaged ? path.join(__dirname, 'preload.js') : path.join(__dirname, '../../.erb/dll/preload.js')
import { DeepLinkService } from './services/deep-link.service';
import { AppWindow } from 'shared/models/window-manager/app-window.model';
import { LocalMapsManagerService } from './services/additional-content/local-maps-manager.service';
import { LocalPlaylistsManagerService } from './services/additional-content/local-playlists-manager.service';
import { LocalModelsManagerService } from './services/additional-content/local-models-manager.service';
import { APP_NAME } from './constants';
import { BSLauncherService } from './services/bs-launcher.service';
const isDebug = process.env.NODE_ENV === 'development' || process.env.DEBUG_PROD === 'true';
log.transports.file.level = 'info';
log.transports.file.resolvePath = (() => {
const now = new Date();
return path.join(app.getPath("logs"), `${now.getFullYear()}-${now.getMonth()+1}-${now.getDate()}.log`);
return path.join(app.getPath("logs"), `${now.getFullYear()}-${now.getMonth()+1}-${now.getDate()}-v${app.getVersion()}.log`);
});
log.catchErrors();
const utilsService = UtilsService.getInstance();
utilsService.setAssetsPath(app.isPackaged ? path.join(process.resourcesPath, 'assets') : path.join(__dirname, '../../assets'));
if (process.env.NODE_ENV === 'production') {
const sourceMapSupport = require('source-map-support');
sourceMapSupport.install();
@@ -48,19 +49,56 @@ const installExtensions = async () => {
return installer.default(extensions.map((name) => installer[name]), forceDownload).catch(console.log);
};
const createWindow = async () => {
const createWindow = async (window: AppWindow = "launcher.html") => {
if(isDebug){ await installExtensions(); }
WindowManagerService.getInstance().openWindow("launcher.html");
WindowManagerService.getInstance().openWindow(window);
};
app.on('window-all-closed', () => {
// Respect the OSX convention of having the application in memory even
// after all windows have been closed
if (process.platform !== 'darwin') {
app.quit();
}
});
const initServicesMustBeInitialized = () => {
LocalMapsManagerService.getInstance();
LocalPlaylistsManagerService.getInstance();
LocalModelsManagerService.getInstance();
// Model
}
app.whenReady().then(() => {
createWindow();
}).catch(console.log);
const gotTheLock = app.requestSingleInstanceLock();
if(!gotTheLock){
app.quit();
}
else{
app.on('second-instance', (e, argv) => {
const deepLink = argv.find(arg => DeepLinkService.getInstance().isDeepLink(arg));
if(!deepLink){ return; }
DeepLinkService.getInstance().dispatchLinkOpened(deepLink);
});
app.whenReady().then(() => {
app.setAppUserModelId(APP_NAME);
initServicesMustBeInitialized();
const deepLink = process.argv.find(arg => DeepLinkService.getInstance().isDeepLink(arg));
if(!deepLink){
createWindow();
}
else{
DeepLinkService.getInstance().dispatchLinkOpened(deepLink);
}
protocol.registerFileProtocol('file', (request, callback) => {
const pathname = decodeURI(request.url.replace('file:///', ''));
callback(pathname);
});
BSLauncherService.getInstance().restoreSteamVR();
}).catch(log.error);
}
+78
View File
@@ -0,0 +1,78 @@
import archiver from "archiver";
import { createWriteStream } from "fs";
import { Observable } from "rxjs";
import recursive from "recursive-readdir";
import { lstatSync } from "fs";
import * as _path from "path";
import { ArchiveProgress } from "shared/models/archive.interface";
export class Archive{
private archive: archiver.Archiver;
private readonly output: string;
private readonly directories: string[] = [];
private readonly files: string[] = [];
constructor(output: string, options?: archiver.ArchiverOptions){
this.output = output;
this.initArchive(options);
}
private initArchive(options?: archiver.ArchiverOptions): void{
const defaultOptions: archiver.ArchiverOptions = {
zlib: {level: 9}
};
this.archive = archiver("zip", {...defaultOptions, ...options});
}
private async loadTotalFiles(): Promise<number>{
let totalFiles = this.files.length;
for(const path of this.directories){
const files = await recursive(path);
totalFiles += files.length;
}
return totalFiles;
}
public addDirectory(path: string, destPath?: string|false): void{
this.directories.push(path);
destPath = destPath === false ? false : _path.basename(path);
this.archive.directory(path, destPath);
}
public addFile(path: string, destPath?: string): void{
this.files.push(path);
destPath = destPath ||= _path.basename(path);
this.archive.file(path, {name: destPath});
}
public finalize(): Observable<ArchiveProgress>{
const progress: ArchiveProgress = {
totalFiles: 0,
prossesedFiles: 0
};
return new Observable<ArchiveProgress>(observer => {
(async () => {
progress.totalFiles = await this.loadTotalFiles();
this.archive.on("entry", e => {
if(e.stats.isDirectory()){ return; }
progress.prossesedFiles++;
observer.next(progress);
});
this.archive.pipe(createWriteStream(this.output));
this.archive.on("error", err => observer.error(err));
this.archive.finalize().then(() => observer.complete());
})();
});
}
}
+7 -5
View File
@@ -1,21 +1,23 @@
import { contextBridge, ipcRenderer, IpcRendererEvent } from 'electron';
export type Channels = any;
import { IpcChannel } from 'shared/models/ipc/ipc-response.interface';
contextBridge.exposeInMainWorld('electron', {
ipcRenderer: {
sendMessage(channel: Channels, args: unknown[]) {
sendMessage(channel: IpcChannel, args: unknown[]) {
ipcRenderer.send(channel, args);
},
on(channel: Channels, func: (...args: unknown[]) => void) {
on(channel: IpcChannel, func: (...args: unknown[]) => void) {
const subscription = (_event: IpcRendererEvent, ...args: unknown[]) =>
func(...args);
ipcRenderer.on(channel, subscription);
return () => ipcRenderer.removeListener(channel, subscription);
},
once(channel: Channels, func: (...args: unknown[]) => void) {
once(channel: IpcChannel, func: (...args: unknown[]) => void) {
ipcRenderer.once(channel, (_event, ...args) => func(...args));
},
removeAllListeners(channel: IpcChannel) {
ipcRenderer.removeAllListeners(channel);
}
},
});
@@ -0,0 +1,297 @@
import path from "path";
import { BSVersion } from "shared/bs-version.interface";
import { BsvMapDetail, RawMapInfoData } from "shared/models/maps";
import { BsmLocalMap, BsmLocalMapsProgress, DeleteMapsProgress } from "shared/models/maps/bsm-local-map.interface";
import { BSLocalVersionService } from "../bs-local-version.service";
import { InstallationLocationService } from "../installation-location.service";
import { UtilsService } from "../utils.service";
import crypto from "crypto";
import { lstatSync, unlinkSync } from "fs";
import { copySync } from "fs-extra";
import StreamZip from "node-stream-zip";
import { RequestService } from "../request.service";
import sanitize from "sanitize-filename";
import { DeepLinkService } from "../deep-link.service";
import log from 'electron-log';
import { WindowManagerService } from "../window-manager.service";
import { ipcMain } from "electron";
import { IpcRequest } from 'shared/models/ipc';
import { Observable } from "rxjs";
import { Archive } from "../../models/archive.class";
import { deleteFolder, ensureFolderExist, getFoldersInFolder, pathExist } from "../../helpers/fs.helpers";
import { readFile } from "fs/promises";
import { FolderLinkerService } from "../folder-linker.service";
export class LocalMapsManagerService {
private static instance: LocalMapsManagerService;
public static getInstance(): LocalMapsManagerService{
if(!LocalMapsManagerService.instance){ LocalMapsManagerService.instance = new LocalMapsManagerService(); }
return LocalMapsManagerService.instance;
}
public static readonly LEVELS_ROOT_FOLDER = "Beat Saber_Data";
public static readonly CUSTOM_LEVELS_FOLDER = "CustomLevels";
public static readonly SHARED_MAPS_FOLDER = "SharedMaps";
private readonly DEEP_LINKS = {
BeatSaver: "beatsaver",
ScoreSaber: "web+bsmap"
};
private readonly localVersion: BSLocalVersionService;
private readonly installLocation: InstallationLocationService;
private readonly utils: UtilsService;
private readonly reqService: RequestService;
private readonly deepLink: DeepLinkService;
private readonly windows: WindowManagerService;
private readonly linker = FolderLinkerService.getInstance();
private constructor(){
this.localVersion = BSLocalVersionService.getInstance();
this.installLocation = InstallationLocationService.getInstance();
this.utils = UtilsService.getInstance();
this.reqService = RequestService.getInstance();
this.deepLink = DeepLinkService.getInstance();
this.windows = WindowManagerService.getInstance();
this.linker = FolderLinkerService.getInstance();
this.deepLink.addLinkOpenedListener(this.DEEP_LINKS.BeatSaver, link => {
log.info("DEEP-LINK RECEIVED FROM", this.DEEP_LINKS.BeatSaver, link);
this.openOneClickDownloadMapWindow(new URL(link).host);
});
this.deepLink.addLinkOpenedListener(this.DEEP_LINKS.ScoreSaber, link => {
log.info("DEEP-LINK RECEIVED FROM", this.DEEP_LINKS.ScoreSaber, link);
this.openOneClickDownloadMapWindow(new URL(link).host, true);
});
}
public async getMapsFolderPath(version?: BSVersion): Promise<string>{
if(version){ return path.join(await this.localVersion.getVersionPath(version), LocalMapsManagerService.LEVELS_ROOT_FOLDER, LocalMapsManagerService.CUSTOM_LEVELS_FOLDER); }
const sharedMapsPath = path.join(this.installLocation.sharedContentPath, LocalMapsManagerService.SHARED_MAPS_FOLDER, LocalMapsManagerService.CUSTOM_LEVELS_FOLDER);
if(!(await pathExist(sharedMapsPath))){
await ensureFolderExist(sharedMapsPath);
}
return sharedMapsPath;
}
private async computeMapHash(mapPath: string, rawInfoString: string): Promise<string>{
const mapRawInfo = JSON.parse(rawInfoString);
const shasum = crypto.createHash("sha1");
shasum.update(rawInfoString);
for(const set of mapRawInfo._difficultyBeatmapSets){
for(const diff of set._difficultyBeatmaps){
const diffFilePath = path.join(mapPath, diff._beatmapFilename);
const diffContent = await readFile(diffFilePath, {encoding: "utf-8"}).catch(() => null);
diffContent && shasum.update(diffContent);
}
}
return shasum.digest("hex");
}
private async loadMapInfoFromPath(mapPath: string): Promise<BsmLocalMap>{
const infoFilePath = path.join(mapPath, "Info.dat");
if(!(await pathExist(infoFilePath))){ return null; }
const rawInfoString = await readFile(infoFilePath, {encoding: "utf-8"});
const rawInfo: RawMapInfoData = JSON.parse(rawInfoString);
const coverUrl = new URL(`file:///${path.join(mapPath, rawInfo._coverImageFilename)}`).href;
const songUrl = new URL(`file:///${path.join(mapPath, rawInfo._songFilename)}`).href;
const hash = await this.computeMapHash(mapPath, rawInfoString);
return {rawInfo, coverUrl, songUrl, hash, path: mapPath};
}
private async downloadMapZip(zipUrl: string): Promise<{zip: StreamZip.StreamZipAsync, zipPath: string}>{
const fileName = path.basename(zipUrl);
const tempPath = this.utils.getTempPath();
await ensureFolderExist(this.utils.getTempPath());
const dest = path.join(tempPath, fileName);
const zipPath = await this.reqService.downloadFile(zipUrl, dest);
const zip = new StreamZip.async({file : zipPath});
return {zip, zipPath};
}
private openOneClickDownloadMapWindow(mapId: string, isHash = false): void{
ipcMain.once("one-click-map-info", async (event, req: IpcRequest<void>) => {
this.utils.ipcSend(req.responceChannel, {success: true, data: {id: mapId, isHash}});
});
this.windows.openWindow("oneclick-download-map.html");
}
public getMaps(version?: BSVersion): Observable<BsmLocalMapsProgress>{
const progression: BsmLocalMapsProgress = {
total: 0,
loaded: 0,
maps: []
};
return new Observable<BsmLocalMapsProgress>(observer => {
(async () => {
const levelsFolder = await this.getMapsFolderPath(version);
const levelsPaths = (await pathExist(levelsFolder)) ? await getFoldersInFolder(levelsFolder) : [];
progression.total = levelsPaths.length;
const promises = levelsPaths.map(async levelPath => {
const mapInfo = await this.loadMapInfoFromPath(levelPath);
if(!mapInfo){ return null; }
progression.loaded++;
observer.next(progression);
return mapInfo;
});
const mapsInfo = (await Promise.allSettled(promises)).reduce((acc, mapInfo) => {
if(mapInfo.status === "fulfilled" && mapInfo.value){
acc.push(mapInfo.value);
}
return acc;
} ,[] as BsmLocalMap[]);
progression.maps = mapsInfo;
observer.next(progression);
observer.complete();
})();
});
}
public async versionIsLinked(version: BSVersion): Promise<boolean>{
const levelsPath = await this.getMapsFolderPath(version);
const isPathExist = await pathExist(levelsPath);
if(!isPathExist){ return false; }
return lstatSync(levelsPath).isSymbolicLink()
}
public async linkVersionMaps(version: BSVersion, keepMaps: boolean): Promise<void>{
const versionMapsPath = await this.getMapsFolderPath(version);
return this.linker.linkFolder(versionMapsPath, {keepContents: keepMaps, intermediateFolder: LocalMapsManagerService.SHARED_MAPS_FOLDER});
}
public async unlinkVersionMaps(version: BSVersion, keepMaps: boolean): Promise<void>{
const versionMapsPath = await this.getMapsFolderPath(version);
return this.linker.unlinkFolder(versionMapsPath, {keepContents: keepMaps, intermediateFolder: LocalMapsManagerService.SHARED_MAPS_FOLDER});
}
public deleteMaps(maps: BsmLocalMap[]): Observable<DeleteMapsProgress>{
const mapsFolders = maps.map(map => map.path);
const mapsHashsToDelete = maps.map(map => map.hash);
return new Observable<DeleteMapsProgress>(observer => {
(async () => {
const progress: DeleteMapsProgress = { total: maps.length, deleted: 0 };
try{
for(const folder of mapsFolders){
const detail = await this.loadMapInfoFromPath(folder);
if(!mapsHashsToDelete.includes(detail?.hash)){ continue; }
await deleteFolder(folder);
progress.deleted++;
observer.next(progress);
}
}catch(e){
observer.error(e);
}
observer.complete();
})();
});
}
public async downloadMap(map: BsvMapDetail, version?: BSVersion): Promise<BsmLocalMap>{
if(!map.versions.at(0).hash){ throw "Cannot download map, no hash found"; }
const zipUrl = map.versions.at(0).downloadURL;
const mapsFolder = await this.getMapsFolderPath(version);
const {zip, zipPath} = await this.downloadMapZip(zipUrl);
const mapFolderName = sanitize(`${map.id}-${map.name}`);
const mapPath = path.join(mapsFolder, mapFolderName);
if(!zip){ throw `Cannot download ${zipUrl}`; }
await ensureFolderExist(mapPath);
await zip.extract(null, mapPath);
await zip.close();
unlinkSync(zipPath);
const localMap = await this.loadMapInfoFromPath(mapPath);
localMap.bsaverInfo = map;
return localMap;
}
public async exportMaps(version: BSVersion, maps: BsmLocalMap[], outPath: string){
const archive = new Archive(outPath);
if(!maps || maps.length === 0){
const mapsFolder = await this.getMapsFolderPath(version);
archive.addDirectory(mapsFolder, false);
}
else{
const mapsFolders = maps.map(map => map.path);
mapsFolders.forEach(maps => archive.addDirectory(maps));
}
return archive.finalize()
}
public async oneClickDownloadMap(map: BsvMapDetail): Promise<void>{
const downloadedMap = await this.downloadMap(map);
const versions = await this.localVersion.getInstalledVersions();
for(const version of versions){
if(await this.versionIsLinked(version)){ continue; }
const versionMapsPath = await this.getMapsFolderPath(version);
await ensureFolderExist(versionMapsPath);
copySync(downloadedMap.path, path.join(versionMapsPath, path.basename(downloadedMap.path)), {overwrite: true});
}
}
public enableDeepLinks(): boolean{
return Array.from(Object.values(this.DEEP_LINKS)).every(link => this.deepLink.registerDeepLink(link));
}
public disableDeepLinks(): boolean{
return Array.from(Object.values(this.DEEP_LINKS)).every(link => this.deepLink.unRegisterDeepLink(link));
}
public isDeepLinksEnabled(): boolean{
return Array.from(Object.values(this.DEEP_LINKS)).every(link => this.deepLink.isDeepLinkRegistred(link));
}
}
@@ -0,0 +1,127 @@
import { DeepLinkService } from "../deep-link.service";
import log from "electron-log"
import { ipcMain } from "electron";
import { IpcRequest } from "shared/models/ipc";
import { UtilsService } from "../utils.service";
import { WindowManagerService } from "../window-manager.service";
import { MSModel, MSModelType } from "shared/models/model-saber/model-saber.model";
import { BSVersion } from "shared/bs-version.interface";
import { BSLocalVersionService } from "../bs-local-version.service";
import path from "path";
import { RequestService } from "../request.service";
import { copyFileSync } from "fs-extra";
import sanitize from "sanitize-filename";
import { ensureFolderExist } from "../../helpers/fs.helpers";
export class LocalModelsManagerService {
private static instance: LocalModelsManagerService;
public static getInstance(): LocalModelsManagerService{
if(!LocalModelsManagerService.instance){ LocalModelsManagerService.instance = new LocalModelsManagerService(); }
return LocalModelsManagerService.instance;
}
private readonly DEEP_LINKS = {
ModelSaber: "modelsaber",
};
private readonly MODEL_TYPE_FOLDER: Record<Exclude<MSModelType, "misc">, string> = {
avatar: "CustomAvatars",
bloq: "CustomNotes",
platform: "CustomPlatforms",
saber: "CustomSabers"
}
private readonly deepLink: DeepLinkService;
private readonly utils: UtilsService;
private readonly windows: WindowManagerService;
private readonly localVersion: BSLocalVersionService;
private readonly request: RequestService;
private constructor(){
this.deepLink = DeepLinkService.getInstance();
this.utils = UtilsService.getInstance();
this.windows = WindowManagerService.getInstance();
this.localVersion = BSLocalVersionService.getInstance();
this.request = RequestService.getInstance();
this.deepLink.addLinkOpenedListener(this.DEEP_LINKS.ModelSaber, (link) => {
log.info("DEEP-LINK RECEIVED FROM", this.DEEP_LINKS.ModelSaber, link);
const url = new URL(link);
const type = url.host
const id = url.pathname.replace("/", '').split("/").at(0);
this.openOneClickDownloadModelWindow(id, type);
});
}
private openOneClickDownloadModelWindow(id: string, type: string){
ipcMain.once("one-click-model-info", async (event, req: IpcRequest<void>) => {
this.utils.ipcSend(req.responceChannel, {success: true, data: {id, type}});
});
this.windows.openWindow("oneclick-download-model.html");
}
private async getModelFolderPath(type: MSModelType, version?: BSVersion): Promise<string>{
if(!version){ throw "will be implemented whith models management" }
if(type === "misc"){ throw "model type not supported"; }
const versionPath = await this.localVersion.getVersionPath(version);
const modelFolderPath = path.join(versionPath, this.MODEL_TYPE_FOLDER[type]);
await ensureFolderExist(modelFolderPath);
return modelFolderPath;
}
public async downloadModel(model: MSModel, version: BSVersion): Promise<string>{
const modelFolder = await this.getModelFolderPath(model.type, version);
const modelDest = path.join(modelFolder, sanitize(path.basename(model.download)));
return this.request.downloadFile(model.download, modelDest);
}
public async oneClickDownloadModel(model: MSModel): Promise<void>{
if(!model){ return; }
const versions = await this.localVersion.getInstalledVersions();
if(versions?.length === 0){ return; }
const fisrtVersion = versions.shift();
const downloaded = await this.downloadModel(model, fisrtVersion);
for(const version of versions){
const modelDest = path.join(await this.getModelFolderPath(model.type, version), path.basename(downloaded));
copyFileSync(downloaded, modelDest);
}
}
public enableDeepLinks(): boolean{
return Array.from(Object.values(this.DEEP_LINKS)).every(link => this.deepLink.registerDeepLink(link));
}
public disableDeepLinks(): boolean{
return Array.from(Object.values(this.DEEP_LINKS)).every(link => this.deepLink.unRegisterDeepLink(link));
}
public isDeepLinksEnabled(): boolean{
return Array.from(Object.values(this.DEEP_LINKS)).every(link => this.deepLink.isDeepLinkRegistred(link));
}
}
@@ -0,0 +1,227 @@
import path from "path";
import { BehaviorSubject, Observable } from "rxjs";
import { BSVersion } from "shared/bs-version.interface";
import { BSLocalVersionService } from "../bs-local-version.service";
import { DeepLinkService } from "../deep-link.service";
import { RequestService } from "../request.service";
import { UtilsService } from "../utils.service";
import { LocalMapsManagerService } from "./local-maps-manager.service";
import log from "electron-log"
import { isValidUrl } from "../../helpers/url.helpers";
import { ipcMain } from "electron";
import { WindowManagerService } from "../window-manager.service";
import { IpcRequest } from "shared/models/ipc";
import { BPList, DownloadPlaylistProgression } from "shared/models/playlists/playlist.interface";
import { copyFileSync, readFileSync } from "fs";
import { BeatSaverService } from "../thrid-party/beat-saver/beat-saver.service";
import { copySync } from "fs-extra";
import { ensureFolderExist, pathExist } from "../../helpers/fs.helpers";
export class LocalPlaylistsManagerService {
private static instance: LocalPlaylistsManagerService
public static getInstance(): LocalPlaylistsManagerService {
if (!LocalPlaylistsManagerService.instance) { LocalPlaylistsManagerService.instance = new LocalPlaylistsManagerService(); }
return LocalPlaylistsManagerService.instance;
}
private readonly PLAYLISTS_FOLDER = "Playlists";
private readonly DEEP_LINKS = {
BeatSaver: "bsplaylist",
};
private readonly versions: BSLocalVersionService;
private readonly maps: LocalMapsManagerService;
private readonly utils: UtilsService;
private readonly request: RequestService;
private readonly deepLink: DeepLinkService;
private readonly windows: WindowManagerService;
private readonly bsaver: BeatSaverService;
private constructor(){
this.maps = LocalMapsManagerService.getInstance();
this.versions = BSLocalVersionService.getInstance();
this.utils = UtilsService.getInstance();
this.request = RequestService.getInstance();
this.deepLink = DeepLinkService.getInstance();
this.windows = WindowManagerService.getInstance();
this.bsaver = BeatSaverService.getInstance();
this.deepLink.addLinkOpenedListener(this.DEEP_LINKS.BeatSaver, link => {
log.info("DEEP-LINK RECEIVED FROM", this.DEEP_LINKS.BeatSaver, link);
const url = new URL(link);
const bplistUrl = url.host === "playlist" ? url.pathname.replace("/", "") : "";
this.openOneClickDownloadPlaylistWindow(bplistUrl);
});
}
private getPlaylistIdFromDownloadUrl(url: string): string{
if(!isValidUrl(url)){ return ""; }
const splited = url.split("/")
const idIndex = splited.indexOf("id");
if(idIndex < 0){ return ""; }
return splited[idIndex + 1];
}
private async getPlaylistsFolder(version?: BSVersion){
if(!version){ throw "Playlists are not available to be linked yet" }
const versionFolder = await this.versions.getVersionPath(version);
const folder = path.join(versionFolder, this.PLAYLISTS_FOLDER);
await ensureFolderExist(folder)
return folder;
}
private async installBPListFile(bpListUrlOrPath: string, version: BSVersion): Promise<string>{
const playlistFolder = await this.getPlaylistsFolder(version);
const bpListDest = path.join(playlistFolder, path.basename(bpListUrlOrPath));
if(await pathExist(bpListUrlOrPath)){
copyFileSync(bpListUrlOrPath, bpListDest);
}
else{
await this.request.downloadFile(bpListUrlOrPath, bpListDest);
}
return bpListDest;
}
private async readPlaylistFile(path: string): Promise<BPList>{
if(!(await pathExist(path))){ throw `bplist file not exist at ${path}`; }
const rawContent = readFileSync(path).toString();
return JSON.parse(rawContent);
}
private openOneClickDownloadPlaylistWindow(downloadUrl: string): void{
ipcMain.once("one-click-playlist-info", async (event, req: IpcRequest<void>) => {
this.utils.ipcSend(req.responceChannel, {success: true, data: {bpListUrl: downloadUrl, id: this.getPlaylistIdFromDownloadUrl(downloadUrl)}});
});
this.windows.openWindow("oneclick-download-playlist.html");
}
public downloadPlaylist(bpListUrl: string, version: BSVersion): Observable<DownloadPlaylistProgression>{
const res = new BehaviorSubject<DownloadPlaylistProgression>({progression: 0, current: null, downloadedMaps: [], mapsPath: [], bpListPath: ""});
const sub = res.subscribe(process => {
this.utils.ipcSend("download-playlist-progress", {success: true, data: process});
}, err => {
this.utils.ipcSend("download-playlist-progress", {success: false, error: err});
});
const observer = async () => {
try{
const bpListPath = await this.installBPListFile(bpListUrl, version);
res.next({...res.value, bpListPath});
const bpList = await this.readPlaylistFile(bpListPath);
for(const song of bpList.songs){
if(!song.key){ continue; }
const map = await this.bsaver.getMapDetailsById(song.key);
res.next({
...res.value,
current: map,
progression: ((res.value.downloadedMaps.length + .5) / bpList.songs.length) * 100
});
const mapPath = await this.maps.downloadMap(map, version);
const progression = ((res.value.downloadedMaps.length + 1) / bpList.songs.length) * 100;
res.next({
...res.value,
current: null,
downloadedMaps: [...res.value.downloadedMaps, map],
mapsPath: [...res.value.mapsPath, mapPath.path],
progression
});
}
}
catch(e){
res.error(e);
}
res.complete();
}
observer().finally(() => sub.unsubscribe());
return res.asObservable();
}
public async oneClickInstallPlaylist(bpListUrl: string): Promise<void>{
const versions = await this.versions.getInstalledVersions();
const firstVersion = versions.shift();
const fistVersionLinked = await this.maps.versionIsLinked(firstVersion);
const {bpListPath, mapsPath} = await this.downloadPlaylist(bpListUrl, firstVersion).toPromise();
for(const version of versions){
await this.installBPListFile(bpListPath, version);
const versionIsLinked = await this.maps.versionIsLinked(version);
if(fistVersionLinked && versionIsLinked){ continue; }
for(const mapPath of mapsPath){
const versionMapsFolder = await this.maps.getMapsFolderPath(version);
const mapDest = path.join(versionMapsFolder, path.basename(mapPath));
copySync(mapPath, mapDest, {overwrite: true});
}
}
}
public enableDeepLinks(): boolean{
return Array.from(Object.values(this.DEEP_LINKS)).every(link => this.deepLink.registerDeepLink(link));
}
public disableDeepLinks(): boolean{
return Array.from(Object.values(this.DEEP_LINKS)).every(link => this.deepLink.unRegisterDeepLink(link));
}
public isDeepLinksEnabled(): boolean{
return Array.from(Object.values(this.DEEP_LINKS)).every(link => this.deepLink.isDeepLinkRegistred(link));
}
}
+2 -6
View File
@@ -1,6 +1,7 @@
import { autoUpdater } from 'electron-updater';
import log from 'electron-log';
import { UtilsService } from './utils.service';
import { gt } from 'semver';
export class AutoUpdaterService {
private static instance: AutoUpdaterService;
@@ -24,8 +25,7 @@ export class AutoUpdaterService {
autoUpdater.checkForUpdates().then(info => {
const needUpdate = (() => {
if(!info || !info.updateInfo){ return false; }
if(autoUpdater.currentVersion.version === info.updateInfo.version){ return false; }
return true;
return gt(info.updateInfo.version, autoUpdater.currentVersion.version);
})();
resolve(needUpdate)}
).catch(() => resolve(false));
@@ -38,10 +38,6 @@ export class AutoUpdaterService {
autoUpdater.addListener("download-progress", info => {
this.utilsService.ipcSend("update-download-progress", {success: true, data: info.percent});
});
// const promise = new Promise<boolean>((resolve, reject) => {
// autoUpdater.addListener("update-downloaded", () => resolve(true));
// autoUpdater.addListener("error", () => reject(false))
// });
return autoUpdater.downloadUpdate().then(res => !!res && !!res.length);
}
+81 -9
View File
@@ -1,13 +1,18 @@
/* eslint-disable prefer-promise-reject-errors */
import { BS_APP_ID, BS_DEPOT } from "../constants";
import path from "path";
import { BSVersion } from 'shared/bs-version.interface';
import { BSVersion, PartialBSVersion } from 'shared/bs-version.interface';
import { UtilsService } from "./utils.service";
import { ChildProcessWithoutNullStreams, spawn } from "child_process";
import { ChildProcessWithoutNullStreams, spawn, spawnSync } from "child_process";
import log from "electron-log";
import { InstallationLocationService } from "./installation-location.service";
import { ctrlc } from "ctrlc-windows";
import { BSLocalVersionService } from "./bs-local-version.service";
import isOnline from 'is-online';
import { WindowManagerService } from "./window-manager.service";
import { copy, copySync } from "fs-extra";
import { clean, satisfies } from "semver";
import { ensureFolderExist, pathExist } from "../helpers/fs.helpers";
export class BSInstallerService{
@@ -16,6 +21,7 @@ export class BSInstallerService{
private readonly utils: UtilsService;
private readonly installLocationService: InstallationLocationService;
private readonly localVersionService: BSLocalVersionService;
private readonly windows: WindowManagerService;
private downloadProcess: ChildProcessWithoutNullStreams;
@@ -23,8 +29,9 @@ export class BSInstallerService{
this.utils = UtilsService.getInstance();
this.installLocationService = InstallationLocationService.getInstance();
this.localVersionService = BSLocalVersionService.getInstance();
this.windows = WindowManagerService.getInstance();
this.utils.getMainWindow().on("close", () => {
this.windows.getWindow("index.html")?.on("close", () => {
this.killDownloadProcess();
});
}
@@ -34,8 +41,12 @@ export class BSInstallerService{
return BSInstallerService.instance;
}
private escapeSpaces(path: string): string{
return `\"${path}\"`
}
private getDepotDownloaderExePath(): string{
return path.join(this.utils.getAssetsScriptsPath(), 'depot-downloader', 'DepotDownloader.exe');
return this.escapeSpaces(path.join(this.utils.getAssetsScriptsPath(), 'depot-downloader', 'DepotDownloader.exe'));
}
private removeSpecialSchar(txt: string): string{ return txt.replaceAll(/\[|\]/g, ""); }
@@ -62,6 +73,21 @@ export class BSInstallerService{
});
}
public async isDotNet6Installed(): Promise<boolean>{
try{
const process = spawnSync(this.getDepotDownloaderExePath(), {shell: true});
if(process.stderr.toString()){
log.error("no dotnet", process.stderr.toString());
return false;
}
return true;
}
catch(e){
log.error("Error while checking .NET 6", e);
return false;
}
}
public async downloadBsVersion(downloadInfos: DownloadInfo): Promise<DownloadEvent>{
if(this.downloadProcess && this.downloadProcess.connected){ throw "AlreadyDownloading"; }
@@ -69,7 +95,14 @@ export class BSInstallerService{
if(!bsVersion){ return {type: "[Error]"}; }
if(!(await isOnline({timeout: 1500}))){ throw "no-internet"; }
this.utils.createFolderIfNotExist(this.installLocationService.versionsDirectory);
await ensureFolderExist(this.installLocationService.versionsDirectory);
const versionPath = await this.localVersionService.getVersionPath(bsVersion)
const dest = !downloadInfos.isVerification ? await this.getPathNotAleardyExist(versionPath) : versionPath;
const downloadVersion: BSVersion = {...downloadInfos.bsVersion, ...(path.basename(dest) !== downloadInfos.bsVersion.BSVersion && {name: path.basename(dest)})}
this.downloadProcess = spawn(
this.getDepotDownloaderExePath(),
[
@@ -77,12 +110,13 @@ export class BSInstallerService{
`-depot ${BS_DEPOT}`,
`-manifest ${bsVersion.BSManifest}`,
`-username ${downloadInfos.username}`,
`-dir \"${this.localVersionService.getVersionFolder(bsVersion)}\"`,
(downloadInfos.stay || !downloadInfos.password) && "-remember-password"
`-dir \"${this.localVersionService.getVersionFolder(downloadVersion)}\"`
],
{shell: true, cwd: this.installLocationService.versionsDirectory}
);
this.utils.ipcSend("start-download-version", {success: true, data: downloadVersion});
return new Promise((resolve, reject) => {
this.downloadProcess.stdout.on('data', data => {
@@ -127,16 +161,25 @@ export class BSInstallerService{
this.downloadProcess.stdout.on('error', (err) => {
log.error("BS-DOWNLOAD ERROR", err.toString());
this.killDownloadProcess();
if(err.toString().includes(".NET") || err.toString().includes("dotnet") || err.toString().includes(".dll")){
reject("dotnet");
}
reject();
});
this.downloadProcess.stderr.on('data', (err) => {
log.error("BS-DOWNLOAD ERROR", err.toString());
this.killDownloadProcess();
if(err.toString().includes(".NET") || err.toString().includes("dotnet") || err.toString().includes(".dll")){
reject("dotnet");
}
reject();
});
this.downloadProcess.stderr.on('error', (err) => {
log.error("BS-DOWNLOAD ERROR", err.toString());
this.killDownloadProcess();
if(err.toString().includes(".NET") || err.toString().includes("dotnet") || err.toString().includes(".dll")){
reject("dotnet");
}
reject();
});
@@ -144,6 +187,34 @@ export class BSInstallerService{
})
}
private async getPathNotAleardyExist(path: string): Promise<string>{
let destPath = path;
let folderExist = await pathExist(destPath);
let i = 0;
while(folderExist){
i++;
destPath = `${path} (${i})`;
folderExist = await pathExist(destPath);
}
return destPath
}
public async importVersion(path: string): Promise<PartialBSVersion>{
const rawBsVersion = await this.localVersionService.getVersionOfBSFolder(path);
if(!rawBsVersion){ throw new Error("NOT_BS_FOLDER"); }
const destPath = await this.getPathNotAleardyExist(await this.localVersionService.getVersionPath(rawBsVersion));
await copy(path, destPath, {dereference: true});
return rawBsVersion;
}
}
@@ -153,12 +224,13 @@ export interface DownloadInfo {
bsVersion: BSVersion,
username: string,
password?: string,
stay?: boolean
stay?: boolean,
isVerification: boolean
}
export interface DownloadEvent{
type: DownloadEventType,
data?: unknown,
data?: unknown
}
export type DownloadEventType = "[Password]" | "[Guard]" | "[2FA]" | "[Progress]" | "[Validated]" | "[Finished]" | "[AlreadyDownloading]" | "[Error]" | "[Warning]" | "[SteamID]" | "[Exit]" | "[NoInternet]";
+63 -10
View File
@@ -1,10 +1,15 @@
import path from "path";
import { LaunchResult, LauchOption } from "shared/models/bs-launch";
import { UtilsService } from "./utils.service";
import { BS_EXECUTABLE, BS_APP_ID } from "../constants";
import { BS_EXECUTABLE, BS_APP_ID, STEAMVR_APP_ID } from "../constants";
import { ChildProcessWithoutNullStreams, spawn } from "child_process";
import { SteamService } from "./steam.service";
import { BSLocalVersionService } from "./bs-local-version.service";
import { OculusService } from "./oculus.service";
import { pathExist } from "../helpers/fs.helpers";
import { rename } from "fs/promises";
import log from "electron-log";
import { timer } from "rxjs";
export class BSLauncherService{
@@ -12,6 +17,7 @@ export class BSLauncherService{
private readonly utilsService: UtilsService;
private readonly steamService: SteamService;
private readonly oculusService: OculusService;
private readonly localVersionService: BSLocalVersionService;
private bsProcess: ChildProcessWithoutNullStreams;
@@ -24,31 +30,78 @@ export class BSLauncherService{
private constructor(){
this.utilsService = UtilsService.getInstance();
this.steamService = SteamService.getInstance();
this.oculusService = OculusService.getInstance();
this.localVersionService = BSLocalVersionService.getInstance();
}
private getSteamVRPath(): Promise<string>{
return this.steamService.getGameFolder(STEAMVR_APP_ID, "SteamVR");
}
private async backupSteamVR(): Promise<void>{
const steamVrFolder = await this.getSteamVRPath();
if(!await pathExist(steamVrFolder)){ return; }
return rename(steamVrFolder, steamVrFolder + ".bak").catch(log.error);
}
public async restoreSteamVR(): Promise<void>{
console.log("restoreSteamVR");
const steamVrFolder = await this.getSteamVRPath();
const steamVrBackup = steamVrFolder + ".bak";
if(!await pathExist(steamVrBackup)){ return; }
return rename(steamVrFolder + ".bak", steamVrFolder).catch(log.error);
}
public isBsRunning(): boolean{
return this.bsProcess?.connected || this.utilsService.taskRunning(BS_EXECUTABLE);
}
public async launch(launchOptions: LauchOption): Promise<LaunchResult>{
if(!this.steamService.steamRunning()){ return "STEAM_NOT_RUNNING" }
if(launchOptions.version.oculus && !this.oculusService.oculusRunning()){ return "OCULUS_NOT_RUNNING" }
if(!launchOptions.version.oculus && !this.steamService.steamRunning()){ return "STEAM_NOT_RUNNING" }
if(this.isBsRunning()){ return "BS_ALREADY_RUNNING" }
const cwd = await this.localVersionService.getVersionPath(launchOptions.version);
const exePath = path.join(cwd, BS_EXECUTABLE);
console.log(exePath);
if(!this.utilsService.pathExist(exePath)){ return "EXE_NOT_FINDED"; }
if(!(await pathExist(exePath))){ return "EXE_NOT_FINDED"; }
const launchMods = [launchOptions.oculus && "-vrmode oculus", launchOptions.desktop && "fpfc", launchOptions.debug && "--verbose"];
let launchArgs = [];
this.bsProcess = spawn(`\"${exePath}\"`, launchMods, {shell: true, cwd: cwd, env: {...process.env, "SteamAppId": BS_APP_ID}});
if(!launchOptions.version.steam && !launchOptions.version.oculus){ launchArgs.push("--no-yeet"); }
if(launchOptions.oculus){ launchArgs.push("-vrmode oculus"); }
if(launchOptions.desktop){ launchArgs.push("fpfc"); }
if(launchOptions.debug){ launchArgs.push("--verbose"); }
if(launchOptions.additionalArgs){ launchArgs.push(...launchOptions.additionalArgs); }
this.bsProcess.on('message', msg => { /** EMIT HERE **/ });
this.bsProcess.on('error', err => { /** EMIT HERE **/ });
this.bsProcess.on('exit', code => this.utilsService.ipcSend("bs-launch.exit", {data: code, success: code === 0}));
launchArgs = Array.from(new Set(launchArgs).values());
let restoreTimout: NodeJS.Timeout;
if(launchArgs.includes("fpfc")){
await this.backupSteamVR().catch(() => {
this.restoreSteamVR();
}).finally(() => {
restoreTimout = setTimeout(() => this.restoreSteamVR(), 35_000);
});
await timer(2_000).toPromise();
}
else{
await this.restoreSteamVR();
}
if(launchOptions.debug){
this.bsProcess = spawn(`\"${exePath}\"`, launchArgs, {shell: true, cwd, env: {...process.env, "SteamAppId": BS_APP_ID}, detached: true, windowsVerbatimArguments: true });
}
else{
this.bsProcess = spawn(`\"${exePath}\"`, launchArgs, {shell: true, cwd, env: {...process.env, "SteamAppId": BS_APP_ID} });
}
this.bsProcess.on('error', err => log.error(err));
this.bsProcess.on('exit', code => {
this.restoreSteamVR().finally(() => clearTimeout(restoreTimout));
this.utilsService.ipcSend("bs-launch.exit", {data: code, success: code === 0})
});
return "LAUNCHED";
}
+130 -65
View File
@@ -1,16 +1,20 @@
import { BSVersionLibService } from "./bs-version-lib.service";
import { BSVersion } from 'shared/bs-version.interface';
import { BSVersion, PartialBSVersion } from 'shared/bs-version.interface';
import { InstallationLocationService } from "./installation-location.service";
import { SteamService } from "./steam.service";
import { UtilsService } from "./utils.service";
import { BS_APP_ID } from "../constants";
import { BS_APP_ID, OCULUS_BS_DIR } from "../constants";
import path from "path";
import { createInterface } from "readline";
import { createReadStream } from "fs";
import fs from "fs-extra";
import { ConfigurationService } from "./configuration.service";
import { rename } from "fs/promises";
import { BsmException } from "shared/models/bsm-exception.model";
import log from "electron-log";
import { OculusService } from "./oculus.service";
import { DownloadLinkType } from "shared/models/mods";
import sanitize from "sanitize-filename";
import { deleteFolder, getFoldersInFolder, pathExist } from "../helpers/fs.helpers";
import { FolderLinkerService } from "./folder-linker.service";
export class BSLocalVersionService{
@@ -19,44 +23,57 @@ export class BSLocalVersionService{
private readonly CUSTOM_VERSIONS_KEY = "custom-versions";
private readonly installLocationService: InstallationLocationService;
private readonly utilsService: UtilsService;
private readonly steamService: SteamService;
private readonly oculusService: OculusService;
private readonly remoteVersionService: BSVersionLibService;
private readonly configService: ConfigurationService;
private readonly linker: FolderLinkerService;
public static getInstance(): BSLocalVersionService{
if(!BSLocalVersionService.instance){ BSLocalVersionService.instance = new BSLocalVersionService(); }
return BSLocalVersionService.instance;
}
private constructor(){
this.installLocationService = InstallationLocationService.getInstance();
this.utilsService = UtilsService.getInstance();
this.steamService = SteamService.getInstance();
this.remoteVersionService = BSVersionLibService.getInstance();
this.configService = ConfigurationService.getInstance();
}
private constructor(){
this.installLocationService = InstallationLocationService.getInstance();
this.steamService = SteamService.getInstance();
this.oculusService = OculusService.getInstance();
this.remoteVersionService = BSVersionLibService.getInstance();
this.configService = ConfigurationService.getInstance();
this.linker = FolderLinkerService.getInstance();
}
private async getVersionOfBSFolder(bsPath: string): Promise<string>{
public async getVersionOfBSFolder(bsPath: string): Promise<PartialBSVersion>{
const versionFilePath = path.join(bsPath, 'Beat Saber_Data', 'globalgamemanagers');
if(!this.utilsService.pathExist(versionFilePath)){ return null; }
if(!(await pathExist(versionFilePath))){ return null; }
const versionsAvailable = await this.remoteVersionService.getAvailableVersions();
return new Promise<string>(resolve => {
const readLine = createInterface({ input: createReadStream(versionFilePath) });
let findVersion: string = null;
readLine.on('line', (line) => {
return new Promise<PartialBSVersion>(resolve => {
const stream = createReadStream(versionFilePath);
let findVersion: PartialBSVersion = null;
stream.on('data', (line) => {
line = line.toString();
for(const version of versionsAvailable){
if(line.includes(version.BSVersion)){
findVersion = version.BSVersion;
readLine.close();
if(line.includes(version.BSVersion)){
findVersion = {BSVersion: version.BSVersion};
if(findVersion.BSVersion !== path.basename(bsPath)){
findVersion.name = path.basename(bsPath);
}
stream.close();
stream.destroy();
break;
}
}
});
readLine.on('close', () => {
stream.on('end', () => {
if(findVersion){ resolve(findVersion) }
resolve(findVersion);
});
stream.on('close', () => {
if(findVersion){ resolve(findVersion) }
resolve(findVersion);
})
})
}
@@ -79,6 +96,7 @@ export class BSLocalVersionService{
public async getVersionPath(version: BSVersion): Promise<string>{
if(version.steam){ return this.steamService.getGameFolder(BS_APP_ID, "Beat Saber") }
if(version.oculus){ return this.oculusService.getGameFolder(OCULUS_BS_DIR); }
return path.join(
this.installLocationService.versionsDirectory,
this.getVersionFolder(version)
@@ -86,57 +104,89 @@ export class BSLocalVersionService{
}
private removeSpecialChar(seq: string): string{
// eslint-disable-next-line no-useless-escape
return seq.replace( /[<>:"\/\\|?*]+/g, '' );
return sanitize(seq);
}
public getVersionFolder(version: BSVersion){
return version.name ? `${version.BSVersion}-${version.name}` : version.BSVersion;
}
public getVersionFolder(version: BSVersion): string{
return version.name ?? version.BSVersion;
}
public async getInstalledVersions(): Promise<BSVersion[]>{
const versions: BSVersion[] = [];
const steamBsFolder = await this.steamService.getGameFolder(BS_APP_ID, "Beat Saber")
if(steamBsFolder && this.utilsService.pathExist(steamBsFolder)){
const steamBsVersion = await this.getVersionOfBSFolder(steamBsFolder);
if(steamBsVersion){
const steamVersionDetails = this.remoteVersionService.getVersionDetails(steamBsVersion);
versions.push(steamVersionDetails ? {...steamVersionDetails, steam: true} : {BSVersion: steamBsVersion, steam: true});
}
}
if(!this.utilsService.pathExist(this.installLocationService.versionsDirectory)){ return versions }
public getVersionType(version: BSVersion): DownloadLinkType{
if(version.steam){ return "steam"; }
if(version.oculus){ return "oculus"; }
return "universal"
}
const folderInInstallation = this.utilsService.listDirsInDir(this.installLocationService.versionsDirectory);
folderInInstallation.forEach(f => {
let version = this.remoteVersionService.getVersionDetails(f);
if(version){ version = this.getCustomVersions().find(v => v.BSVersion === version.BSVersion && v.name === version.name) ?? version; }
else { version = this.getCustomVersions().find(v => {
const [version, ...rest] = f.split("-");
if(rest.length < 1){ return false; }
const name = rest.join("-");
return name === v.name && version === v.BSVersion;
})
}
version && versions.push(version);
});
this.setCustomVersions(versions.filter(v => !!v.name || !!v.color));
return versions;
private async getSteamVersion(): Promise<BSVersion>{
const steamBsFolder = await this.steamService.getGameFolder(BS_APP_ID, "Beat Saber");
if(!steamBsFolder || !(await pathExist(steamBsFolder))){ return null; }
const steamBsVersion = await this.getVersionOfBSFolder(steamBsFolder);
if(!steamBsVersion){ return null; }
const version = await this.remoteVersionService.getVersionDetails(steamBsVersion.BSVersion);
if(!version){ return null; }
return {...version, steam: true};
}
private async getOculusVersion(): Promise<BSVersion>{
const oculusBsFolder = await this.oculusService.getGameFolder(OCULUS_BS_DIR);
if(!oculusBsFolder){ return null; }
const oculusBsVersion = await this.getVersionOfBSFolder(oculusBsFolder);
if(!oculusBsVersion){ return null; }
const version = await this.remoteVersionService.getVersionDetails(oculusBsVersion.BSVersion);
if(!version){ return null; }
return {...version, oculus: true};
}
public async getInstalledVersions(): Promise<BSVersion[]>{
const versions: BSVersion[] = [];
const steamVersion = await this.getSteamVersion();
if(steamVersion){ versions.push(steamVersion); }
const oculusVersion = await this.getOculusVersion();
if(oculusVersion){ versions.push(oculusVersion); }
if(!(await pathExist(this.installLocationService.versionsDirectory))){ return versions }
const folderInInstallation = await getFoldersInFolder(this.installLocationService.versionsDirectory);
for(const f of folderInInstallation){
log.info("try get version from folder", f);
const rawVersion = await this.getVersionOfBSFolder(f);
if(!rawVersion){ continue; }
const bsVersion = {...await this.remoteVersionService.getVersionDetails(rawVersion.BSVersion)};
if(!bsVersion){ continue; }
bsVersion.name = path.basename(f) !== bsVersion.BSVersion ? path.basename(f) : undefined;
const customVersion = this.getCustomVersions().find(custom => custom.BSVersion === bsVersion.BSVersion && custom.name === bsVersion.name);
if(customVersion){
bsVersion.color = customVersion.color;
}
versions.push(bsVersion);
};
this.setCustomVersions(versions.filter(v => !!v.color));
return versions;
}
public async deleteVersion(version: BSVersion): Promise<boolean>{
if(version.steam){ return false; }
if(version.steam || version.oculus){ return false; }
const versionFolder = await this.getVersionPath(version);
if(!this.utilsService.pathExist(versionFolder)){ return true; }
if(!(await pathExist(versionFolder))){ return true; }
return this.utilsService.deleteFolder(versionFolder)
return deleteFolder(versionFolder)
.then(() => { return true; })
.catch(() => { return false; })
}
public async editVersion(version: BSVersion, name: string, color: string): Promise<BSVersion>{
if(version.steam){ throw {title: "CantEditSteam", msg: "CantEditSteam"} as BsmException; }
if(version.steam || version.oculus){ throw {title: "CantEditSteam", msg: "CantEditSteam"} as BsmException; }
const oldPath = await this.getVersionPath(version);
const editedVersion: BSVersion = version.BSVersion === name
const editedVersion: BSVersion = version.BSVersion === name
? {...version, name: undefined, color}
: {...version, name: this.removeSpecialChar(name), color};
const newPath = await this.getVersionPath(editedVersion);
@@ -147,38 +197,53 @@ export class BSLocalVersionService{
return editedVersion;
}
if(this.utilsService.pathExist(newPath)){ throw {title: "VersionAlreadExist"} as BsmException; }
if((await pathExist(newPath)) && newPath === oldPath){ throw {title: "VersionAlreadExist"} as BsmException; }
return rename(oldPath, newPath).then(() => {
this.deleteCustomVersion(version);
this.addCustomVersion(editedVersion);
return editedVersion;
}).catch((err: Error) => {
log.error("edit version error", err, version, name, color);
throw {title: "CantRename", error: err} as BsmException;
});
}
public async cloneVersion(version: BSVersion, name: string, color: string): Promise<BSVersion>{
const originPath = await this.getVersionPath(version);
const cloneVersion: BSVersion = version.BSVersion === name
const cloneVersion: BSVersion = version.BSVersion === name
? {...version, name: undefined, color}
: {...version, name: this.removeSpecialChar(name), color, steam: false};
: {...version, name: this.removeSpecialChar(name), color, steam: false, oculus: false};
const newPath = await this.getVersionPath(cloneVersion);
if(originPath === newPath){
this.deleteCustomVersion(version);
this.addCustomVersion(cloneVersion);
return cloneVersion;
}
if(this.utilsService.pathExist(newPath)){ throw {title: "VersionAlreadExist"} as BsmException; }
if(await pathExist(newPath)){ throw {title: "VersionAlreadExist"} as BsmException; }
return fs.copy(originPath, newPath).then(() => {
return fs.copy(originPath, newPath, {dereference: true}).then(() => {
this.addCustomVersion(cloneVersion);
return cloneVersion;
}).catch((err: Error) => {
log.error("clone version error", err, version, name, color);
throw {title: "CantClone", error: err} as BsmException
})
}
}
public async getLinkedFolders(version: BSVersion): Promise<string[]>{
const versionPath = await this.getVersionPath(version);
const [rootFolders, beatSaberDataFolders] = await Promise.all([
getFoldersInFolder(versionPath),
getFoldersInFolder(path.join(versionPath, "Beat Saber_Data"))
]);
const linkedFolder = Promise.all([...rootFolders, ...beatSaberDataFolders].map(async folder => {
if(!(await this.linker.isFolderSymlink(folder))){ return null; }
return folder;
}));
return (await linkedFolder).filter(folder => folder);
}
}
+22 -29
View File
@@ -1,9 +1,10 @@
import { get } from 'https'
import { UtilsService } from './utils.service';
import path from 'path';
import { writeFileSync } from 'fs';
import { BSVersion } from 'shared/bs-version.interface';
import { RequestService } from "./request.service"
import isOnline from 'is-online';
import { readJSON } from 'fs-extra';
export class BSVersionLibService{
@@ -13,11 +14,13 @@ export class BSVersionLibService{
private static instance: BSVersionLibService;
private utilsService: UtilsService;
private requestService: RequestService
private bsVersions: BSVersion[] = [];
private bsVersions: BSVersion[];
private constructor(){
this.utilsService = UtilsService.getInstance();
this.requestService = RequestService.getInstance();
}
@@ -26,24 +29,13 @@ export class BSVersionLibService{
return BSVersionLibService.instance;
}
private getRemoteVersions(): Promise<BSVersion[]>{
return new Promise<BSVersion[]>((resolve, reject) => {
let body = ''
get(this.REMOTE_BS_VERSIONS_URL, (res) => {
res.on('data', chunk => body += chunk);
res.on('end', () => {
this.bsVersions = JSON.parse(body);
resolve(this.bsVersions);
});
res.on('error', () => reject(null))
})
})
}
private getRemoteVersions(): Promise<BSVersion[]>{
return this.requestService.get<BSVersion[]>(this.REMOTE_BS_VERSIONS_URL);
}
private async getLocalVersions(): Promise<BSVersion[]>{
const localVersionsPath = path.join(this.utilsService.getAssestsJsonsPath(), this.VERSIONS_FILE);
const rawVersion = (await this.utilsService.readFileAsync(localVersionsPath)).toString();
return JSON.parse(rawVersion);
return readJSON(localVersionsPath);
}
private async updateLocalVersions(versions: BSVersion[]): Promise<void>{
@@ -51,25 +43,26 @@ export class BSVersionLibService{
writeFileSync(localVersionsPath, JSON.stringify(versions, null, "\t"), {encoding: 'utf-8', flag: 'w'});
};
private async loadBsVersions(): Promise<BSVersion[]>{
const [localVersions, remoteVersions] = await Promise.all([
this.getLocalVersions(), (await isOnline({timeout: 1500}) && this.getRemoteVersions())
]);
let resVersions = localVersions;
if(remoteVersions && remoteVersions.length){ resVersions = remoteVersions; this.updateLocalVersions(resVersions); }
this.bsVersions = resVersions;
return this.bsVersions;
private async loadBsVersions(): Promise<BSVersion[]>{
if(this.bsVersions){ return this.bsVersions; }
const [localVersions, remoteVersions] = await Promise.all([
this.getLocalVersions(), (await isOnline({timeout: 1500}) && this.getRemoteVersions())
]);
let resVersions = localVersions;
if(remoteVersions && remoteVersions.length){ resVersions = remoteVersions; this.updateLocalVersions(resVersions); }
this.bsVersions = resVersions;
return this.bsVersions;
}
public async getAvailableVersions(): Promise<BSVersion[]>{
if(this.bsVersions && this.bsVersions.length){ return this.bsVersions; }
const bsVersions = await this.loadBsVersions();
if(!bsVersions || !bsVersions.length){ return []; }
return bsVersions;
}
public getVersionDetails(version: string): BSVersion{
return this.bsVersions.find(v => v.BSVersion === version);
}
public async getVersionDetails(version: string): Promise<BSVersion>{
const versions = await this.getAvailableVersions();
return versions.find(v => v.BSVersion === version);
}
}
+20 -6
View File
@@ -1,23 +1,37 @@
import ElectronStore from "electron-store";
import { InstallationLocationService } from "./installation-location.service";
export class ConfigurationService {
private static instance: ConfigurationService;
private readonly _store: ElectronStore;
public static getInstance(): ConfigurationService{
if(!ConfigurationService.instance){ ConfigurationService.instance = new ConfigurationService(); }
return ConfigurationService.instance;
}
private readonly locations: InstallationLocationService;
private store: ElectronStore;
private constructor(){
this._store = new ElectronStore();
this.locations = InstallationLocationService.getInstance();
this.initStore();
this.locations.onInstallLocationUpdate(() => this.initStore());
}
public get store(): ElectronStore{ return this._store; }
private initStore(){
const contentPath = this.locations.installationDirectory;
this.store = new ElectronStore({
cwd: contentPath,
name: "config",
fileExtension: "cfg",
});
}
public set(key: string, value: any): void{
public set(key: string, value: unknown): void{
this.store.set(key, value);
}
@@ -29,4 +43,4 @@ export class ConfigurationService {
this.store.delete(key);
}
}
}
+99
View File
@@ -0,0 +1,99 @@
import { app } from "electron";
import path from "path";
import { URL } from "url";
import log from "electron-log"
export class DeepLinkService {
// See docs : https://www.electronjs.org/docs/latest/tutorial/launch-app-from-url-in-another-app#main-process-mainjs
private static instance: DeepLinkService;
public static getInstance(): DeepLinkService{
if(!DeepLinkService.instance){ DeepLinkService.instance = new DeepLinkService(); }
return DeepLinkService.instance;
}
private readonly listeners = new Map<string, Listerner[]>()
private constructor(){}
public registerDeepLink(protocol: string): boolean{
if(process.defaultApp && process.argv.length >= 2){
return app.setAsDefaultProtocolClient(protocol, process.execPath, [path.resolve(process.argv[1])]);
}
return app.setAsDefaultProtocolClient(protocol);
}
public unRegisterDeepLink(protocol: string): boolean{
if(process.defaultApp && process.argv.length >= 2) {
return app.removeAsDefaultProtocolClient(protocol, process.execPath, [path.resolve(process.argv[1])]);
}
return app.removeAsDefaultProtocolClient(protocol);
}
public isDeepLinkRegistred(protocol: string): boolean{
if(process.defaultApp && process.argv.length >= 2) {
return app.isDefaultProtocolClient(protocol, process.execPath, [path.resolve(process.argv[1])]);
}
return app.isDefaultProtocolClient(protocol);
}
public addLinkOpenedListener(protocol: string, fn: Listerner){
if(!this.listeners.has(protocol)){
this.listeners.set(protocol, [] as Listerner[]);
}
this.listeners.get(protocol).push(fn);
}
public removeLinkOpenedListener(protocol: string, fn: Listerner){
if(!this.listeners.get(protocol)?.length){ return; }
const listeners = this.listeners.get(protocol);
const fnIndex = listeners.findIndex(listener => listener === fn);
if(fnIndex < 0){ return; }
listeners.splice(fnIndex, 1);
}
public dispatchLinkOpened(link: string){
log.info("DEISPATCH", link);
const url = new URL(link);
const protocolListeners = this.listeners.get(url.protocol.replace(":", "")) ?? [];
protocolListeners.forEach(listerner => {
listerner(link);
});
}
public isDeepLink(link: string): boolean{
try{
const url = new URL(link);
const protocol = url.protocol.replace(":", "");
return Array.from(this.listeners.keys()).some(key => key === protocol);
}
catch(e){
return false;
}
}
}
type Listerner = (link: string) => void;
+108
View File
@@ -0,0 +1,108 @@
import { InstallationLocationService } from "./installation-location.service";
import log from "electron-log";
import { deleteFolder, ensureFolderExist, moveFolderContent, pathExist, unlinkPath } from "../helpers/fs.helpers";
import { lstat, symlink } from "fs/promises";
import path from "path";
import { copy } from "fs-extra";
export class FolderLinkerService {
private static instance: FolderLinkerService;
public static getInstance(): FolderLinkerService {
if (!FolderLinkerService.instance) {
FolderLinkerService.instance = new FolderLinkerService();
}
return FolderLinkerService.instance;
}
private readonly installLocationService = InstallationLocationService.getInstance();
private readonly sharedFolder: string;
private constructor(){
this.installLocationService = InstallationLocationService.getInstance();
this.sharedFolder = this.installLocationService.sharedContentPath;
}
private getSharedFolder(folderPath: string, intermediateFolder?: string): string {
return path.join(this.sharedFolder, intermediateFolder ?? "", path.basename(folderPath));
}
private getBackupFolder(folderPath: string): string {
return folderPath + "_backup";
}
private async backupFolder(folderPath: string): Promise<void> {
if(!await pathExist(folderPath)){ return; }
return copy(folderPath, this.getBackupFolder(folderPath), { overwrite: true, errorOnExist: false });
}
private async restoreFolder(folderPath: string): Promise<void> {
if(!await pathExist( this.getBackupFolder(folderPath) )){ return; }
return copy(this.getBackupFolder(folderPath), folderPath, { overwrite: true, errorOnExist: false }).then(() => {
return deleteFolder(this.getBackupFolder(folderPath));
});
}
public async linkFolder(folderPath: string, options?: LinkOptions): Promise<void> {
if(await this.isFolderSymlink(folderPath)){ return; }
const sharedPath = this.getSharedFolder(folderPath, options?.intermediateFolder);
await ensureFolderExist(folderPath);
await ensureFolderExist(sharedPath);
if(options?.backup === true){
await this.backupFolder(folderPath);
}
if(options?.keepContents !== false){
await moveFolderContent(folderPath, sharedPath).toPromise();
}
await deleteFolder(folderPath);
return symlink(sharedPath, folderPath, "junction");
}
public async unlinkFolder(folderPath: string, options?: LinkOptions): Promise<void> {
if(!(await this.isFolderSymlink(folderPath))){ return; }
await unlinkPath(folderPath);
const sharedPath = this.getSharedFolder(folderPath, options?.intermediateFolder);
await ensureFolderExist(folderPath);
if(options?.backup === true){
return this.restoreFolder(folderPath);
}
if(options?.keepContents === false){ return; }
await ensureFolderExist(sharedPath);
return copy(sharedPath, folderPath, { errorOnExist: false, recursive: true });
}
public async isFolderSymlink(folder: string): Promise<boolean> {
try{
if(!(await pathExist(folder))){ return false; }
return lstat(folder).then(stat => stat.isSymbolicLink());
}
catch(e){
log.error(e);
}
return false;
}
}
export interface LinkOptions {
keepContents?: boolean,
intermediateFolder?: string,
backup?: boolean
}
@@ -1,59 +1,75 @@
import path from "path";
import { ConfigurationService } from "./configuration.service";
import { UtilsService } from "./utils.service";
import fs from 'fs-extra';
import log from "electron-log";
import { app } from "electron";
import { BsmException } from "shared/models/bsm-exception.model";
import ElectronStore from "electron-store";
import { ensureFolderExist, pathExist } from "../helpers/fs.helpers";
export class InstallationLocationService {
private static instance: InstallationLocationService;
public static getInstance(): InstallationLocationService{
if(!InstallationLocationService.instance){ InstallationLocationService.instance = new InstallationLocationService(); }
return InstallationLocationService.instance;
}
private readonly INSTALLATION_FOLDER = "BSManager";
private readonly VERSIONS_FOLDER = "BSInstances";
private readonly SHARED_CONTENT_FOLDER = "SharedContent";
private readonly STORE_INSTALLATION_PATH_KEY = "installation-folder";
private readonly configService: ConfigurationService;
private readonly utilsService: UtilsService;
private readonly installPathConfig: ElectronStore;
private readonly updateListeners: Set<Listener> = new Set();
private _installationDirectory: string;
public static getInstance(): InstallationLocationService{
if(!InstallationLocationService.instance){ InstallationLocationService.instance = new InstallationLocationService(); }
return InstallationLocationService.instance;
}
private constructor(){
this.configService = ConfigurationService.getInstance();
this.utilsService = UtilsService.getInstance();
this.installPathConfig = new ElectronStore({watch: true});
this.initInstallationLocation();
this.installPathConfig.onDidChange(this.STORE_INSTALLATION_PATH_KEY, () => {
this.triggerListeners();
})
}
private initInstallationLocation(): void{
this._installationDirectory = this.configService.get<string>(this.STORE_INSTALLATION_PATH_KEY) || app.getPath("documents");
this._installationDirectory = this.installPathConfig.get<string>(this.STORE_INSTALLATION_PATH_KEY) as string || app.getPath("documents");
}
public get installationDirectory(): string{ return path.join(this._installationDirectory, this.INSTALLATION_FOLDER); }
public get versionsDirectory(): string { return path.join(this.installationDirectory, this.VERSIONS_FOLDER); }
private triggerListeners(): void{
this.updateListeners.forEach(listener => listener());
}
public setInstallationDirectory(newDir: string): Promise<string>{
const oldDir = this.installationDirectory;
const newDest = path.join(newDir, this.INSTALLATION_FOLDER);
return new Promise<string>((resolve, reject) => {
if(!this.utilsService.pathExist(oldDir)){ this.utilsService.createFolderIfNotExist(oldDir); }
return new Promise<string>(async (resolve, reject) => {
if(!(await pathExist(oldDir))){ ensureFolderExist(oldDir); }
fs.move(oldDir, newDest, { overwrite: true }).then(() => {
this._installationDirectory = newDir;
this.configService.store.set(this.STORE_INSTALLATION_PATH_KEY, newDir);
this.installPathConfig.set(this.STORE_INSTALLATION_PATH_KEY, newDir);
resolve(this.installationDirectory);
}).catch((err: Error) => {
reject({title: "CantMoveFolder", error: err} as BsmException);
log.error(err);
})
})
});
}
}
public onInstallLocationUpdate(fn: Listener){
this.updateListeners.add(fn);
}
public get installationDirectory(): string{ return path.join(this._installationDirectory, this.INSTALLATION_FOLDER); }
public get versionsDirectory(): string { return path.join(this.installationDirectory, this.VERSIONS_FOLDER); }
public get sharedContentPath(): string { return path.join(this.installationDirectory, this.SHARED_CONTENT_FOLDER); }
}
type Listener = () => void;
+66
View File
@@ -0,0 +1,66 @@
import { IpcRequest } from "shared/models/ipc";
import { ipcMain } from "electron";
import { Observable } from "rxjs";
import { IpcChannel, IpcCompleteChannel, IpcErrorChannel } from "shared/models/ipc/ipc-response.interface";
import { AppWindow } from "shared/models/window-manager/app-window.model";
import { WindowManagerService } from "./window-manager.service";
import { IpcReplier } from "shared/models/ipc/ipc-request.interface";
import log from "electron-log";
export class IpcService {
private static instance: IpcService;
public static getInstance(): IpcService {
if (!IpcService.instance) { IpcService.instance = new IpcService(); }
return IpcService.instance;
}
private readonly windows: WindowManagerService;
private constructor() {
this.windows = WindowManagerService.getInstance();
}
private getErrorChannel(channel: IpcChannel): IpcErrorChannel {
return `${channel}_error`;
}
private getCompleteChannel(channel: IpcChannel): IpcCompleteChannel {
return `${channel}_complete`;
}
private buildProxyListener<T>(listener: (req: IpcRequest<T>, replier: IpcReplier) => void) {
return (event: Electron.IpcMainEvent, req: IpcRequest<T>) => {
const window = this.windows.getAppWindowFromWebContents(event.sender);
const replier = (data: Observable<unknown>) => this.connectStream(req.responceChannel, window, data);
listener(req, replier);
}
}
public send<T>(channel: IpcChannel, window: AppWindow, response?: T|Error): void{
this.windows.getWindow(window)?.webContents?.send(channel, response);
}
public connectStream(channel: IpcChannel, window: AppWindow, observable: Observable<unknown>): void{
observable.subscribe(data => {
this.send(channel, window, data);
}, error => {
log.error(error);
this.send(this.getErrorChannel(channel), window, error);
}, () => {
this.send(this.getCompleteChannel(channel), window);
});
}
public on<T>(channel: IpcChannel, listener: (req: IpcRequest<T>, replier: IpcReplier) => void): void{
ipcMain.on(channel, this.buildProxyListener(listener));
}
public once<T>(channel: IpcChannel, listener: (req: IpcRequest<T>, replier: IpcReplier) => void): void{
ipcMain.once(channel, this.buildProxyListener(listener));
}
}
-47
View File
@@ -1,47 +0,0 @@
import path from "path";
import { BSVersion } from "shared/bs-version.interface";
import { BSLocalVersionService } from "./bs-local-version.service";
import archiver from "archiver";
import { createWriteStream } from "fs";
import log from "electron-log";
export class MapService{
private readonly MAP_PATH = path.join("Beat Saber_Data", "CustomLevels");
private static instance: MapService;
private readonly localVersionService: BSLocalVersionService;
public static getInstance(): MapService{
if(!MapService.instance){ MapService.instance = new MapService(); }
return MapService.instance;
}
private constructor(){
this.localVersionService = BSLocalVersionService.getInstance();
}
private getMapsPath(versionPath: string): string{
return path.join(versionPath, this.MAP_PATH);
}
public async exportVersionMaps(version: BSVersion, outputZip: string): Promise<void>{
const versionPath = await this.localVersionService.getVersionPath(version);
const mapsPath = this.getMapsPath(versionPath);
const output = createWriteStream(outputZip);
const archive = archiver("zip", {zlib: {level: 9}});
const promise = new Promise<void>((resolve, reject) => {
archive.pipe(output);
archive.directory(mapsPath, false);
archive.on("error", reject);
output.on("close", resolve);
archive.finalize()
});
return promise;
}
}
@@ -0,0 +1,88 @@
import { BSVersion } from "shared/bs-version.interface";
import { Mod } from "shared/models/mods/mod.interface";
import { RequestService } from "../request.service";
export class BeatModsApiService {
private static instance: BeatModsApiService;
private readonly requestService: RequestService;
private readonly BEAT_MODS_VERSIONS = "https://versions.beatmods.com/versions.json";
private readonly BEAT_MODS_ALIAS = "https://alias.beatmods.com/aliases.json";
private readonly BEAT_MODS_API_URL = "https://beatmods.com/api/v1/";
public readonly BEAT_MODS_URL = "https://beatmods.com";
private readonly aliasesCache = new Map<string, BSVersion[]>();
private readonly versionModsCache = new Map<string, Mod[]>();
private allModsCache: Mod[];
public static getInstance(): BeatModsApiService{
if(!BeatModsApiService.instance){ BeatModsApiService.instance = new BeatModsApiService(); }
return BeatModsApiService.instance;
}
private constructor(){
this.requestService = RequestService.getInstance();
}
private getVersionModsUrl(version: BSVersion): string{
return `${this.BEAT_MODS_API_URL}mod?status=approved&gameVersion=${version.BSVersion}&sort=&sortDirection=1`;
}
private getAllModsUrl(): string{
return `${this.BEAT_MODS_API_URL}mod`;
}
private async getVersionAlias(): Promise<Map<string, BSVersion[]>>{
if(this.aliasesCache.size){ return this.aliasesCache; }
return this.requestService.get<Record<string, string[]>>(this.BEAT_MODS_ALIAS).then(rawAliases => {
Object.entries(rawAliases).forEach(([key, value]) => {
this.aliasesCache.set(key, value.map(s => ({BSVersion: s} as BSVersion)));
});
return this.aliasesCache;
})
}
private async getAliasOfVersion(version: BSVersion): Promise<BSVersion>{
return this.getVersionAlias().then(aliases => {
if(Array.from(aliases.keys()).some(k => k === version.BSVersion)){ return version; }
const alias = Array.from(aliases.entries()).find(([key, value]) => value.find(v => v.BSVersion === version.BSVersion))[0];
return {BSVersion: alias} as BSVersion
});
}
private asignDependencies(mod: Mod, mods: Mod[]): Mod{
mod.dependencies = mod.dependencies.map(dep => mods.find(mod => mod.name === dep.name));
return mod;
}
public async getVersionMods(version: BSVersion): Promise<Mod[]>{
if(this.versionModsCache.has(version.BSVersion)){ return this.versionModsCache.get(version.BSVersion); }
const alias = await this.getAliasOfVersion(version);
return this.requestService.get<Mod[]>(this.getVersionModsUrl(alias)).then(mods => {
mods = mods.map(mod => this.asignDependencies(mod, mods));
this.versionModsCache.set(version.BSVersion, mods);
return mods;
});
}
public async getAllMods(): Promise<Mod[]>{
if(!!this.allModsCache){ return this.allModsCache; }
return this.requestService.get<Mod[]>(this.getAllModsUrl()).then(mods => {
this.allModsCache = mods;
return this.allModsCache;
});
}
public loadAllMods(){ return this.getAllMods(); }
}
@@ -0,0 +1,333 @@
import { BSVersion } from "shared/bs-version.interface";
import { DownloadLink, InstallModsResult, Mod, ModInstallProgression, UninstallModsResult } from "shared/models/mods";
import { BeatModsApiService } from "./beat-mods-api.service";
import { BSLocalVersionService } from "../bs-local-version.service"
import path from "path";
import { UtilsService } from "../utils.service";
import md5File from "md5-file";
import fs from "fs"
import StreamZip from "node-stream-zip";
import { RequestService } from "../request.service";
import { spawn } from "child_process";
import { BS_EXECUTABLE } from "../../constants";
import log from "electron-log";
import { deleteFolder, ensureFolderExist, pathExist, unlinkPath } from "../../helpers/fs.helpers";
export class BsModsManagerService {
private static instance: BsModsManagerService;
private readonly beatModsApi: BeatModsApiService;
private readonly bsLocalService: BSLocalVersionService;
private readonly utilsService: UtilsService;
private readonly requestService: RequestService
private manifestMatches: Mod[];
private nbModsToInstall = 0;
private nbInstalledMods = 0;
private nbModsToUninstall = 0;
private nbUninstalledMods = 0;
public static getInstance(): BsModsManagerService{
if(!BsModsManagerService.instance){ BsModsManagerService.instance = new BsModsManagerService(); }
return BsModsManagerService.instance;
}
private constructor(){
this.beatModsApi = BeatModsApiService.getInstance();
this.bsLocalService = BSLocalVersionService.getInstance();
this.utilsService = UtilsService.getInstance();
this.requestService = RequestService.getInstance();
}
private async getModFromHash(hash: string): Promise<Mod>{
const allMods = await this.beatModsApi.getAllMods();
return allMods.find(mod => {
if(mod.name.toLowerCase() === "bsipa" || mod.status === "declined"){ return false; }
return mod.downloads.some(download => download.hashMd5.some(md5 => md5.hash === hash));
})
}
private async getIpaFromHash(hash: string): Promise<Mod>{
const allMods = await this.beatModsApi.getAllMods();
return allMods.find(mod => {
if(mod.name.toLowerCase() !== "bsipa"){ return false; }
return mod.downloads.some(download => download.hashMd5.some(md5 => md5.hash === hash));
})
}
private async getModsInDir(version: BSVersion, modsDir: ModsInstallFolder): Promise<Mod[]>{
const bsPath = await this.bsLocalService.getVersionPath(version);
const modsPath = path.join(bsPath, modsDir);
if(!(await pathExist(modsPath))){ return []; }
const files = fs.readdirSync(modsPath);
const promises = files.map(f => {
return (async() => {
const filePath = path.join(modsPath, f)
const ext = path.extname(f);
if(ext !== ".dll" && ext !== ".exe" && ext !== ".manifest"){ return undefined; }
const hash = await md5File(filePath);
const mod = await this.getModFromHash(hash);
if(!mod){ return undefined; }
if(ext === ".manifest"){
this.manifestMatches.push(mod);
return undefined;
}
if(filePath.includes("Libs")){
if(!this.manifestMatches.some(m => m.name === mod.name)){ return undefined; }
const modIndex = this.manifestMatches.indexOf(mod);
if(modIndex > -1){ this.manifestMatches.splice(modIndex, 1); }
}
return mod;
})()
});
const mods = await Promise.all(promises)
return mods.filter(m => !!m);
}
private async getBsipaInstalled(version: BSVersion): Promise<Mod>{
const bsPath = await this.bsLocalService.getVersionPath(version);
const injectorPath = path.join(bsPath, "Beat Saber_Data", "Managed", "IPA.Injector.dll");
if(!(await pathExist(injectorPath))){ return undefined; }
const injectorMd5 = await md5File(injectorPath);
return this.getIpaFromHash(injectorMd5);
}
private async downloadZip(zipUrl: string): Promise<{zip: StreamZip.StreamZipAsync, zipPath: string}>{
zipUrl = path.join(this.beatModsApi.BEAT_MODS_URL, zipUrl);
const fileName = path.basename(zipUrl);
const tempPath = this.utilsService.getTempPath();
await ensureFolderExist(this.utilsService.getTempPath());
const dest = path.join(tempPath, fileName);
const zipPath = await this.requestService.downloadFile(zipUrl, dest);
const zip = new StreamZip.async({file : zipPath});
return {zip, zipPath};
}
private async executeBSIPA(version: BSVersion, args: string[]): Promise<boolean>{
const versionPath = await this.bsLocalService.getVersionPath(version);
const ipaPath = path.join(versionPath, "IPA.exe");
const bsExePath = path.join(versionPath, BS_EXECUTABLE);
if(!(await pathExist(ipaPath)) || !(await pathExist(bsExePath))){ return false; }
return new Promise<boolean>(resolve => {
const processIPA = spawn(`start /wait /min "" "${ipaPath}" ${args.join(" ")}`, {cwd: versionPath, detached: true, shell: true});
processIPA.once("exit", code => {
if(code === 0){ return resolve(true); }
log.error("IPA PROCESS", "exit code", code);
resolve(false);
});
setTimeout(() => resolve(false), (1 * 60) * 1000); //timeout 1min
});
}
private getModDownload(mod: Mod, version: BSVersion): DownloadLink{
return mod.downloads.find(download => {
const type = download.type.toLowerCase()
return type === "universal" || type === this.bsLocalService.getVersionType(version);
});
}
private async installMod(mod: Mod, version: BSVersion): Promise<boolean>{
this.utilsService.ipcSend<ModInstallProgression>("mod-installed", {success: true, data: {name: mod.name, progression: ((this.nbInstalledMods + 1) / this.nbModsToInstall) * 100}})
const download = this.getModDownload(mod, version);
if(!download){ return false; }
const {zip, zipPath} = await this.downloadZip(download.url);
if(!zip){ return false; }
const crypto = require('crypto');
const entries = await zip.entries();
const checkedEntries = (await Promise.all(Object.values(entries).map(async (entry) => {
if(!entry.isFile){ return undefined; }
const data = await zip.entryData(entry);
const entryMd5 = crypto.createHash('md5').update(data).digest('hex')
return download.hashMd5.some(md5 => md5.hash === entryMd5) ? entry : undefined;
}))).filter(entry => !!entry);
if(checkedEntries.length != download.hashMd5.length){ return false; }
const verionPath = await this.bsLocalService.getVersionPath(version);
const isBSIPA = mod.name.toLowerCase() === "bsipa";
const destDir = isBSIPA ? verionPath : path.join(verionPath, ModsInstallFolder.PENDING);
const extracted = await zip.extract(null, destDir).then(() => true).catch(err => {log.error(err); return false});
await zip.close();
await unlinkPath(zipPath);
const res = isBSIPA ? (extracted && (await this.executeBSIPA(version, ["-n"]))) : extracted;
res && this.nbInstalledMods++;
return res;
}
private isDependency(mod: Mod, selectedMods: Mod[], availableMods: Mod[]){
return selectedMods.some(m => {
const deps = m.dependencies.map(dep => Array.from(availableMods.values()).find(m => dep.name === m.name));
if(deps.some(depMod => depMod.name === mod.name)){ return true; }
return deps.some(depMod => depMod.dependencies.some(depModDep => depModDep.name === mod.name));
});
}
private async resolveDependencies(mods: Mod[], version: BSVersion): Promise<Mod[]>{
const availableMods = await this.beatModsApi.getVersionMods(version);
return Array.from(new Map<string, Mod>(availableMods.reduce((res, mod) => {
if(this.isDependency(mod, mods, availableMods)){
res.push([mod.name, mod]);
}
return res;
}, [])).values());
}
private async uninstallBSIPA(mod: Mod, version: BSVersion): Promise<void>{
const download = this.getModDownload(mod, version);
const verionPath = await this.bsLocalService.getVersionPath(version);
const hasIPAExe = await pathExist(path.join(verionPath, "IPA.exe"));
const hasIPADir = await pathExist(path.join(verionPath, "IPA"));
if(!hasIPADir || !hasIPAExe){ return; }
await this.executeBSIPA(version, ["--revert", "-n"]);
const promises = download.hashMd5.map(files => {
const file = files.file.replaceAll("IPA/", "").replaceAll("Data", "Beat Saber_Data");
return unlinkPath(path.join(verionPath, file));
})
await Promise.all(promises);
}
private async uninstallMod(mod: Mod, version: BSVersion): Promise<void>{
this.nbUninstalledMods++;
this.utilsService.ipcSend<ModInstallProgression>("mod-uninstalled", {success: true, data: {name: mod.name, progression: (this.nbUninstalledMods / this.nbModsToUninstall) * 100}})
if(mod.name.toLowerCase() === "bsipa"){ return this.uninstallBSIPA(mod, version); }
const download = this.getModDownload(mod, version);
const versionPath = await this.bsLocalService.getVersionPath(version);
const promises = download.hashMd5.map(async files => {
return Promise.all([
unlinkPath(path.join(versionPath, files.file)),
unlinkPath(path.join(versionPath, "IPA", "Pending", files.file))
]);
});
await Promise.all(promises);
}
public getAvailableMods(version: BSVersion): Promise<Mod[]>{
return this.beatModsApi.getVersionMods(version);
}
public async getInstalledMods(version: BSVersion): Promise<Mod[]>{
this.manifestMatches = [];
await this.beatModsApi.loadAllMods();
const bsipa = await this.getBsipaInstalled(version);
return Promise.all([
this.getModsInDir(version, ModsInstallFolder.PLUGINS_PENDING),
this.getModsInDir(version, ModsInstallFolder.LIBS_PENDING),
this.getModsInDir(version, ModsInstallFolder.PLUGINS),
this.getModsInDir(version, ModsInstallFolder.LIBS)
]).then(dirMods => {
const res = [];
if(!!bsipa){ res.push(bsipa); }
const installedMods = Array.from(new Map<string, Mod>(dirMods.flat().map(m => [m.name, m])).values());
res.push(...installedMods);
return res;
});
}
public async installMods(mods: Mod[], version: BSVersion): Promise<InstallModsResult>{
if(!mods || !mods.length){ throw "no-mods"; }
const deps = await this.resolveDependencies(mods, version);
mods.push(...deps);
const bsipa = mods.find(mod => mod.name.toLowerCase() === "bsipa");
if(bsipa){ mods = mods.filter(mod => mod.name.toLowerCase() !== "bsipa"); }
this.nbModsToInstall = mods.length + (bsipa && 1);
this.nbInstalledMods = 0;
if(bsipa){
const installed = await this.installMod(bsipa, version).catch(err => {log.error("INSTALL BSIPA", err); return false; })
if(!installed){ throw "cannot-install-bsipa"; }
}
for(const mod of mods){
await this.installMod(mod, version);;
}
return {
nbModsToInstall: this.nbModsToInstall,
nbInstalledMods: this.nbInstalledMods
};
}
public async uninstallMods(mods: Mod[], version: BSVersion): Promise<UninstallModsResult>{
if(!mods || !mods.length){ throw "no-mods"; }
this.nbModsToUninstall = mods.length;
this.nbUninstalledMods = 0;
for(const mod of mods){
await this.uninstallMod(mod, version);
}
return {
nbModsToUninstall: this.nbModsToUninstall,
nbUninstalledMods: this.nbUninstalledMods
};
}
public async uninstallAllMods(version: BSVersion): Promise<UninstallModsResult>{
const mods = await this.getInstalledMods(version);
if(!mods || !mods.length){ throw "no-mods"; }
this.nbModsToUninstall = mods.length;
this.nbUninstalledMods = 0;
for(const mod of mods){
await this.uninstallMod(mod, version);
}
const versionPath = await this.bsLocalService.getVersionPath(version);
await deleteFolder(path.join(versionPath, ModsInstallFolder.PLUGINS));
await deleteFolder(path.join(versionPath, ModsInstallFolder.LIBS));
await deleteFolder(path.join(versionPath, ModsInstallFolder.IPA));
path.resolve
return {
nbModsToUninstall: this.nbModsToUninstall,
nbUninstalledMods: this.nbUninstalledMods
};
}
}
const enum ModsInstallFolder {
PLUGINS = "Plugins",
LIBS = "Libs",
IPA = "IPA",
PENDING = "IPA/Pending",
PLUGINS_PENDING = "IPA/Pending/Plugins",
LIBS_PENDING = "IPA/Pending/Libs"
}
+27
View File
@@ -0,0 +1,27 @@
import { Notification } from "electron";
import { SystemNotificationOptions } from "shared/models/notification/system-notification.model";
import { UtilsService } from "./utils.service";
export class NotificationService {
private static instance: NotificationService;
public static getInstance(): NotificationService{
if(!NotificationService.instance){ NotificationService.instance = new NotificationService(); }
return NotificationService.instance;
}
private readonly APP_ICON: string;
private readonly utils: UtilsService;
private constructor(){
this.utils = UtilsService.getInstance();
this.APP_ICON = this.utils.getAssetsPath("favicon.ico");
}
public notify(options: SystemNotificationOptions){
new Notification({...options, icon: this.APP_ICON}).show();
}
}
+67
View File
@@ -0,0 +1,67 @@
import { UtilsService } from "./utils.service";
import regedit from 'regedit'
import path from "path";
import { pathExist } from "../helpers/fs.helpers";
export class OculusService {
private static instance: OculusService;
private readonly utils: UtilsService;
private oculusPaths: string[];
public static getInstance(): OculusService{
if(!OculusService.instance){ OculusService.instance = new OculusService(); }
return OculusService.instance;
}
private constructor(){
this.utils = UtilsService.getInstance();
}
public oculusRunning(): boolean{
return this.utils.taskRunning("OculusClient.exe");
}
public async getOculusLibsPath(): Promise<string[]>{
if(this.oculusPaths){ return this.oculusPaths; }
const oculusLibsRegKey = "HKCU\\SOFTWARE\\Oculus VR, LLC\\Oculus\\Libraries";
const libsRegData = (await regedit.promisified.list([oculusLibsRegKey]))["HKCU\\SOFTWARE\\Oculus VR, LLC\\Oculus\\Libraries"];
if(!libsRegData.exists || !libsRegData.keys){ return null; }
const libsPath = (await Promise.all(libsRegData.keys.map(async key => {
const originalPath = (await regedit.promisified.list([`${oculusLibsRegKey}\\${key}`]))[`${oculusLibsRegKey}\\${key}`];
if(!originalPath.exists || !libsRegData.values || !originalPath.values["OriginalPath"]){ return null; }
return originalPath.values["OriginalPath"].value as string;
}, []))).filter(path => !!path);
this.oculusPaths = libsPath;
return libsPath;
}
public async getGameFolder(gameFolder: string): Promise<string>{
const libsFolders = await this.getOculusLibsPath();
if(!libsFolders){ return null; }
const rootLibDir = "Software"
for(const lib of libsFolders){
const gameFullPath = path.join(lib, rootLibDir, gameFolder);
if(await pathExist(gameFullPath)){ return gameFullPath; }
}
return null;
}
}
+45
View File
@@ -0,0 +1,45 @@
import { get } from "https";
import { createWriteStream, unlink } from "fs";
export class RequestService {
private static instance: RequestService;
public static getInstance(): RequestService{
if(!RequestService.instance){ RequestService.instance = new RequestService(); }
return RequestService.instance;
}
private constructor(){}
public get<T = any>(url: string): Promise<T>{
return new Promise((resolve, reject) => {
let body = ''
get(url, (res) => {
res.on('data', chunk => body += chunk);
res.on('end', () => {
resolve(JSON.parse(body));
});
res.on('error', (err) => reject(err))
});
});
}
public downloadFile(url: string, dest: string): Promise<string>{
return new Promise((resolve, reject) => {
const file = createWriteStream(dest);
get(url, res => {
res.pipe(file);
file.on("close", () => {
file.close(() => resolve(dest))
}).on("error", err => {
unlink(dest, () => reject(err));
});
}).on("error", err => {
unlink(dest, () => reject(err));
});
});
}
}
+36 -14
View File
@@ -3,6 +3,9 @@ import regedit from 'regedit'
import path from "path";
import { parse } from "@node-steam/vdf";
import { readFile } from "fs/promises";
import { spawn } from "child_process";
import { pathExist } from "../helpers/fs.helpers";
import log from "electron-log";
export class SteamService{
@@ -27,35 +30,54 @@ export class SteamService{
}
public async getSteamPath(): Promise<string>{
if(this.steamPath !== ''){ return this.steamPath; }
if(!!this.steamPath){ return this.steamPath; }
const [win32Res, win64Res] = await Promise.all([
regedit.promisified.list(['HKLM\\SOFTWARE\\Valve\\Steam']),
regedit.promisified.list(['HKLM\\SOFTWARE\\WOW6432Node\\Valve\\Steam'])
]);
const [win32, win64] = [win32Res["HKLM\\SOFTWARE\\Valve\\Steam"], win64Res["HKLM\\SOFTWARE\\WOW6432Node\\Valve\\Steam"]];
let res = ''
if(win64.values.InstallPath.value){ res = win64.values.InstallPath.value as string; }
else if(win32.values.InstallPath.value){ res = win32.values.InstallPath.value as string; }
let res = '';
if(win64.exists && win64?.values?.InstallPath?.value){ res = win64.values.InstallPath.value as string; }
else if(win32.exists && win32?.values?.InstallPath?.value){ res = win32.values.InstallPath.value as string; }
this.steamPath = res;
return this.steamPath;
}
public async getGameFolder(gameId: string, gameFolder?: string): Promise<string>{
const steamPath = await this.getSteamPath();
let libraryFolders: any = path.join(steamPath, 'steamapps', 'libraryfolders.vdf');
try{
const steamPath = await this.getSteamPath();
if(!this.utils.pathExist(libraryFolders)){ return null; }
libraryFolders = parse(await readFile(libraryFolders, {encoding: 'utf-8'}));
let libraryFolders: any = path.join(steamPath, 'steamapps', 'libraryfolders.vdf');
if(!(await pathExist(libraryFolders))){ return null; }
libraryFolders = parse(await readFile(libraryFolders, {encoding: 'utf-8'}));
if(!libraryFolders.libraryfolders){ return null; }
libraryFolders = libraryFolders.libraryfolders
if(!libraryFolders.libraryfolders){ return null; }
libraryFolders = libraryFolders.libraryfolders
for(const libKey in Object.keys(libraryFolders)){
if(!libraryFolders[libKey] || !libraryFolders[libKey]["apps"]){ continue; }
if(libraryFolders[libKey]["apps"][gameId]){ return path.join(libraryFolders[libKey]["path"], "steamapps", "common", gameFolder); };
for(const libKey in Object.keys(libraryFolders)){
if(!libraryFolders[libKey] || !libraryFolders[libKey]["apps"]){ continue; }
if(libraryFolders[libKey]["apps"][gameId] != null){ return path.join(libraryFolders[libKey]["path"], "steamapps", "common", gameFolder); };
}
return null;
}
catch(e){
log.error(e);
return null;
}
return null;
}
public openSteam(): Promise<boolean>{
const process = spawn("start", ["steam://open/games"], {shell: true});
return new Promise(resolve => {
process.on("exit", () => resolve(true));
process.on("error", () => resolve(false));
});
}
}
+2 -2
View File
@@ -1,4 +1,5 @@
import { writeFileSync } from "fs";
import { readJSON } from "fs-extra";
import { get } from "https";
import isOnline from "is-online";
import path from "path";
@@ -43,8 +44,7 @@ export class SupportersService {
private async getLocalSupporters(): Promise<Supporter[]>{
const patreonsPath = path.join(this.utilsService.getAssestsJsonsPath(), this.PATREONS_FILE);
const rawPatreons = (await this.utilsService.readFileAsync(patreonsPath)).toString();
return JSON.parse(rawPatreons);
return readJSON(patreonsPath);
}
private async loadSupporters(): Promise<Supporter[]>{
@@ -0,0 +1,130 @@
import { ApiResult } from "renderer/models/api/api.model";
import { BsvMapDetail } from "shared/models/maps";
import { BsvPlaylist, BsvPlaylistPage, MapFilter, SearchParams, SearchResponse } from "shared/models/maps/beat-saver.model";
import fetch from "node-fetch"
export class BeatSaverApiService {
private static instance: BeatSaverApiService;
public static getInstance(): BeatSaverApiService{
if(!BeatSaverApiService.instance){ BeatSaverApiService.instance = new BeatSaverApiService(); }
return BeatSaverApiService.instance;
}
private readonly bsaverApiUrl = "https://beatsaver.com/api"
private constructor(){}
private mapFilterToUrlParams(filter: MapFilter): URLSearchParams{
if(!filter){ return new URLSearchParams(); }
const enbledTagsString = filter.enabledTags ? Array.from(filter.enabledTags) : null;
const excludedTagsString = filter.excludedTags ? Array.from(filter.excludedTags).map(tag => `!${tag}`) : null;
const tags = (enbledTagsString || excludedTagsString) ? [...enbledTagsString, excludedTagsString].join("|") : null;
const params = {
...(filter.automapper && {automapper: String(filter.automapper)}),
...(filter.chroma && {chroma: String(filter.chroma)}),
...(filter.cinema && {cinema: String(filter.cinema)}),
...(filter.me && {me: String(filter.me)}),
...(filter.noodle && {noodle: String(filter.noodle)}),
...(filter.ranked && {ranked: String(filter.ranked)}),
...(filter.verified && {verified: String(filter.verified)}),
...(filter.curated && {curated: String(filter.curated)}),
...(filter.fullSpread && {fullSpread: String(filter.fullSpread)}),
...(filter.from && {from: String(filter.from)}),
...(filter.to && {to: String(filter.to)}),
...(tags && {tags: String(tags)}),
...(filter.minDuration && {minDuration: String(filter.minDuration)}),
...(filter.maxDuration && {maxDuration: String(filter.maxDuration)}),
...(filter.minNps && {minNps: String(filter.minNps)}),
...(filter.maxNps && {maxNps: String(filter.maxNps)})
};
return new URLSearchParams(params);
}
private searchParamsToUrlParams(search: SearchParams): URLSearchParams{
if(!search){ return new URLSearchParams(); }
const searchParams = {
...(search.includeEmpty && {includeEmpty: String(search.includeEmpty)}),
...(search.sortOrder && {sortOrder: search.sortOrder}),
...(search.q && {q: search.q})
};
const filterUrlParms = this.mapFilterToUrlParams(search.filter);
return new URLSearchParams({
...searchParams,
...Object.fromEntries(filterUrlParms)
});
}
public async getMapsDetailsByHashs<T extends string>(hashs: T[]): Promise<ApiResult<Record<Lowercase<T>, BsvMapDetail>>>{
if(hashs.length > 50){ throw "too musch map hashs"; }
const paramsHashs = hashs.join(",");
const resp = await fetch(`${this.bsaverApiUrl}/maps/hash/${paramsHashs}`);
const data = await resp.json() as Record<Lowercase<T>, BsvMapDetail> | BsvMapDetail;
if((data as BsvMapDetail).id){
const key = (data as BsvMapDetail).versions.at(0).hash.toLowerCase();
const parsedData = {
[key]: data as BsvMapDetail
} as Record<Lowercase<T>, BsvMapDetail>;
return {status: resp.status, data: parsedData}
}
return {status: resp.status, data: (data as Record<Lowercase<T>, BsvMapDetail>)};
}
public async getMapDetailsById(id: string): Promise<ApiResult<BsvMapDetail>>{
const res = await fetch(`${this.bsaverApiUrl}/maps/id/${id}`);
const data = await res.json() as BsvMapDetail;
return {status: res.status, data};
}
public async searchMaps(search: SearchParams): Promise<ApiResult<SearchResponse>>{
const url = new URL(`${this.bsaverApiUrl}/search/text/${search?.page ?? 0}`);
url.search = this.searchParamsToUrlParams(search).toString();
const res = await fetch(url.toString());
if(!res.ok){
return {status: res.status, data: null};
}
const data: any = await res.json();
return {status: res.status, data};
}
public async getPlaylistDetails(id: string): Promise<ApiResult<BsvPlaylist>>{
const res = await fetch(`${this.bsaverApiUrl}/playlists/id/${id}/0`);
const data = await res.json() as BsvPlaylistPage;
return {status: res.status, data: data.playlist};
}
}
@@ -0,0 +1,75 @@
import { splitIntoChunk } from "../../../helpers/array.helpers";
import { BsvMapDetail } from "shared/models/maps";
import { BsvPlaylist, SearchParams } from "shared/models/maps/beat-saver.model";
import { BeatSaverApiService } from "./beat-saver-api.service";
export class BeatSaverService {
private static instance: BeatSaverService;
public static getInstance(): BeatSaverService{
if(!BeatSaverService.instance){ BeatSaverService.instance = new BeatSaverService(); }
return BeatSaverService.instance;
}
private readonly bsaverApi: BeatSaverApiService;
private readonly cachedMapsDetails = new Map<string, BsvMapDetail>();
private constructor(){
this.bsaverApi = BeatSaverApiService.getInstance();
}
public async getMapDetailsFromHashs(hashs: string[]): Promise<BsvMapDetail[]>{
const filtredHashs = hashs.map(h => h.toLowerCase()).filter(hash => !Array.from(this.cachedMapsDetails.keys()).includes(hash));
const chunkHash = splitIntoChunk(filtredHashs, 50);
const mapDetails = Array.from(this.cachedMapsDetails.entries()).reduce((res , [hash, details]) => {
if(hashs.includes(hash)){
res.push(details);
}
return res;
}, [] as BsvMapDetail[]);
await Promise.allSettled(chunkHash.map(async hashs => {
const res = await this.bsaverApi.getMapsDetailsByHashs(hashs);
if(res.status === 200){
mapDetails.push(...Object.values<BsvMapDetail>(res.data).filter(detail => !!detail));
mapDetails.forEach(detail => {
this.cachedMapsDetails.set(detail.versions.at(0).hash.toLowerCase(), detail);
});
}
}));
return mapDetails;
}
public async getMapDetailsById(id: string): Promise<BsvMapDetail>{
const res = await this.bsaverApi.getMapDetailsById(id);
return res.data;
}
public searchMaps(search: SearchParams): Promise<BsvMapDetail[]>{
return this.bsaverApi.searchMaps(search).then(res => {
return res.status === 200 ? res.data.docs : [];
}).catch(err => {
return [];
});
}
public async getPlaylistPage(id: string): Promise<BsvPlaylist>{
const res = await this.bsaverApi.getPlaylistDetails(id);
return res.data;
}
}
@@ -0,0 +1,70 @@
import fetch from "node-fetch";
import { ApiResult } from "renderer/models/api/api.model";
import { MSGetQuery, MSGetQueryFilter, MSGetResponse } from "shared/models/model-saber/model-saber.model";
export class ModelSaberApiService {
private static instance: ModelSaberApiService;
public static getInstance(): ModelSaberApiService{
if(!ModelSaberApiService.instance){ ModelSaberApiService.instance = new ModelSaberApiService(); }
return ModelSaberApiService.instance;
}
private readonly API_URL = "https://modelsaber.com/api/v2/";
private readonly ENDPOINTS = {get: "get.php", types: "types.php"};
private constructor(){}
private parseFilters(filters: MSGetQueryFilter[]): string{
if(!filters){ return null; }
const parsed = filters.map(filter => {
const stringFilter = filter.type === "searchName" ? filter.value : `${filter.type}:${filter.value}`;
return filter.isNegative ? `-${stringFilter}` : stringFilter;
});
return parsed.join(",");
}
private buildUrlQuery(query: MSGetQuery): URLSearchParams{
if(!query){ return new URLSearchParams(); }
const filterQuery = this.parseFilters(query.filter);
const searchParams = {
...(query.type && {type: query.type}),
...(query.platform && {platform: query.platform}),
...(query.start && {start: `${query.start}`}),
...(query.end && {end: `${query.end}`}),
...(query.sort && {sort: query.sort}),
...(query.sortDirection && {sortDirection: query.sortDirection}),
...(filterQuery && {filter: filterQuery}),
}
return new URLSearchParams(searchParams);
}
public async searchModel(query: MSGetQuery): Promise<ApiResult<MSGetResponse>>{
const url = new URL(this.ENDPOINTS.get, this.API_URL);
url.search = this.buildUrlQuery(query).toString();
const res = await fetch(url.toString());
if(!res.ok){
return {data: null, status: res.status};
}
const data = await res.json() as MSGetResponse;
return {data, status: res.status};
}
}
@@ -0,0 +1,45 @@
import { MSGetQuery, MSGetQueryFilter, MSModel } from "shared/models/model-saber/model-saber.model";
import { ModelSaberApiService } from "./model-saber-api.service";
export class ModelSaberService {
private static instance: ModelSaberService;
public static getInstance(): ModelSaberService{
if(!ModelSaberService.instance){ ModelSaberService.instance = new ModelSaberService(); }
return ModelSaberService.instance;
}
private readonly modelSaberApi: ModelSaberApiService;
private constructor(){
this.modelSaberApi = ModelSaberApiService.getInstance();
}
public async getModelById(id: number|string): Promise<MSModel>{
const query: MSGetQuery = {
start: 0,
end: 1,
platform: "pc",
filter: [{type: "id", value: id}]
}
try{
const res = await this.modelSaberApi.searchModel(query);
if(res.status !== 200){ return null; }
if(Object.keys(res.data).length === 0){
return null;
}
return res.data[`${id}`];
}
catch(e){
return null;
}
}
}
+14 -41
View File
@@ -1,19 +1,20 @@
import { existsSync, mkdirSync, readdirSync, readFile } from "fs";
import { spawnSync } from "child_process";
import { homedir } from "os";
import path from "path";
import { BrowserWindow } from "electron";
import { rm } from "fs/promises";
import { app, BrowserWindow } from "electron";
import { IpcResponse } from "shared/models/ipc";
import log from "electron-log";
import { AppWindow } from "shared/models/window-manager/app-window.model";
// TODO : REFACTOR
export class UtilsService{
private static instance: UtilsService;
private assetsPath: string = '';
private assetsPath: string = app.isPackaged ? path.join(process.resourcesPath, 'assets') : path.join(__dirname, '../../../assets');
private mainWindow: BrowserWindow;
private windows: Map<AppWindow, BrowserWindow> = new Map<AppWindow, BrowserWindow>();
private constructor(){}
@@ -27,52 +28,24 @@ export class UtilsService{
public getAssetsScriptsPath(): string { return this.getAssetsPath("scripts") }
public getAssestsJsonsPath(): string { return this.getAssetsPath("jsons"); }
public getTempPath(): string{ return path.join(app.getPath("temp"), app.getName()) }
public setMainWindow(win: BrowserWindow){ this.mainWindow = win; }
public getMainWindow(){ return this.mainWindow; }
public pathExist(path: string): boolean{ return existsSync(path); }
public createFolderIfNotExist(path: string): void{
if(!this.pathExist(path)){ mkdirSync(path, {recursive: true}); }
}
public setMainWindows(windows: Map<AppWindow, BrowserWindow>){ this.windows = windows; }
public getMainWindows(win: AppWindow){ return this.windows.get(win); }
public taskRunning(task: string): boolean{
const tasks = spawnSync('tasklist').stdout.toString();
return tasks.includes(task);
}
public getUserFolder(){ return homedir(); }
public getUserDocumentsFolder(): string{
return path.join(this.getUserFolder(), 'Documents');
}
public readFileAsync(path: string){
return new Promise<Buffer>((resolve, reject) => {
readFile(path, (err, data) => {
if(err){ reject(err); }
else{ resolve(data); }
});
});
}
public listDirsInDir(dirPath: string): string[]{
let files = readdirSync(dirPath, { withFileTypes:true});
files = files.filter(f => f.isDirectory())
return files.map(f => f.name);
}
public deleteFolder(folderPath: string): Promise<void>{
return rm(folderPath, {recursive: true});
}
public ipcSend(channel: string, response: IpcResponse<any>): void{
public ipcSend<T = any>(channel: string, response: IpcResponse<T>): void{
try {
this.mainWindow.webContents.send(channel, response);
Array.from(this.windows.values()).forEach(window => window?.webContents?.send(channel, response));
} catch (error) {
log.error(error);
}
}
}
+29 -11
View File
@@ -2,25 +2,32 @@ import { app, BrowserWindow, BrowserWindowConstructorOptions } from "electron";
import { resolveHtmlPath } from "../util";
import { UtilsService } from "./utils.service";
import { AppWindow } from "shared/models/window-manager/app-window.model";
import { PRELOAD_PATH } from "../main";
import path from "path";
import { APP_NAME } from "../constants";
export class WindowManagerService{
private static instance: WindowManagerService;
private readonly PRELOAD_PATH = app.isPackaged ? path.join(__dirname, 'preload.js') : path.join(__dirname, '../../../.erb/dll/preload.js')
private readonly utilsService: UtilsService = UtilsService.getInstance();
private readonly appWindowsOptions: Record<AppWindow, BrowserWindowConstructorOptions> = {
"launcher.html": {width: 380, height: 500, minWidth: 380, minHeight: 500, resizable: false},
"index.html": {width: 1080, height: 720, minWidth: 900, minHeight: 500}
"index.html": {width: 1080, height: 720, minWidth: 900, minHeight: 500},
"oneclick-download-map.html": {width: 350, height: 400, minWidth: 350, minHeight: 400, resizable: false},
"oneclick-download-playlist.html": {width: 350, height: 400, minWidth: 350, minHeight: 400, resizable: false},
"oneclick-download-model.html": {width: 350, height: 400, minWidth: 350, minHeight: 400, resizable: false},
}
private readonly baseWindowOption: BrowserWindowConstructorOptions = {
title: APP_NAME,
icon: this.utilsService.getAssetsPath("favicon.ico"),
show: false,
frame: false,
titleBarOverlay: false,
webPreferences: { preload: PRELOAD_PATH }
webPreferences: { preload: this.PRELOAD_PATH, webSecurity: false }
}
private readonly windows: Map<AppWindow, BrowserWindow> = new Map<AppWindow, BrowserWindow>();
@@ -32,15 +39,16 @@ export class WindowManagerService{
private constructor(){}
public openWindow(windowType: AppWindow): Promise<BrowserWindow>{
const window = new BrowserWindow({...this.appWindowsOptions[windowType], ...this.baseWindowOption});
public openWindow(windowType: AppWindow, options?: BrowserWindowConstructorOptions): Promise<BrowserWindow>{
const window = new BrowserWindow({...this.appWindowsOptions[windowType], ...this.baseWindowOption, ...options});
const promise = window.loadURL(resolveHtmlPath(windowType));
window.removeMenu();
window.setMenu(null);
window.once("ready-to-show", () => {
if (!window) { throw new Error('"window" is not defined'); }
return window.show();
window.show();
});
window.once("closed", () => {
@@ -49,15 +57,11 @@ export class WindowManagerService{
});
this.windows.set(windowType, window);
this.utilsService.setMainWindow(window);
this.utilsService.setMainWindows(this.windows);
return promise.then(() => window);
}
public closeWindow(window: AppWindow){
this.windows.get(window).close();
}
public closeAllWindows(except?: AppWindow){
this.windows.forEach((window, key) => {
if(key === except){ return; }
@@ -65,4 +69,18 @@ export class WindowManagerService{
})
}
public close(...win: AppWindow[]){
win.forEach(window => {
this.windows.get(window)?.close();
});
}
public getWindow(window: AppWindow): BrowserWindow{
return this.windows.get(window);
}
public getAppWindowFromWebContents(sender: Electron.WebContents): AppWindow{
return Array.from(this.windows.entries()).find(([key, value]) => value.webContents.id === sender.id)[0];
}
}
-43
View File
@@ -1,43 +0,0 @@
import { NavBar } from "./components/nav-bar/nav-bar.component";
import TitleBar from "./components/title-bar/title-bar.component";
import { Routes, Route } from "react-router-dom";
import { AvailableVersionsList } from "./pages/available-versions-list.components";
import { VersionViewer } from "./pages/version-viewer.component";
import { Modal } from "./components/modal/modal.component";
import { SettingsPage } from "./pages/settings-page.component";
import { BsmProgressBar } from "./components/progress-bar/bsm-progress-bar.component";
import { useEffect } from "react";
import { ThemeService } from "./services/theme.service";
import { NotificationOverlay } from "./components/notification/notification-overlay.component";
export default function App() {
const themeService = ThemeService.getInstance();
useEffect(() => {
themeService.theme$.subscribe(() => {
if(themeService.isDark || (themeService.isOS && window.matchMedia('(prefers-color-scheme: dark)').matches)){ document.documentElement.classList.add('dark'); }
else { document.documentElement.classList.remove('dark'); }
});
}, []);
return (
<div className="relative w-screen h-screen overflow-hidden flex bg-light-main-color-1 dark:bg-main-color-1 z-0 max-w-full">
<Modal/>
<NavBar/>
<NotificationOverlay/>
<div className="relative flex flex-col grow max-w-full min-w-0">
<TitleBar/>
<div className="bg-light-main-color-2 dark:bg-main-color-2 relative rounded-tl-lg grow overflow-hidden max-w-full">
<Routes>
<Route path={"/bs-version/:versionNumber"} element={<VersionViewer/>}/>
<Route path={"/settings"} element={<SettingsPage/>}/>
<Route path="*" element={<AvailableVersionsList/>}/>
</Routes>
<BsmProgressBar/>
</div>
</div>
</div>
);
}
@@ -1,22 +0,0 @@
.glow-on-hover {
border-radius: 10px;
background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
position: absolute;
top: -4px;
left:-4px;
background-size: 400%;
z-index: -1;
filter: blur(3px);
width: calc(100% + 8px);
height: calc(100% + 8px);
animation: glowing 20s linear infinite;
opacity: 0;
transition: opacity .2s ease-in-out;
border-radius: 10px;
}
@keyframes glowing {
0% { background-position: 0 0; }
50% { background-position: 400% 0; }
100% { background-position: 0 0; }
}
@@ -1,21 +1,23 @@
import { BSVersion } from 'shared/bs-version.interface';
import './available-version-item.component.css';
import { useEffect, useState, memo } from "react";
import { BsDownloaderService } from "renderer/services/bs-downloader.service";
import { distinctUntilChanged } from "rxjs/operators";
import defaultImage from '../../../../assets/images/default-version-img.jpg'
import dateFormat from "dateformat";
import { BsmImage } from "../shared/bsm-image.component";
import { IpcService } from "renderer/services/ipc.service";
import { useTranslation } from "renderer/hooks/use-translation.hook";
import { BsmIcon } from "../svgs/bsm-icon.component";
import { LinkOpenerService } from 'renderer/services/link-opener.service';
import { motion } from 'framer-motion';
import { GlowEffect } from '../shared/glow-effect.component';
export const AvailableVersionItem = memo(function AvailableVersionItem(props: {version: BSVersion}) {
const bsDownloaderService = BsDownloaderService.getInstance();
const ipcService = IpcService.getInstance();
const linkOpener = LinkOpenerService.getInstance();
const [selected, setSelected] = useState(false);
const [hovered, setHovered] = useState(false);
const t = useTranslation();
const formatedDate = (() => { return dateFormat(+props.version.ReleaseDate*1000, "ddd. d mmm yyyy"); })()
@@ -26,7 +28,7 @@ export const AvailableVersionItem = memo(function AvailableVersionItem(props: {v
else{ bsDownloaderService.selectedBsVersion$.next(props.version); }
}
const openReleasePage = () => { ipcService.sendLazy("new-window", {args: props.version.ReleaseURL}); }
const openReleasePage = () => { linkOpener.open(props.version.ReleaseURL) }
useEffect(() => {
const sub = bsDownloaderService.selectedBsVersion$.pipe(distinctUntilChanged()).subscribe((version) => {
@@ -38,25 +40,25 @@ export const AvailableVersionItem = memo(function AvailableVersionItem(props: {v
}
}, [])
return (
<div className="group m-3 relative w-72 h-60 transition-transform active:scale-[.98]" onClick={toggleSelect}>
<div className={`absolute glow-on-hover group-hover:opacity-100 ${selected && "opacity-100"}`}></div>
<div className={`relative flex flex-col overflow-hidden rounded-md w-72 h-60 cursor-pointer group-hover:shadow-none duration-300 bg-light-main-color-2 dark:bg-main-color-2 ${!selected && "shadow-lg shadow-gray-900"}`}>
<BsmImage image={props.version.ReleaseImg ? props.version.ReleaseImg : defaultImage} errorImage={defaultImage} placeholder={defaultImage} className="absolute top-0 right-0 w-full h-full opacity-40 blur-xl object-cover" loading="lazy"/>
<BsmImage image={props.version.ReleaseImg ? props.version.ReleaseImg : defaultImage} errorImage={defaultImage} placeholder={defaultImage} className="bg-black w-full h-3/4 object-cover" loading="lazy"/>
<div className="relative z-[1] p-2 w-full flex items-center justify-between grow">
<div>
<span className="block text-xl font-bold text-white tracking-wider">{props.version.BSVersion}</span>
<span className="text-sm text-gray-700 dark:text-gray-400">{formatedDate}</span>
</div>
{ props.version.ReleaseURL && (
<a onClickCapture={e => { e.stopPropagation(); openReleasePage(); }} className="relative flex flex-row justify-between items-center rounded-full bg-black bg-opacity-30 text-white pb-[1px] hover:bg-opacity-50">
<BsmIcon icon="steam" className="w-[25px] h-[25px] transition-transform group-hover:rotate-[-360deg] duration-300"/>
<span className="relative -left-[2px] text-sm w-fit max-w-0 text-center overflow-hidden h-full whitespace-nowrap pb-[3px] transition-all group-hover:max-w-[200px] group-hover:px-1 duration-300">{t("pages.available-versions.steam-release")}</span>
</a>
)}
</div>
</div>
</div>
)
return (
<motion.li className="group relative w-72 h-60 transition-transform active:scale-[.98]" onClick={toggleSelect} onHoverStart={() => setHovered(true)} onHoverEnd={() => setHovered(false)}>
<GlowEffect visible={hovered || selected} className="absolute"/>
<div className={`relative flex flex-col overflow-hidden rounded-md w-72 h-60 cursor-pointer group-hover:shadow-none duration-300 bg-light-main-color-2 dark:bg-main-color-2 ${!selected && "shadow-lg shadow-gray-900"}`}>
<BsmImage image={props.version.ReleaseImg ? props.version.ReleaseImg : defaultImage} errorImage={defaultImage} placeholder={defaultImage} className="absolute top-0 right-0 w-full h-full opacity-40 blur-xl object-cover" loading="lazy"/>
<BsmImage image={props.version.ReleaseImg ? props.version.ReleaseImg : defaultImage} errorImage={defaultImage} placeholder={defaultImage} className="bg-black w-full h-3/4 object-cover" loading="lazy"/>
<div className="z-[1] p-2 w-full flex items-center justify-between grow">
<div>
<h2 className="block text-xl font-bold text-white tracking-wider">{props.version.BSVersion}</h2>
<span className="text-sm text-gray-700 dark:text-gray-400">{formatedDate}</span>
</div>
{ props.version.ReleaseURL && (
<a onClickCapture={e => { e.stopPropagation(); openReleasePage(); }} className="flex flex-row justify-between items-center rounded-full bg-black bg-opacity-30 text-white pb-px hover:bg-opacity-50">
<BsmIcon icon="steam" className="w-[25px] h-[25px] transition-transform group-hover:rotate-[-360deg] duration-300"/>
<span className="relative -left-px text-sm w-fit max-w-0 text-center overflow-hidden h-full whitespace-nowrap pb-[3px] transition-all group-hover:max-w-[200px] group-hover:px-1 duration-300">{t("pages.available-versions.steam-release")}</span>
</a>
)}
</div>
</div>
</motion.li>
)
})
@@ -1,7 +1,7 @@
import { BSVersion } from 'shared/bs-version.interface';
import { useEffect, useState } from "react"
import { BSVersionManagerService } from "renderer/services/bs-version-manager.service";
import { filter, take } from "rxjs/operators";
import { filter } from "rxjs/operators";
import { AvailableVersionItem } from "./available-version-item.component";
export function AvailableVersionsSlide(props: {year: string}) {
@@ -11,19 +11,16 @@ export function AvailableVersionsSlide(props: {year: string}) {
const versionsService = BSVersionManagerService.getInstance();
useEffect(() => {
versionsService.availableVersions$.pipe(filter(versions => !!versions?.length), take(1)).subscribe(() => {
versionsService.availableVersions$.pipe(filter(versions => !!versions?.length)).subscribe(() => {
setAvailableVersions(versionsService.getAvaibleVersionsOfYear(props.year));
});
}, [])
return (
<div className="w-full max-w-full max-h-full shrink-0 flex items-start justify-center overflow-x-hidden overflow-y-scroll content-start scrollbar-thin hover:scrollbar-thumb-neutral-900">
<div className="relative left-[2px] flex justify-center items-start content-start flex-wrap max-w-6xl pb-4">
{availableVersions.map((version, index) =>
<AvailableVersionItem key={index} version={version}></AvailableVersionItem>
)}
</div>
</div>
return (
<ol className="w-full flex items-start justify-center gap-6 shrink-0 content-start flex-wrap p-4 overflow-x-hidden overflow-y-scroll scrollbar-thin scrollbar-thumb-rounded-full scrollbar-thumb-neutral-900">
{availableVersions.map((version, index) =>
<AvailableVersionItem key={index} version={version}></AvailableVersionItem>
)}
</ol>
)
}
@@ -1,34 +1,34 @@
import { useEffect, useState } from "react"
import { BSVersionManagerService } from "../../services/bs-version-manager.service";
import { AvailableVersionsSlide } from "./available-versions-slide.component";
import { filter, take } from "rxjs/operators";
import { filter} from "rxjs/operators";
import { TabNavBar } from "../shared/tab-nav-bar.component";
export function AvailableVersionsSlider() {
const [availableYears, setAvailableYears] = useState([]);
const [yearIndex, setYearIndex] = useState(0);
const versionManagerService = BSVersionManagerService.getInstance();
const versionManagerService = BSVersionManagerService.getInstance();
const [availableYears, setAvailableYears] = useState([]);
const [yearIndex, setYearIndex] = useState(0);
const setSelectedYear = (index: number) => {
setYearIndex(index);
}
const setSelectedYear = (index: number) => {
setYearIndex(index);
}
useEffect(() => {
versionManagerService.availableVersions$.pipe(filter(versions => !!versions?.length), take(1)).subscribe(() => {
setAvailableYears(versionManagerService.getAvailableYears());
});
}, [])
useEffect(() => {
versionManagerService.availableVersions$.pipe(filter(versions => !!versions?.length)).subscribe(() => {
setAvailableYears(versionManagerService.getAvailableYears());
});
}, [])
return (
<div className="w-full h-fit max-h-full relative flex flex-col items-center grow min-h-0">
<TabNavBar tabsText={availableYears} onTabChange={setSelectedYear}/>
<div className="w-full min-h-0 flex transition-transform duration-300" style={{transform: `translate(${-(yearIndex * 100)}%, 0)`}}>
{ availableYears.map((year, index) =>
<AvailableVersionsSlide key={index} year={year}></AvailableVersionsSlide>
)}
</div>
</div>
)
return (
<div className="w-full h-fit max-h-full flex flex-col items-center grow min-h-0 gap-3">
<TabNavBar tabIndex={yearIndex} tabsText={availableYears} onTabChange={setSelectedYear}/>
<ol className="w-full min-h-0 flex transition-transform duration-300" style={{transform: `translate(${-(yearIndex * 100)}%, 0)`}}>
{ availableYears.map(year =>
<AvailableVersionsSlide key={year} year={year}/>
)}
</ol>
</div>
)
}
@@ -0,0 +1,224 @@
import { MapFilter, MapSpecificity, MapStyle, MapTag, MapType } from "shared/models/maps/beat-saver.model"
import {motion} from "framer-motion"
import { MutableRefObject, useEffect, useRef, useState} from "react"
import { MAP_TYPES } from "renderer/partials/maps/map-tags/map-types"
import { MAP_STYLES } from "renderer/partials/maps/map-tags/map-styles"
import { BsmCheckbox } from "../shared/bsm-checkbox.component"
import { min_to_s } from "renderer/helpers/time-utils"
import dateFormat from "dateformat"
import { BsmRange } from "../shared/bsm-range.component"
import { useTranslation } from "renderer/hooks/use-translation.hook"
import { MAP_SPECIFICITIES } from "renderer/partials/maps/map-general/map-specificity"
import { MAP_REQUIREMENTS } from "renderer/partials/maps/map-requirements/map-requirements"
import { MAP_DIFFICULTIES_COLORS } from "renderer/partials/maps/map-difficulties/map-difficulties-colors"
import { BsmButton } from "../shared/bsm-button.component"
import equal from "fast-deep-equal/es6";
import clone from "rfdc";
import { GlowEffect } from "../shared/glow-effect.component"
export type Props = {
className?: string,
ref?: MutableRefObject<undefined>
playlist?: boolean,
filter: MapFilter,
onChange?: (filter: MapFilter) => void,
onApply?: (filter: MapFilter) => void,
onClose?: (filter: MapFilter) => void
}
export function FilterPanel({className, ref, playlist = false, filter, onChange, onApply, onClose}: Props) {
const t = useTranslation();
const [haveChanged, setHaveChanged] = useState(false);
const [firstFilter,] = useState(clone()(filter));
const firstRun = useRef(true);
const MIN_NPS = 0;
const MAX_NPS = 17;
const MIN_DURATION = 0;
const MAX_DURATION = min_to_s(30);
const npss = [filter?.minNps || MIN_NPS, filter?.maxNps || MAX_NPS];
const durations = [filter?.minDuration || MIN_DURATION, filter?.maxDuration || MAX_DURATION];
const isTagActivated = (tag: MapTag): boolean => filter?.enabledTags?.has(tag) || filter?.excludedTags?.has(tag);
const isTagExcluded = (tag: MapTag): boolean => filter?.excludedTags?.has(tag);
useEffect(() => {
if(firstRun.current){
firstRun.current = false;
return;
}
setHaveChanged(() => !equal(filter, firstFilter));
}, [filter])
const renderDurationLabel = (sec: number): JSX.Element => {
const textValue = (() => {
if(sec === MIN_DURATION){ return t("maps.map-filter-panel.duration"); }
if(sec === MAX_DURATION){ return "∞"; }
const date = new Date(0);
date.setSeconds(sec);
return sec > 3600 ? dateFormat(date, "h:MM:ss") : dateFormat(date, "MM:ss");
})();
return renderLabel(textValue, sec === MAX_DURATION);
}
const renderNpsLabel = (nps: number): JSX.Element => {
const textValue = (() => {
if(nps === MIN_NPS){ return "NPS"; }
if(nps === MAX_NPS){ return "∞"; }
return nps;
})();
return renderLabel(textValue, nps === MAX_NPS);
}
const renderLabel = (text: unknown, isMax: boolean): JSX.Element => {
return (
<span className={`bg-inherit absolute top-[calc(100%+4px)] h-5 font-bold rounded-md shadow-center shadow-black px-1 flex items-center ${isMax ? "text-lg" : "text-sm"}`}>
{text}
</span>
)
}
const onNpssChange = ([min, max]: number[]) => {
const newFilter: MapFilter = {...filter, minNps: min, maxNps: max};
if(max === MAX_NPS){
delete newFilter["maxNps"];
}
if(min === MIN_NPS){
delete newFilter["minNps"];
}
onChange(newFilter);
}
const onDurationsChange = ([min, max]: number[]) => {
const newFilter: MapFilter = {...filter, minDuration: min, maxDuration: max};
if(max === MAX_DURATION){
delete newFilter["maxDuration"];
}
if(min === MIN_DURATION){
delete newFilter["minDuration"];
}
onChange(newFilter);
}
const handleTagClick = (tag: MapTag) => {
const enabledTags = filter.enabledTags ?? new Set<MapTag>();
const excludedTags = filter.excludedTags ?? new Set<MapTag>();
if(isTagExcluded(tag)){
excludedTags.delete(tag);
}
else if(isTagActivated(tag)){
excludedTags.add(tag);
enabledTags.delete(tag);
}
else{
enabledTags.add(tag);
}
const newFilter = {...filter, enabledTags, excludedTags};
if(newFilter.enabledTags.size === 0){
delete newFilter["enabledTags"];
}
if(newFilter.excludedTags.size === 0){
delete newFilter["excludedTags"];
}
onChange(newFilter);
}
const translateMapType = (type: MapType): string => {
return t(`maps.map-types.${type}`);
}
const translateMapStyle = (style: MapStyle): string => {
return t(`maps.map-styles.${style}`)
}
const translateMapSpecificity = (specificity: MapSpecificity): string => {
return t(`maps.map-specificities.${specificity}`);
}
type BooleanKeys<T> = { [k in keyof T]: T[k] extends boolean ? k : never }[keyof T];
const handleCheckbox = (key: BooleanKeys<MapFilter>) => {
const newFilter = {...(filter ?? {})};
if(newFilter[key] === true){
delete newFilter[key];
}
else{
newFilter[key] = true;
}
onChange(newFilter);
}
const handleApply = () => {
onApply(filter);
setHaveChanged(() => false);
onClose?.(filter);
}
return !playlist ? (
<motion.div ref={ref} className={`${className} bg-light-main-color-2 dark:bg-main-color-3`} initial={{opacity: 0}} animate={{opacity: 1}} exit={{opacity: 0}}>
<div className="w-full h-6 grid grid-cols-2 gap-x-12 px-4 mb-6 pt-2">
<BsmRange min={MIN_NPS} max={MAX_NPS} values={npss} onChange={onNpssChange} renderLabel={renderNpsLabel} step={.1}/>
<BsmRange min={MIN_DURATION} max={MAX_DURATION} values={durations} onChange={onDurationsChange} renderLabel={renderDurationLabel} step={5}/>
</div>
<div className="w-full h-full flex gap-x-2">
<section className="shrink-0">
<h2 className="mb-1 uppercase text-sm">{t("maps.map-filter-panel.specificities")}</h2>
{MAP_SPECIFICITIES.map(specificity => (
<div key={specificity} className="flex justify-start items-center h-[22px] z-20 relative py-0.5 cursor-pointer" onClick={() => handleCheckbox(specificity)}>
<BsmCheckbox className="h-full aspect-square relative bg-inherit mr-1" checked={filter?.[specificity]} onChange={() => handleCheckbox(specificity)}/>
<span className="grow capitalize">{translateMapSpecificity(specificity)}</span>
</div>
))}
<h2 className="my-1 uppercase text-sm">{t("maps.map-filter-panel.requirements")}</h2>
{MAP_REQUIREMENTS.map(requirement => (
<div key={requirement} className="flex justify-start items-center h-[22px] z-20 relative py-0.5 cursor-pointer" onClick={() => handleCheckbox(requirement)}>
<BsmCheckbox className="h-full aspect-square relative bg-inherit mr-1" checked={filter?.[requirement]} onChange={() => handleCheckbox(requirement)}/>
<span className="grow capitalize">{requirement}</span>
</div>
))}
</section>
<section className="grow capitalize">
<h2 className="uppercase text-sm mb-1">{t("maps.map-filter-panel.tags")}</h2>
<div className="w-full flex flex-row flex-wrap items-start justify-start content-start gap-1 mb-2">
{MAP_TYPES.map(tag => (
<span key={tag} onClick={() => handleTagClick(tag)} className={`text-[12.5px] text-black rounded-md px-1 font-bold cursor-pointer ${(!isTagActivated(tag)) && "opacity-40 hover:opacity-90"}`} style={{backgroundColor: isTagExcluded(tag) ? MAP_DIFFICULTIES_COLORS.Expert : MAP_DIFFICULTIES_COLORS.Normal}}>{translateMapType(tag)}</span>
))}
</div>
<div className="w-full flex flex-row flex-wrap items-start justify-start content-start gap-1">
{MAP_STYLES.map(tag => (
<span key={tag} onClick={() => handleTagClick(tag)} className={`text-[12.5px] text-black rounded-md px-1 font-bold cursor-pointer ${(!isTagActivated(tag)) && "opacity-40 hover:opacity-90"}`} style={{backgroundColor: isTagExcluded(tag) ? MAP_DIFFICULTIES_COLORS.Expert : MAP_DIFFICULTIES_COLORS.Easy}}>{translateMapStyle(tag)}</span>
))}
</div>
</section>
</div>
{onApply && (
<div className="inline float-right relative w-fit h-fit mt-2">
<BsmButton className="inline float-right rounded-md font-bold px-1 py-0.5 text-sm" text="misc.apply" typeColor="primary" withBar={false} onClick={handleApply}/>
<GlowEffect visible={haveChanged}/>
</div>
)}
</motion.div>
) : (
<></>
)
}
@@ -0,0 +1,30 @@
import { motion } from "framer-motion"
import { forwardRef } from "react"
import { useThemeColor } from "renderer/hooks/use-theme-color.hook"
import { BsmIcon } from "../svgs/bsm-icon.component"
type Props = {
className?: string,
title?: string,
linked?: boolean
disabled?: boolean,
onClick?: () => void
}
export const LinkButton = motion(forwardRef((props: Props, ref) => {
const color = useThemeColor("first-color");
const linkedColor = (() => {
if(props.disabled){ return "orange"; }
if(props.linked){ return color; }
return "red";
})()
return (
<div ref={ref} className={props.className} title={props.title} onClick={e => {e.preventDefault(); !props.disabled && props.onClick?.()}} style={{pointerEvents: props.disabled ? "none" : "auto"}}>
<span className="absolute top-0 left-0 h-full w-full rounded-full brightness-50 opacity-75 dark:opacity-20 dark:filter-none" style={{backgroundColor: linkedColor}}/>
<BsmIcon className="p-1 absolute top-0 left-0 h-full w-full !bg-transparent -rotate-45 brightness-150" icon={props.linked ? "link" : "unlink"} style={{color: linkedColor}} />
</div>
)
}))
@@ -0,0 +1,333 @@
import { MapsManagerService } from "renderer/services/maps-manager.service"
import { BSVersion } from "shared/bs-version.interface"
import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from "react"
import { BsmLocalMap } from "shared/models/maps/bsm-local-map.interface"
import { Subscription } from "rxjs"
import { MapFilter } from "shared/models/maps/beat-saver.model"
import { useInView } from "framer-motion"
import { MapsDownloaderService } from "renderer/services/maps-downloader.service"
import { VariableSizeList } from "react-window"
import { MapsRow } from "./maps-row.component"
import { BehaviorSubject } from "rxjs"
import { debounceTime, last, map, mergeMap, throttleTime } from "rxjs/operators"
import { BeatSaverService } from "renderer/services/thrird-partys/beat-saver.service"
import { OsDiagnosticService } from "renderer/services/os-diagnostic.service"
import { useTranslation } from "renderer/hooks/use-translation.hook"
import BeatWaitingImg from "../../../../assets/images/apngs/beat-waiting.png"
import BeatConflict from "../../../../assets/images/apngs/beat-conflict.png"
import { BsmImage } from "../shared/bsm-image.component"
import { BsmButton } from "../shared/bsm-button.component"
import TextProgressBar from "../progress-bar/text-progress-bar.component"
type Props = {
version: BSVersion,
className?: string,
filter?: MapFilter
search?: string,
linked?: boolean
}
export const LocalMapsListPanel = forwardRef(({version, className, filter, search, linked} : Props, forwardRef) => {
const mapsManager = MapsManagerService.getInstance();
const mapsDownloader = MapsDownloaderService.getInstance();
const bsaver = BeatSaverService.getInstance();
const os = OsDiagnosticService.getInstance();
const t = useTranslation();
const ref = useRef(null)
const isVisible = useInView(ref, {once: true, amount: .5});
const [maps, setMaps] = useState<BsmLocalMap[]>(null);
const [subs] = useState<Subscription[]>([]);
const [selectedMaps$] = useState(new BehaviorSubject<BsmLocalMap[]>([]));
const [itemPerRow, setItemPerRow] = useState(2);
const [listHeight, setListHeight] = useState(0);
const [loadPercent$] = useState(new BehaviorSubject(0));
useImperativeHandle(forwardRef ,()=>({
deleteMaps(){
const mapsToDelete = selectedMaps$.value.length === 0 ? maps : selectedMaps$.value;
mapsManager.deleteMaps(mapsToDelete, version).then(res => {
if(!res){ return; }
removeMapsFromList(mapsToDelete);
selectedMaps$.next([]);
});
},
exportMaps(){
mapsManager.exportMaps(version, selectedMaps$.value);
},
getMaps(){
return maps;
}
}), [selectedMaps$.value, maps, version]);
useEffect(() => {
if(isVisible){
loadMaps();
mapsDownloader.addOnMapDownloadedListener((map, targerVersion) => {
if(targerVersion !== version){ return; }
setMaps(maps => maps ? [map, ...maps] : [map]);
});
}
return () => {
setMaps(() => null);
loadPercent$.next(0);
subs.forEach(s => s.unsubscribe());
mapsDownloader.removeOnMapDownloadedListener(loadMaps);
}
}, [isVisible, version, linked]);
useEffect(() => {
if(!isVisible){ return () => {}; }
const updateItemPerRow = (listWidth: number) => {
const newPerRow = Math.min(Math.floor(listWidth / 400), 3);
if(newPerRow === itemPerRow){ return; }
setItemPerRow(newPerRow);
};
const heightObserver$ = new BehaviorSubject(0);
const observer = new ResizeObserver(() => {
updateItemPerRow(ref.current?.clientWidth || 0);
heightObserver$.next(ref.current?.clientHeight || 0)
});
observer.observe(ref.current);
const sub = heightObserver$.pipe(debounceTime(100)).subscribe(setListHeight);
return () => {
observer.disconnect();
sub.unsubscribe();
}
}, [isVisible, itemPerRow])
const loadMaps = () => {
setMaps(() => null);
loadPercent$.next(0);
const loadMapsObs$ = mapsManager.getMaps(version);
loadMapsObs$.pipe(map(progess => {
return Math.floor(((progess.loaded / progess.total) * 100));
})).subscribe(percent => loadPercent$.next(percent));
subs.push(loadMapsObs$.pipe(
last(),
mergeMap(async progress => {
if(os.isOffline){ return progress.maps; }
const maps = progress.maps;
const details = await bsaver.getMapDetailsFromHashs(maps.map(map => map.hash));
return maps.map(map => {
map.bsaverInfo = details.find(d => d.versions.at(0).hash === map.hash);
return map;
})
})
).subscribe({
next: maps => setMaps(() => maps),
complete: () => loadPercent$.next(0)
}));
}
const removeMapsFromList = (mapsToRemove: BsmLocalMap[]) => {
const filtredMaps = maps.filter(map => !mapsToRemove.some(toDeleteMaps => map.hash === toDeleteMaps.hash));
setMaps(() => filtredMaps);
};
const handleDelete = useCallback((map: BsmLocalMap) => {
mapsManager.deleteMaps([map], version).then(res => res && removeMapsFromList([map]));
}, [version, maps]);
const onMapSelected = useCallback((map: BsmLocalMap) => {
const mapsCopy = [...selectedMaps$.value];
if(mapsCopy.some(selectedMap => selectedMap.hash === map.hash)){
const i = mapsCopy.findIndex(selectedMap => selectedMap.hash === map.hash);
mapsCopy.splice(i, 1);
}
else{
mapsCopy.push(map);
}
selectedMaps$.next(mapsCopy);
}, [selectedMaps$.value]);
const isMapFitFilter = (map: BsmLocalMap): boolean => {
// Can be more clean and optimized i think
const fitEnabledTags = (() => {
if(!filter?.enabledTags || filter.enabledTags.size === 0){ return true; }
if(!map?.bsaverInfo?.tags){ return false; }
return Array.from(filter.enabledTags.values()).every(tag => map.bsaverInfo.tags.some(mapTag => mapTag === tag));
})();
if(!fitEnabledTags){ return false; }
const fitExcluedTags = (() => {
if(!filter?.excludedTags || filter.excludedTags.size === 0){ return true; }
if(!map?.bsaverInfo?.tags){ return true; }
return !map.bsaverInfo.tags.some(tag => filter.excludedTags.has(tag));
})();
if(!fitExcluedTags){ return false; }
const fitMinNps = (() => {
if(!filter?.minNps){ return true; }
if(!map?.bsaverInfo?.versions?.at(0)){ return false; }
return !map.bsaverInfo.versions.some(version => {
return version.diffs.some(diff => diff.nps < filter.minNps);
});
})();
if(!fitMinNps){ return false; }
const fitMaxNps = (() => {
if(!filter?.maxNps){ return true; }
if(!map?.bsaverInfo?.versions?.at(0)){ return false; }
return !map.bsaverInfo.versions.some(version => {
return version.diffs.some(diff => diff.nps > filter.maxNps);
});
})();
if(!fitMaxNps){ return false; }
const fitMinDuration = (() => {
if(!filter?.minDuration){ return true; }
if(!map?.bsaverInfo?.metadata?.duration){ return false; }
return map.bsaverInfo.metadata.duration >= filter.minDuration;
})();
if(!fitMinDuration){ return false; }
const fitMaxDuration = (() => {
if(!filter?.maxDuration){ return true; }
if(!map?.bsaverInfo?.metadata?.duration){ return false; }
return map.bsaverInfo.metadata.duration <= filter.maxDuration;
})();
if(!fitMaxDuration){ return false; }
const fitNoodle = (() => {
if(!filter?.noodle){ return true; }
if(!map?.bsaverInfo?.versions?.at(0)){ return false; }
return map.bsaverInfo.versions.some(version => version.diffs.some(diff => !!diff.ne));
})();
if(!fitNoodle){ return false; }
const fitMe = (() => {
if(!filter?.me){ return true; }
if(!map?.bsaverInfo?.versions?.at(0)){ return false; }
return map.bsaverInfo.versions.some(version => version.diffs.some(diff => !!diff.me));
})();
if(!fitMe){ return false; }
const fitCinema = (() => {
if(!filter?.cinema){ return true; }
if(!map?.bsaverInfo?.versions?.at(0)){ return false; }
return map.bsaverInfo.versions.some(version => version.diffs.some(diff => !!diff.cinema));
})();
if(!fitCinema){ return false; }
const fitChroma =(() => {
if(!filter?.chroma){ return true; }
if(!map?.bsaverInfo?.versions?.at(0)){ return false; }
return map.bsaverInfo.versions.some(version => version.diffs.some(diff => !!diff.chroma));
})();
if(!fitChroma){ return false; }
const fitFullSpread = (() => {
if(!filter?.fullSpread){ return true; }
if(!map?.bsaverInfo?.versions?.at(0)){ return false; }
return map.bsaverInfo.versions.some(version => version?.diffs?.length >= 5);
})();
if(!fitFullSpread){ return false; }
if(!(filter?.automapper ? map.bsaverInfo?.automapper === filter.automapper : true)){ return false }
if(!(filter?.ranked ? map.bsaverInfo?.ranked === filter.ranked : true)){ return false }
if(!(filter?.curated ? !!map.bsaverInfo?.curatedAt : true)){ return false }
if(!(filter?.verified ? !!map.bsaverInfo?.uploader?.verifiedMapper : true)){ return false }
const searchCheck = (() => {
return (
((map.rawInfo?._songName ?? map.bsaverInfo?.name) || "")?.toLowerCase().includes(search.toLowerCase()) ||
((map.rawInfo?._songAuthorName ?? map.bsaverInfo?.metadata?.songAuthorName) || "")?.toLowerCase().includes(search.toLowerCase()) ||
((map.rawInfo?._levelAuthorName ?? map.bsaverInfo?.metadata?.levelAuthorName) || "")?.toLowerCase().includes(search.toLowerCase()));
})();
if(!searchCheck){ return false };
return true;
}
const preppedMaps: BsmLocalMap[][] = (() => {
if(!maps){ return []; }
const res: BsmLocalMap[][] = [];
let mapsRow: BsmLocalMap[] = []
for(const map of maps){
if(!isMapFitFilter(map)){ continue; }
if(mapsRow.length === itemPerRow){
res.push(mapsRow);
mapsRow = [];
}
mapsRow.push(map);
}
if(mapsRow.length){
res.push(mapsRow);
}
return res;
})();
if(!maps){
return (
<div ref={ref} className={className}>
<div className="h-full flex flex-col items-center justify-center flex-wrap gap-1 text-gray-800 dark:text-gray-200">
<BsmImage className="w-32 h-32 spin-loading" image={BeatWaitingImg}/>
<span className="font-bold">{t("modals.download-maps.loading-maps")}</span>
<TextProgressBar value$={loadPercent$}/>
</div>
</div>
);
}
if(!maps.length){
return (
<div ref={ref} className={className}>
<div className="h-full flex flex-col items-center justify-center flex-wrap gap-1 text-gray-800 dark:text-gray-200">
<BsmImage className="h-32" image={BeatConflict}/>
<span className="font-bold">{t("pages.version-viewer.maps.tabs.maps.empty-maps.text")}</span>
<BsmButton className="font-bold rounded-md p-2" text="pages.version-viewer.maps.tabs.maps.empty-maps.button" typeColor="primary" withBar={false} onClick={e => {e.preventDefault(); mapsDownloader.openDownloadMapModal(version)}}/>
</div>
</div>
);
}
return (
<div ref={ref} className={className}>
<VariableSizeList className="p-0 scrollbar-thin scrollbar-thumb-rounded-full scrollbar-thumb-neutral-900" width={"100%"} height={listHeight} itemSize={() => 108} itemCount={preppedMaps.length} itemData={preppedMaps} layout="vertical" style={{scrollbarGutter: "stable both-edges"}} itemKey={(i, data) => data[i].map(map => map.hash).join()}>
{(props) => <MapsRow maps={props.data[props.index]} style={props.style} selectedMaps$={selectedMaps$} onMapSelect={onMapSelected} onMapDelete={handleDelete}/>}
</VariableSizeList>
</div>
)
})
@@ -0,0 +1,244 @@
import { BsmImage } from "../shared/bsm-image.component";
import { BsvMapCharacteristic, BsvMapDifficultyType } from "shared/models/maps/beat-saver.model"
import { useThemeColor } from "renderer/hooks/use-theme-color.hook";
import { BsmLink } from "../shared/bsm-link.component";
import { BsmIcon } from "../svgs/bsm-icon.component";
import { BsmButton } from "../shared/bsm-button.component";
import { AnimatePresence, motion } from "framer-motion";
import { useState, Fragment, memo, useRef } from "react";
import { LinkOpenerService } from "renderer/services/link-opener.service";
import dateFormat from "dateformat";
import { AudioPlayerService } from "renderer/services/audio-player.service";
import { useObservable } from "renderer/hooks/use-observable.hook";
import { map } from "rxjs/operators";
import useDelayedState from "use-delayed-state";
import equal from "fast-deep-equal/es6";
import { getMapZipUrlFromHash } from "renderer/helpers/maps-utils";
import { BsmBasicSpinner } from "../shared/bsm-basic-spinner/bsm-basic-spinner.component";
import defaultImage from '../../../../assets/images/default-version-img.jpg'
import { useTranslation } from "renderer/hooks/use-translation.hook";
import { MAP_DIFFICULTIES } from "renderer/partials/maps/map-difficulties/map-difficulties";
import { MAP_DIFFICULTIES_COLORS } from "renderer/partials/maps/map-difficulties/map-difficulties-colors"
import useDoubleClick from "use-double-click";
import { GlowEffect } from "../shared/glow-effect.component";
export type ParsedMapDiff = {type: BsvMapDifficultyType, name: string, stars: number}
export type MapItemProps<T = any> = {
hash: string,
title: string,
autor: string,
songAutor: string,
coverUrl: string,
songUrl: string,
autorId: number,
mapId: string,
diffs: Map<BsvMapCharacteristic, ParsedMapDiff[]>,
ranked: boolean,
bpm: number,
duration: number,
likes: number,
createdAt: string,
selected?: boolean,
downloading?: boolean,
showOwned?: boolean,
callBackParam: T
onDelete?: (param: T) => void,
onDownload?: (param: T) => void,
onSelected?: (param: T) => void,
onCancelDownload?: (param: T) => void,
onDoubleClick?: (param: T) => void
}
export const MapItem = memo(({hash, title, autor, songAutor, coverUrl, songUrl, autorId, mapId, diffs, ranked, bpm, duration, likes, createdAt, selected, downloading, showOwned, callBackParam, onDelete, onDownload, onSelected, onCancelDownload, onDoubleClick}: MapItemProps) => {
const linkOpener = LinkOpenerService.getInstance();
const audioPlayer = AudioPlayerService.getInstance();
const color = useThemeColor("first-color");
const t = useTranslation();
const ref = useRef(null);
const [hovered, setHovered] = useState(false);
const [bottomBarHovered, setBottomBarHovered, cancelBottomBarHovered] = useDelayedState(false);
const [diffsPanelHovered, setDiffsPanelHovered] = useState(false);
useDoubleClick({
ref,
latency: onDoubleClick ? 200 : 0,
onSingleClick: e => onSelected?.(callBackParam),
onDoubleClick: e => onDoubleClick?.(callBackParam)
})
const songPlaying = useObservable(audioPlayer.playing$.pipe(map(playing => playing && audioPlayer.src === songUrl)));
const zipUrl = getMapZipUrlFromHash(hash);
const previewUrl = mapId ? `https://skystudioapps.com/bs-viewer/?url=${zipUrl}` : null;
const mapUrl = mapId ? `https://beatsaver.com/maps/${mapId}` : null;
const authorUrl = autorId ? `https://beatsaver.com/profile/${autorId}` : null;
const createdDate = createdAt ? dateFormat(createdAt, "d mmm yyyy") : null;
const likesText = likes ? Intl.NumberFormat(undefined, {notation: "compact"}).format(likes).split(" ").join("") : null;
const durationText = (() => {
if(!duration){ return null; }
const date = new Date(0);
date.setSeconds(duration);
return duration > 3600 ? dateFormat(date, "h:MM:ss") : dateFormat(date, "MM:ss");
})();
const parseDiffLabel = (diffLabel: string) => {
if(MAP_DIFFICULTIES.includes(diffLabel as BsvMapDifficultyType)){
return t(`maps.difficulties.${diffLabel}`);
}
return diffLabel;
}
const openPreview = () => {
if(audioPlayer.playing){
audioPlayer.pause();
}
linkOpener.open(previewUrl, true);
}
const copyBsr = () => navigator.clipboard.writeText(`!bsr ${mapId}`);
const toogleMusic = () => {
if(songPlaying){
return audioPlayer.pause();
}
if(!audioPlayer.playing && audioPlayer.src === songUrl){
return audioPlayer.resume();
}
audioPlayer.play(songUrl, bpm);
}
const bottomBarHoverStart = () => {
cancelBottomBarHovered();
setBottomBarHovered(true, (diffsPanelHovered || bottomBarHovered) ? 0 : 300);
}
const bottomBarHoverEnd = () => {
cancelBottomBarHovered();
setBottomBarHovered(false, 100);
}
const diffsPanelHoverStart = () => setDiffsPanelHovered(true);
const diffsPanelHoverEnd = () => setDiffsPanelHovered(false);
const renderDiffPreview = () => {
const diffSets = Array.from(diffs.entries());
if(diffSets.length === 1){
const [diffType, diffSet] = diffSets[0];
return (
<>
<BsmIcon className="h-4 w-4 mr-px" icon="bsMapDifficulty"/>
<div className="flex py-[2px] gap-[1px] h-full">
{diffSet.map(diff => (
<span key={crypto.randomUUID()} className="h-full w-[6px] rounded-full" style={{backgroundColor: MAP_DIFFICULTIES_COLORS[diff.type]}}/>
))}
</div>
</>
)
}
if(diffSets.length > 1){
return diffSets.map(([diffType, diffSet]) => (
<Fragment key={crypto.randomUUID()}>
<BsmIcon className="h-full w-fit mr-px" icon={diffType}/>
<span className="mr-2 font-bold text-[15px] h-full flex items-center pb-px">{diffSet.length}</span>
</Fragment>
));
}
}
return (
<motion.li className="relative h-[100px] w-[400px] min-w-[370px] shrink-0 grow basis-0 text-white group cursor-pointer" onHoverStart={() => setHovered(true)} onHoverEnd={() => setHovered(false)} style={{zIndex: hovered && 5, transform: "translateZ(0) scale(1.0, 1.0)", backfaceVisibility: "hidden"}}>
<GlowEffect visible={hovered || selected && !!onSelected}/>
<AnimatePresence>
{(diffsPanelHovered || bottomBarHovered) && (
<motion.ul key={hash} className="absolute top-[calc(100%-10px)] w-full h-fit max-h-[200%] pt-4 pb-2 px-2 overflow-y-scroll bg-light-main-color-3 dark:bg-main-color-3 text-main-color-1 dark:text-current brightness-125 rounded-md flex flex-col gap-3 scrollbar-thin scrollbar-thumb-rounded-full scrollbar-thumb-neutral-900 shadow-sm shadow-black" initial={{opacity: 0}} animate={{opacity: 1}} exit={{opacity: 0}} transition={{duration: .15}} onHoverStart={diffsPanelHoverStart} onHoverEnd={diffsPanelHoverEnd}>
{Array.from(diffs.entries()).map(([charac, diffSet]) => (
<ol key={crypto.randomUUID()} className="flex flex-col w-full gap-1">
{diffSet.map(({type, name, stars}) => (
<li key={`${type}${name}${stars}`} className="w-full h-4 flex items-center gap-1">
<BsmIcon className="h-full w-fit p-px" icon={charac}/>
<span className="h-full px-2 flex items-center text-xs font-bold bg-current rounded-full" style={{color: MAP_DIFFICULTIES_COLORS[type]}}>
{
stars ? (
<span className="h-full block brightness-[.25]"> {stars}</span>
) : (
<span className="h-full brightness-[.25] leading-4 pb-[2px] capitalize">{parseDiffLabel(type)}</span>
)
}
</span>
<span className="text-sm leading-4 pb-[2px] capitalize">{parseDiffLabel(name)}</span>
</li>
))}
</ol>
))}
</motion.ul>
)}
</AnimatePresence>
<div className="h-full w-full relative pl-[100px] rounded-md overflow-hidden flex flex-row justify-end">
<div className={`absolute top-0 left-0 h-full aspect-square cursor-pointer ${showOwned && "border-l-[5px]"}`} style={{borderColor: showOwned && color}}>
<BsmImage className="w-full h-full object-cover" image={coverUrl} placeholder={defaultImage} errorImage={defaultImage} loading="lazy"/>
<span className="absolute flex justify-center items-center w-full h-full pr-1 bg-transparent top-0 left-0 group-hover:bg-black group-hover:bg-opacity-40" style={{color}} onClick={(e) => {e.stopPropagation(); e.preventDefault(); toogleMusic()}}>
<BsmIcon className="w-full h-full p-7 opacity-0 group-hover:opacity-100 text-white hover:text-current" icon={songPlaying ? "pause" : "play"}/>
</span>
</div>
<div className="relative h-full w-full z-[1] rounded-md overflow-hidden -translate-x-1" ref={ref}>
<BsmImage className="absolute top-0 left-0 w-full h-full -z-[1] object-cover" image={coverUrl} placeholder={defaultImage} errorImage={defaultImage} loading="lazy"/>
<div className="pt-1 pl-2 pr-7 top-0 left-0 w-full h-full bg-gray-600 bg-opacity-80 flex flex-col justify-between group-hover:bg-main-color-1 group-hover:bg-opacity-80">
<h1 className="font-bold whitespace-nowrap text-ellipsis overflow-hidden w-full leading-5 tracking-wide text-lg" title={title}><BsmLink className="hover:underline" href={mapUrl}>{title}</BsmLink></h1>
<h2 className="font-bold whitespace-nowrap text-ellipsis overflow-hidden w-full text-sm mb-[3px]">{songAutor && t("maps.map-item.by", {songAutor})}</h2>
<h3 className="font-bold whitespace-nowrap text-ellipsis overflow-hidden w-full text-xs">{autor && (<> {t("maps.map-item.mapped-by")} <BsmLink href={authorUrl} className="brightness-200 hover:underline" style={{color}}>{autor}</BsmLink></>)}</h3>
<div className="w-full h-4 text-xs gap-2 flex opacity-0 group-hover:opacity-100">
{likesText && (
<div className="h-full flex items-center">
<BsmIcon className="h-full py-[2px] w-fit shrink-0 mr-1" icon="thumbUpFill"/>
<span className="mb-[2px]">{likesText}</span>
</div>
)}
{durationText && (
<div className="h-full flex items-center">
<BsmIcon className="h-full py-[2px] w-fit shrink-0 mr-1" icon="timerFill"/>
<span className="mb-[2px]">{durationText}</span>
</div>
)}
{createdAt && (
<div className="h-full flex items-center">
<BsmIcon className="h-full py-[2px] w-fit shrink-0 mr-1" icon="checkCircleIcon"/>
<time className="mb-[2px]">{createdDate}</time>
</div>
)}
</div>
<motion.div className="w-full h-5 pb-1 pr-7 flex items-center gap-1" onHoverStart={bottomBarHoverStart} onHoverEnd={bottomBarHoverEnd}>
{ranked && (
<div className="text-yellow-300 bg-current rounded-full px-1 h-full flex items-center justify-center">
<span className="uppercase text-xs font-bold tracking-wide brightness-[.25]">{t("maps.map-specificities.ranked")}</span>
</div>
)}
<div className="h-full grow flex items-start content-start">
{renderDiffPreview()}
</div>
</motion.div>
</div>
</div>
<div className="absolute bg-light-main-color-1 dark:bg-main-color-3 top-0 h-full z-[1] w-[30px] -right-5 group-hover:right-0 transition-all">
<span className="absolute w-[10px] h-[10px] top-0 right-full bg-inherit" style={{clipPath: 'path("M11 -1 L11 10 L10 10 A10 10 0 0 0 0 0 L0 -1 Z")'}}/>
<span className="absolute w-[10px] h-[10px] bottom-0 right-full bg-inherit" style={{clipPath: 'path("M11 11 L11 0 L10 0 A10 10 0 0 1 0 10 L 0 11 Z")'}}/>
<div className="flex flex-col justify-center items-center gap-1 w-full h-full overflow-hidden opacity-0 group-hover:opacity-100">
{onDelete && !downloading && <BsmButton className="w-6 h-6 p-[2px] rounded-md !bg-inherit hover:!bg-light-main-color-2 hover:dark:!bg-main-color-2" iconClassName="w-full h-full brightness-75 dark:brightness-200" iconColor={color} icon="trash" withBar={false} onClick={e => {e.stopPropagation(); onDelete(callBackParam)}}/>}
{onDownload && !downloading && <BsmButton className="w-6 h-6 p-[2px] rounded-md !bg-inherit hover:!bg-light-main-color-2 hover:dark:!bg-main-color-2" iconClassName="w-full h-full brightness-75 dark:brightness-200" iconColor={color} icon="download" withBar={false} onClick={e => {e.stopPropagation(); onDownload(callBackParam)}}/>}
{onCancelDownload && !downloading && <BsmButton className="w-6 h-6 p-1 rounded-md !bg-inherit hover:!bg-light-main-color-2 hover:dark:!bg-main-color-2" iconClassName="w-full h-full brightness-75 dark:brightness-200" iconColor="red" icon="cross" withBar={false} onClick={e => {e.stopPropagation(); onCancelDownload(callBackParam)}}/>}
{downloading && <BsmBasicSpinner className="w-6 h-6 p-1 rounded-md !bg-inherit hover:!bg-light-main-color-2 hover:dark:!bg-main-color-2 flex items-center justify-center" spinnerClassName="brightness-75 dark:brightness-200" style={{color}} thikness="3px"/>}
{previewUrl && <BsmButton className="w-6 h-6 p-[2px] rounded-md !bg-inherit hover:!bg-light-main-color-2 hover:dark:!bg-main-color-2" iconClassName="w-full h-full brightness-75 dark:brightness-200" iconColor={color} icon="eye" withBar={false} onClick={e => {e.stopPropagation(); openPreview()}}/>}
{mapId && <BsmButton className="w-6 h-6 p-1 rounded-md !bg-inherit hover:!bg-light-main-color-2 hover:dark:!bg-main-color-2" iconClassName="w-full h-full brightness-75 dark:brightness-200" iconColor={color} icon="twitch" withBar={false} onClick={e => {e.stopPropagation(); copyBsr()}}/>}
</div>
</div>
</div>
</motion.li>
)
}, equal);
@@ -0,0 +1,169 @@
import { DetailedHTMLProps, useEffect, useRef, useState } from "react"
import { BSVersion } from "shared/bs-version.interface"
import { TabNavBar } from "../shared/tab-nav-bar.component"
import { LocalMapsListPanel } from "./local-maps-list-panel.component"
import { BsmDropdownButton, DropDownItem } from "../shared/bsm-dropdown-button.component"
import { FilterPanel } from "./filter-panel.component"
import { MapFilter } from "shared/models/maps/beat-saver.model"
import { useThemeColor } from "renderer/hooks/use-theme-color.hook"
import { MapsManagerService } from "renderer/services/maps-manager.service"
import { motion, Variants } from "framer-motion";
import { MapsDownloaderService } from "renderer/services/maps-downloader.service"
import { BsmImage } from "../shared/bsm-image.component"
import wipGif from "../../../../assets/images/gifs/wip.gif"
import { OsDiagnosticService } from "renderer/services/os-diagnostic.service"
import { useObservable } from "renderer/hooks/use-observable.hook"
import { BsmIcon } from "../svgs/bsm-icon.component"
import { useTranslation } from "renderer/hooks/use-translation.hook"
import { LinkButton } from "./link-button.component"
import { debounceTime } from "rxjs/operators"
import { FolderLinkerService } from "renderer/services/folder-linker.service"
type Props = {
version?: BSVersion
}
export function MapsPlaylistsPanel({version}: Props) {
const mapsService = MapsManagerService.getInstance();
const mapsDownloader = MapsDownloaderService.getInstance();
const osDiagnostic = OsDiagnosticService.getInstance();
const linker = FolderLinkerService.getInstance();
const [tabIndex, setTabIndex] = useState(0);
const [mapFilter, setMapFilter] = useState<MapFilter>({});
const [mapSearch, setMapSearch] = useState("");
const [playlistSearch, setPlaylistSearch] = useState("");
const [mapsLinked, setMapsLinked] = useState(false);
const [linkingPending, setLinkingPending] = useState(false);
const isOnline = useObservable(osDiagnostic.isOnline$);
const color = useThemeColor("first-color");
const t = useTranslation();
const mapsRef = useRef<any>();
useEffect(() => {
loadMapIsLinked();
const sub = mapsService.$mapsLinkingPending(version).pipe(debounceTime(50)).subscribe(setLinkingPending);
const onMapsLinked = (folder: string) => {
if(!folder.includes("CustomLevels")){ return; }
loadMapIsLinked();
}
linker.onFolderLinked(onMapsLinked);
linker.onFolderUnlinked(onMapsLinked);
return () => {
sub.unsubscribe();
linker.removeOnFolderLinked(onMapsLinked);
linker.removeOnFolderUnlinked(onMapsLinked);
}
}, [version]);
const loadMapIsLinked = () => {
mapsService.versionHaveMapsLinked(version).then(setMapsLinked);
}
const handleSearch = (value: string) => {
if(tabIndex === 0){
return setMapSearch(() => value);
}
return setPlaylistSearch(() => value);
}
const handleMapsLinkClick = () => {
if(!mapsLinked){
return mapsService.linkVersion(version);
}
return mapsService.unlinkVersion(version);
}
const handleMapsAddClick = () => {
mapsDownloader.openDownloadMapModal(version, mapsRef.current.getMaps?.());
}
const renderTab = (props: DetailedHTMLProps<React.HTMLAttributes<HTMLLIElement>, HTMLLIElement>, text: string, index: number): JSX.Element => {
const onClickLink = (index: number) => {
if(index === 0){ handleMapsLinkClick(); }
}
const onClickAdd = (index: number) => {
if(index === 0){ handleMapsAddClick(); }
}
const variants: Variants = { hover: {rotate: 22.5}, tap: {rotate: 45} };
return (
<li className="relative text-center text-lg font-bold hover:backdrop-brightness-75 flex justify-center items-center content-center" onClick={props.onClick}>
<span className="text-main-color-1 dark:text-gray-200">{text}</span>
{index === 0 &&(
<div className="h-full flex absolute right-0 top-0 gap-1.5 items-center pr-2">
{isOnline && (
<motion.div whileHover="hover" whileTap="tap" className="relative h-[calc(100%-5px)] flex flex-row justify-center items-center shrink-0 rounded-full overflow-hidden pr-2" style={{color}} onClick={e => {e.stopPropagation(); onClickAdd(index)}}>
<span className="absolute top-0 left-0 h-full w-full brightness-50 opacity-75 dark:opacity-20 dark:filter-none" style={{backgroundColor: "currentcolor"}}/>
<motion.div className="h-full p-0.5" variants={variants}>
<BsmIcon className="block h-full aspect-square brightness-150" icon="add"/>
</motion.div>
<span className="text-sm brightness-150">{t("pages.version-viewer.maps.tabs.maps.actions.add-maps.text")}</span>
</motion.div>
)}
{(!!version) && (
<LinkButton
variants={variants}
disabled={linkingPending}
whileHover="hover"
whileTap="tap"
initial={{rotate: 0}}
className="block p-0.5 h-[calc(100%-5px)] aspect-square blur-0 hover:brightness-75"
linked={mapsLinked}
title={t(mapsLinked ? "pages.version-viewer.maps.tabs.maps.actions.link-maps.tooltips.unlink" : "pages.version-viewer.maps.tabs.maps.actions.link-maps.tooltips.link")}
onClick={() => onClickLink(index)}
/>
)}
</div>
)}
</li>
)
}
const dropDownItems = ((): DropDownItem[] => {
if(tabIndex === 1){
return [
]
}
return [
{icon:"export", text: "pages.version-viewer.maps.search-bar.dropdown.export-maps", onClick: () => mapsRef.current.exportMaps?.()},
{icon: "trash", text: "pages.version-viewer.maps.search-bar.dropdown.delete-maps", onClick: () => mapsRef.current.deleteMaps?.()}
]
})()
return (
<div className="w-full h-full flex flex-col items-center justify-center">
<nav className="w-full shrink-0 flex h-9 justify-center px-40 gap-2 mb-3 text-main-color-1 dark:text-white">
<div className="h-full rounded-full bg-light-main-color-2 dark:bg-main-color-2 grow p-[6px]">
<input type="text" className="h-full w-full bg-light-main-color-1 dark:bg-main-color-1 rounded-full px-2" placeholder={t("pages.version-viewer.maps.search-bar.search-placeholder")} value={tabIndex === 0 ? mapSearch : playlistSearch} onChange={e => handleSearch(e.target.value)} tabIndex={-1}/>
</div>
<BsmDropdownButton className="h-full relative z-[1] flex justify-center" buttonClassName="flex items-center justify-center h-full rounded-full px-2 py-1" icon="filter" text="pages.version-viewer.maps.search-bar.filters-btn" withBar={false}>
<FilterPanel className="absolute top-[calc(100%+3px)] origin-top w-[500px] h-fit p-2 rounded-md shadow-md shadow-black" filter={mapFilter} onChange={setMapFilter}/>
</BsmDropdownButton>
<BsmDropdownButton className="h-full flex aspect-square relative rounded-full z-[1] bg-light-main-color-1 dark:bg-main-color-3" buttonClassName="rounded-full h-full w-full p-[6px]" icon="three-dots" withBar={false} items={dropDownItems} menuTranslationY="6px" align="center"/>
</nav>
<div className="w-full h-full flex flex-col bg-light-main-color-3 dark:bg-main-color-2 rounded-md shadow-black shadow-md overflow-hidden">
<TabNavBar className="!rounded-none shadow-sm" tabIndex={tabIndex} tabsText={["misc.maps", "misc.playlists"]} onTabChange={setTabIndex} renderTab={renderTab}/>
<div className="w-full grow min-h-0 flex flex-row items-center transition-transform duration-300" style={{transform: `translate(${-(tabIndex * 100)}%, 0)`}}>
<LocalMapsListPanel ref={mapsRef} className="w-full h-full shrink-0 flex flex-col" version={version} filter={mapFilter} search={mapSearch} linked={mapsLinked}/>
<div className="w-full h-full shrink-0 flex flex-col justify-center items-center content-center gap-2 overflow-hidden text-gray-800 dark:text-gray-200">
<BsmImage className="rounded-md" image={wipGif}/>
<span>Coming soon</span>
</div>
</div>
</div>
</div>
)
}
@@ -0,0 +1,73 @@
import { CSSProperties, memo } from "react"
import { useObservable } from "renderer/hooks/use-observable.hook"
import { distinctUntilChanged, map } from "rxjs/operators"
import { BehaviorSubject } from "rxjs"
import { BsvMapCharacteristic } from "shared/models/maps/beat-saver.model"
import { BsmLocalMap } from "shared/models/maps/bsm-local-map.interface"
import { ParsedMapDiff, MapItem } from "./map-item.component"
import equal from "fast-deep-equal/es6"
type Props = {
maps: BsmLocalMap[],
style?: CSSProperties,
onMapDelete: (map: BsmLocalMap) => void,
onMapSelect: (map: BsmLocalMap) => void,
selectedMaps$: BehaviorSubject<BsmLocalMap[]>
}
export const MapsRow = memo(({maps, style, selectedMaps$, onMapSelect, onMapDelete}: Props) => {
const selectedMaps = useObservable<BsmLocalMap[]>(selectedMaps$.pipe(
map(selectedMaps => selectedMaps.filter(selected => maps.some(map => map.hash === selected.hash))),
distinctUntilChanged(equal)
), []);
const extractMapDiffs = (map: BsmLocalMap): Map<BsvMapCharacteristic, ParsedMapDiff[]> => {
const res = new Map<BsvMapCharacteristic, ParsedMapDiff[]>();
if(map.bsaverInfo?.versions[0]?.diffs){
map.bsaverInfo.versions[0].diffs.forEach(diff => {
const arr = res.get(diff.characteristic) || [];
const diffName = map.rawInfo._difficultyBeatmapSets.find(set => set._beatmapCharacteristicName === diff.characteristic)._difficultyBeatmaps.find(rawDiff => rawDiff._difficulty === diff.difficulty)?._customData?._difficultyLabel || diff.difficulty
arr.push({name: diffName, type: diff.difficulty, stars: diff.stars});
res.set(diff.characteristic, arr);
});
return res;
}
map.rawInfo._difficultyBeatmapSets.forEach(set => {
set._difficultyBeatmaps.forEach(diff => {
const arr = res.get(set._beatmapCharacteristicName) || [];
arr.push({name: diff._customData?._difficultyLabel || diff._difficulty, type: diff._difficulty, stars: null});
res.set(set._beatmapCharacteristicName, arr);
});
});
return res;
}
const renderMapItem = (map: BsmLocalMap) => {
return <MapItem
key={map.hash}
hash={map.hash}
title={map.rawInfo._songName}
coverUrl={map.coverUrl}
songUrl={map.songUrl}
autor={map.rawInfo._levelAuthorName}
songAutor={map.rawInfo._songAuthorName}
bpm={map.rawInfo._beatsPerMinute}
duration={map.bsaverInfo?.metadata?.duration}
selected={selectedMaps.some(selected => selected.hash === map.hash)}
diffs={extractMapDiffs(map)} mapId={map.bsaverInfo?.id} ranked={map.bsaverInfo?.ranked} autorId={map.bsaverInfo?.uploader?.id} likes={map.bsaverInfo?.stats?.upvotes} createdAt={map.bsaverInfo?.createdAt}
onDelete={onMapDelete}
onSelected={onMapSelect}
callBackParam={map}
/>;
}
return (
<ul className="h-fit w-full flex flex-nowrap basis-0 gap-x-[8px] py-1 px-3" style={style}>
{maps && maps.map(renderMapItem)}
</ul>
)
}, equal);
@@ -0,0 +1,11 @@
type Props = {
className?: string
}
export function MapsToolbar({className}: Props) {
return (
<div className={className}>
</div>
)
}
@@ -0,0 +1,51 @@
import { useEffect, useState } from "react";
import { BsmButton } from "renderer/components/shared/bsm-button.component";
import { BsmCheckbox } from "renderer/components/shared/bsm-checkbox.component";
import { BsmImage } from "renderer/components/shared/bsm-image.component";
import { useTranslation } from "renderer/hooks/use-translation.hook";
import { ConfigurationService } from "renderer/services/configuration.service";
import { MapsManagerService } from "renderer/services/maps-manager.service";
import { ModalComponent, ModalExitCode } from "renderer/services/modale.service";
import { BsmLocalMap } from "shared/models/maps/bsm-local-map.interface";
import BeatConflict from '../../../../../assets/images/apngs/beat-conflict.png'
export const DeleteMapsModal: ModalComponent<void, {linked: boolean, maps: BsmLocalMap[]}> = ({resolver, data:{linked, maps}}) => {
const config = ConfigurationService.getInstance();
const t = useTranslation();
const [remember, setRemember] = useState(false);
useEffect(() => {
const key = MapsManagerService.REMEMBER_CHOICE_DELETE_MAP_KEY;
config.set(key, remember);
}, [remember])
const multiple = maps.length > 1;
const titleText = multiple ? "modals.maps-actions.delete-maps.title.multiple" : "modals.maps-actions.delete-maps.title.single";
const descText = multiple ? "modals.maps-actions.delete-maps.desc.multiple" : "modals.maps-actions.delete-maps.desc.single";
const infoText = multiple ? "modals.maps-actions.delete-maps.info.desc.multiple" : "modals.maps-actions.delete-maps.info.desc.single";
const infoTitleText = multiple ? "modals.maps-actions.delete-maps.info.title.multiple" : "modals.maps-actions.delete-maps.info.title.single";
return (
<form className="text-gray-800 dark:text-gray-200">
<h1 className="text-3xl uppercase tracking-wide w-full text-center">{t(titleText)}</h1>
<BsmImage className="mx-auto h-24" image={BeatConflict} />
<p className="max-w-sm w-full">{t(descText, multiple ? {nb: maps.length.toString()} : {name: maps.at(0).rawInfo._songName})}</p>
{linked && <p className="text-sm italic mt-2 cursor-help w-fit" title={t(infoTitleText)}>{t(infoText)}</p>}
{!multiple && (
<div className="flex items-center relative py-2 gap-1 mt-1">
<BsmCheckbox className="h-5 relative z-[1]" checked={remember} onChange={(val) => setRemember(val)}/>
<span className="italic">{t("modals.misc.remember-my-choice")}</span>
</div>
)}
<div className="grid grid-flow-col grid-cols-2 gap-4 mt-2">
<BsmButton typeColor="cancel" className="rounded-md text-center transition-all" onClick={() => resolver({exitCode: ModalExitCode.CANCELED})} withBar={false} text="misc.cancel"/>
<BsmButton typeColor="primary" className="rounded-md text-center transition-all" onClick={() => resolver({exitCode: ModalExitCode.COMPLETED})} withBar={false} text="misc.delete"/>
</div>
</form>
)
}
@@ -0,0 +1,187 @@
import { motion } from "framer-motion";
import { useCallback, useEffect, useRef, useState } from "react";
import { FilterPanel } from "renderer/components/maps-mangement-components/filter-panel.component";
import { MapItem, ParsedMapDiff } from "renderer/components/maps-mangement-components/map-item.component";
import { BsmButton } from "renderer/components/shared/bsm-button.component";
import { BsmDropdownButton } from "renderer/components/shared/bsm-dropdown-button.component";
import { BsmSelect, BsmSelectOption } from "renderer/components/shared/bsm-select.component";
import { useObservable } from "renderer/hooks/use-observable.hook";
import { BSV_SORT_ORDER } from "renderer/partials/beat-saver/sort-order";
import { BeatSaverService } from "renderer/services/thrird-partys/beat-saver.service";
import { MapsDownloaderService } from "renderer/services/maps-downloader.service";
import { MapsManagerService } from "renderer/services/maps-manager.service";
import { ModalComponent } from "renderer/services/modale.service";
import { BSVersion } from "shared/bs-version.interface";
import { BsvMapCharacteristic, BsvMapDetail, MapFilter, SearchOrder, SearchParams } from "shared/models/maps/beat-saver.model";
import BeatWaitingImg from "../../../../../assets/images/apngs/beat-waiting.png";
import BeatConflictImg from "../../../../../assets/images/apngs/beat-conflict.png";
import equal from "fast-deep-equal/es6";
import { ProgressBarService } from "renderer/services/progress-bar.service";
import { useTranslation } from "renderer/hooks/use-translation.hook";
import { OsDiagnosticService } from "renderer/services/os-diagnostic.service";
import { BsmLocalMap } from "shared/models/maps/bsm-local-map.interface";
export const DownloadMapsModal: ModalComponent<void, {version: BSVersion, ownedMaps: BsmLocalMap[]}> = ({resolver, data: { ownedMaps, version }}) => {
const beatSaver = BeatSaverService.getInstance();
const mapsDownloader = MapsDownloaderService.getInstance();
const progressBar = ProgressBarService.getInstance();
const os = OsDiagnosticService.getInstance();
const currentDownload = useObservable(mapsDownloader.currentMapDownload$);
const mapsInQueue = useObservable(mapsDownloader.mapsInQueue$);
const t = useTranslation();
const filterContainerRef = useRef(null);
const [filter, setFilter] = useState<MapFilter>({});
const [query, setQuery] = useState("");
const [maps, setMaps] = useState<BsvMapDetail[]>([]);
const [sortOrder, setSortOrder] = useState<SearchOrder>(BSV_SORT_ORDER.at(0));
const [ownedMapHashs, setOwnedMapHashs] = useState<string[]>(ownedMaps?.map(map => map.hash) ?? []);
const [loading, setLoading] = useState(false);
const isOnline = useObservable(os.isOnline$);
const [searchParams, setSearchParams] = useState<SearchParams>({
sortOrder,
filter,
page: 0,
q: query
});
const loaderRef = useRef(null);
const sortOptions: BsmSelectOption[] = (() => {
return BSV_SORT_ORDER.map(sort => ({text: `beat-saver.maps-sorts.${sort}`, value: sort}));
})();
useEffect(() => {
loadMaps(searchParams);
}, [searchParams]);
useEffect(() => {
const onMapDownloaded = (map: BsmLocalMap, targerVersion: BSVersion) => {
if(!equal(targerVersion, version)){ return; }
const downloadedHash = map.hash;
setOwnedMapHashs((prev) => [...prev, downloadedHash]);
}
mapsDownloader.addOnMapDownloadedListener(onMapDownloaded);
if(mapsDownloader.isDownloading){
progressBar.setStyle(mapsDownloader.progressBarStyle);
}
return () => {
mapsDownloader.removeOnMapDownloadedListener(onMapDownloaded);
progressBar.setStyle(null);
}
}, [])
const loadMaps = (params: SearchParams) => {
setLoading(() => true);
beatSaver.searchMaps(params).then((maps => setMaps(prev => [...prev, ...maps]))).finally(() => setLoading(() => false));
}
const extractMapDiffs = (map: BsvMapDetail): Map<BsvMapCharacteristic, ParsedMapDiff[]> => {
const res = new Map<BsvMapCharacteristic, ParsedMapDiff[]>();
if(map.versions.at(0).diffs){
map.versions.at(0).diffs.forEach(diff => {
const arr = res.get(diff.characteristic) || [];
arr.push({name: diff.difficulty, type: diff.difficulty, stars: diff.stars});
res.set(diff.characteristic, arr);
});
}
return res;
}
const renderMap = (map: BsvMapDetail) => {
const isMapOwned = map.versions.some(version => ownedMapHashs.includes(version.hash));
const isDownloading = map.id === currentDownload?.map?.id;
const inQueue = mapsInQueue.some(toDownload => equal(toDownload.version, version) && toDownload.map.id === map.id);
return (
<MapItem
autor={map.metadata.levelAuthorName}
autorId={map.uploader.id}
bpm={map.metadata.bpm}
coverUrl={map.versions.at(0).coverURL}
createdAt={map.createdAt}
duration={map.metadata.duration}
hash={map.versions.at(0).hash}
likes={map.stats.upvotes}
mapId={map.id}
ranked={map.ranked}
title={map.name}
songAutor={map.metadata.songAuthorName}
diffs={extractMapDiffs(map)}
songUrl={map.versions.at(0).previewURL}
key={map.id}
onDownload={(!isMapOwned && !inQueue) && (handleDownloadMap)}
onDoubleClick={(!isMapOwned && !inQueue) && (handleDownloadMap)}
onCancelDownload={(inQueue && !isDownloading) && (handleCancelDownload)}
downloading={isDownloading}
showOwned={isMapOwned}
callBackParam={map}
/>
)
}
const handleDownloadMap = useCallback((map: BsvMapDetail) => {
mapsDownloader.addMapToDownload({map, version})
}, []);
const handleCancelDownload = useCallback((map: BsvMapDetail) => {
mapsDownloader.removeMapToDownload({map, version});
}, []);
const handleSortChange = (newSort: string) => {
setSortOrder(() => newSort as SearchOrder);
setMaps(() => []);
setSearchParams(() => ({...searchParams, sortOrder: (newSort as SearchOrder)}));
}
const handleSearch = () => {
const searchParams: SearchParams = {
sortOrder,
filter,
q: query.trim(),
page: 0,
};
setMaps(() => []);
setSearchParams(() => searchParams);
}
const handleLoadMore = () => {
setSearchParams((prev) => {
return {...prev, page: prev.page + 1}
});
}
return (
<form className="text-gray-800 dark:text-gray-200 flex flex-col max-w-[95vw] w-[970px] h-[85vh] gap-3" onSubmit={e => {e.preventDefault(); handleSearch()}}>
<div className="flex h-9 gap-2 shrink-0">
<BsmDropdownButton ref={filterContainerRef} className="shrink-0 h-full relative z-[1] flex justify-start" buttonClassName="flex items-center justify-center h-full rounded-full px-2 py-1 !bg-light-main-color-1 dark:!bg-main-color-1" icon="filter" text="pages.version-viewer.maps.search-bar.filters-btn" withBar={false}>
<FilterPanel className="absolute top-[calc(100%+3px)] origin-top w-[450px] h-fit p-2 rounded-md shadow-md shadow-black" filter={filter} onChange={setFilter} onApply={handleSearch} onClose={() => filterContainerRef.current.close()}/>
</BsmDropdownButton>
<input className="h-full bg-light-main-color-1 dark:bg-main-color-1 rounded-full px-2 grow pb-0.5" type="text" name="" id="" placeholder={t("pages.version-viewer.maps.search-bar.search-placeholder")} value={query} onChange={e => setQuery(e.target.value)}/>
<BsmButton className="shrink-0 rounded-full py-1 px-3 !bg-light-main-color-1 dark:!bg-main-color-1 flex justify-center items-center capitalize" icon="search" text="modals.download-maps.search-btn" withBar={false} onClick={e => {e.preventDefault(); handleSearch()}}/>
<BsmSelect className="bg-light-main-color-1 dark:bg-main-color-1 rounded-full px-1 pb-0.5 text-center" options={sortOptions} onChange={handleSortChange}/>
</div>
<ul className="w-full grow flex content-start flex-wrap gap-2 pt-1.5 px-2 overflow-y-scroll overflow-x-hidden scrollbar-thin scrollbar-thumb-rounded-full scrollbar-thumb-neutral-900 z-0" >
{maps.length === 0 ? (
<div className="w-full h-full flex flex-col items-center justify-center">
<img className={`w-32 h-32 ${loading && "spin-loading"}`} src={loading ? BeatWaitingImg : BeatConflictImg} alt=" "/>
<span className="text-lg">{t(loading ? "modals.download-maps.loading-maps" : isOnline ? "modals.download-maps.no-maps-found" : "modals.download-maps.no-internet")}</span>
</div>
) : (
<>
{maps.map(renderMap)}
<motion.span onViewportEnter={handleLoadMore} ref={loaderRef} className="block w-full h-8"/>
</>
)}
</ul>
</form>
)
}
@@ -5,18 +5,17 @@ import { BsmIcon } from "renderer/components/svgs/bsm-icon.component";
import { DefaultConfigKey } from "renderer/config/default-configuration.config";
import { useTranslation } from "renderer/hooks/use-translation.hook";
import { ConfigurationService } from "renderer/services/configuration.service";
import { ModalExitCode, ModalResponse, ModalService } from "renderer/services/modale.service";
import { ModalComponent, ModalExitCode } from "renderer/services/modale.service";
import { BSVersion } from "shared/bs-version.interface";
export function EditVersionModal({resolver, clone = false}: {resolver: (x: ModalResponse<{name: string, color: string}>) => void, clone?: boolean}) {
export const EditVersionModal: ModalComponent<{name: string, color: string}, {version: BSVersion, clone?: boolean}> = ({resolver, data}) => {
const {version, clone} = data;
const configService = ConfigurationService.getInstance();
const modalService = ModalService.getInsance();
const modalData: BSVersion = modalService.getModalData();
const [name, setName] = useState(modalData.name || modalData.BSVersion);
const [color, setColor] = useState(modalData.color ?? configService.get<string>("second-color" as DefaultConfigKey));
const [name, setName] = useState(version.name || version.BSVersion);
const [color, setColor] = useState(version.color ?? configService.get<string>("second-color" as DefaultConfigKey));
const t = useTranslation();
const rename = () => {
@@ -31,16 +30,16 @@ export function EditVersionModal({resolver, clone = false}: {resolver: (x: Modal
return (
<form className="static" onSubmit={(e) => {e.preventDefault(); rename();}}>
<h1 className="text-3xl uppercase tracking-wide w-full text-center text-gray-800 dark:text-gray-200">{t(!clone ? "modals.edit-version.title" : "modals.clone-version.title")}</h1>
<BsmIcon className="w-full h-11 my-3" icon="bsNote" style={{color: color}}/>
<BsmIcon className="w-full h-11 my-3" icon="bsNote" style={{color}}/>
{ clone && (
<p className="max-w-sm mb-2 text-gray-800 dark:text-gray-200">{t("modals.clone-version.description")}</p>
)}
<div className="mb-3">
<label className="block font-bold cursor-pointer tracking-wide text-gray-800 dark:text-gray-200" htmlFor="name">{t("Nom")}</label>
<input className="w-full bg-light-main-color-1 dark:bg-main-color-1 px-1 py-[2px] rounded-md outline-none" onChange={e => setName(e.target.value)} value={name} type="text" name="name" id="name" minLength={2} maxLength={15} placeholder={t("Nom de la version")}/>
<label className="block font-bold cursor-pointer tracking-wide text-gray-800 dark:text-gray-200" htmlFor="name">{t("modals.clone-version.inputs.name.label")}</label>
<input className="w-full bg-light-main-color-1 dark:bg-main-color-1 px-1 py-[2px] rounded-md outline-none" onChange={e => setName(e.target.value)} value={name} type="text" name="name" id="name" minLength={2} maxLength={15} placeholder={t("modals.clone-version.inputs.name.placeholder")}/>
</div>
<div>
<span className="block font-bold tracking-wide text-gray-800 dark:text-gray-200">Couleur</span>
<span className="block font-bold tracking-wide text-gray-800 dark:text-gray-200">{t("modals.clone-version.inputs.color.label")}</span>
<div className="relative w-full h-7 mb-4 bg-light-main-color-1 dark:bg-main-color-1 flex justify-center rounded-md py-1 z-[1]">
<SettingColorChooser color={color} onChange={setColor} pickerClassName="!h-32 !w-32"/>
<div className="absolute right-2 top-0 h-full flex items-center">
@@ -1,11 +1,11 @@
import { ModalExitCode, ModalResponse } from "../../../services/modale.service";
import { ModalComponent, ModalExitCode } from "../../../services/modale.service";
import { useState } from "react";
import BeatConflict from "../../../../../assets/images/apngs/beat-conflict.png"
import { BsmImage } from "renderer/components/shared/bsm-image.component";
import { BsmButton } from "renderer/components/shared/bsm-button.component";
import { useTranslation } from "renderer/hooks/use-translation.hook";
export function GuardModal({resolver}: {resolver: (x: ModalResponse<string>) => void}) {
export const GuardModal: ModalComponent<string> = ({resolver}) => {
const [guardCode, setGuardCode] = useState('');
const t = useTranslation();
@@ -0,0 +1,22 @@
import { BsmButton } from 'renderer/components/shared/bsm-button.component'
import { BsmImage } from 'renderer/components/shared/bsm-image.component'
import { useTranslation } from 'renderer/hooks/use-translation.hook'
import { ModalComponent, ModalExitCode } from 'renderer/services/modale.service'
import BeatImpatient from "../../../../../assets/images/apngs/beat-impatient.png"
export const ImportVersionModal: ModalComponent<void> = ({resolver}) => {
const t = useTranslation();
return (
<form>
<h1 className="text-3xl uppercase tracking-wide w-full text-center text-gray-800 dark:text-gray-200">{t("modals.bs-import-version.title")}</h1>
<BsmImage className="mx-auto h-20" image={BeatImpatient}/>
<p className="max-w-sm text-gray-800 dark:text-gray-200">{t("modals.bs-import-version.description")}</p>
<div className="grid grid-flow-col grid-cols-2 gap-4 mt-4">
<BsmButton typeColor="cancel" className="rounded-md text-center transition-all" onClick={() => resolver({exitCode: ModalExitCode.CANCELED})} withBar={false} text="misc.cancel"/>
<BsmButton typeColor="primary" className="rounded-md text-center transition-all" onClick={() => resolver({exitCode: ModalExitCode.COMPLETED})} withBar={false} text="modals.bs-import-version.buttons.submit"/>
</div>
</form>
)
}
@@ -1,16 +1,15 @@
import { BsmButton } from "renderer/components/shared/bsm-button.component";
import { BsmImage } from "renderer/components/shared/bsm-image.component";
import { useTranslation } from "renderer/hooks/use-translation.hook";
import { ModalExitCode, ModalResponse } from "renderer/services/modale.service";
import { ModalComponent, ModalExitCode } from "renderer/services/modale.service";
import BeatConflict from "../../../../../assets/images/apngs/beat-conflict.png"
export function InstallationFolderModal({resolver}: {resolver: (x: ModalResponse) => void}) {
export const InstallationFolderModal: ModalComponent<void> = ({resolver}) => {
const t = useTranslation();
return (
<>
<span className="absolute bg-gradient-to-r from-blue-500 to-red-500 top-0 w-full left-0 h-1"></span>
<form>
<h1 className="text-3xl uppercase tracking-wide w-full text-center text-gray-800 dark:text-gray-200">{t("modals.install-folder.title")}</h1>
<BsmImage className="mx-auto h-24" image={BeatConflict}/>
<p className="max-w-sm text-gray-800 dark:text-gray-200">{t("modals.install-folder.description")}</p>
@@ -18,6 +17,6 @@ export function InstallationFolderModal({resolver}: {resolver: (x: ModalResponse
<BsmButton typeColor="cancel" className="rounded-md text-center transition-all" onClick={() => resolver({exitCode: ModalExitCode.CANCELED})} withBar={false} text="misc.cancel"/>
<BsmButton typeColor="primary" className="rounded-md text-center transition-all" onClick={() => resolver({exitCode: ModalExitCode.COMPLETED})} withBar={false} text="modals.install-folder.buttons.submit"/>
</div>
</>
</form>
)
}
@@ -0,0 +1,30 @@
import { useState } from "react";
import { BsmButton } from "renderer/components/shared/bsm-button.component";
import { BsmCheckbox } from "renderer/components/shared/bsm-checkbox.component";
import { BsmImage } from "renderer/components/shared/bsm-image.component";
import { useTranslation } from "renderer/hooks/use-translation.hook";
import { ModalComponent, ModalExitCode } from "renderer/services/modale.service";
import BeatRunning from '../../../../../assets/images/apngs/beat-running.png'
export const LinkMapsModal: ModalComponent<boolean> = ({resolver}) => {
const t = useTranslation();
const [keepMaps, setKeepMaps] = useState(true);
return (
<form className="text-gray-800 dark:text-gray-200">
<h1 className="text-3xl uppercase tracking-wide w-full text-center">{t("modals.maps-actions.link-maps.title")}</h1>
<BsmImage className="mx-auto h-24" image={BeatRunning} />
<p className="max-w-sm w-full">{t("modals.maps-actions.link-maps.desc")}</p>
<p className="max-w-sm w-full text-sm italic mt-2">{t("modals.maps-actions.link-maps.info")}</p>
<div className="relative h-5 flex my-3 items-center">
<BsmCheckbox className="h-full aspect-square relative bg-inherit mr-1.5 z-[1]" checked={keepMaps} onChange={setKeepMaps}/>
<span className="text-sm mb-0.5 cursor-help" title={t("modals.maps-actions.link-maps.keep-maps.title")}>{t("modals.maps-actions.link-maps.keep-maps.label")}</span>
</div>
<div className="grid grid-flow-col grid-cols-2 gap-4 mt-4">
<BsmButton typeColor="cancel" className="rounded-md text-center transition-all" onClick={() => resolver({exitCode: ModalExitCode.CANCELED})} withBar={false} text="misc.cancel"/>
<BsmButton typeColor="primary" className="rounded-md text-center transition-all" onClick={() => resolver({exitCode: ModalExitCode.COMPLETED, data: keepMaps})} withBar={false} text="modals.maps-actions.link-maps.valid-btn"/>
</div>
</form>
)
}
@@ -2,14 +2,17 @@ import { useState } from "react";
import { BsmButton } from "renderer/components/shared/bsm-button.component";
import { BsmImage } from "renderer/components/shared/bsm-image.component";
import { useTranslation } from "renderer/hooks/use-translation.hook";
import { ModalExitCode, ModalResponse } from "renderer/services/modale.service";
import { ModalComponent, ModalExitCode, ModalService } from "renderer/services/modale.service";
import BeatImpatient from '../../../../../assets/images/apngs/beat-impatient.png'
import { WhyCredentialsModal } from "./why-credentials-modal.component";
export function LoginModal({resolver}: {resolver: (x: ModalResponse<any>) => void}) {
export const LoginModal: ModalComponent<{username: string, password: string, stay: boolean}> = ({resolver}) => {
const modal = ModalService.getInsance();
const [username, setUsername] = useState('');
const [password, setPassword] = useState('');
const [stay, setStay] = useState(true);
const [stay, setStay] = useState(false);
const t = useTranslation();
const loggin = () => {
@@ -17,10 +20,15 @@ export function LoginModal({resolver}: {resolver: (x: ModalResponse<any>) => voi
resolver({exitCode: ModalExitCode.COMPLETED, data:{username, password, stay}});
}
const whyCredentials = () => {
modal.openModal(WhyCredentialsModal);
}
return (
<form onSubmit={(e) => {e.preventDefault(); loggin();}}>
<h1 className="text-3xl uppercase tracking-wide w-full text-center text-gray-800 dark:text-gray-200">{t("modals.steam-login.title")}</h1>
<BsmImage className="mx-auto h-20" image={BeatImpatient} />
<div className="mb-2">
<label className="block font-bold cursor-pointer tracking-wide text-gray-800 dark:text-gray-200" htmlFor="username">{t("modals.steam-login.inputs.username.label")}</label>
<input className="w-full bg-light-main-color-1 dark:bg-main-color-1 px-1 py-[2px] rounded-md outline-none" onChange={e => setUsername(e.target.value)} value={username} type="text" name="username" id="username" placeholder={t("modals.steam-login.inputs.username.placeholder")}/>
@@ -29,13 +37,12 @@ export function LoginModal({resolver}: {resolver: (x: ModalResponse<any>) => voi
<label className="block font-bold cursor-pointer tracking-wide text-gray-800 dark:text-gray-200" htmlFor="password">{t("modals.steam-login.inputs.password.label")}</label>
<input className="w-full bg-light-main-color-1 dark:bg-main-color-1 px-1 py-[2px] rounded-md outline-none" onChange={e => setPassword(e.target.value)} value={password} type="password" name="password" id="password" placeholder={t("modals.steam-login.inputs.password.placeholder")}/>
</div>
<div className="flex items-center content-center justify-start mb-3">
<input onChange={e => setStay(e.target.checked)} checked={stay} className="mr-1" type="checkbox" name="stay" id="stay" />
<label className="cursor-pointer text-gray-800 dark:text-gray-200" htmlFor="stay">{t("modals.steam-login.inputs.stay.label")}</label>
</div>
<span onClick={whyCredentials} className="underline my-4 block cursor-pointer">{t("modals.steam-login.why-credentials")}</span>
<div className="grid grid-flow-col grid-cols-2 gap-4">
<BsmButton typeColor="cancel" className="rounded-md text-center transition-all" onClick={() => {resolver({exitCode: ModalExitCode.CANCELED})}} withBar={false} text="misc.cancel"/>
<BsmButton typeColor="primary" className="rounded-md text-center transition-all" type="submit" withBar={false} text={t("modals.steam-login.buttons.submit")}/>
<BsmButton typeColor="primary" className="rounded-md text-center transition-all" type="submit" withBar={false} text="modals.steam-login.buttons.submit"/>
</div>
</form>
)
@@ -0,0 +1,28 @@
import { BsmButton } from "renderer/components/shared/bsm-button.component";
import { BsmImage } from "renderer/components/shared/bsm-image.component";
import { useTranslation } from "renderer/hooks/use-translation.hook";
import { ModalComponent, ModalExitCode } from "renderer/services/modale.service";
import BeatConflict from '../../../../../assets/images/apngs/beat-conflict.png'
export const ModsDisclaimerModal: ModalComponent<void, void> = ({resolver}) => {
const t = useTranslation();
return (
<form className="max-w-[800px] text-gray-800 dark:text-gray-200">
<h1 className="text-3xl uppercase tracking-wide w-full text-center text-gray-800 dark:text-gray-200">{t("modals.mods-disclaimer.title")}</h1>
<BsmImage className="mx-auto h-20" image={BeatConflict} />
<p className="mb-1">{t("modals.mods-disclaimer.p-1")}</p>
<ul className="list-disc w-full pl-6">
<li>{t("modals.mods-disclaimer.li-1")}</li>
<li>{t("modals.mods-disclaimer.li-2")}</li>
<li>{t("modals.mods-disclaimer.li-3")}</li>
</ul>
<p className="mt-1">{t("modals.mods-disclaimer.p-2")}</p>
<div className="grid grid-flow-col grid-cols-2 gap-4 pt-3">
<BsmButton typeColor="cancel" className="rounded-md text-center transition-all" onClick={() => {resolver({exitCode: ModalExitCode.CANCELED})}} withBar={false} text="misc.refuse"/>
<BsmButton typeColor="primary" className="rounded-md text-center transition-all" onClick={() => {resolver({exitCode: ModalExitCode.COMPLETED})}} withBar={false} text="misc.accept"/>
</div>
</form>
)
}

Some files were not shown because too many files have changed in this diff Show More