mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
Compare commits
65 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f71c29da58 | |||
| 60c656b45b | |||
| bec8e1f571 | |||
| 20d0cd7ee6 | |||
| 3f37c2ee34 | |||
| 0b24a5ceb2 | |||
| 318a6b5afa | |||
| c80685065e | |||
| cdc589f602 | |||
| ee6acb7980 | |||
| 515ef06589 | |||
| 344cce9461 | |||
| 536690dc55 | |||
| 4fc5a87c13 | |||
| 263061e7ce | |||
| 0b7cad82d5 | |||
| 63d35f678d | |||
| 16b9ca79f2 | |||
| 792ad9d777 | |||
| b6ecaa3934 | |||
| bb4ce5505a | |||
| d6aad2690c | |||
| cfb2b35bf7 | |||
| 40f6803b90 | |||
| d2c1d815a1 | |||
| 4c8617a419 | |||
| 444db56d90 | |||
| 4b94b11b53 | |||
| 1a9ed04cc2 | |||
| f3d4c64118 | |||
| f908acefd6 | |||
| 7dc63fa775 | |||
| 08e1b46e06 | |||
| 9d613d5a7f | |||
| 6e2dfa26b7 | |||
| 86017e65c0 | |||
| d6e51f0d11 | |||
| c095469214 | |||
| fcf391db55 | |||
| 68b105dd63 | |||
| c54185b348 | |||
| cc42f0a978 | |||
| 073061c8e5 | |||
| e071d792ad | |||
| 072e2991ba | |||
| 8c9597ab0e | |||
| a7dbe61535 | |||
| a51bf1ab15 | |||
| 1ed71c61ef | |||
| 40ecf536d0 | |||
| 32cab3d4eb | |||
| 4c7a61ecd0 | |||
| 0b1f36cc96 | |||
| 902ca819c5 | |||
| fcad40ec66 | |||
| f448f023f8 | |||
| 05a3a383ee | |||
| 54f24d93a3 | |||
| 395b6704fd | |||
| 79be8a8173 | |||
| 7f3a55cee4 | |||
| c2d722d5fe | |||
| 91d71b295b | |||
| c1afa24d7a | |||
| 081e4e4fa7 |
+1
-1
@@ -2,7 +2,7 @@ root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
+6
-1
@@ -46,7 +46,12 @@ module.exports = {
|
||||
"react/prop-types": "off",
|
||||
"import/no-cycle": "off",
|
||||
"prefer-promise-reject-errors": "off",
|
||||
"react/jsx-no-target-blank": "off"
|
||||
"react/jsx-no-target-blank": "off",
|
||||
"@typescript-eslint/ban-types": ["error", {
|
||||
types: {
|
||||
Function: false,
|
||||
}
|
||||
}]
|
||||
},
|
||||
parserOptions: {
|
||||
ecmaVersion: 2020,
|
||||
|
||||
@@ -27,3 +27,6 @@ npm-debug.log.*
|
||||
*.css.d.ts
|
||||
*.sass.d.ts
|
||||
*.scss.d.ts
|
||||
|
||||
# externals
|
||||
externals/bs-admin-start/target/*
|
||||
|
||||
+244
-1
@@ -1,4 +1,247 @@
|
||||
## [0.2.0](https://github.com/Zagrios/bs-manager/releases/tag/v0.2.0) (October 23, 2022)
|
||||
## Not released yet ~
|
||||
|
||||
## [1.4.3](https://github.com/Zagrios/bs-manager/releases/tag/v1.4.3) (Dec 27, 2023)
|
||||
|
||||
### Features
|
||||
- It's now possible to save Oculus token entered manually with a password #383
|
||||
|
||||
### Fixes
|
||||
- Fixed issue where the latest Beat Saber version was misordered #379
|
||||
|
||||
### Other changes
|
||||
- Re-enabled Oculus downgrade with manual token input #383
|
||||
|
||||
## [1.4.2](https://github.com/Zagrios/bs-manager/releases/tag/v1.4.2) (Dec 17, 2023)
|
||||
|
||||
### Features
|
||||
- Added Traditional Chinese translation (thanks to @mant0u0) #372
|
||||
|
||||
### Fixes
|
||||
- Fixed an issue with keyboard navigation in the downloadable versions list [344e7ab](https://github.com/Zagrios/bs-manager/commit/344e7abc95130cfa44d9fa51365a5161c9f378a6)
|
||||
- Fixed an issue where automatic Steam version detection was not working for some users #375
|
||||
|
||||
### Other changes
|
||||
- Temporarily disabled Oculus downgrade #377
|
||||
- Recommended version now appears first in the versions list #376
|
||||
- Updated the "Broken Models" notification #378
|
||||
|
||||
## [1.4.1](https://github.com/Zagrios/bs-manager/releases/tag/v1.4.1) (Dec 5, 2023)
|
||||
|
||||
### Features
|
||||
- Added Japanese translation (thanks to @emesan22) #365
|
||||
|
||||
### Fixes
|
||||
- Fixed a JavaScript error that occurred when closing a window during a download #366
|
||||
- Resolved text overflow issue with the Spanish translation #367
|
||||
- Fixed an issue where downloading a playlist was not possible if a version do not has the "CustomLevel" folder #368
|
||||
- Installing a playlist now doesn't download maps that are already present #369
|
||||
|
||||
## [1.4.0](https://github.com/Zagrios/bs-manager/releases/tag/v1.4.0) (Nov 28, 2023)
|
||||
|
||||
### Features
|
||||
- Oculus PCVR support #346
|
||||
- The most moddable version now have a “Recommended” banner #354
|
||||
- Chinese translation has been added (thanks to @ktKongTong)
|
||||
|
||||
### Fixes
|
||||
- BSManager crashes if too many OneClick downloads are done at the same time #340
|
||||
- Unable to download playlists with OneClick from some websites #349
|
||||
- "Refresh list" was updating available versions but not installed versions #351
|
||||
- Prevent launching a version that is currently downloading #355
|
||||
- Prioritize IPv4 to avoid IPv6 issues #353
|
||||
- Import version progress bar is now accurate #358
|
||||
|
||||
### Other changes
|
||||
- Fix french translation misspelling and standardize the "Beat Saber" name #341 (Thanks to @Synaelle)
|
||||
|
||||
## [1.3.2](https://github.com/Zagrios/bs-manager/releases/tag/v1.3.2) (Oct 8, 2023)
|
||||
|
||||
### Fixes
|
||||
- Maps or Playlists couldn't be downloaded with OneClick if maps were linked #331 #337
|
||||
- Mishandling of additional launch arguments when launching from a shortcut #335
|
||||
- Incorrect English translation #336
|
||||
|
||||
## [1.3.1](https://github.com/Zagrios/bs-manager/releases/tag/v1.3.1) (Oct 2, 2023)
|
||||
|
||||
### Features
|
||||
- Beat Saber versions now automatically sync with LIV #320
|
||||
- Use ArcViewer to preview maps #312
|
||||
|
||||
### Fixes
|
||||
- SteamVR backup folder is now restored when disabling FPFC Mode #314
|
||||
- OneClick installs now correctly place contents in user-defined symlinks #311
|
||||
- Currently downloading Beat Saber version no longer disappears on uninstalling a version #307
|
||||
- Add "no-yeet" argument when launching Beat Saber to prevent mods to be removed if "UserData" is linked #321
|
||||
- Fixed a rare bug that prevent BSManager from launching due to a missing DLL #328
|
||||
- Increase the SteamVR restore timeout to prevent it from launching in FPFC Mode #330
|
||||
|
||||
### Other changes
|
||||
- Improved Spanish translation #309 (Thanks to @GabiRP)
|
||||
- For new installations, the default folder for BSManager contents has been moved from "Documents" to the "User" directory to avoid OneDrive conflicts #319
|
||||
|
||||
## [1.3.0](https://github.com/Zagrios/bs-manager/releases/tag/v1.3.0) (Aug 10, 2023)
|
||||
|
||||
### Features
|
||||
- Steam now launches automatically if needed when starting a version of Beat Saber #255
|
||||
- Create shortcuts to launch Beat Saber more quickly without going through BSManager #282
|
||||
- Russian translation has been added (thanks to @Dead0Duck)
|
||||
- Download Beat Saber versions without enter your credentials using QR code to login #293
|
||||
- Login approval from the Steam app is now being handled #293
|
||||
|
||||
### Fixes
|
||||
- Unable to delete maps from shared content #262
|
||||
- Maps are no longer loaded unnecessarily when not accessing the map tab #261
|
||||
- BSManager no longer crashes when it loads tons of maps #288
|
||||
- Loading maps is faster and consumes a lot less memory #288
|
||||
- Prevent installed mods from being downgraded after mods installation #291
|
||||
- Window title of BSManager no longer become "index.html" after closing settings #290
|
||||
- Models' texts color within the download modal in light theme is now correct #296
|
||||
- Downloading versions of Beat Saber now works on Linux #297 (thanks to @Insprill)
|
||||
- Fix the ability to focus on non-visible elements #299
|
||||
|
||||
### Other changes
|
||||
- Corrections and adjustments of some translations for better clarity #249 #279 (Thanks to @AltyFox and @KnuckleDF)
|
||||
- Improved compatibility with Linux (Thanks to @RedlineTriad and @Insprill)
|
||||
- Alpha versions should now update to the latest Stable version when its available #294
|
||||
|
||||
## [1.2.0](https://github.com/Zagrios/bs-manager/releases/tag/v1.2.0) (Jun 16, 2023)
|
||||
|
||||
### Features
|
||||
- Add models management #218
|
||||
- Hexadecimal field has been added in color pickers #236
|
||||
- "Show Password" button has been added in the login modal #244
|
||||
|
||||
### Fixes
|
||||
- Made permission error not possible when installing mods #219
|
||||
- Fix progress collision when switching versions while maps are being loaded #220
|
||||
- Some mods do not show as installed after an update #231
|
||||
- Some mods are not marked as updated, after a mods update #229
|
||||
- Shortcut to BSManager had an incorrect description #240
|
||||
- Mod LookupID was never shown as installed #242
|
||||
- Usernames with spaces were not supported for Steam login #243
|
||||
- Can't clone Steam version without renaming it #248
|
||||
|
||||
### Other changes
|
||||
- Some UI elements have been reorganized to make usage more pleasant #218
|
||||
- Initial loading of mods is now faster #232
|
||||
- A warning has been added when the Steam password exceeds 64 characters #225
|
||||
|
||||
## [1.1.1](https://github.com/Zagrios/bs-manager/releases/tag/v1.1.1) (Apr 13, 2023)
|
||||
|
||||
### Features
|
||||
- Add German translation #198 #199 (thanks @XCraftTM)
|
||||
- Add message when no mods are available #197
|
||||
- Add button to link all folders at once #204
|
||||
- Add indicator when a supporter is clickable #208
|
||||
|
||||
### Fixes
|
||||
- Fix error with mods management when offline #202
|
||||
- Can't open supporter link #207
|
||||
- Change color of diamond supporters to match the discord role color #208
|
||||
- Error when spaces are present in Steam Guard code #209
|
||||
- Unable to move contents folder of BSManager when parent folder is named "BSManager" #210
|
||||
- Unable to move contents folder of BSManager to another drive if symlinks are present #210
|
||||
- Improve resilience to errors when moving contents folder of BSManager #210
|
||||
- A strange bug prevents the launch of Beat Saber for some people #215
|
||||
|
||||
### Other changes
|
||||
- Add BeatLeader icon in OneClicks settings #193
|
||||
|
||||
## [1.1.0](https://github.com/Zagrios/bs-manager/releases/tag/v1.1.0) (Mar 24, 2023)
|
||||
|
||||
### Features
|
||||
- Custom folders can now be shared between BeatSaber versions #176
|
||||
- Advanced launch options to add custom launch arguments for BeatSaber #179
|
||||
- Added an indicator if the current version is a preview #185
|
||||
|
||||
### Fixes
|
||||
- Disable SteamVR when "Desktop Mode" is enabled #181
|
||||
- Fix some UI bugs #175
|
||||
- Reactivate support button #183
|
||||
- Installing an older version of a mod overwrites the most recent version installed #186
|
||||
- On version cloning, contents of linked folders no longer duplicate #189
|
||||
- Now, the content of a shared folder is moved instead of being duplicated if no other version uses this shared folder #191
|
||||
|
||||
## [1.0.4](https://github.com/Zagrios/bs-manager/releases/tag/v1.0.4) (Mar 4, 2023)
|
||||
|
||||
### Features
|
||||
- Add volume control #154
|
||||
|
||||
### Fixes
|
||||
- Fix some English translations #153 #151 #167
|
||||
- The debug console does not open #158
|
||||
- Can't enable Oculus and Desktop mode in the same time #159
|
||||
- Pause Map song on open preview #160
|
||||
- Reduces map loading time by 20 to 40% depending on configuration (still work on that) #161
|
||||
- Mods menu partially hidden when no mods listed #165
|
||||
- Fix light theme issues #168
|
||||
- The .NET installation request notification sometimes does not appear #170
|
||||
- Change Oculus Mode description #166
|
||||
|
||||
### Other changes
|
||||
- We have added an explanation of why we need your Steam credentials to download a BeatSaber version #164
|
||||
|
||||
## [1.0.3](https://github.com/Zagrios/bs-manager/releases/tag/v1.0.3) (Feb 28, 2023)
|
||||
|
||||
### Fixes
|
||||
- Can't download Beat Saber version if there are spaces in the folder path
|
||||
|
||||
## [1.0.2](https://github.com/Zagrios/bs-manager/releases/tag/v1.0.2) (Feb 24, 2023)
|
||||
|
||||
### Fixes
|
||||
- Huge RAM usage optimization in maps list #140
|
||||
- Maps deletion is way faster #140
|
||||
- Maps progress bars are now accurate #140
|
||||
- Maps loading is slightly faster #140
|
||||
- Other little optimizations for the Maps management feature #140
|
||||
- OneClick install for Maps not work if no Beat Saber version is installed #141
|
||||
- Little English translation fix #143
|
||||
|
||||
## [1.0.1](https://github.com/Zagrios/bs-manager/releases/tag/v1.0.1) (Feb 6, 2023)
|
||||
|
||||
### Fixes
|
||||
- Some French translation corrections #133
|
||||
- Update the default Mods to be more consistent with ModAssistant #132 #135
|
||||
- Disable the `Support BSManager` button due to the change of the donation platform #134
|
||||
|
||||
## [1.0.0](https://github.com/Zagrios/bs-manager/releases/tag/v1.0.0) (Jan 26, 2023)
|
||||
|
||||
### Breaking Change
|
||||
|
||||
- Config file have been moved to contents folder of BSManager to keep user config even if it exports the contents folder to another pc #55
|
||||
- Versions file system have been modified to be more reliable #118
|
||||
|
||||
### Features
|
||||
|
||||
- Maps Management #35
|
||||
- OneClick installs (maps, playlists, models) #35
|
||||
- Oculus BeatSaber detection #17
|
||||
- Lunch Steam from BSManager #37
|
||||
- Alert if dotnet is not installed #54
|
||||
- Swipe notification to close it #40
|
||||
- Add discord button in settings #46
|
||||
- Add Mods disclaimer #50
|
||||
- Some UI tweaks #39 #51
|
||||
- Moving from Patreon to Mee6 #86
|
||||
- Add launch mod infos #11
|
||||
- Can import external BeatSaber installs #121
|
||||
- Add Web installer
|
||||
|
||||
### Fixes
|
||||
|
||||
- Outdated mod not seen as outdated #36
|
||||
- Settings close button was stuck when scrolling #85
|
||||
- Error when try to loading mods without internet #87
|
||||
- Can't manage any version if Oculus app is not installed #101
|
||||
- Download version button overlap with the spin loader #99
|
||||
- After uninstall last BeatSaber version we stay on the same page #105
|
||||
- No more files verification in available versions list #126
|
||||
|
||||
### Other Changes
|
||||
|
||||
- Fix high CPU usage #121
|
||||
|
||||
## [0.2.0](https://github.com/Zagrios/bs-manager/releases/tag/v0.2.0) (Oct 23, 2022)
|
||||
|
||||
### Features
|
||||
|
||||
|
||||
@@ -681,5 +681,14 @@
|
||||
"ReleaseImg": "https://clan.akamai.steamstatic.com/images/32055887/ae11d195bbe41a0f244d7b4d055a0ab89f88e5bb.png",
|
||||
"ReleaseDate": "1702309893",
|
||||
"year": "2023"
|
||||
},
|
||||
{
|
||||
"BSVersion": "1.34.5",
|
||||
"BSManifest": "7413405154512822201",
|
||||
"OculusBinaryId": "6639053626194360",
|
||||
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/4036983137766828694",
|
||||
"ReleaseImg": "https://clan.cloudflare.steamstatic.com/images/32055887/925e60f14c6815f7617fde11a894ed20f54a0846.png",
|
||||
"ReleaseDate": "1707745958",
|
||||
"year": "2024"
|
||||
}
|
||||
]
|
||||
@@ -67,5 +67,17 @@
|
||||
"username": "Lumberjack462",
|
||||
"type": "diamond",
|
||||
"link": "https://www.youtube.com/@lumberjack462"
|
||||
},
|
||||
{
|
||||
"username": "Xero"
|
||||
},
|
||||
{
|
||||
"username": "Minescence"
|
||||
},
|
||||
{
|
||||
"username": "Finlay"
|
||||
},
|
||||
{
|
||||
"username": "mereknom"
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
}
|
||||
},
|
||||
"pages": {
|
||||
"shared-maps": {
|
||||
"title": "Geteilte Maps"
|
||||
},
|
||||
"version-viewer": {
|
||||
"launch-mods": {
|
||||
"oculus": "Oculus Modus",
|
||||
@@ -42,7 +39,6 @@
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
"title": "Geteilte Maps",
|
||||
"search-bar": {
|
||||
"search-placeholder": "Suche eine Map",
|
||||
"filters-btn": "Filter",
|
||||
@@ -723,11 +719,22 @@
|
||||
"enter-oculus-token": "Ein Oculus-Token eingeben"
|
||||
},
|
||||
"valid-btn": "Validieren"
|
||||
},
|
||||
"launch-as-admin": {
|
||||
"title": "Administratorberechtigungen",
|
||||
"body": {
|
||||
"info": "Es wurde festgestellt, dass Steam mit Administratorrechten ausgeführt wird. Um mit Steam zu kommunizieren, muss auch Beat Saber als Administrator gestartet werden. Andernfalls könnte Beat Saber Probleme haben und nach dem Starten schließen.",
|
||||
"info-2": "Das Starten von Beat Saber im Administratormodus gibt auch den installierten Mods Administratorrechte. Daher wird empfohlen, Steam ohne Administratorrechte neu zu starten.",
|
||||
"info-3": "Beachten Sie, dass es nicht ratsam ist, Steam Administratorrechte zu geben, da dies auch die installierten Spiele und Mods betrifft und ein Sicherheitsrisiko darstellt."
|
||||
},
|
||||
"launch-as-admin": "Als Administrator starten",
|
||||
"not-remind-me": "Nicht mehr erinnern"
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
"map-filter-panel": {
|
||||
"duration": "Länge",
|
||||
"nps" : "Noten Pro Sekunde",
|
||||
"tags": "Stichworte",
|
||||
"specificities": "Allgemein",
|
||||
"requirements": "Anforderungen"
|
||||
@@ -795,7 +802,13 @@
|
||||
},
|
||||
"map-item": {
|
||||
"by": "Von {songAutor}",
|
||||
"mapped-by": "Gemapped von"
|
||||
"mapped-by": "Gemapped von",
|
||||
"delete": "Löschen",
|
||||
"preview" : "Kartenvorschau",
|
||||
"bsr-code" : "BSR Code",
|
||||
"download" : "Karte herunterladen",
|
||||
"downloading" :"Karte wird heruntergeladen",
|
||||
"cancel-download" : "Download abbrechen"
|
||||
}
|
||||
},
|
||||
"models": {
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
}
|
||||
},
|
||||
"pages": {
|
||||
"shared-maps": {
|
||||
"title": "Shared maps"
|
||||
},
|
||||
"version-viewer": {
|
||||
"launch-mods": {
|
||||
"oculus": "Oculus Mode",
|
||||
@@ -42,7 +39,6 @@
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
"title": "Shared maps",
|
||||
"search-bar": {
|
||||
"search-placeholder": "Search a map",
|
||||
"filters-btn": "Filters",
|
||||
@@ -723,11 +719,22 @@
|
||||
"enter-oculus-token": "Enter an Oculus token"
|
||||
},
|
||||
"valid-btn": "Validate"
|
||||
},
|
||||
"launch-as-admin": {
|
||||
"title": "Administrator Permissions",
|
||||
"body": {
|
||||
"info": "Steam has been detected as running with administrator permissions. To communicate with Steam, Beat Saber must also be launched as an administrator. Otherwise, Beat Saber might experience problems and close after launching.",
|
||||
"info-2": "Launching Beat Saber in administrator mode will also give administrator rights to the installed mods. Therefore, it is recommended to restart Steam without administrator permissions.",
|
||||
"info-3": "Note that it is advised against giving administrator rights to Steam, as this affects the installed games and mods, presenting a security risk."
|
||||
},
|
||||
"launch-as-admin": "Launch as Administrator",
|
||||
"not-remind-me": "Do not remind me"
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
"map-filter-panel": {
|
||||
"duration": "Duration",
|
||||
"nps" : "Notes Per Second",
|
||||
"tags": "tags",
|
||||
"specificities": "general",
|
||||
"requirements": "requirements"
|
||||
@@ -795,7 +802,13 @@
|
||||
},
|
||||
"map-item": {
|
||||
"by": "By {songAutor}",
|
||||
"mapped-by": "mapped by"
|
||||
"mapped-by": "mapped by",
|
||||
"delete": "Delete",
|
||||
"preview" : "Preview map",
|
||||
"bsr-code" : "BSR code",
|
||||
"download" : "Download map",
|
||||
"downloading" :"Downloading map",
|
||||
"cancel-download" : "Cancel download"
|
||||
}
|
||||
},
|
||||
"models": {
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
}
|
||||
},
|
||||
"pages": {
|
||||
"shared-maps": {
|
||||
"title": "Mapas comunes"
|
||||
},
|
||||
"version-viewer": {
|
||||
"launch-mods": {
|
||||
"oculus": "Modo Oculus",
|
||||
@@ -722,11 +719,22 @@
|
||||
"enter-oculus-token": "Introducir un token de Oculus"
|
||||
},
|
||||
"valid-btn": "Validar"
|
||||
},
|
||||
"launch-as-admin": {
|
||||
"title": "Permisos Administrador",
|
||||
"body": {
|
||||
"info": "Se ha detectado que Steam está funcionando con permisos de administrador. Para comunicarse con Steam, Beat Saber también debe iniciarse como administrador. De lo contrario, Beat Saber podría experimentar problemas y cerrarse después de iniciar.",
|
||||
"info-2": "Iniciar Beat Saber en modo administrador también otorgará derechos de administrador a los mods instalados. Por lo tanto, se recomienda reiniciar Steam sin permisos de administrador.",
|
||||
"info-3": "Tenga en cuenta que se desaconseja otorgar derechos de administrador a Steam, ya que esto afecta a los juegos y mods instalados, presentando un riesgo de seguridad."
|
||||
},
|
||||
"launch-as-admin": "Iniciar como Administrador",
|
||||
"not-remind-me": "No volver a recordármelo"
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
"map-filter-panel": {
|
||||
"duration": "Duración",
|
||||
"nps" : "Notas Por Segundo",
|
||||
"tags": "tags",
|
||||
"specificities": "general",
|
||||
"requirements": "requisitos"
|
||||
@@ -794,7 +802,13 @@
|
||||
},
|
||||
"map-item": {
|
||||
"by": "Por {songAutor}",
|
||||
"mapped-by": "mapeado por"
|
||||
"mapped-by": "mapeado por",
|
||||
"delete": "Borrar",
|
||||
"preview" : "Vista previa del mapa",
|
||||
"bsr-code" : "Código BSR",
|
||||
"download" : "Descargar mapa",
|
||||
"downloading" :"Descargando mapa",
|
||||
"cancel-download" : "Cancelar descarga"
|
||||
}
|
||||
},
|
||||
"models": {
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
}
|
||||
},
|
||||
"pages": {
|
||||
"shared-maps": {
|
||||
"title": "Maps partagées"
|
||||
},
|
||||
"version-viewer": {
|
||||
"launch-mods": {
|
||||
"oculus": "Mode Oculus",
|
||||
@@ -230,8 +227,11 @@
|
||||
"steam-download": {
|
||||
"warnings": {
|
||||
"msg": {
|
||||
"ManifestChecksum": "Le manifeste précédemment téléchargé ne correspond pas au nouveau 🤔",
|
||||
"ConnectionTimeout": "Ta connexion internet semble instable 🥶",
|
||||
"Unknown": "Quelque chose d'étrange s'est produit 🤔 Votre connexion est surement instable."
|
||||
"ConnectionLost": "La connexion a été perdue, essayez à nouveau...",
|
||||
"ConnectionError": "Impossible de se connecter à Steam, essayez à nouveau...",
|
||||
"Unknown": "Quelque chose d'étrange s'est produit 🤔 Votre connexion est probablement instable."
|
||||
}
|
||||
},
|
||||
"errors": {
|
||||
@@ -719,11 +719,22 @@
|
||||
"enter-oculus-token": "Entrer un token Oculus"
|
||||
},
|
||||
"valid-btn": "Valider"
|
||||
},
|
||||
"launch-as-admin": {
|
||||
"title": "Permissions Administrateur",
|
||||
"body": {
|
||||
"info": "Steam a été détecté comme fonctionnant avec des permissions administrateur. Afin communiquer avec Steam, Beat Saber doit également être lancé en tant qu'administrateur. Dans le cas contraire, Beat Saber pourrait rencontrer des problèmes et se fermer après son lancement.",
|
||||
"info-2": "Lancer Beat Saber en mode administrateur donnera également les droits administrateur aux mods installés. Il est donc plutôt recommandé de redémarrer Steam sans permissions administrateur.",
|
||||
"info-3": "Notez qu'il est déconseillé de donner des droits d'administrateur à Steam, car cela affecte également les jeux et mods installés, présentant un risque pour la sécurité."
|
||||
},
|
||||
"launch-as-admin": "Lancer en administateur",
|
||||
"not-remind-me": "Ne plus me rappeler"
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
"map-filter-panel": {
|
||||
"duration": "Durée",
|
||||
"nps" : "Notes Par Seconde",
|
||||
"tags": "tags",
|
||||
"specificities": "général",
|
||||
"requirements": "requis"
|
||||
@@ -791,7 +802,13 @@
|
||||
},
|
||||
"map-item": {
|
||||
"by": "Par {songAutor}",
|
||||
"mapped-by": "mappée par"
|
||||
"mapped-by": "mappée par",
|
||||
"delete": "Supprimer",
|
||||
"preview" : "Aperçu de la carte",
|
||||
"bsr-code" : "Code BSR",
|
||||
"download" : "Télécharger la carte",
|
||||
"downloading" :"Téléchargement de la carte",
|
||||
"cancel-download" : "Annuler le téléchargement"
|
||||
}
|
||||
},
|
||||
"models": {
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
}
|
||||
},
|
||||
"pages": {
|
||||
"shared-maps": {
|
||||
"title": "共有マップ"
|
||||
},
|
||||
"version-viewer": {
|
||||
"launch-mods": {
|
||||
"oculus": "Oculusモード",
|
||||
@@ -42,7 +39,6 @@
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
"title": "共有マップ",
|
||||
"search-bar": {
|
||||
"search-placeholder": "マップを検索",
|
||||
"filters-btn": "絞り込み",
|
||||
@@ -723,11 +719,22 @@
|
||||
"enter-oculus-token": "オキュラストークンを入力する"
|
||||
},
|
||||
"valid-btn": "確認"
|
||||
},
|
||||
"launch-as-admin": {
|
||||
"title": "管理者権限",
|
||||
"body": {
|
||||
"info": "Steamが管理者権限で動作していることが検出されました。Steamと通信するためには、Beat Saberも管理者として起動する必要があります。そうでない場合、Beat Saberは問題が発生し、起動後に終了する可能性があります。",
|
||||
"info-2": "管理者モードでBeat Saberを起動すると、インストールされたMODにも管理者権限が与えられます。そのため、管理者権限なしでSteamを再起動することをお勧めします。",
|
||||
"info-3": "Steamに管理者権限を与えることはお勧めできません。これはインストールされたゲームやMODにも影響を与え、セキュリティリスクをもたらすからです。"
|
||||
},
|
||||
"launch-as-admin": "管理者として起動",
|
||||
"not-remind-me": "Больше не напоминать"
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
"map-filter-panel": {
|
||||
"duration": "尺",
|
||||
"nps" : "秒間ノート数",
|
||||
"tags": "タグ",
|
||||
"specificities": "一般",
|
||||
"requirements": "要Mod"
|
||||
@@ -795,7 +802,13 @@
|
||||
},
|
||||
"map-item": {
|
||||
"by": "By {songAutor}",
|
||||
"mapped-by": "作成者 "
|
||||
"mapped-by": "作成者 ",
|
||||
"delete": "削除",
|
||||
"preview" : "マッププレビュー",
|
||||
"bsr-code" : "BSRコード",
|
||||
"download" : "マップをダウンロード",
|
||||
"downloading" :"マップをダウンロード中",
|
||||
"cancel-download" : "ダウンロードをキャンセル"
|
||||
}
|
||||
},
|
||||
"models": {
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
}
|
||||
},
|
||||
"pages": {
|
||||
"shared-maps": {
|
||||
"title": "Общие карты"
|
||||
},
|
||||
"version-viewer": {
|
||||
"launch-mods": {
|
||||
"oculus": "Режим Oculus",
|
||||
@@ -42,7 +39,6 @@
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
"title": "Общие карты",
|
||||
"search-bar": {
|
||||
"search-placeholder": "Поиск среди карт",
|
||||
"filters-btn": "Фильтр",
|
||||
@@ -723,11 +719,21 @@
|
||||
"enter-oculus-token": "Введите токен Oculus"
|
||||
},
|
||||
"valid-btn": "Подтвердить"
|
||||
},
|
||||
"launch-as-admin": {
|
||||
"title": "Права Администратора",
|
||||
"body": {
|
||||
"info": "Обнаружено, что Steam работает с правами администратора. Чтобы связаться со Steam, Beat Saber также должен быть запущен от имени администратора. В противном случае Beat Saber может столкнуться с проблемами и закрыться после запуска.",
|
||||
"info-2": "Запуск Beat Saber в режиме администратора также даст права администратора установленным модам. Поэтому рекомендуется перезапустить Steam без прав администратора.",
|
||||
"info-3": "Обратите внимание, что не рекомендуется предоставлять права администратора Steam, так как это также влияет на установленные игры и моды, представляя угрозу безопасности."
|
||||
},
|
||||
"launch-as-admin": "Запустить от имени администратора"
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
"map-filter-panel": {
|
||||
"duration": "Длительность",
|
||||
"nps" : "Нот в Секунду",
|
||||
"tags": "тэги",
|
||||
"specificities": "основное",
|
||||
"requirements": "требуемые моды"
|
||||
@@ -795,7 +801,13 @@
|
||||
},
|
||||
"map-item": {
|
||||
"by": "От {songAutor}",
|
||||
"mapped-by": "автор карты "
|
||||
"mapped-by": "автор карты ",
|
||||
"delete": "Удалить",
|
||||
"preview" : "Предпросмотр карты",
|
||||
"bsr-code" : "Код BSR",
|
||||
"download" : "Скачать карту",
|
||||
"downloading" :"Загрузка карты",
|
||||
"cancel-download" : "Отменить загрузку"
|
||||
}
|
||||
},
|
||||
"models": {
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
}
|
||||
},
|
||||
"pages": {
|
||||
"shared-maps": {
|
||||
"title": "共享譜面 "
|
||||
},
|
||||
"version-viewer": {
|
||||
"launch-mods": {
|
||||
"oculus": "Oculus 模式",
|
||||
@@ -42,7 +39,6 @@
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
"title": "Shared maps",
|
||||
"search-bar": {
|
||||
"search-placeholder": "譜面搜尋",
|
||||
"filters-btn": "篩選",
|
||||
@@ -653,7 +649,6 @@
|
||||
"valid-btn": "取消關聯譜面"
|
||||
}
|
||||
},
|
||||
|
||||
"download-maps": {
|
||||
"search-btn": "搜尋",
|
||||
"loading-maps": "譜面載入中...",
|
||||
@@ -724,11 +719,22 @@
|
||||
"enter-oculus-token": "輸入Oculus令牌"
|
||||
},
|
||||
"valid-btn": "驗證"
|
||||
},
|
||||
"launch-as-admin": {
|
||||
"title": "管理員權限",
|
||||
"body": {
|
||||
"info": "檢測到Steam正在以管理員權限運行。為了與Steam通信,Beat Saber也必須以管理員身份啟動。否則,Beat Saber可能會遇到問題並在啟動後關閉。",
|
||||
"info-2": "以管理員模式啟動Beat Saber還會將管理員權限賦予已安裝的模組。因此,建議重啟Steam,不使用管理員權限。",
|
||||
"info-3": "請注意,不建議給Steam管理員權限,因為這也會影響已安裝的遊戲和模組,帶來安全風險。"
|
||||
},
|
||||
"launch-as-admin": "以管理員身份啟動",
|
||||
"not-remind-me": "不再提醒我"
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
"map-filter-panel": {
|
||||
"duration": "時長",
|
||||
"nps" : "每秒音符數",
|
||||
"tags": "標籤",
|
||||
"specificities": "general",
|
||||
"requirements": "要求"
|
||||
@@ -796,7 +802,13 @@
|
||||
},
|
||||
"map-item": {
|
||||
"by": "By {songAutor}",
|
||||
"mapped-by": "mapped by"
|
||||
"mapped-by": "mapped by",
|
||||
"delete": "刪除",
|
||||
"preview" : "預覽地圖",
|
||||
"bsr-code" : "BSR代碼",
|
||||
"download" : "下載地圖",
|
||||
"downloading" :"正在下載地圖",
|
||||
"cancel-download" : "取消下載"
|
||||
}
|
||||
},
|
||||
"models": {
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
}
|
||||
},
|
||||
"pages": {
|
||||
"shared-maps": {
|
||||
"title": "共享谱面"
|
||||
},
|
||||
"version-viewer": {
|
||||
"launch-mods": {
|
||||
"oculus": "Oculus 模式",
|
||||
@@ -42,7 +39,6 @@
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
"title": "Shared maps",
|
||||
"search-bar": {
|
||||
"search-placeholder": "谱面搜索",
|
||||
"filters-btn": "筛选",
|
||||
@@ -653,7 +649,6 @@
|
||||
"valid-btn": "取消关联谱面"
|
||||
}
|
||||
},
|
||||
|
||||
"download-maps": {
|
||||
"search-btn": "搜索",
|
||||
"loading-maps": "谱面加载中...",
|
||||
@@ -724,11 +719,22 @@
|
||||
"enter-oculus-token": "输入Oculus令牌"
|
||||
},
|
||||
"valid-btn": "验证"
|
||||
},
|
||||
"launch-as-admin": {
|
||||
"title": "管理员权限",
|
||||
"body": {
|
||||
"info": "检测到Steam正在以管理员权限运行。为了与Steam通信,Beat Saber也必须以管理员身份启动。否则,Beat Saber可能会遇到问题并在启动后关闭。",
|
||||
"info-2": "以管理员模式启动Beat Saber还会将管理员权限赋予已安装的模组。因此,建议重启Steam,不使用管理员权限。",
|
||||
"info-3": "请注意,不建议给Steam管理员权限,因为这也会影响已安装的游戏和模组,带来安全风险。"
|
||||
},
|
||||
"launch-as-admin": "以管理员身份启动",
|
||||
"not-remind-me": "不再提醒我"
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
"map-filter-panel": {
|
||||
"duration": "时长",
|
||||
"nps" : "每秒音符数",
|
||||
"tags": "标签",
|
||||
"specificities": "general",
|
||||
"requirements": "要求"
|
||||
@@ -796,7 +802,13 @@
|
||||
},
|
||||
"map-item": {
|
||||
"by": "By {songAutor}",
|
||||
"mapped-by": "mapped by"
|
||||
"mapped-by": "mapped by",
|
||||
"delete": "删除",
|
||||
"preview" : "预览地图",
|
||||
"bsr-code" : "BSR代码",
|
||||
"download" : "下载地图",
|
||||
"downloading" :"正在下载地图",
|
||||
"cancel-download" : "取消下载"
|
||||
}
|
||||
},
|
||||
"models": {
|
||||
|
||||
Binary file not shown.
+2
@@ -0,0 +1,2 @@
|
||||
[target.x86_64-pc-windows-msvc]
|
||||
rustflags = ["-C", "target-feature=+crt-static"]
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.76"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.35"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.195"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.195"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "start_beat_saber_admin"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"winres",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.48"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
version = "0.5.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
|
||||
|
||||
[[package]]
|
||||
name = "winres"
|
||||
version = "0.1.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b68db261ef59e9e52806f688020631e987592bd83619edccda9c47d42cde4f6c"
|
||||
dependencies = [
|
||||
"toml",
|
||||
]
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
[package]
|
||||
name = "start_beat_saber_admin"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
build = "build.rs"
|
||||
|
||||
[build-dependencies]
|
||||
winres = "0.1.12"
|
||||
|
||||
[profile.release]
|
||||
codegen-units = 1
|
||||
lto = true
|
||||
opt-level = "z"
|
||||
|
||||
[package.metadata.winres]
|
||||
FileDescription = "Start Beat Saber as Admin"
|
||||
LegalCopyright = "Copyright © 2024 Zagrios"
|
||||
CompanyName = "Zagrios"
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
extern crate winres;
|
||||
|
||||
fn main() {
|
||||
if cfg!(target_os = "windows") {
|
||||
let mut res = winres::WindowsResource::new();
|
||||
res.set_manifest(r#"
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
||||
"#);
|
||||
res.set_icon("./icon.ico");
|
||||
res.compile().unwrap();
|
||||
}
|
||||
}
|
||||
Vendored
BIN
Binary file not shown.
|
After Width: | Height: | Size: 67 KiB |
Vendored
+47
@@ -0,0 +1,47 @@
|
||||
|
||||
use std::{process::Command, path::Path};
|
||||
|
||||
const EXECUTABLE_NAME: &str = "Beat Saber.exe";
|
||||
const AUTORIZED_ARGS: [&str; 8] = [
|
||||
"fpfc",
|
||||
"-vrmode",
|
||||
"oculus",
|
||||
"--verbose",
|
||||
"--no-yeet",
|
||||
"--disable-autoupdate",
|
||||
"--combine-logs",
|
||||
"editor"
|
||||
];
|
||||
|
||||
fn main() {
|
||||
let args: Vec<String> = std::env::args().collect();
|
||||
|
||||
let executable_path = Path::new(&args[1]);
|
||||
|
||||
if executable_path.file_name().unwrap() != EXECUTABLE_NAME {
|
||||
eprintln!("Executable path is not Beat Saber.exe.");
|
||||
return;
|
||||
}
|
||||
|
||||
if !executable_path.exists() || !executable_path.is_file() {
|
||||
eprintln!("Executable path is not valid.");
|
||||
return;
|
||||
}
|
||||
|
||||
let mut command = Command::new(executable_path);
|
||||
|
||||
if let Some(parent_dir) = executable_path.parent() {
|
||||
command.current_dir(parent_dir);
|
||||
}
|
||||
|
||||
for arg in args.iter().skip(2) {
|
||||
if !AUTORIZED_ARGS.contains(&arg.as_str()) {
|
||||
continue;
|
||||
}
|
||||
command.arg(arg);
|
||||
}
|
||||
|
||||
command.env("SteamAppId", "620980");
|
||||
|
||||
let _ = command.spawn();
|
||||
}
|
||||
Generated
+288
-18
@@ -24,6 +24,7 @@
|
||||
"framer-motion": "^10.16.16",
|
||||
"fs-extra": "^11.2.0",
|
||||
"history": "^5.3.0",
|
||||
"is-elevated": "^3.0.0",
|
||||
"jszip": "^3.10.1",
|
||||
"md5-file": "^5.0.0",
|
||||
"node-abi": "^3.47.0",
|
||||
@@ -4952,9 +4953,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001508",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001508.tgz",
|
||||
"integrity": "sha512-sdQZOJdmt3GJs1UMNpCCCyeuS2IEGLXnHyAo9yIO5JJDjbjoVRij4M1qep6P6gFpptD1PqIYgzM+gwJbOi92mw==",
|
||||
"version": "1.0.30001572",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001572.tgz",
|
||||
"integrity": "sha512-1Pbh5FLmn5y4+QhNyJE9j3/7dK44dGB83/ZMjv/qJk86TvDbjk0LosiZo0i0WB0Vx607qMX9jYrn1VLHCkN4rw==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -7047,7 +7048,6 @@
|
||||
"version": "1.4.4",
|
||||
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
|
||||
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"once": "^1.4.0"
|
||||
}
|
||||
@@ -10291,6 +10291,125 @@
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/is-admin": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-admin/-/is-admin-3.0.0.tgz",
|
||||
"integrity": "sha512-wOa3CXFJAu8BZ2BDtG9xYOOrsq6oiSvc2jFPy4X/HINx5bmJUcW8e+apItVbU2E7GIfBVaFVO7Zit4oAWtTJcw==",
|
||||
"dependencies": {
|
||||
"execa": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/is-admin/node_modules/cross-spawn": {
|
||||
"version": "6.0.5",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
|
||||
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
|
||||
"dependencies": {
|
||||
"nice-try": "^1.0.4",
|
||||
"path-key": "^2.0.1",
|
||||
"semver": "^5.5.0",
|
||||
"shebang-command": "^1.2.0",
|
||||
"which": "^1.2.9"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.8"
|
||||
}
|
||||
},
|
||||
"node_modules/is-admin/node_modules/execa": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
|
||||
"integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
|
||||
"dependencies": {
|
||||
"cross-spawn": "^6.0.0",
|
||||
"get-stream": "^4.0.0",
|
||||
"is-stream": "^1.1.0",
|
||||
"npm-run-path": "^2.0.0",
|
||||
"p-finally": "^1.0.0",
|
||||
"signal-exit": "^3.0.0",
|
||||
"strip-eof": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/is-admin/node_modules/get-stream": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
|
||||
"integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
|
||||
"dependencies": {
|
||||
"pump": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/is-admin/node_modules/is-stream": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
|
||||
"integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/is-admin/node_modules/npm-run-path": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
|
||||
"integrity": "sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==",
|
||||
"dependencies": {
|
||||
"path-key": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/is-admin/node_modules/path-key": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
|
||||
"integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==",
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/is-admin/node_modules/semver": {
|
||||
"version": "5.7.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
|
||||
"integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
|
||||
"bin": {
|
||||
"semver": "bin/semver"
|
||||
}
|
||||
},
|
||||
"node_modules/is-admin/node_modules/shebang-command": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
|
||||
"integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==",
|
||||
"dependencies": {
|
||||
"shebang-regex": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/is-admin/node_modules/shebang-regex": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
|
||||
"integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/is-admin/node_modules/which": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
|
||||
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
|
||||
"dependencies": {
|
||||
"isexe": "^2.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"which": "bin/which"
|
||||
}
|
||||
},
|
||||
"node_modules/is-arguments": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz",
|
||||
@@ -10431,6 +10550,18 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/is-elevated": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-elevated/-/is-elevated-3.0.0.tgz",
|
||||
"integrity": "sha512-wjcp6RkouU9jpg55zERl+BglvV5j4jx5c/EMvQ+d12j/+nIEenNWPu+qc0tCg3JkLodbKZMg1qhJzEwG4qjclg==",
|
||||
"dependencies": {
|
||||
"is-admin": "^3.0.0",
|
||||
"is-root": "^2.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/is-extglob": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
||||
@@ -10595,6 +10726,14 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/is-root": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-root/-/is-root-2.1.0.tgz",
|
||||
"integrity": "sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg==",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/is-set": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz",
|
||||
@@ -10760,8 +10899,7 @@
|
||||
"node_modules/isexe": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
||||
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="
|
||||
},
|
||||
"node_modules/isobject": {
|
||||
"version": "3.0.1",
|
||||
@@ -13572,6 +13710,11 @@
|
||||
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/nice-try": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
|
||||
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
|
||||
},
|
||||
"node_modules/no-case": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz",
|
||||
@@ -14080,6 +14223,14 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/p-finally": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
|
||||
"integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==",
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/p-limit": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
|
||||
@@ -15389,7 +15540,6 @@
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
|
||||
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"end-of-stream": "^1.1.0",
|
||||
"once": "^1.3.1"
|
||||
@@ -16629,8 +16779,7 @@
|
||||
"node_modules/signal-exit": {
|
||||
"version": "3.0.7",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
|
||||
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
|
||||
"dev": true
|
||||
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
|
||||
},
|
||||
"node_modules/simple-swizzle": {
|
||||
"version": "0.2.2",
|
||||
@@ -17091,6 +17240,14 @@
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/strip-eof": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
|
||||
"integrity": "sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/strip-final-newline": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
|
||||
@@ -23045,9 +23202,9 @@
|
||||
}
|
||||
},
|
||||
"caniuse-lite": {
|
||||
"version": "1.0.30001508",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001508.tgz",
|
||||
"integrity": "sha512-sdQZOJdmt3GJs1UMNpCCCyeuS2IEGLXnHyAo9yIO5JJDjbjoVRij4M1qep6P6gFpptD1PqIYgzM+gwJbOi92mw==",
|
||||
"version": "1.0.30001572",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001572.tgz",
|
||||
"integrity": "sha512-1Pbh5FLmn5y4+QhNyJE9j3/7dK44dGB83/ZMjv/qJk86TvDbjk0LosiZo0i0WB0Vx607qMX9jYrn1VLHCkN4rw==",
|
||||
"dev": true
|
||||
},
|
||||
"caseless": {
|
||||
@@ -24610,7 +24767,6 @@
|
||||
"version": "1.4.4",
|
||||
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
|
||||
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"once": "^1.4.0"
|
||||
}
|
||||
@@ -26978,6 +27134,94 @@
|
||||
"integrity": "sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng==",
|
||||
"dev": true
|
||||
},
|
||||
"is-admin": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-admin/-/is-admin-3.0.0.tgz",
|
||||
"integrity": "sha512-wOa3CXFJAu8BZ2BDtG9xYOOrsq6oiSvc2jFPy4X/HINx5bmJUcW8e+apItVbU2E7GIfBVaFVO7Zit4oAWtTJcw==",
|
||||
"requires": {
|
||||
"execa": "^1.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"cross-spawn": {
|
||||
"version": "6.0.5",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
|
||||
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
|
||||
"requires": {
|
||||
"nice-try": "^1.0.4",
|
||||
"path-key": "^2.0.1",
|
||||
"semver": "^5.5.0",
|
||||
"shebang-command": "^1.2.0",
|
||||
"which": "^1.2.9"
|
||||
}
|
||||
},
|
||||
"execa": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
|
||||
"integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
|
||||
"requires": {
|
||||
"cross-spawn": "^6.0.0",
|
||||
"get-stream": "^4.0.0",
|
||||
"is-stream": "^1.1.0",
|
||||
"npm-run-path": "^2.0.0",
|
||||
"p-finally": "^1.0.0",
|
||||
"signal-exit": "^3.0.0",
|
||||
"strip-eof": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"get-stream": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
|
||||
"integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
|
||||
"requires": {
|
||||
"pump": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"is-stream": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
|
||||
"integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ=="
|
||||
},
|
||||
"npm-run-path": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
|
||||
"integrity": "sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==",
|
||||
"requires": {
|
||||
"path-key": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"path-key": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
|
||||
"integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw=="
|
||||
},
|
||||
"semver": {
|
||||
"version": "5.7.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
|
||||
"integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g=="
|
||||
},
|
||||
"shebang-command": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
|
||||
"integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==",
|
||||
"requires": {
|
||||
"shebang-regex": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"shebang-regex": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
|
||||
"integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ=="
|
||||
},
|
||||
"which": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
|
||||
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
|
||||
"requires": {
|
||||
"isexe": "^2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"is-arguments": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz",
|
||||
@@ -27073,6 +27317,15 @@
|
||||
"integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
|
||||
"dev": true
|
||||
},
|
||||
"is-elevated": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-elevated/-/is-elevated-3.0.0.tgz",
|
||||
"integrity": "sha512-wjcp6RkouU9jpg55zERl+BglvV5j4jx5c/EMvQ+d12j/+nIEenNWPu+qc0tCg3JkLodbKZMg1qhJzEwG4qjclg==",
|
||||
"requires": {
|
||||
"is-admin": "^3.0.0",
|
||||
"is-root": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"is-extglob": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
||||
@@ -27183,6 +27436,11 @@
|
||||
"has-tostringtag": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"is-root": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-root/-/is-root-2.1.0.tgz",
|
||||
"integrity": "sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg=="
|
||||
},
|
||||
"is-set": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz",
|
||||
@@ -27294,8 +27552,7 @@
|
||||
"isexe": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
||||
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="
|
||||
},
|
||||
"isobject": {
|
||||
"version": "3.0.1",
|
||||
@@ -29583,6 +29840,11 @@
|
||||
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
|
||||
"dev": true
|
||||
},
|
||||
"nice-try": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
|
||||
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
|
||||
},
|
||||
"no-case": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz",
|
||||
@@ -29954,6 +30216,11 @@
|
||||
"integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==",
|
||||
"dev": true
|
||||
},
|
||||
"p-finally": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
|
||||
"integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow=="
|
||||
},
|
||||
"p-limit": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
|
||||
@@ -30844,7 +31111,6 @@
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
|
||||
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"end-of-stream": "^1.1.0",
|
||||
"once": "^1.3.1"
|
||||
@@ -31787,8 +32053,7 @@
|
||||
"signal-exit": {
|
||||
"version": "3.0.7",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
|
||||
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
|
||||
"dev": true
|
||||
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
|
||||
},
|
||||
"simple-swizzle": {
|
||||
"version": "0.2.2",
|
||||
@@ -32152,6 +32417,11 @@
|
||||
"integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==",
|
||||
"dev": true
|
||||
},
|
||||
"strip-eof": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
|
||||
"integrity": "sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q=="
|
||||
},
|
||||
"strip-final-newline": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
|
||||
|
||||
+2
-1
@@ -155,6 +155,7 @@
|
||||
"@testing-library/react": "^13.3.0",
|
||||
"@types/archiver": "^5.3.1",
|
||||
"@types/color": "^3.0.3",
|
||||
"@types/crypto-js": "^4.2.1",
|
||||
"@types/dateformat": "^5.0.0",
|
||||
"@types/jest": "^27.5.2",
|
||||
"@types/node": "17.0.23",
|
||||
@@ -172,7 +173,6 @@
|
||||
"@types/use-double-click": "^1.0.1",
|
||||
"@types/webpack-bundle-analyzer": "^4.4.2",
|
||||
"@types/webpack-env": "^1.18.0",
|
||||
"@types/crypto-js": "^4.2.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.34.0",
|
||||
"@typescript-eslint/parser": "^5.34.0",
|
||||
"autoprefixer": "^10.4.8",
|
||||
@@ -250,6 +250,7 @@
|
||||
"framer-motion": "^10.16.16",
|
||||
"fs-extra": "^11.2.0",
|
||||
"history": "^5.3.0",
|
||||
"is-elevated": "^3.0.0",
|
||||
"jszip": "^3.10.1",
|
||||
"md5-file": "^5.0.0",
|
||||
"node-abi": "^3.47.0",
|
||||
|
||||
Generated
+258
-33
@@ -1,17 +1,18 @@
|
||||
{
|
||||
"name": "bs-manager",
|
||||
"version": "1.4.2",
|
||||
"version": "1.4.4",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "bs-manager",
|
||||
"version": "1.4.2",
|
||||
"version": "1.4.4",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ps-list": "^7.2.0",
|
||||
"regedit-rs": "^1.0.1",
|
||||
"query-process": "^0.0.3",
|
||||
"regedit-rs": "^1.0.2",
|
||||
"sharp": "^0.32.6"
|
||||
}
|
||||
},
|
||||
@@ -344,6 +345,160 @@
|
||||
"once": "^1.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/query-process": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/query-process/-/query-process-0.0.3.tgz",
|
||||
"integrity": "sha512-6WRue0P+c84abP0o8MkDvigoS/gkkJzsSBt10PsOoBkP7Yodo4DducFsn9XyS4S+LuVYPAE5Hr4+kVNR5Onykg==",
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"query-process-android-arm-eabi": "0.0.3",
|
||||
"query-process-android-arm64": "0.0.3",
|
||||
"query-process-linux-arm-gnueabihf": "0.0.3",
|
||||
"query-process-linux-arm64-gnu": "0.0.3",
|
||||
"query-process-linux-arm64-musl": "0.0.3",
|
||||
"query-process-linux-x64-gnu": "0.0.3",
|
||||
"query-process-linux-x64-musl": "0.0.3",
|
||||
"query-process-win32-arm64-msvc": "0.0.3",
|
||||
"query-process-win32-x64-msvc": "0.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/query-process-android-arm-eabi": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/query-process-android-arm-eabi/-/query-process-android-arm-eabi-0.0.3.tgz",
|
||||
"integrity": "sha512-NB+9T+/poBcygDiG+7d2lJSeioP5ZyLT0HwUBdnLgNWvNCpzbJxydup1SLpnt5G2NF6nlTgbUZlH4hvxY7t/bw==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/query-process-android-arm64": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/query-process-android-arm64/-/query-process-android-arm64-0.0.3.tgz",
|
||||
"integrity": "sha512-TiAw2yO62vQzM0s02471LToHyUs/PRkLGGlA715z10BPIM5NckzIe245AI45CDyH6tE/3nVHUd0LX/dfjQtTcw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/query-process-linux-arm-gnueabihf": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/query-process-linux-arm-gnueabihf/-/query-process-linux-arm-gnueabihf-0.0.3.tgz",
|
||||
"integrity": "sha512-w7NLHBKt7qselCDoh/PVWyeuEb2NiiDDf1A9UB4K3Ns/H24hK3NbfMMBm8mCFxUnFUqoVX8O+VMs7dD/FNlTxA==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/query-process-linux-arm64-gnu": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/query-process-linux-arm64-gnu/-/query-process-linux-arm64-gnu-0.0.3.tgz",
|
||||
"integrity": "sha512-nrPHjnSqCBuuN7IZkZWOnBpiJjyKOjfpT0Xt2EjSGp+I7C0CHbnhCL/vG1hBzaWZn0mxJ5nf0c5N0Fja7krnpQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/query-process-linux-arm64-musl": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/query-process-linux-arm64-musl/-/query-process-linux-arm64-musl-0.0.3.tgz",
|
||||
"integrity": "sha512-vk8xMYTnS1PRKhwJgqLKyBAGIFP2CYZW2BsaKuNgQKUrDv7NnBaG7yukZT8niHNO1ycSrFpR/xqeJ8R23hO07A==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/query-process-linux-x64-gnu": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/query-process-linux-x64-gnu/-/query-process-linux-x64-gnu-0.0.3.tgz",
|
||||
"integrity": "sha512-j1tGcNnGyVCABJ1PHZD1gKuyuomNzsPow3NDuZzUGjPqvKu67RsmKJJJOhMyT1SvUkcqdLFdtS1KTD20I4GS5Q==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/query-process-linux-x64-musl": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/query-process-linux-x64-musl/-/query-process-linux-x64-musl-0.0.3.tgz",
|
||||
"integrity": "sha512-AOGrrI/Qcb30iKFstiW60zNG/HQevCY0Q38eMHGd7LrBZ5sEN7NzZOjzKp43KeNHejuZBDMxf0gdGAqDznOAng==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/query-process-win32-arm64-msvc": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/query-process-win32-arm64-msvc/-/query-process-win32-arm64-msvc-0.0.3.tgz",
|
||||
"integrity": "sha512-LHvxbzMFwPPUXHe4bDCAqs1bYbp8j0bMW8XyJGPZnIYrnwHz6g8VE5WQEtXQxSznsbfVxAKJXUtn088EjDVazw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/query-process-win32-x64-msvc": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/query-process-win32-x64-msvc/-/query-process-win32-x64-msvc-0.0.3.tgz",
|
||||
"integrity": "sha512-LfHAKmfqyKCgl9K+sTz0KyNwMwB79VcXZUy/Et9iQKLuZt7PDYpHWcFdhrfHw2qqIdKWTED8KmnmsOLhUn/2OA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/queue-tick": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz",
|
||||
@@ -377,22 +532,22 @@
|
||||
}
|
||||
},
|
||||
"node_modules/regedit-rs": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/regedit-rs/-/regedit-rs-1.0.1.tgz",
|
||||
"integrity": "sha512-wsvoGP5JDevIcx3q52aATW1c1dY86bQx7/tJ32gqV+L98OHRJykobKkjYqGzROtz9c2Pr+wGJZr0glFyc2dpvQ==",
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/regedit-rs/-/regedit-rs-1.0.2.tgz",
|
||||
"integrity": "sha512-4vEgiZNO1FCG8z/Zx3v/6PU1+eZ+ELe6R0ca+VB96Vw+Mi3M0IVHAjtMFbl97lUSX11dJqpyousX/wY8QcI1lA==",
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"regedit-rs-win32-arm64-msvc": "1.0.1",
|
||||
"regedit-rs-win32-ia32-msvc": "1.0.1",
|
||||
"regedit-rs-win32-x64-msvc": "1.0.1"
|
||||
"regedit-rs-win32-arm64-msvc": "1.0.2",
|
||||
"regedit-rs-win32-ia32-msvc": "1.0.2",
|
||||
"regedit-rs-win32-x64-msvc": "1.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/regedit-rs-win32-arm64-msvc": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/regedit-rs-win32-arm64-msvc/-/regedit-rs-win32-arm64-msvc-1.0.1.tgz",
|
||||
"integrity": "sha512-QA46d/wiUHlW2h0ZlHKrtDhnwoxMpVle+EbFziEbLYC7dimtAiWCeXu4zNymaFClDimYSifQkWgza5GBmD8etg==",
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/regedit-rs-win32-arm64-msvc/-/regedit-rs-win32-arm64-msvc-1.0.2.tgz",
|
||||
"integrity": "sha512-hM1sxazOJWKmiC9DM8QXW9Iqm50Mh/Y9G4/rRYQpWXjMzq7lTqjwVZRkAoBrHliFS6d1Lt4qkm5+Ybt6GkbDpw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -405,9 +560,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/regedit-rs-win32-ia32-msvc": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/regedit-rs-win32-ia32-msvc/-/regedit-rs-win32-ia32-msvc-1.0.1.tgz",
|
||||
"integrity": "sha512-V2NisvicQqiozl0yMas9tjDYmBwHWf48M/dMJUWMQxxkJaDCNoHW8PljL59A/h8ew2NBFsJK5RYkYfxW1o+OyQ==",
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/regedit-rs-win32-ia32-msvc/-/regedit-rs-win32-ia32-msvc-1.0.2.tgz",
|
||||
"integrity": "sha512-FLINrCJ30wm6NYw7skQUDET8NP1N46kH77dqesCiU+/FjWzzPE5luZYY+j4uf+hKjPY6/MCj2CB9l9VdPhaBVQ==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
@@ -420,9 +575,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/regedit-rs-win32-x64-msvc": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/regedit-rs-win32-x64-msvc/-/regedit-rs-win32-x64-msvc-1.0.1.tgz",
|
||||
"integrity": "sha512-qhQawjYPzXGrz0xODJiviwrzw0eytGP9+quuQJUQAiLEw2P1tQ0LCyID3jOvNltLH+tqJChSV4JaQcPVleohZg==",
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/regedit-rs-win32-x64-msvc/-/regedit-rs-win32-x64-msvc-1.0.2.tgz",
|
||||
"integrity": "sha512-ccCSyd5vWBKVWftBKLKzegqwwPMWcQtIW0ub66dCFFuv2s+x2EcZZWGdD9dVXX2Z6V9DU2JRPKgWUNjVPaj6Xg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -851,6 +1006,76 @@
|
||||
"once": "^1.3.1"
|
||||
}
|
||||
},
|
||||
"query-process": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/query-process/-/query-process-0.0.3.tgz",
|
||||
"integrity": "sha512-6WRue0P+c84abP0o8MkDvigoS/gkkJzsSBt10PsOoBkP7Yodo4DducFsn9XyS4S+LuVYPAE5Hr4+kVNR5Onykg==",
|
||||
"requires": {
|
||||
"query-process-android-arm-eabi": "0.0.3",
|
||||
"query-process-android-arm64": "0.0.3",
|
||||
"query-process-linux-arm-gnueabihf": "0.0.3",
|
||||
"query-process-linux-arm64-gnu": "0.0.3",
|
||||
"query-process-linux-arm64-musl": "0.0.3",
|
||||
"query-process-linux-x64-gnu": "0.0.3",
|
||||
"query-process-linux-x64-musl": "0.0.3",
|
||||
"query-process-win32-arm64-msvc": "0.0.3",
|
||||
"query-process-win32-x64-msvc": "0.0.3"
|
||||
}
|
||||
},
|
||||
"query-process-android-arm-eabi": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/query-process-android-arm-eabi/-/query-process-android-arm-eabi-0.0.3.tgz",
|
||||
"integrity": "sha512-NB+9T+/poBcygDiG+7d2lJSeioP5ZyLT0HwUBdnLgNWvNCpzbJxydup1SLpnt5G2NF6nlTgbUZlH4hvxY7t/bw==",
|
||||
"optional": true
|
||||
},
|
||||
"query-process-android-arm64": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/query-process-android-arm64/-/query-process-android-arm64-0.0.3.tgz",
|
||||
"integrity": "sha512-TiAw2yO62vQzM0s02471LToHyUs/PRkLGGlA715z10BPIM5NckzIe245AI45CDyH6tE/3nVHUd0LX/dfjQtTcw==",
|
||||
"optional": true
|
||||
},
|
||||
"query-process-linux-arm-gnueabihf": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/query-process-linux-arm-gnueabihf/-/query-process-linux-arm-gnueabihf-0.0.3.tgz",
|
||||
"integrity": "sha512-w7NLHBKt7qselCDoh/PVWyeuEb2NiiDDf1A9UB4K3Ns/H24hK3NbfMMBm8mCFxUnFUqoVX8O+VMs7dD/FNlTxA==",
|
||||
"optional": true
|
||||
},
|
||||
"query-process-linux-arm64-gnu": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/query-process-linux-arm64-gnu/-/query-process-linux-arm64-gnu-0.0.3.tgz",
|
||||
"integrity": "sha512-nrPHjnSqCBuuN7IZkZWOnBpiJjyKOjfpT0Xt2EjSGp+I7C0CHbnhCL/vG1hBzaWZn0mxJ5nf0c5N0Fja7krnpQ==",
|
||||
"optional": true
|
||||
},
|
||||
"query-process-linux-arm64-musl": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/query-process-linux-arm64-musl/-/query-process-linux-arm64-musl-0.0.3.tgz",
|
||||
"integrity": "sha512-vk8xMYTnS1PRKhwJgqLKyBAGIFP2CYZW2BsaKuNgQKUrDv7NnBaG7yukZT8niHNO1ycSrFpR/xqeJ8R23hO07A==",
|
||||
"optional": true
|
||||
},
|
||||
"query-process-linux-x64-gnu": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/query-process-linux-x64-gnu/-/query-process-linux-x64-gnu-0.0.3.tgz",
|
||||
"integrity": "sha512-j1tGcNnGyVCABJ1PHZD1gKuyuomNzsPow3NDuZzUGjPqvKu67RsmKJJJOhMyT1SvUkcqdLFdtS1KTD20I4GS5Q==",
|
||||
"optional": true
|
||||
},
|
||||
"query-process-linux-x64-musl": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/query-process-linux-x64-musl/-/query-process-linux-x64-musl-0.0.3.tgz",
|
||||
"integrity": "sha512-AOGrrI/Qcb30iKFstiW60zNG/HQevCY0Q38eMHGd7LrBZ5sEN7NzZOjzKp43KeNHejuZBDMxf0gdGAqDznOAng==",
|
||||
"optional": true
|
||||
},
|
||||
"query-process-win32-arm64-msvc": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/query-process-win32-arm64-msvc/-/query-process-win32-arm64-msvc-0.0.3.tgz",
|
||||
"integrity": "sha512-LHvxbzMFwPPUXHe4bDCAqs1bYbp8j0bMW8XyJGPZnIYrnwHz6g8VE5WQEtXQxSznsbfVxAKJXUtn088EjDVazw==",
|
||||
"optional": true
|
||||
},
|
||||
"query-process-win32-x64-msvc": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/query-process-win32-x64-msvc/-/query-process-win32-x64-msvc-0.0.3.tgz",
|
||||
"integrity": "sha512-LfHAKmfqyKCgl9K+sTz0KyNwMwB79VcXZUy/Et9iQKLuZt7PDYpHWcFdhrfHw2qqIdKWTED8KmnmsOLhUn/2OA==",
|
||||
"optional": true
|
||||
},
|
||||
"queue-tick": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz",
|
||||
@@ -878,31 +1103,31 @@
|
||||
}
|
||||
},
|
||||
"regedit-rs": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/regedit-rs/-/regedit-rs-1.0.1.tgz",
|
||||
"integrity": "sha512-wsvoGP5JDevIcx3q52aATW1c1dY86bQx7/tJ32gqV+L98OHRJykobKkjYqGzROtz9c2Pr+wGJZr0glFyc2dpvQ==",
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/regedit-rs/-/regedit-rs-1.0.2.tgz",
|
||||
"integrity": "sha512-4vEgiZNO1FCG8z/Zx3v/6PU1+eZ+ELe6R0ca+VB96Vw+Mi3M0IVHAjtMFbl97lUSX11dJqpyousX/wY8QcI1lA==",
|
||||
"requires": {
|
||||
"regedit-rs-win32-arm64-msvc": "1.0.1",
|
||||
"regedit-rs-win32-ia32-msvc": "1.0.1",
|
||||
"regedit-rs-win32-x64-msvc": "1.0.1"
|
||||
"regedit-rs-win32-arm64-msvc": "1.0.2",
|
||||
"regedit-rs-win32-ia32-msvc": "1.0.2",
|
||||
"regedit-rs-win32-x64-msvc": "1.0.2"
|
||||
}
|
||||
},
|
||||
"regedit-rs-win32-arm64-msvc": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/regedit-rs-win32-arm64-msvc/-/regedit-rs-win32-arm64-msvc-1.0.1.tgz",
|
||||
"integrity": "sha512-QA46d/wiUHlW2h0ZlHKrtDhnwoxMpVle+EbFziEbLYC7dimtAiWCeXu4zNymaFClDimYSifQkWgza5GBmD8etg==",
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/regedit-rs-win32-arm64-msvc/-/regedit-rs-win32-arm64-msvc-1.0.2.tgz",
|
||||
"integrity": "sha512-hM1sxazOJWKmiC9DM8QXW9Iqm50Mh/Y9G4/rRYQpWXjMzq7lTqjwVZRkAoBrHliFS6d1Lt4qkm5+Ybt6GkbDpw==",
|
||||
"optional": true
|
||||
},
|
||||
"regedit-rs-win32-ia32-msvc": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/regedit-rs-win32-ia32-msvc/-/regedit-rs-win32-ia32-msvc-1.0.1.tgz",
|
||||
"integrity": "sha512-V2NisvicQqiozl0yMas9tjDYmBwHWf48M/dMJUWMQxxkJaDCNoHW8PljL59A/h8ew2NBFsJK5RYkYfxW1o+OyQ==",
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/regedit-rs-win32-ia32-msvc/-/regedit-rs-win32-ia32-msvc-1.0.2.tgz",
|
||||
"integrity": "sha512-FLINrCJ30wm6NYw7skQUDET8NP1N46kH77dqesCiU+/FjWzzPE5luZYY+j4uf+hKjPY6/MCj2CB9l9VdPhaBVQ==",
|
||||
"optional": true
|
||||
},
|
||||
"regedit-rs-win32-x64-msvc": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/regedit-rs-win32-x64-msvc/-/regedit-rs-win32-x64-msvc-1.0.1.tgz",
|
||||
"integrity": "sha512-qhQawjYPzXGrz0xODJiviwrzw0eytGP9+quuQJUQAiLEw2P1tQ0LCyID3jOvNltLH+tqJChSV4JaQcPVleohZg==",
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/regedit-rs-win32-x64-msvc/-/regedit-rs-win32-x64-msvc-1.0.2.tgz",
|
||||
"integrity": "sha512-ccCSyd5vWBKVWftBKLKzegqwwPMWcQtIW0ub66dCFFuv2s+x2EcZZWGdD9dVXX2Z6V9DU2JRPKgWUNjVPaj6Xg==",
|
||||
"optional": true
|
||||
},
|
||||
"safe-buffer": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bs-manager",
|
||||
"version": "1.4.3",
|
||||
"version": "1.4.5",
|
||||
"description": "BSManager",
|
||||
"main": "./dist/main/main.js",
|
||||
"author": {
|
||||
@@ -15,7 +15,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"ps-list": "^7.2.0",
|
||||
"regedit-rs": "^1.0.1",
|
||||
"query-process": "^0.0.3",
|
||||
"regedit-rs": "^1.0.2",
|
||||
"sharp": "^0.32.6"
|
||||
},
|
||||
"license": "MIT"
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
import log from "electron-log";
|
||||
import { isPromise } from "../../shared/helpers/promise.helpers";
|
||||
import { tryit } from "../../shared/helpers/error.helpers";
|
||||
|
||||
type LogOptions = {
|
||||
logInput?: boolean;
|
||||
logOutput?: boolean;
|
||||
logArgs?: boolean;
|
||||
};
|
||||
|
||||
const stringifyArgs = (args: unknown[]) => {
|
||||
return args?.map(a => JSON.stringify(a)).join(', ');
|
||||
};
|
||||
|
||||
const logInfo = (message: string, propertyKey: string, args: unknown[], logArgs: boolean, result: unknown) => {
|
||||
log.info(`[${message}] ${propertyKey}(${logArgs ? stringifyArgs(args) : ''})`, result);
|
||||
};
|
||||
|
||||
const logError = (propertyKey: string, args: unknown[], logArgs: boolean, error: unknown) => {
|
||||
log.error(`[ERROR] ${propertyKey}(${logArgs ? stringifyArgs(args) : ''})`, error);
|
||||
throw error;
|
||||
};
|
||||
|
||||
export function Log(options?: LogOptions){
|
||||
|
||||
const logInput = options?.logInput ?? false;
|
||||
const logOutput = options?.logOutput ?? true;
|
||||
const logArgs = options?.logArgs ?? true;
|
||||
|
||||
return (target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => {
|
||||
const originalMethod = descriptor.value;
|
||||
|
||||
descriptor.value = function(...args: unknown[]) {
|
||||
|
||||
if (logInput) {
|
||||
logInfo('INPUT', propertyKey, args, logArgs, null);
|
||||
}
|
||||
|
||||
const outcome = tryit(() => originalMethod.apply(this, args));
|
||||
|
||||
if (isPromise(outcome)) {
|
||||
return outcome.then(({ result, error }) => {
|
||||
|
||||
if (error) {
|
||||
logError(propertyKey, args, logArgs, error);
|
||||
}
|
||||
if (logOutput) {
|
||||
logInfo('OUTPUT', propertyKey, args, logArgs, result);
|
||||
}
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
const { result, error } = outcome;
|
||||
|
||||
if (error) {
|
||||
logError(propertyKey, args, logArgs, error);
|
||||
}
|
||||
|
||||
if (logOutput) {
|
||||
logInfo('OUTPUT', propertyKey, args, logArgs, result);
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -5,6 +5,8 @@ import { Observable, concatMap, from } from "rxjs";
|
||||
import log from "electron-log";
|
||||
import { BsmException } from "shared/models/bsm-exception.model";
|
||||
import crypto from "crypto";
|
||||
import { execSync } from "child_process";
|
||||
import { tryit } from "../../shared/helpers/error.helpers";
|
||||
|
||||
export async function pathExist(path: string): Promise<boolean> {
|
||||
try {
|
||||
@@ -232,6 +234,16 @@ export async function isJunction(path: string): Promise<boolean>{
|
||||
return lstats.isSymbolicLink() && stats.isDirectory();
|
||||
}
|
||||
|
||||
export function resolveGUIDPath(guidPath: string): string {
|
||||
const guidVolume = path.parse(guidPath).root;
|
||||
const command = `powershell -command "(Get-WmiObject -Class Win32_Volume | Where-Object { $_.DeviceID -like '${guidVolume}' }).DriveLetter"`;
|
||||
const {result: driveLetter, error} = tryit(() => execSync(command).toString().trim());
|
||||
if (!driveLetter || error) {
|
||||
throw new Error("Unable to resolve GUID path", error);
|
||||
}
|
||||
return path.join(driveLetter, path.relative(guidVolume, guidPath));
|
||||
}
|
||||
|
||||
export interface Progression<T = unknown> {
|
||||
total: number;
|
||||
current: number;
|
||||
|
||||
@@ -10,4 +10,16 @@ export async function taskRunning(task: string): Promise<boolean> {
|
||||
log.error(error);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function getProcessPid(task: string): Promise<number> {
|
||||
try {
|
||||
const processes = await psList();
|
||||
const process = processes.find(process => process.name?.includes(task) || process.cmd?.includes(task));
|
||||
return process?.pid;
|
||||
}
|
||||
catch(error){
|
||||
log.error(error);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,9 @@ import { IpcService } from '../services/ipc.service';
|
||||
import { from } from "rxjs";
|
||||
import { SteamLauncherService } from "../services/bs-launcher/steam-launcher.service";
|
||||
import { OculusLauncherService } from "../services/bs-launcher/oculus-launcher.service";
|
||||
import { SteamService } from "../services/steam.service";
|
||||
import log from "electron-log";
|
||||
import isElevated from "is-elevated";
|
||||
|
||||
const ipc = IpcService.getInstance();
|
||||
|
||||
@@ -13,6 +16,17 @@ ipc.on<LaunchOption>('bs-launch.launch', (req, reply) => {
|
||||
reply(bsLauncher.launch(req.args));
|
||||
});
|
||||
|
||||
ipc.on<boolean>("bs-launch.need-start-as-admin", (_, reply) => {
|
||||
const steam = SteamService.getInstance();
|
||||
reply(from(isElevated().then(elevated => {
|
||||
if(elevated){ return false; }
|
||||
return steam.isElevated().catch(e => {
|
||||
log.error("Error while checking if Steam is running as admin", e);
|
||||
return false;
|
||||
});
|
||||
})));
|
||||
});
|
||||
|
||||
ipc.on<LaunchOption>("create-launch-shortcut", (req, reply) => {
|
||||
const bsLauncher = BSLauncherService.getInstance();
|
||||
reply(from(bsLauncher.createLaunchShortcut(req.args)));
|
||||
@@ -29,4 +43,4 @@ ipc.on<void>("restore-original-oculus-folder", (_, reply) => {
|
||||
reply(from(
|
||||
oculusLauncher.deleteBsSymlinks().then(() => oculusLauncher.restoreOriginalBeatSaber())
|
||||
));
|
||||
})
|
||||
})
|
||||
|
||||
@@ -7,7 +7,7 @@ import { InstallationLocationService } from "../installation-location.service";
|
||||
import { UtilsService } from "../utils.service";
|
||||
import crypto from "crypto";
|
||||
import { lstatSync } from "fs";
|
||||
import { copy, createReadStream, ensureDir, realpath, unlink } from "fs-extra";
|
||||
import { copy, createReadStream, ensureDir, pathExists, realpath, unlink } from "fs-extra";
|
||||
import StreamZip from "node-stream-zip";
|
||||
import { RequestService } from "../request.service";
|
||||
import sanitize from "sanitize-filename";
|
||||
@@ -255,10 +255,12 @@ export class LocalMapsManagerService {
|
||||
const mapFolderName = sanitize(`${map.id}-${map.name}`);
|
||||
const mapsFolder = await this.getMapsFolderPath(version);
|
||||
|
||||
const installedMap = await this.loadMapInfoFromPath(path.join(mapsFolder, mapFolderName)).catch(e => {
|
||||
log.error("loadMapInfoFromPath", e);
|
||||
return null;
|
||||
});
|
||||
const mapPath = path.join(mapsFolder, mapFolderName);
|
||||
|
||||
const installedMap = await pathExists(mapPath).then(exists => {
|
||||
if(!exists){ return null; }
|
||||
return this.loadMapInfoFromPath(mapPath);
|
||||
}).catch(() => null);
|
||||
|
||||
if(map.versions.every(version => version.hash === installedMap?.hash)) {
|
||||
return installedMap;
|
||||
@@ -270,8 +272,6 @@ export class LocalMapsManagerService {
|
||||
throw `Cannot download ${zipUrl}`;
|
||||
}
|
||||
|
||||
const mapPath = path.join(mapsFolder, mapFolderName);
|
||||
|
||||
await ensureFolderExist(mapPath);
|
||||
|
||||
await zip.extract(null, mapPath);
|
||||
|
||||
@@ -11,6 +11,7 @@ import { AbstractLauncherService } from "./abstract-launcher.service";
|
||||
import { taskRunning } from "../../helpers/os.helpers";
|
||||
import { CustomError } from "../../../shared/models/exceptions/custom-error.class";
|
||||
import { InstallationLocationService } from "../installation-location.service";
|
||||
import { ensurePathNotAlreadyExist } from "../../helpers/fs.helpers";
|
||||
|
||||
export class OculusLauncherService extends AbstractLauncherService implements StoreLauncherInterface {
|
||||
|
||||
@@ -34,7 +35,9 @@ export class OculusLauncherService extends AbstractLauncherService implements St
|
||||
this.pathsService = InstallationLocationService.getInstance();
|
||||
|
||||
this.oculus.tryGetGameFolder([OCULUS_BS_DIR, OCULUS_BS_BACKUP_DIR]).then(async dirPath => {
|
||||
if(dirPath){ return this.oculusLib$.next( path.join(dirPath, "..") ); }
|
||||
if(dirPath){
|
||||
return this.oculusLib$.next( path.join(dirPath, "..") );
|
||||
}
|
||||
const defaultLib = ((await this.oculus.getOculusLibs()) || []).find(lib => lib.isDefault);
|
||||
if(defaultLib?.path){ return this.oculusLib$.next(path.join(defaultLib.path, "Software")); }
|
||||
this.oculusLib$.next(null);
|
||||
@@ -59,13 +62,13 @@ export class OculusLauncherService extends AbstractLauncherService implements St
|
||||
log.info("Symlinks found in Oculus library", symlinks);
|
||||
|
||||
const bsSymlinks = symlinks.filter(dirent => dirent.startsWith(OCULUS_BS_DIR));
|
||||
|
||||
|
||||
const bsmSymlinks = (await Promise.all(bsSymlinks.map(async symlink => {
|
||||
const symlinkPath = path.join(oculusLibPath, symlink);
|
||||
const targetPath = await readlink(symlinkPath).catch(err => log.error(err));
|
||||
|
||||
log.info("Oculus Symlink", symlink, "target", targetPath);
|
||||
|
||||
|
||||
if(!targetPath){ return null; }
|
||||
|
||||
const bsmVersionsDir = path.join(this.pathsService.INSTALLATION_FOLDER, this.pathsService.VERSIONS_FOLDER);
|
||||
@@ -84,7 +87,7 @@ export class OculusLauncherService extends AbstractLauncherService implements St
|
||||
private async backupOriginalBeatSaber(): Promise<void>{
|
||||
const bsFolder = await this.oculus.getGameFolder(OCULUS_BS_DIR);
|
||||
if(!bsFolder){ return; }
|
||||
const backupPath = path.join(bsFolder, "..", OCULUS_BS_BACKUP_DIR);
|
||||
const backupPath = await ensurePathNotAlreadyExist(path.join(bsFolder, "..", OCULUS_BS_BACKUP_DIR));
|
||||
log.info("Backing up original Beat Saber", bsFolder, backupPath);
|
||||
return rename(bsFolder, backupPath);
|
||||
}
|
||||
@@ -136,20 +139,24 @@ export class OculusLauncherService extends AbstractLauncherService implements St
|
||||
if(bsRunning){
|
||||
throw CustomError.fromError(new Error("Cannot start two instance of Beat Saber for Oculus"), BSLaunchError.BS_ALREADY_RUNNING);
|
||||
}
|
||||
|
||||
|
||||
// Remove previously symlinks created by BSM
|
||||
await this.deleteBsSymlinks().catch(err => log.error("Error while deleting BSM symlinks", err));
|
||||
|
||||
const bsPath = await (launchOptions.version.oculus ? prepareOriginalVersion() : prepareDowngradedVersion());
|
||||
|
||||
// Launch Beat Saber
|
||||
const exePath = path.join(bsPath, BS_EXECUTABLE);
|
||||
|
||||
if(!(await pathExists(exePath))){
|
||||
throw CustomError.fromError(new Error(`BS Path not exist ${bsPath}`), BSLaunchError.BS_NOT_FOUND);
|
||||
}
|
||||
|
||||
// Make sure Oculus is running
|
||||
await this.oculus.startOculus().catch(err => log.error("Error while starting Oculus", err));
|
||||
|
||||
obs.next({type: BSLaunchEvent.BS_LAUNCHING});
|
||||
|
||||
// Launch Beat Saber
|
||||
return this.launchBs(exePath, this.buildBsLaunchArgs(launchOptions)).catch(err => {
|
||||
throw CustomError.fromError(err, BSLaunchError.BS_EXIT_ERROR);
|
||||
});
|
||||
@@ -168,4 +175,4 @@ export class OculusLauncherService extends AbstractLauncherService implements St
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,9 @@ import { BS_APP_ID, BS_EXECUTABLE, STEAMVR_APP_ID } from "../../constants";
|
||||
import log from "electron-log";
|
||||
import { AbstractLauncherService } from "./abstract-launcher.service";
|
||||
import { CustomError } from "../../../shared/models/exceptions/custom-error.class";
|
||||
import isElevated from "is-elevated";
|
||||
import { UtilsService } from "../utils.service";
|
||||
import { exec } from "child_process";
|
||||
|
||||
export class SteamLauncherService extends AbstractLauncherService implements StoreLauncherInterface{
|
||||
|
||||
@@ -21,10 +24,12 @@ export class SteamLauncherService extends AbstractLauncherService implements Sto
|
||||
}
|
||||
|
||||
private readonly steam: SteamService;
|
||||
private readonly util: UtilsService;
|
||||
|
||||
private constructor(){
|
||||
super();
|
||||
this.steam = SteamService.getInstance();
|
||||
this.util = UtilsService.getInstance();
|
||||
}
|
||||
|
||||
private getSteamVRPath(): Promise<string> {
|
||||
@@ -41,6 +46,17 @@ export class SteamLauncherService extends AbstractLauncherService implements Sto
|
||||
});
|
||||
}
|
||||
|
||||
private needStartBsAsAdmin(): Promise<boolean> {
|
||||
return isElevated().then(elevated => {
|
||||
if(elevated){ return false; }
|
||||
return this.steam.isElevated();
|
||||
})
|
||||
}
|
||||
|
||||
private getStartBsAsAdminExePath(): string {
|
||||
return path.join(this.util.getAssetsScriptsPath(), "start_beat_saber_admin.exe");
|
||||
}
|
||||
|
||||
public async restoreSteamVR(): Promise<void> {
|
||||
const steamVrFolder = await this.getSteamVRPath();
|
||||
const steamVrBackup = `${steamVrFolder}.bak`;
|
||||
@@ -53,7 +69,7 @@ export class SteamLauncherService extends AbstractLauncherService implements Sto
|
||||
log.error("Error while restoring SteamVR", err);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public launch(launchOptions: LaunchOption): Observable<BSLaunchEventData>{
|
||||
|
||||
return new Observable<BSLaunchEventData>(obs => {(async () => {
|
||||
@@ -90,13 +106,33 @@ export class SteamLauncherService extends AbstractLauncherService implements Sto
|
||||
|
||||
obs.next({type: BSLaunchEvent.BS_LAUNCHING});
|
||||
|
||||
await this.launchBs(exePath, launchArgs, { env: {...process.env, "SteamAppId": BS_APP_ID} }).then(exitCode => {
|
||||
const launchPromise = !launchOptions.admin ? (
|
||||
this.launchBs(exePath, launchArgs, { env: {...process.env, "SteamAppId": BS_APP_ID} })
|
||||
) : (
|
||||
new Promise<number>(resolve => {
|
||||
const adminProcess = exec(`"${this.getStartBsAsAdminExePath()}" "${exePath}" ${launchArgs.join(" ")}`, { env: {...process.env, "SteamAppId": BS_APP_ID} });
|
||||
adminProcess.on("error", err => {
|
||||
log.error("Error while starting BS as Admin", err);
|
||||
resolve(-1)
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
adminProcess.removeAllListeners("error");
|
||||
resolve(-1);
|
||||
}, 35_000);
|
||||
})
|
||||
);
|
||||
|
||||
try {
|
||||
const exitCode = await launchPromise;
|
||||
log.info("BS process exit code", exitCode);
|
||||
}).catch(err => {
|
||||
}
|
||||
catch(err: any) {
|
||||
throw CustomError.fromError(err, BSLaunchError.BS_EXIT_ERROR);
|
||||
}).finally(() => {
|
||||
this.restoreSteamVR().catch(log.error);
|
||||
});
|
||||
}
|
||||
finally {
|
||||
await this.restoreSteamVR().catch(log.error);
|
||||
}
|
||||
|
||||
})().then(() => {
|
||||
obs.complete();
|
||||
@@ -109,4 +145,4 @@ export class SteamLauncherService extends AbstractLauncherService implements Sto
|
||||
})});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { execOnOs } from "../../helpers/env.helpers";
|
||||
import { list, createKey, putValue, deleteKey, RegSzValue } from "regedit-rs";
|
||||
import path from "path";
|
||||
import { Log } from "../../decorators/log.decorator";
|
||||
|
||||
const { list, createKey, putValue, deleteKey, RegSzValue } = (execOnOs({ win32: () => require("regedit-rs") }, true) ?? {}) as typeof import("regedit-rs");
|
||||
|
||||
export class LivService {
|
||||
|
||||
@@ -20,6 +22,7 @@ export class LivService {
|
||||
|
||||
}
|
||||
|
||||
@Log()
|
||||
public async isLivInstalled(): Promise<boolean> {
|
||||
return execOnOs({
|
||||
win32: async () => {
|
||||
@@ -29,6 +32,7 @@ export class LivService {
|
||||
}, true);
|
||||
}
|
||||
|
||||
@Log()
|
||||
public async createLivShortcut(entry: LivEntry): Promise<void> {
|
||||
return execOnOs({
|
||||
win32: async () => {
|
||||
@@ -46,6 +50,7 @@ export class LivService {
|
||||
});
|
||||
}
|
||||
|
||||
@Log()
|
||||
public async deleteLivShortcuts(ids: string[]): Promise<void> {
|
||||
return execOnOs({
|
||||
win32: async () => {
|
||||
@@ -55,11 +60,13 @@ export class LivService {
|
||||
})
|
||||
}
|
||||
|
||||
@Log()
|
||||
public getLivShortcuts(): Promise<LivEntry[]> {
|
||||
|
||||
return execOnOs({
|
||||
win32: async () => {
|
||||
const regRes = await list(this.livExternalAppsRegeditKey).then(res => res[this.livExternalAppsRegeditKey]);
|
||||
|
||||
|
||||
if(!regRes.exists){
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ export class BeatModsApiService {
|
||||
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];
|
||||
const alias = Array.from(aliases.entries()).find(([key, value]) => value.find(v => v.BSVersion === version.BSVersion))?.[0];
|
||||
return { BSVersion: alias } as BSVersion;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
import { list } from "regedit-rs";
|
||||
import path from "path";
|
||||
import { pathExist } from "../helpers/fs.helpers";
|
||||
import { pathExist, resolveGUIDPath } from "../helpers/fs.helpers";
|
||||
import log from "electron-log";
|
||||
import { lstat } from "fs-extra";
|
||||
import { tryit } from "../../shared/helpers/error.helpers";
|
||||
import { shell } from "electron";
|
||||
import { taskRunning } from "../helpers/os.helpers";
|
||||
import { sToMs } from "../../shared/helpers/time.helpers";
|
||||
import { execOnOs } from "../helpers/env.helpers";
|
||||
|
||||
const { list } = (execOnOs({ win32: () => require("regedit-rs") }, true) ?? {}) as typeof import("regedit-rs");
|
||||
|
||||
export class OculusService {
|
||||
private static instance: OculusService;
|
||||
@@ -41,12 +47,17 @@ export class OculusService {
|
||||
const libsPath: OculusLibrary[] = (
|
||||
await Promise.all(libsRegData.keys.map(async key => {
|
||||
const originalPath = await list([`${oculusLibsRegKey}\\${key}`]).then(res => res[`${oculusLibsRegKey}\\${key}`]);
|
||||
|
||||
if (!originalPath.values?.OriginalPath) {
|
||||
return null;
|
||||
|
||||
if (originalPath.values?.OriginalPath) {
|
||||
return { id: key, path: originalPath.values.OriginalPath.value, isDefault: defaultLibraryId === key } as OculusLibrary;
|
||||
}
|
||||
|
||||
return { id: key, path: originalPath.values.OriginalPath.value, isDefault: defaultLibraryId === key } as OculusLibrary
|
||||
if(originalPath.values?.Path) {
|
||||
const { result } = tryit(() => resolveGUIDPath(originalPath.values.Path.value as string));
|
||||
return result ? { id: key, path: result, isDefault: defaultLibraryId === key } as OculusLibrary : null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}, []))
|
||||
).filter(Boolean);
|
||||
|
||||
@@ -76,7 +87,7 @@ export class OculusService {
|
||||
|
||||
/**
|
||||
* Return the first game folder found in the list
|
||||
* @param {string[]} gameFolders
|
||||
* @param {string[]} gameFolders
|
||||
*/
|
||||
public async tryGetGameFolder(gameFolders: string[]): Promise<string> {
|
||||
for(const gameFolder of gameFolders){
|
||||
@@ -86,6 +97,29 @@ export class OculusService {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public oculusRunning(): Promise<boolean> {
|
||||
return taskRunning("OculusClient");
|
||||
}
|
||||
|
||||
public async startOculus(): Promise<void>{
|
||||
if(await this.oculusRunning()){ return; }
|
||||
|
||||
await shell.openPath("oculus://view/homepage");
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
const interval = setInterval(async () => {
|
||||
if(!(await this.oculusRunning())){ return; }
|
||||
clearInterval(interval);
|
||||
resolve();
|
||||
}, sToMs(3));
|
||||
|
||||
setTimeout(() => {
|
||||
clearInterval(interval);
|
||||
reject(new Error("Unable to open Oculus"));
|
||||
}, sToMs(30));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export interface OculusLibrary {
|
||||
|
||||
@@ -1,15 +1,22 @@
|
||||
import { list, RegDwordValue } from "regedit-rs"
|
||||
import { RegDwordValue } from "regedit-rs"
|
||||
import path from "path";
|
||||
import { parse } from "@node-steam/vdf";
|
||||
import { readFile } from "fs/promises";
|
||||
import { pathExist } from "../helpers/fs.helpers";
|
||||
import log from "electron-log";
|
||||
import { app, shell } from "electron";
|
||||
import { taskRunning } from "../helpers/os.helpers";
|
||||
import { getProcessPid, taskRunning } from "../helpers/os.helpers";
|
||||
import { isElevated } from "query-process";
|
||||
import { execOnOs } from "../helpers/env.helpers";
|
||||
|
||||
const { list } = (execOnOs({ win32: () => require("regedit-rs") }, true) ?? {}) as typeof import("regedit-rs");
|
||||
|
||||
export class SteamService {
|
||||
|
||||
private static readonly PROCESS_NAME = "steam";
|
||||
|
||||
private static instance: SteamService;
|
||||
|
||||
private steamPath: string = '';
|
||||
|
||||
private constructor(){}
|
||||
@@ -29,12 +36,30 @@ export class SteamService {
|
||||
}
|
||||
|
||||
public async steamRunning(): Promise<boolean>{
|
||||
const steamProcessRunning = await taskRunning("steam");
|
||||
const steamProcessRunning = await taskRunning(SteamService.PROCESS_NAME);
|
||||
if(process.platform === "linux") { return steamProcessRunning; }
|
||||
const activeUser = await this.getActiveUser().catch(err => log.error(err));
|
||||
return steamProcessRunning && !!activeUser;
|
||||
}
|
||||
|
||||
public async getSteamPid(): Promise<number>{
|
||||
return getProcessPid(SteamService.PROCESS_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the Steam process is running as administrator
|
||||
* @throws Can throw an error if the Steam process is running as admin
|
||||
* @returns true if the Steam process is running as administrator
|
||||
*/
|
||||
public async isElevated(): Promise<boolean>{
|
||||
if(process.platform === "linux"){ return true; }
|
||||
const steamPid = await this.getSteamPid();
|
||||
|
||||
if(!steamPid){ return false; }
|
||||
|
||||
return isElevated(steamPid);
|
||||
}
|
||||
|
||||
public async getSteamPath(): Promise<string>{
|
||||
|
||||
if(this.steamPath){ return this.steamPath; }
|
||||
@@ -68,7 +93,7 @@ export class SteamService {
|
||||
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; }
|
||||
@@ -83,7 +108,7 @@ export class SteamService {
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
|
||||
} catch (e) {
|
||||
log.error(e);
|
||||
return null;
|
||||
@@ -91,7 +116,7 @@ export class SteamService {
|
||||
}
|
||||
|
||||
public async openSteam(): Promise<void> {
|
||||
|
||||
|
||||
await shell.openPath("steam://open/games");
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
@@ -8,7 +8,7 @@ import { useObservable } from "renderer/hooks/use-observable.hook";
|
||||
export function AvailableVersionsSlider() {
|
||||
const versionManagerService = useService(BSVersionManagerService);
|
||||
|
||||
const availableVersions = useObservable(versionManagerService.availableVersions$);
|
||||
const availableVersions = useObservable(() => versionManagerService.availableVersions$);
|
||||
const [yearIndex, setYearIndex] = useState(0);
|
||||
|
||||
const availableYears = (() => {
|
||||
|
||||
@@ -56,7 +56,7 @@ export function FilterPanel({ className, ref, playlist = false, filter, onChange
|
||||
const renderDurationLabel = (sec: number): JSX.Element => {
|
||||
const textValue = (() => {
|
||||
if (sec === MIN_DURATION) {
|
||||
return t("maps.map-filter-panel.duration");
|
||||
return MIN_DURATION;
|
||||
}
|
||||
if (sec === MAX_DURATION) {
|
||||
return "∞";
|
||||
@@ -72,7 +72,7 @@ export function FilterPanel({ className, ref, playlist = false, filter, onChange
|
||||
const renderNpsLabel = (nps: number): JSX.Element => {
|
||||
const textValue = (() => {
|
||||
if (nps === MIN_NPS) {
|
||||
return "NPS";
|
||||
return MIN_NPS;
|
||||
}
|
||||
if (nps === MAX_NPS) {
|
||||
return "∞";
|
||||
@@ -167,9 +167,11 @@ export function FilterPanel({ className, ref, playlist = false, filter, onChange
|
||||
|
||||
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={0.1} />
|
||||
<BsmRange min={MIN_DURATION} max={MAX_DURATION} values={durations} onChange={onDurationsChange} renderLabel={renderDurationLabel} step={5} />
|
||||
<div className="w-full h-6 grid grid-cols-2 gap-x-12 px-4 mb-6 pt-1">
|
||||
<BsmRange min={MIN_NPS} max={MAX_NPS} values={npss} onChange={onNpssChange} renderLabel={renderNpsLabel} step={0.1} />
|
||||
<BsmRange min={MIN_DURATION} max={MAX_DURATION} values={durations} onChange={onDurationsChange} renderLabel={renderDurationLabel} step={5} />
|
||||
<span className=" text-sm font-bold text-center mt-2.5">{t("maps.map-filter-panel.nps")}</span>
|
||||
<span className=" text-sm font-bold text-center mt-2.5">{t("maps.map-filter-panel.duration")}</span>
|
||||
</div>
|
||||
<div className="w-full h-full flex gap-x-2">
|
||||
<section className="shrink-0">
|
||||
@@ -180,7 +182,6 @@ export function FilterPanel({ className, ref, playlist = false, filter, onChange
|
||||
<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)}>
|
||||
|
||||
@@ -1,48 +1,56 @@
|
||||
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";
|
||||
import { useTranslation } from "renderer/hooks/use-translation.hook";
|
||||
import { FolderLinkState } from "renderer/services/version-folder-linker.service";
|
||||
|
||||
type Props = {
|
||||
export type LinkBtnProps = {
|
||||
className?: string;
|
||||
title?: string;
|
||||
linked?: boolean;
|
||||
disabled?: boolean;
|
||||
onClick?: () => void;
|
||||
state: FolderLinkState;
|
||||
onClick?: () => unknown;
|
||||
};
|
||||
|
||||
export const LinkButton = motion(
|
||||
forwardRef((props: Props, ref) => {
|
||||
const t = useTranslation();
|
||||
const color = useThemeColor("first-color");
|
||||
export const LinkButton = ({className, title, state, onClick}: LinkBtnProps) => {
|
||||
const t = useTranslation();
|
||||
|
||||
const color = useThemeColor("first-color");
|
||||
const disabled = state === FolderLinkState.Processing || state === FolderLinkState.Pending;
|
||||
|
||||
const linkedColor = (() => {
|
||||
if (props.disabled) {
|
||||
return "orange";
|
||||
}
|
||||
if (props.linked) {
|
||||
const btnColor = () => {
|
||||
switch (state) {
|
||||
case FolderLinkState.Linked:
|
||||
return color;
|
||||
}
|
||||
return "red";
|
||||
})();
|
||||
case FolderLinkState.Pending:
|
||||
case FolderLinkState.Processing:
|
||||
return "orange";
|
||||
case FolderLinkState.Unlinked:
|
||||
return "red";
|
||||
default:
|
||||
return "red";
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
ref={ref}
|
||||
className={props.className}
|
||||
title={props.title ? t(props.title) : undefined}
|
||||
onClick={e => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
!props.disabled && props.onClick?.();
|
||||
}}
|
||||
style={{ pointerEvents: props.disabled ? "none" : "auto" }}
|
||||
tabIndex={-1}
|
||||
>
|
||||
<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>
|
||||
);
|
||||
})
|
||||
);
|
||||
const handleClick = (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
!disabled && onClick?.();
|
||||
}
|
||||
|
||||
return (
|
||||
<motion.div
|
||||
variants={{ hover: { rotate: 22.5 }, tap: { rotate: 45 } }}
|
||||
whileHover="hover"
|
||||
whileTap="tap"
|
||||
initial={{ rotate: 0 }}
|
||||
className={className}
|
||||
title={title ? t(title) : null}
|
||||
onClick={handleClick}
|
||||
style={{ pointerEvents: disabled ? "none" : "auto" }}
|
||||
tabIndex={-1}
|
||||
>
|
||||
<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: btnColor() }} />
|
||||
<BsmIcon className="p-1 absolute top-0 left-0 h-full w-full !bg-transparent -rotate-45 brightness-150" icon={state === FolderLinkState.Linked ? "link" : "unlink"} style={{ color: btnColor() }} />
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
|
||||
+1
-1
@@ -429,7 +429,7 @@ export const LocalMapsListPanel = forwardRef(({ version, className, filter, sear
|
||||
|
||||
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()}>
|
||||
<VariableSizeList className="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>
|
||||
|
||||
@@ -21,6 +21,7 @@ import useDoubleClick from "use-double-click";
|
||||
import { GlowEffect } from "../shared/glow-effect.component";
|
||||
import { useDelayedState } from "renderer/hooks/use-delayed-state.hook";
|
||||
import { useService } from "renderer/hooks/use-service.hook";
|
||||
import Tippy from "@tippyjs/react";
|
||||
|
||||
export type ParsedMapDiff = { type: BsvMapDifficultyType; name: string; stars: number };
|
||||
|
||||
@@ -51,7 +52,6 @@ export type MapItemProps<T = unknown> = {
|
||||
};
|
||||
|
||||
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 = useService(LinkOpenerService);
|
||||
const audioPlayer = useService(AudioPlayerService);
|
||||
|
||||
@@ -70,7 +70,7 @@ export const MapItem = memo(({ hash, title, autor, songAutor, coverUrl, songUrl,
|
||||
onDoubleClick: () => onDoubleClick?.(callBackParam),
|
||||
});
|
||||
|
||||
const songPlaying = useObservable(audioPlayer.playing$.pipe(map(playing => playing && audioPlayer.src === songUrl)));
|
||||
const songPlaying = useObservable(() => audioPlayer.playing$.pipe(map(playing => playing && audioPlayer.src === songUrl)));
|
||||
|
||||
const previewUrl = mapId ? `https://allpoland.github.io/ArcViewer/?id=${mapId}` : null;
|
||||
const mapUrl = mapId ? `https://beatsaver.com/maps/${mapId}` : null;
|
||||
@@ -156,25 +156,25 @@ export const MapItem = memo(({ hash, title, autor, songAutor, coverUrl, songUrl,
|
||||
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: 0.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>
|
||||
<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: 0.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" />
|
||||
@@ -191,8 +191,8 @@ export const MapItem = memo(({ hash, title, autor, songAutor, coverUrl, songUrl,
|
||||
</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">
|
||||
<BsmImage className="absolute top-0 left-0 w-full h-full -z-[1] object-cover saturate-200" 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-neutral-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}
|
||||
@@ -240,52 +240,72 @@ export const MapItem = memo(({ hash, title, autor, songAutor, coverUrl, songUrl,
|
||||
</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">
|
||||
<div className="absolute bg-light-main-color-3 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);
|
||||
}}
|
||||
/>
|
||||
<Tippy content={t("maps.map-item.delete")} placement="left" theme="default">
|
||||
<div>
|
||||
<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);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</Tippy>
|
||||
)}
|
||||
{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);
|
||||
}}
|
||||
/>
|
||||
<Tippy content={t("maps.map-item.download")} placement="left" theme="default">
|
||||
<div>
|
||||
<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);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</Tippy>
|
||||
)}
|
||||
{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);
|
||||
}}
|
||||
/>
|
||||
<Tippy content={t("maps.map-item.cancel-download")} placement="left" theme="default">
|
||||
<div>
|
||||
<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);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</Tippy>
|
||||
)}
|
||||
{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" />}
|
||||
{downloading &&
|
||||
<Tippy content={t("maps.map-item.downloading")} placement="left" theme="default">
|
||||
<div>
|
||||
<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" />
|
||||
</div>
|
||||
</Tippy>
|
||||
}
|
||||
{previewUrl && (
|
||||
<Tippy content={t("maps.map-item.preview")} placement="left" theme="default">
|
||||
<div>
|
||||
<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"
|
||||
@@ -297,8 +317,12 @@ export const MapItem = memo(({ hash, title, autor, songAutor, coverUrl, songUrl,
|
||||
openPreview();
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</Tippy>
|
||||
)}
|
||||
{mapId && (
|
||||
<Tippy content={t("maps.map-item.bsr-code")} placement="left" theme="default">
|
||||
<div>
|
||||
<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"
|
||||
@@ -310,6 +334,8 @@ export const MapItem = memo(({ hash, title, autor, songAutor, coverUrl, songUrl,
|
||||
copyBsr();
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</Tippy>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+45
-72
@@ -1,24 +1,22 @@
|
||||
import { DetailedHTMLProps, useEffect, useRef, useState } from "react";
|
||||
import { 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 { VersionFolderLinkerService, VersionLinkerActionListener } from "renderer/services/version-folder-linker.service";
|
||||
import { FolderLinkState, VersionFolderLinkerService, VersionLinkerActionListener } from "renderer/services/version-folder-linker.service";
|
||||
import { useService } from "renderer/hooks/use-service.hook";
|
||||
import { BsContentTabPanel } from "../shared/bs-content-tab-panel/bs-content-tab-panel.component";
|
||||
import { BsmButton } from "../shared/bsm-button.component";
|
||||
import { MapIcon } from "../svgs/icons/map-icon.component";
|
||||
import { PlaylistIcon } from "../svgs/icons/playlist-icon.component";
|
||||
import { useObservable } from "renderer/hooks/use-observable.hook";
|
||||
import { of } from "rxjs";
|
||||
|
||||
type Props = {
|
||||
version?: BSVersion;
|
||||
@@ -29,7 +27,6 @@ export function MapsPlaylistsPanel({ version, isActive }: Props) {
|
||||
|
||||
const mapsService = useService(MapsManagerService);
|
||||
const mapsDownloader = useService(MapsDownloaderService);
|
||||
const osDiagnostic = useService(OsDiagnosticService);
|
||||
const linker = useService(VersionFolderLinkerService);
|
||||
|
||||
const [tabIndex, setTabIndex] = useState(0);
|
||||
@@ -37,9 +34,7 @@ export function MapsPlaylistsPanel({ version, isActive }: Props) {
|
||||
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 mapsLinkedState = useObservable(() => version ? mapsService.$mapsFolderLinkState(version) : of(null), FolderLinkState.Unlinked, [version]);
|
||||
const t = useTranslation();
|
||||
const mapsRef = useRef<any>();
|
||||
|
||||
@@ -50,8 +45,6 @@ export function MapsPlaylistsPanel({ version, isActive }: Props) {
|
||||
|
||||
loadMapIsLinked();
|
||||
|
||||
const sub = mapsService.$mapsLinkingPending(version).pipe(debounceTime(50)).subscribe(setLinkingPending);
|
||||
|
||||
const onMapsLinked: VersionLinkerActionListener = action => {
|
||||
if (!action.relativeFolder.includes(MapsManagerService.RELATIVE_MAPS_FOLDER)) {
|
||||
return;
|
||||
@@ -63,7 +56,6 @@ export function MapsPlaylistsPanel({ version, isActive }: Props) {
|
||||
linker.onVersionFolderUnlinked(onMapsLinked);
|
||||
|
||||
return () => {
|
||||
sub.unsubscribe();
|
||||
linker.removeVersionFolderLinkedListener(onMapsLinked);
|
||||
linker.removeVersionFolderUnlinkedListener(onMapsLinked);
|
||||
};
|
||||
@@ -80,6 +72,10 @@ export function MapsPlaylistsPanel({ version, isActive }: Props) {
|
||||
return setPlaylistSearch(() => value);
|
||||
};
|
||||
|
||||
const handleMapsAddClick = () => {
|
||||
mapsDownloader.openDownloadMapModal(version, mapsRef.current.getMaps?.());
|
||||
};
|
||||
|
||||
const handleMapsLinkClick = () => {
|
||||
if (!mapsLinked) {
|
||||
return mapsService.linkVersion(version);
|
||||
@@ -87,56 +83,6 @@ export function MapsPlaylistsPanel({ version, isActive }: Props) {
|
||||
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);
|
||||
}}
|
||||
tabIndex={-1}
|
||||
>
|
||||
<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("misc.add")}</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={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 [];
|
||||
@@ -150,6 +96,15 @@ export function MapsPlaylistsPanel({ version, isActive }: Props) {
|
||||
return (
|
||||
<div className="w-full h-full flex flex-col items-center justify-center gap-4">
|
||||
<nav className="w-full shrink-0 flex h-9 justify-center px-40 gap-2 text-main-color-1 dark:text-white">
|
||||
<BsmButton
|
||||
className="flex items-center justify-center w-fit rounded-full px-2 py-1 font-bold"
|
||||
icon="add"
|
||||
text="misc.add"
|
||||
typeColor="primary"
|
||||
withBar={false}
|
||||
disabled={tabIndex === 1}
|
||||
onClick={handleMapsAddClick}
|
||||
/>
|
||||
<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>
|
||||
@@ -158,16 +113,34 @@ export function MapsPlaylistsPanel({ version, isActive }: Props) {
|
||||
</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)` }}>
|
||||
<BsContentTabPanel
|
||||
tabIndex={tabIndex}
|
||||
onTabChange={index => setTabIndex(index)}
|
||||
tabs={[
|
||||
{
|
||||
text: "misc.maps",
|
||||
icon: MapIcon,
|
||||
onClick: () => setTabIndex(0),
|
||||
linkProps: version ? {
|
||||
state: mapsLinkedState,
|
||||
onClick: handleMapsLinkClick,
|
||||
} : null,
|
||||
},
|
||||
{
|
||||
text: "misc.playlists",
|
||||
icon: PlaylistIcon,
|
||||
onClick: () => setTabIndex(1),
|
||||
},
|
||||
]}
|
||||
>
|
||||
<>
|
||||
<LocalMapsListPanel isActive={isActive && tabIndex === 0} 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>
|
||||
</>
|
||||
</BsContentTabPanel>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -16,13 +16,10 @@ type Props = {
|
||||
};
|
||||
|
||||
export const MapsRow = memo(({ maps, style, selectedMaps$, onMapSelect, onMapDelete }: Props) => {
|
||||
const selectedMaps = useObservable<BsmLocalMap[]>(
|
||||
selectedMaps$.pipe(
|
||||
const selectedMaps = useObservable<BsmLocalMap[]>(() => selectedMaps$.pipe(
|
||||
map(selectedMaps => selectedMaps.filter(selected => maps.some(map => map.hash === selected.hash))),
|
||||
distinctUntilChanged(equal)
|
||||
),
|
||||
[]
|
||||
);
|
||||
distinctUntilChanged(equal),
|
||||
), []);
|
||||
|
||||
const extractMapDiffs = (map: BsmLocalMap): Map<BsvMapCharacteristic, ParsedMapDiff[]> => {
|
||||
const res = new Map<BsvMapCharacteristic, ParsedMapDiff[]>();
|
||||
@@ -48,11 +45,30 @@ export const MapsRow = memo(({ maps, style, selectedMaps$, onMapSelect, onMapDel
|
||||
};
|
||||
|
||||
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 <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}>
|
||||
<ul className="h-fit w-full flex flex-nowrap basis-0 gap-x-2 p-2" style={style}>
|
||||
{maps?.map(renderMapItem)}
|
||||
</ul>
|
||||
);
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ export const LoginToSteamModal: ModalComponent<
|
||||
const [password, setPassword] = useState("");
|
||||
const [stay, setStay] = useState(false);
|
||||
const [showPassword, setShowPassword] = useState(false);
|
||||
const qrCodeUrl = useObservable(data.qrCode$);
|
||||
const qrCodeUrl = useObservable(() => data.qrCode$);
|
||||
const t = useTranslation();
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -27,8 +27,8 @@ export const DownloadMapsModal: ModalComponent<void, { version: BSVersion; owned
|
||||
const progressBar = useService(ProgressBarService);
|
||||
const os = useService(OsDiagnosticService);
|
||||
|
||||
const currentDownload = useObservable(mapsDownloader.currentMapDownload$);
|
||||
const mapsInQueue = useObservable(mapsDownloader.mapsInQueue$);
|
||||
const currentDownload = useObservable(() => mapsDownloader.currentMapDownload$);
|
||||
const mapsInQueue = useObservable(() => mapsDownloader.mapsInQueue$);
|
||||
const t = useTranslation();
|
||||
const filterContainerRef = useRef(null);
|
||||
const [filter, setFilter] = useState<MapFilter>({});
|
||||
@@ -37,7 +37,7 @@ export const DownloadMapsModal: ModalComponent<void, { version: BSVersion; owned
|
||||
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 isOnline = useObservable(() => os.isOnline$);
|
||||
const [searchParams, setSearchParams] = useState<SearchParams>({
|
||||
sortOrder,
|
||||
filter,
|
||||
|
||||
+3
-3
@@ -44,10 +44,10 @@ export const DownloadModelsModal: ModalComponent<void, { version: BSVersion; typ
|
||||
}))
|
||||
);
|
||||
|
||||
const currentDownload = useObservable(modelsDownloader.currentDownload$(), null);
|
||||
const downloadQueue = useObservable(modelsDownloader.getQueue$(), []);
|
||||
const currentDownload = useObservable(() => modelsDownloader.currentDownload$(), null);
|
||||
const downloadQueue = useObservable(() => modelsDownloader.getQueue$(), []);
|
||||
const [msModels, msModels$] = useBehaviorSubject<MSModel[]>([]);
|
||||
const isOnline = useObservable(os.isOnline$, true);
|
||||
const isOnline = useObservable(() => os.isOnline$, true);
|
||||
const [error, error$] = useBehaviorSubject(false);
|
||||
const [isLoading, isLoading$] = useBehaviorSubject(false);
|
||||
const [ownedModels, setOwnedModels] = useState<BsmLocalModel[]>(owned ?? []);
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
import { BsmButton } from "renderer/components/shared/bsm-button.component"
|
||||
import { BsmImage } from "renderer/components/shared/bsm-image.component"
|
||||
import { ModalComponent, ModalExitCode } from "renderer/services/modale.service"
|
||||
import BeatConflict from "../../../../../assets/images/apngs/beat-conflict.png";
|
||||
import { useTranslation } from "renderer/hooks/use-translation.hook";
|
||||
import { BsmCheckbox } from "renderer/components/shared/bsm-checkbox.component";
|
||||
import { useState } from "react";
|
||||
|
||||
export const NeedLaunchAdminModal: ModalComponent<boolean, void> = ({resolver}) => {
|
||||
|
||||
const t = useTranslation();
|
||||
|
||||
const [dontShowAgain, setDontShowAgain] = useState(false);
|
||||
|
||||
return (
|
||||
<form className="text-gray-800 dark:text-gray-200 flex flex-col min-w-[350px]">
|
||||
<h1 className="text-3xl uppercase tracking-wide w-full text-center">{t("modals.launch-as-admin.title")}</h1>
|
||||
<BsmImage className="mx-auto h-24" image={BeatConflict} />
|
||||
<div className="flex flex-col gap-3">
|
||||
<p className="w-0 min-w-full">{t("modals.launch-as-admin.body.info")}</p>
|
||||
<p className="w-0 min-w-full">{t("modals.launch-as-admin.body.info-2")}</p>
|
||||
<p className="w-0 min-w-full text-sm italic">{t("modals.launch-as-admin.body.info-3")}</p>
|
||||
</div>
|
||||
<div className="flex flex-row justify-start items-center gap-1.5 my-4">
|
||||
<BsmCheckbox className="relative z-[1] w-6 aspect-square" checked={dontShowAgain} onChange={setDontShowAgain} />
|
||||
<span>{t("modals.launch-as-admin.not-remind-me")}</span>
|
||||
</div>
|
||||
<div className="grid grid-flow-col grid-cols-2 gap-4">
|
||||
<BsmButton typeColor="cancel" className="rounded-md text-center flex items-center justify-center transition-all h-8" onClick={() => resolver({ exitCode: ModalExitCode.CANCELED })} withBar={false} text="misc.cancel" />
|
||||
<BsmButton typeColor="primary" className="rounded-md text-center flex items-center justify-center transition-all h-8" onClick={() => resolver({ exitCode: ModalExitCode.COMPLETED, data: dontShowAgain })} withBar={false} text="modals.launch-as-admin.launch-as-admin" />
|
||||
</div>
|
||||
</form>
|
||||
)
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
import Tippy from "@tippyjs/react";
|
||||
import { Variants } from "framer-motion";
|
||||
import { useEffect, useState } from "react";
|
||||
import { LinkButton } from "renderer/components/maps-mangement-components/link-button.component";
|
||||
import { BsmBasicSpinner } from "renderer/components/shared/bsm-basic-spinner/bsm-basic-spinner.component";
|
||||
@@ -12,7 +11,7 @@ import { BSVersionManagerService } from "renderer/services/bs-version-manager.se
|
||||
import { ConfigurationService } from "renderer/services/configuration.service";
|
||||
import { IpcService } from "renderer/services/ipc.service";
|
||||
import { ModalComponent } from "renderer/services/modale.service";
|
||||
import { VersionFolderLinkerService, VersionLinkerActionType } from "renderer/services/version-folder-linker.service";
|
||||
import { FolderLinkState, VersionFolderLinkerService, VersionLinkerActionType } from "renderer/services/version-folder-linker.service";
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
|
||||
export const ShareFoldersModal: ModalComponent<void, BSVersion> = ({ data }) => {
|
||||
@@ -107,33 +106,12 @@ const FolderItem = ({ version, relativeFolder, onDelete }: FolderProps) => {
|
||||
|
||||
const t = useTranslation();
|
||||
|
||||
const name = relativeFolder.split(window.electron.path.sep).at(-1);
|
||||
const color = useThemeColor("first-color");
|
||||
|
||||
const variants: Variants = {
|
||||
hover: { rotate: 22.5 },
|
||||
tap: { rotate: 45 },
|
||||
};
|
||||
|
||||
const pending = useObservable(linker.isPending(version, relativeFolder));
|
||||
const processing = useObservable(linker.isProcessing(version, relativeFolder));
|
||||
const linkDisabled = pending || processing;
|
||||
|
||||
const [linked, setLinked] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (pending) {
|
||||
return;
|
||||
}
|
||||
loadFolderIsLinked();
|
||||
}, [version, relativeFolder, pending]);
|
||||
|
||||
const loadFolderIsLinked = () => {
|
||||
linker.isVersionFolderLinked(version, relativeFolder).toPromise().then(setLinked);
|
||||
};
|
||||
const state = useObservable(() => linker.$folderLinkedState(version, relativeFolder), FolderLinkState.Unlinked, [version, relativeFolder]);
|
||||
const name = relativeFolder.split(window.electron.path.sep).at(-1);
|
||||
|
||||
const onClickLink = () => {
|
||||
if (linked) {
|
||||
if (state === FolderLinkState.Linked) {
|
||||
return linker.unlinkVersionFolder({
|
||||
version,
|
||||
relativeFolder,
|
||||
@@ -150,7 +128,6 @@ const FolderItem = ({ version, relativeFolder, onDelete }: FolderProps) => {
|
||||
|
||||
const cancelLink = () => {
|
||||
linker.cancelAction(version, relativeFolder);
|
||||
loadFolderIsLinked();
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -159,14 +136,18 @@ const FolderItem = ({ version, relativeFolder, onDelete }: FolderProps) => {
|
||||
{name}
|
||||
</span>
|
||||
<div className="flex flex-row gap-1.5">
|
||||
<Tippy placement="left" content={t(`modals.shared-folders.buttons.${linked ? "unlink-folder" : "link-folder"}`)} arrow={false}>
|
||||
<LinkButton variants={variants} linked={linked} disabled={linkDisabled} whileHover="hover" whileTap="tap" className="p-0.5 h-7 shrink-0 aspect-square blur-0 cursor-pointer hover:brightness-75" onClick={onClickLink} />
|
||||
<Tippy placement="left" content={t(`modals.shared-folders.buttons.${state === FolderLinkState.Linked ? "unlink-folder" : "link-folder"}`)} arrow={false}>
|
||||
<LinkButton
|
||||
className="p-0.5 h-7 shrink-0 aspect-square blur-0 cursor-pointer hover:brightness-75"
|
||||
state={state}
|
||||
onClick={onClickLink}
|
||||
/>
|
||||
</Tippy>
|
||||
{(() => {
|
||||
if (processing) {
|
||||
if (state === FolderLinkState.Processing) {
|
||||
return <BsmBasicSpinner className="aspect-square h-7 rounded-md p-1 dark:bg-main-color-2" thikness="3.5px" style={{ color }} />;
|
||||
}
|
||||
if (pending) {
|
||||
if (state === FolderLinkState.Pending) {
|
||||
return (
|
||||
<BsmButton
|
||||
className="aspect-square h-7 rounded-md p-1"
|
||||
|
||||
@@ -8,7 +8,7 @@ import { BsmIcon } from "../svgs/bsm-icon.component";
|
||||
export function Modal() {
|
||||
const modalSevice = ModalService.getInstance();
|
||||
|
||||
const ModalComponent = useObservable(modalSevice.getModalToShow());
|
||||
const ModalComponent = useObservable(() => modalSevice.getModalToShow());
|
||||
|
||||
const modalData = modalSevice.getModalData();
|
||||
const resolver = modalSevice.getResolver();
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
import { useRef, useState } from "react";
|
||||
import { ModelsTabsNavbar } from "./models-tabs-navbar.component";
|
||||
import { ModelsGrid } from "./models-grid.component";
|
||||
import { MSModelType } from "shared/models/models/model-saber.model";
|
||||
import { BsmDropdownButton, DropDownItem } from "../shared/bsm-dropdown-button.component";
|
||||
@@ -14,6 +13,16 @@ import { NotificationService } from "renderer/services/notification.service";
|
||||
import { ConfigurationService } from "renderer/services/configuration.service";
|
||||
import { useTranslation } from "renderer/hooks/use-translation.hook";
|
||||
import { lt } from "semver";
|
||||
import { lastValueFrom, of, take } from "rxjs";
|
||||
import { FolderLinkState } from "renderer/services/version-folder-linker.service";
|
||||
import { BsContentTabItemProps } from "../shared/bs-content-tab-panel/bs-content-tab-item.component";
|
||||
import { BsContentTabPanel } from "../shared/bs-content-tab-panel/bs-content-tab-panel.component";
|
||||
import { ModelTypeAvatarIcon } from "../svgs/icons/model-type-avatar-icon.component";
|
||||
import { SvgIcon } from "../svgs/svg-icon.type";
|
||||
import { ModelTypeSaberIcon } from "../svgs/icons/model-type-saber-icon.component";
|
||||
import { ModelTypePlatformIcon } from "../svgs/icons/model-type-platform-icon.component";
|
||||
import { ModelTypeBloqIcon } from "../svgs/icons/model-type-bloq-icon.component";
|
||||
import { useObservable } from "renderer/hooks/use-observable.hook";
|
||||
|
||||
export function ModelsPanel({ version, isActive, goToMods }: { version?: BSVersion; isActive: boolean; goToMods?: () => void }) {
|
||||
const modelsManager = useService(ModelsManagerService);
|
||||
@@ -29,9 +38,15 @@ export function ModelsPanel({ version, isActive, goToMods }: { version?: BSVersi
|
||||
|
||||
const [modelTypeTab, setModelTypeTab] = useState<MSModelType>(MSModelType.Avatar);
|
||||
const [currentTabIndex, setCurrentTabIndex] = useState<number>(0);
|
||||
|
||||
const [search, setSearch] = useState<string>("");
|
||||
|
||||
const modelsLinkStats = {
|
||||
[MSModelType.Avatar]: useObservable(() => version ? modelsManager.$modelsLinkingState(version, MSModelType.Avatar) : of(null), FolderLinkState.Unlinked, [version]),
|
||||
[MSModelType.Saber]: useObservable(() => version ? modelsManager.$modelsLinkingState(version, MSModelType.Saber) : of(null), FolderLinkState.Unlinked, [version]),
|
||||
[MSModelType.Platfrom]: useObservable(() => version ? modelsManager.$modelsLinkingState(version, MSModelType.Platfrom) : of(null), FolderLinkState.Unlinked, [version]),
|
||||
[MSModelType.Bloq]: useObservable(() => version ? modelsManager.$modelsLinkingState(version, MSModelType.Bloq) : of(null), FolderLinkState.Unlinked, [version]),
|
||||
}
|
||||
|
||||
useOnUpdate(() => {
|
||||
if (!isActive || !goToMods) {
|
||||
return;
|
||||
@@ -93,6 +108,44 @@ export function ModelsPanel({ version, isActive, goToMods }: { version?: BSVersi
|
||||
{ text: "models.panel.actions.drop-down.delete", onClick: deleteModels, icon: "trash" },
|
||||
];
|
||||
|
||||
const getModelTabProps = (model: MSModelType): BsContentTabItemProps => {
|
||||
|
||||
const onClick = async () => {
|
||||
const state = await lastValueFrom(modelsManager.$modelsLinkingState(version, model).pipe(take(1)));
|
||||
if (state === FolderLinkState.Pending || state === FolderLinkState.Processing) { return; }
|
||||
if (state === FolderLinkState.Linked) {
|
||||
modelsManager.unlinkModels(model, version);
|
||||
} else {
|
||||
modelsManager.linkModels(model, version);
|
||||
}
|
||||
}
|
||||
|
||||
const getModelIcon = (model: MSModelType): SvgIcon => {
|
||||
switch (model) {
|
||||
case MSModelType.Avatar:
|
||||
return ModelTypeAvatarIcon;
|
||||
case MSModelType.Saber:
|
||||
return ModelTypeSaberIcon;
|
||||
case MSModelType.Platfrom:
|
||||
return ModelTypePlatformIcon;
|
||||
case MSModelType.Bloq:
|
||||
return ModelTypeBloqIcon;
|
||||
default:
|
||||
return ModelTypeAvatarIcon;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
text: `models.types.plural.${model}`,
|
||||
icon: getModelIcon(model),
|
||||
onClick: () => setModelTypeTab(model),
|
||||
linkProps: version ? {
|
||||
onClick,
|
||||
state: modelsLinkStats[model],
|
||||
} : null
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div ref={ref} className="w-full h-full flex flex-col items-center justify-center gap-4">
|
||||
<div className="w-full shrink-0 flex h-9 justify-center px-40 gap-2 text-main-color-1 dark:text-white">
|
||||
@@ -112,24 +165,23 @@ export function ModelsPanel({ version, isActive, goToMods }: { version?: BSVersi
|
||||
</div>
|
||||
<BsmDropdownButton items={threeDotsItems} 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} menuTranslationY="6px" align="center" />
|
||||
</div>
|
||||
<div className="w-full h-full flex flex-row bg-light-main-color-3 dark:bg-main-color-2 rounded-md shadow-black shadow-md overflow-hidden">
|
||||
<ModelsTabsNavbar
|
||||
className="flex-shrink-0"
|
||||
version={version}
|
||||
tabIndex={currentTabIndex}
|
||||
onTabChange={(index, tab) => {
|
||||
setModelTypeTab(() => tab.extra);
|
||||
setCurrentTabIndex(() => index);
|
||||
}}
|
||||
/>
|
||||
|
||||
<div className="flex-grow h-full flex flex-col transition-all duration-300" style={{ translate: `0 ${0 - currentTabIndex * 100}%` }}>
|
||||
<BsContentTabPanel
|
||||
tabIndex={currentTabIndex}
|
||||
onTabChange={(index) => setCurrentTabIndex(index)}
|
||||
tabs={[
|
||||
getModelTabProps(MSModelType.Avatar),
|
||||
getModelTabProps(MSModelType.Saber),
|
||||
getModelTabProps(MSModelType.Platfrom),
|
||||
getModelTabProps(MSModelType.Bloq),
|
||||
]}
|
||||
>
|
||||
<>
|
||||
<ModelsGrid ref={modelsGridRefs[0]} version={version} type={MSModelType.Avatar} active={isActive && modelTypeTab === MSModelType.Avatar} search={search} downloadModels={openDownloadModal} />
|
||||
<ModelsGrid ref={modelsGridRefs[1]} version={version} type={MSModelType.Saber} active={isActive && modelTypeTab === MSModelType.Saber} search={search} downloadModels={openDownloadModal} />
|
||||
<ModelsGrid ref={modelsGridRefs[2]} version={version} type={MSModelType.Platfrom} active={isActive && modelTypeTab === MSModelType.Platfrom} search={search} downloadModels={openDownloadModal} />
|
||||
<ModelsGrid ref={modelsGridRefs[3]} version={version} type={MSModelType.Bloq} active={isActive && modelTypeTab === MSModelType.Bloq} search={search} downloadModels={openDownloadModal} />
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
</BsContentTabPanel>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
import { MSModelType } from "../../../shared/models/models/model-saber.model";
|
||||
import { LinkButton } from "../maps-mangement-components/link-button.component";
|
||||
import { useState } from "react";
|
||||
import { useOnUpdate } from "renderer/hooks/use-on-update.hook";
|
||||
import { ModelsManagerService } from "renderer/services/models-management/models-manager.service";
|
||||
import { BsContentNavBar, BsContentNavBarTab } from "../shared/bs-content-nav-bar.component";
|
||||
import { useConstant } from "renderer/hooks/use-constant.hook";
|
||||
import { BsmIcon } from "../svgs/bsm-icon.component";
|
||||
import { MODEL_TYPES } from "../../../shared/models/models/constants";
|
||||
import { useService } from "renderer/hooks/use-service.hook";
|
||||
import { useTranslation } from "renderer/hooks/use-translation.hook";
|
||||
|
||||
type Props = {
|
||||
className?: string;
|
||||
version?: BSVersion;
|
||||
tabIndex: number;
|
||||
onTabChange: (index: number, tab: BsContentNavBarTab<MSModelType>) => void;
|
||||
};
|
||||
|
||||
export function ModelsTabsNavbar({ className, version, tabIndex, onTabChange }: Props) {
|
||||
const tabs = useConstant<BsContentNavBarTab<MSModelType>[]>(() => {
|
||||
return MODEL_TYPES.map(type => ({
|
||||
text: type,
|
||||
extra: type,
|
||||
}));
|
||||
});
|
||||
|
||||
return <BsContentNavBar className={`!rounded-none shadow-sm ${className ?? ""}`} tabIndex={tabIndex} onTabChange={onTabChange} tabs={tabs} renderTab={(props, tab, activeTab) => <ModelTab version={version} modelType={tab.extra} {...props} active={tab === activeTab} />} />;
|
||||
}
|
||||
|
||||
type TabProps = {
|
||||
version?: BSVersion;
|
||||
modelType: MSModelType;
|
||||
active?: boolean;
|
||||
} & React.ComponentProps<"li">;
|
||||
|
||||
function ModelTab({ version, modelType, active, onClick }: TabProps) {
|
||||
const modelsManager = useService(ModelsManagerService);
|
||||
|
||||
const t = useTranslation();
|
||||
|
||||
const [modelsAreLinked, setModelsAreLinked] = useState(false);
|
||||
const [linkBtnDisabled, setLinkBtnDisabled] = useState(false);
|
||||
|
||||
useOnUpdate(() => {
|
||||
if (!version) {
|
||||
return;
|
||||
}
|
||||
|
||||
const sub = modelsManager.$modelsLinkingPending(version, modelType).subscribe(async pending => {
|
||||
if (pending) {
|
||||
return setLinkBtnDisabled(() => pending);
|
||||
}
|
||||
const modelsLinked = await modelsManager.isModelsLinked(version, modelType);
|
||||
setModelsAreLinked(() => modelsLinked);
|
||||
setLinkBtnDisabled(() => pending);
|
||||
});
|
||||
|
||||
return () => {
|
||||
sub.unsubscribe();
|
||||
};
|
||||
}, [version]);
|
||||
|
||||
const linkModels = () => modelsManager.linkModels(modelType, version);
|
||||
const unlinkModels = () => modelsManager.unlinkModels(modelType, version);
|
||||
|
||||
const onClickLink = () => {
|
||||
if (!version) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
if (modelsAreLinked) {
|
||||
return unlinkModels();
|
||||
}
|
||||
return linkModels();
|
||||
};
|
||||
|
||||
return (
|
||||
<li className={`relative w-full cursor-pointer flex-1 text-center text-lg font-bold flex justify-center items-center content-center px-7 dim-on-hover ${active ? "dim" : ""}`} onClick={onClick}>
|
||||
<div className="flex flex-col gap-0.5 justify-start items-center text-main-color-1 dark:text-gray-200">
|
||||
<BsmIcon icon={modelType} className="w-7 h-7" />
|
||||
<span className=" font-thin italic text-xs">{t(`models.types.plural.${modelType}`)}</span>
|
||||
</div>
|
||||
<div className="flex items-center absolute top-1.5 left-1.5">{!!version && <LinkButton variants={{ hover: { rotate: 22.5 }, tap: { rotate: 45 } }} disabled={linkBtnDisabled} whileHover="hover" whileTap="tap" initial={{ rotate: 0 }} className="block w-6 h-6 aspect-square blur-0 cursor-pointer hover:brightness-75" linked={modelsAreLinked} title={modelsAreLinked ? "models.panel.actions.unlink-models" : "models.panel.actions.link-models"} onClick={onClickLink} />}</div>
|
||||
</li>
|
||||
);
|
||||
}
|
||||
@@ -12,7 +12,7 @@ export const BsManagerIcon = memo(({ className }: { className?: string }) => {
|
||||
const audioPlayer = useService(AudioPlayerService);
|
||||
|
||||
const { firstColor, secondColor } = useThemeColor();
|
||||
const playing = useObservable(audioPlayer.playing$);
|
||||
const playing = useObservable(() => audioPlayer.playing$);
|
||||
|
||||
const { bpm } = audioPlayer;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ export function SharedNavBarItem() {
|
||||
const pageState = useService(PageStateService);
|
||||
|
||||
const t = useTranslation();
|
||||
const route = useObservable(pageState.route$);
|
||||
const route = useObservable(() => pageState.route$);
|
||||
const color = useThemeColor("first-color");
|
||||
|
||||
return (
|
||||
|
||||
@@ -19,8 +19,8 @@ export function NavBar() {
|
||||
const versionManager = useService(BSVersionManagerService);
|
||||
const versionDownloader = useService(BsDownloaderService);
|
||||
|
||||
const downloadingVersion = useObservable(versionDownloader.downloadingVersion$.pipe(distinctUntilChanged(equal)));
|
||||
const installedVersions = useObservable(versionManager.installedVersions$);
|
||||
const downloadingVersion = useObservable(() => versionDownloader.downloadingVersion$.pipe(distinctUntilChanged(equal)));
|
||||
const installedVersions = useObservable(() => versionManager.installedVersions$);
|
||||
|
||||
const color = useThemeColor("first-color");
|
||||
const t = useTranslation();
|
||||
|
||||
@@ -7,7 +7,7 @@ import { useService } from "renderer/hooks/use-service.hook";
|
||||
export function NotificationOverlay() {
|
||||
const notificationService = useService(NotificationService);
|
||||
|
||||
const notifications = useObservable(notificationService.notifications$);
|
||||
const notifications = useObservable(() => notificationService.notifications$);
|
||||
|
||||
return (
|
||||
<ul className="absolute h-full w-0 top-0 right-0 z-[100] pt-10">
|
||||
|
||||
@@ -9,9 +9,9 @@ import { useService } from "renderer/hooks/use-service.hook";
|
||||
export function BsmProgressBar() {
|
||||
const progressBarService = useService(ProgressBarService);
|
||||
|
||||
const progressData = useObservable(progressBarService.progressData$);
|
||||
const visible = useObservable(progressBarService.visible$);
|
||||
const style = useObservable(progressBarService.style$);
|
||||
const progressData = useObservable(() => progressBarService.progressData$);
|
||||
const visible = useObservable(() => progressBarService.visible$);
|
||||
const style = useObservable(() => progressBarService.style$);
|
||||
|
||||
const progressLabel = (() => {
|
||||
if (!progressData) {
|
||||
|
||||
@@ -9,7 +9,7 @@ type Props = {
|
||||
};
|
||||
|
||||
export default function TextProgressBar({ value$, className, style }: Props) {
|
||||
const value = useObservable(value$);
|
||||
const value = useObservable(() => value$);
|
||||
|
||||
const prefix = typeof value === "number" ? "%" : "";
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ export function SettingRadioArray<T>({ id, items, selectedItemId, selectedItemVa
|
||||
return (
|
||||
<div id={id} className="w-full flex gap-1.5" style={{flexDirection: direction}}>
|
||||
{items.map(i => (
|
||||
<div onClick={() => onItemSelected(i)} key={i.id} className={`py-3 w-full flex cursor-pointer justify-between items-center rounded-md px-2 transition-colors duration-200 ${isSelected(i) ? "bg-light-main-color-3 dark:bg-main-color-3" : "bg-light-main-color-1 dark:bg-main-color-1"} ${i.className}`}>
|
||||
<div onClick={() => onItemSelected(i)} key={i.id} className={`py-3 w-full flex cursor-pointer justify-between items-center rounded-md px-2 transition-colors duration-300 ${isSelected(i) ? "bg-light-main-color-3 dark:bg-main-color-3" : "bg-light-main-color-1 dark:bg-main-color-1"} ${i.className}`}>
|
||||
<div className="flex items-center">
|
||||
<div className="h-5 rounded-full aspect-square border-2 border-gray-800 dark:border-white p-[3px] mr-2">
|
||||
<motion.span initial={{ scale: 0 }} animate={{ scale: isSelected(i) ? 1 : 0 }} className="h-full w-full block bg-gray-800 dark:bg-white rounded-full" />
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
import { DetailedHTMLProps, Fragment } from "react";
|
||||
import { BsmIconType } from "../svgs/bsm-icon.component";
|
||||
|
||||
type Props<T> = {
|
||||
className?: string;
|
||||
tabIndex: number;
|
||||
tabs: BsContentNavBarTab<T>[];
|
||||
renderTab: (props: DetailedHTMLProps<React.HTMLAttributes<any>, any>, tab?: BsContentNavBarTab<T>, activeTab?: BsContentNavBarTab<T>) => JSX.Element;
|
||||
onTabChange?: (index: number, tab?: BsContentNavBarTab<T>) => void;
|
||||
};
|
||||
|
||||
export type BsContentNavBarTab<T = unknown> = {
|
||||
text: string;
|
||||
icon?: BsmIconType;
|
||||
extra?: T;
|
||||
};
|
||||
|
||||
export function BsContentNavBar<T>({ className, tabIndex, tabs, renderTab, onTabChange }: Props<T>) {
|
||||
const handleTabClick = (index: number) => {
|
||||
onTabChange?.(index, tabs[index]);
|
||||
};
|
||||
|
||||
return (
|
||||
<nav className={`h-full grid grid-flow-row ${className ?? ""}`}>
|
||||
{tabs.map((tab, i) => (
|
||||
<Fragment key={JSON.stringify(tab)}>{renderTab({ onClick: () => handleTabClick(i) }, tab, tabs[tabIndex])}</Fragment>
|
||||
))}
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
import { LinkBtnProps, LinkButton } from "renderer/components/maps-mangement-components/link-button.component";
|
||||
import { SvgIcon } from "renderer/components/svgs/svg-icon.type";
|
||||
import { useTranslation } from "renderer/hooks/use-translation.hook";
|
||||
|
||||
export type BsContentTabItemProps<T = unknown> = {
|
||||
text: string;
|
||||
icon: SvgIcon;
|
||||
active?: boolean;
|
||||
value?: T;
|
||||
linkProps?: LinkBtnProps;
|
||||
onClick: (value?: T) => void;
|
||||
};
|
||||
|
||||
type BsContentTabItemComponent<T = unknown> = ({text, icon, active, value, linkProps, onClick}: BsContentTabItemProps<T>) => JSX.Element;
|
||||
|
||||
export const BsContentTabItem: BsContentTabItemComponent = ({ text, icon: Icon, active, value, linkProps, onClick }) => {
|
||||
|
||||
const t = useTranslation();
|
||||
|
||||
const handleClick = (e: React.MouseEvent<HTMLLIElement, MouseEvent>) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
onClick(value);
|
||||
}
|
||||
|
||||
return (
|
||||
<li className={`relative w-full cursor-pointer flex-1 text-center text-lg font-bold flex justify-center items-center content-center px-7 bg-light-main-color-2 dark:bg-main-color-2 hover:bg-light-main-color-1 dark:hover:bg-main-color-1 ${active && "!bg-light-main-color-1 dark:!bg-main-color-1"}`} onClick={handleClick}>
|
||||
<div className="flex flex-col gap-0.5 justify-start items-center text-main-color-1 dark:text-gray-200">
|
||||
<Icon className="w-7 h-7"/>
|
||||
<span className=" font-thin italic text-xs">{t(text)}</span>
|
||||
</div>
|
||||
{linkProps && (
|
||||
<div className="flex items-center absolute top-1.5 left-1.5">
|
||||
<LinkButton
|
||||
state={linkProps.state}
|
||||
className={linkProps.className ?? "block w-6 h-6 aspect-square blur-0 cursor-pointer hover:brightness-75"}
|
||||
title={linkProps.title}
|
||||
onClick={linkProps.onClick}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</li>
|
||||
);
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
import { useThemeColor } from "renderer/hooks/use-theme-color.hook";
|
||||
import { LaserSlider } from "../laser-slider.component";
|
||||
import { BsContentTabItem, BsContentTabItemProps } from "./bs-content-tab-item.component";
|
||||
|
||||
type Props<T = unknown> = Readonly<{
|
||||
className?: string;
|
||||
tabs: BsContentTabItemProps<T>[];
|
||||
tabIndex: number;
|
||||
onTabChange: (index: number, tab: BsContentTabItemProps<T>) => void;
|
||||
children: JSX.Element;
|
||||
}>;
|
||||
|
||||
export function BsContentTabPanel({className, tabIndex, tabs, onTabChange, children}: Props) {
|
||||
|
||||
const sliderColor = useThemeColor("second-color");
|
||||
|
||||
return (
|
||||
<div className={className ?? "w-full h-full flex flex-row bg-light-main-color-1 dark:bg-main-color-1 rounded-md shadow-black shadow-md overflow-hidden"}>
|
||||
<nav className="h-full grid grid-flow-row !rounded-none shadow-sm flex-shrink-0">
|
||||
{tabs.map((tab, i) => (
|
||||
<BsContentTabItem
|
||||
key={`${tab.text}${tab.icon}`}
|
||||
{...tab}
|
||||
active={tab.active ?? tabIndex === i}
|
||||
onClick={value => {onTabChange(i, tab); tab.onClick(value);}}
|
||||
/>
|
||||
))}
|
||||
</nav>
|
||||
<LaserSlider className="h-full w-1 relative shrink-0" mode="vertical" color={sliderColor} nbSteps={tabs.length} step={tabIndex}/>
|
||||
<div className="flex-grow h-full flex flex-col transition-all duration-300" style={{ translate: `0 ${0 - tabIndex * 100}%` }}>
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import { LinkOpenerService } from "renderer/services/link-opener.service";
|
||||
export function BsmIframeView() {
|
||||
const linkService = useService(LinkOpenerService);
|
||||
|
||||
const iframeUrl = useObservable(linkService.iframeLink$);
|
||||
const iframeUrl = useObservable(() => linkService.iframeLink$);
|
||||
const ref = useRef(null);
|
||||
useClickOutside(ref, () => linkService.closeIframe());
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
import { CSSProperties } from "react";
|
||||
|
||||
type Props = Readonly<{
|
||||
mode: "horizontal" | "vertical";
|
||||
color: string;
|
||||
className?: string;
|
||||
nbSteps: number;
|
||||
step: number;
|
||||
}>
|
||||
|
||||
export function LaserSlider({mode, color, className, nbSteps, step}: Props) {
|
||||
|
||||
const sliderStyle = ((): CSSProperties => {
|
||||
if(mode === "vertical"){
|
||||
return {
|
||||
transform: `translate(0, ${step * 100}%)`,
|
||||
height: `calc(100% / ${nbSteps})`,
|
||||
width: "100%"
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
transform: `translate(${step * 100}%, 0)`,
|
||||
width: `calc(100% / ${nbSteps})`,
|
||||
height: "100%"
|
||||
}
|
||||
})();
|
||||
|
||||
return (
|
||||
<div className={className} style={{ color }}>
|
||||
<span className="absolute h-full w-full bg-current brightness-50" />
|
||||
<span className="absolute block bg-current transition-transform duration-300 shadow-center shadow-current" style={sliderStyle} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
import { DetailedHTMLProps, Fragment } from "react";
|
||||
import { useThemeColor } from "renderer/hooks/use-theme-color.hook";
|
||||
import { useTranslation } from "renderer/hooks/use-translation.hook";
|
||||
import { LaserSlider } from "./laser-slider.component";
|
||||
|
||||
type Props = {
|
||||
tabIndex: number;
|
||||
@@ -22,10 +23,7 @@ export function TabNavBar(props: Props) {
|
||||
|
||||
return (
|
||||
<nav className={`relative h-8 shrink-0 cursor-pointer rounded-md overflow-hidden shadow-md shadow-black bg-light-main-color-2 dark:bg-main-color-2 ${props.className}`}>
|
||||
<div className="absolute w-full h-1 bottom-0" style={{ color: secondColor }}>
|
||||
<span className="absolute h-full w-full bg-current brightness-50" />
|
||||
<span className="absolute h-full block bg-current transition-transform duration-300 shadow-center shadow-current" style={{ transform: `translate(${currentIndex * 100}%, 0)`, width: `calc(100% / ${props.tabsText.length})` }} />
|
||||
</div>
|
||||
<LaserSlider className="absolute w-full h-1 bottom-0" mode="horizontal" color={secondColor} nbSteps={props.tabsText.length} step={currentIndex} />
|
||||
<ul className="grid" style={{ gridTemplateColumns: `repeat(${props.tabsText.length}, minmax(0, 1fr))` }}>
|
||||
{props.tabsText.map((text, index) =>
|
||||
props.renderTab ? (
|
||||
|
||||
@@ -56,20 +56,16 @@ import { RussianIcon } from "./flags/russian-icon.component";
|
||||
import { ChineseIcon } from "./flags/chinese-icon.component";
|
||||
import { ChineseTraditionalIcon } from "./flags/chineseTraditional-icon.component";
|
||||
import { JapanIcon } from "./flags/japan-icon.component";
|
||||
import { MSModelType } from "shared/models/models/model-saber.model";
|
||||
import { ModelTypeAvatarIcon } from "./icons/model-type-avatar-icon.component";
|
||||
import { ModelTypeSaberIcon } from "./icons/model-type-saber-icon.component";
|
||||
import { ModelTypePlatformIcon } from "./icons/model-type-platform-icon.component";
|
||||
import { ModelTypeBloqIcon } from "./icons/model-type-bloq-icon.component";
|
||||
import { ChevronTopIcon } from "./icons/chevron-top-icon.component";
|
||||
import { EyeCrossIcon } from "./icons/eye-cross-icon.component";
|
||||
import { ShortcutIcon } from "./icons/shortcut-icon.component";
|
||||
import { BackupRestoreIcon } from "./icons/backup-restore-icon.component";
|
||||
|
||||
export type BsmIconType = BsvMapCharacteristic | MSModelType | ("settings" | "trash" | "favorite" | "folder" | "bsNote" | "check" | "three-dots" | "twitch" | "eye" | "play" | "checkCircleIcon" | "discord" | "info" | "eye-cross" | "terminal" | "desktop" | "oculus" | "add" | "cross" | "task" | "github" | "close" | "thumbUpFill" | "timerFill" | "pause" | "twitter" | "sync" | "chevron-top" | "copy" | "steam" | "edit" | "export" | "patreon" | "search" | "bsMapDifficulty" | "link" | "unlink" | "download" | "filter" | "mee6" | "volume-up" | "volume-off" | "volume-down" | "shortcut" | "backup-restore" | "fr-FR-flag" | "es-ES-flag" | "en-US-flag" | "en-EN-flag" | "de-DE-flag" | "ru-RU-flag" | "zh-CN-flag" | "zh-TW-flag" | "ja-JP-flag");
|
||||
export type BsmIconType = BsvMapCharacteristic | ("settings" | "trash" | "favorite" | "folder" | "bsNote" | "check" | "three-dots" | "twitch" | "eye" | "play" | "checkCircleIcon" | "discord" | "info" | "eye-cross" | "terminal" | "desktop" | "oculus" | "add" | "cross" | "task" | "github" | "close" | "thumbUpFill" | "timerFill" | "pause" | "twitter" | "sync" | "chevron-top" | "copy" | "steam" | "edit" | "export" | "patreon" | "search" | "bsMapDifficulty" | "link" | "unlink" | "download" | "filter" | "mee6" | "volume-up" | "volume-off" | "volume-down" | "shortcut" | "backup-restore" | "fr-FR-flag" | "es-ES-flag" | "en-US-flag" | "en-EN-flag" | "de-DE-flag" | "ru-RU-flag" | "zh-CN-flag" | "zh-TW-flag" | "ja-JP-flag");
|
||||
|
||||
export const BsmIcon = memo(({ className, icon, style }: { className?: string; icon: BsmIconType; style?: CSSProperties }) => {
|
||||
// TODO : Very ugly very messy, need to find a better way to do this
|
||||
// the rework have started, see `svg-icon.type.ts`
|
||||
|
||||
const renderIcon = () => {
|
||||
if (icon === "settings") {
|
||||
@@ -254,19 +250,6 @@ export const BsmIcon = memo(({ className, icon, style }: { className?: string; i
|
||||
if (icon === "backup-restore") {
|
||||
return <BackupRestoreIcon className={className} style={style} />;
|
||||
}
|
||||
|
||||
if (icon === MSModelType.Avatar) {
|
||||
return <ModelTypeAvatarIcon className={className} style={style} />;
|
||||
}
|
||||
if (icon === MSModelType.Saber) {
|
||||
return <ModelTypeSaberIcon className={className} style={style} />;
|
||||
}
|
||||
if (icon === MSModelType.Platfrom) {
|
||||
return <ModelTypePlatformIcon className={className} style={style} />;
|
||||
}
|
||||
if (icon === MSModelType.Bloq) {
|
||||
return <ModelTypeBloqIcon className={className} style={style} />;
|
||||
}
|
||||
return <TrashIcon className={className} style={style} />;
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import { createSvgIcon } from "../svg-icon.type";
|
||||
|
||||
export const MapIcon = createSvgIcon((props, ref) => {
|
||||
return (
|
||||
<svg ref={ref} {...props} xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="currentColor">
|
||||
<path d="m574-129-214-75-186 72q-10 4-19.5 2.5T137-136q-8-5-12.5-13.5T120-169v-561q0-13 7.5-23t20.5-15l186-63q6-2 12.5-3t13.5-1q7 0 13.5 1t12.5 3l214 75 186-72q10-4 19.5-2.5T823-824q8 5 12.5 13.5T840-791v561q0 13-7.5 23T812-192l-186 63q-6 2-12.5 3t-13.5 1q-7 0-13.5-1t-12.5-3Zm-14-89v-468l-160-56v468l160 56Z"/>
|
||||
</svg>
|
||||
)
|
||||
});
|
||||
@@ -1,9 +1,9 @@
|
||||
import { CSSProperties } from "react";
|
||||
import { createSvgIcon } from "../svg-icon.type";
|
||||
|
||||
export function ModelTypeAvatarIcon(props: { className?: string; style?: CSSProperties }) {
|
||||
export const ModelTypeAvatarIcon = createSvgIcon((props, ref) => {
|
||||
return (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" {...props} fill="currentColor">
|
||||
<svg ref={ref} {...props} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
|
||||
<path d="M64 416L168.6 180.7c15.3-34.4 40.3-63.5 72-83.7l146.9-94c3-1.9 6.5-2.9 10-2.9C407.7 0 416 8.3 416 18.6v1.6c0 2.6-.5 5.1-1.4 7.5L354.8 176.9c-1.9 4.7-2.8 9.7-2.8 14.7c0 5.5 1.2 11 3.4 16.1L448 416H240.9l11.8-35.4 40.4-13.5c6.5-2.2 10.9-8.3 10.9-15.2s-4.4-13-10.9-15.2l-40.4-13.5-13.5-40.4C237 276.4 230.9 272 224 272s-13 4.4-15.2 10.9l-13.5 40.4-40.4 13.5C148.4 339 144 345.1 144 352s4.4 13 10.9 15.2l40.4 13.5L207.1 416H64zM279.6 141.5c-1.1-3.3-4.1-5.5-7.6-5.5s-6.5 2.2-7.6 5.5l-6.7 20.2-20.2 6.7c-3.3 1.1-5.5 4.1-5.5 7.6s2.2 6.5 5.5 7.6l20.2 6.7 6.7 20.2c1.1 3.3 4.1 5.5 7.6 5.5s6.5-2.2 7.6-5.5l6.7-20.2 20.2-6.7c3.3-1.1 5.5-4.1 5.5-7.6s-2.2-6.5-5.5-7.6l-20.2-6.7-6.7-20.2zM32 448H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32z" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
)
|
||||
});
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { CSSProperties } from "react";
|
||||
import { createSvgIcon } from "../svg-icon.type";
|
||||
|
||||
export function ModelTypeBloqIcon(props: { className?: string; style?: CSSProperties }) {
|
||||
export const ModelTypeBloqIcon = createSvgIcon((props, ref) => {
|
||||
return (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" id="Bloq" viewBox="0 0 300 300" {...props} fill="currentColor">
|
||||
<svg ref={ref} {...props} xmlns="http://www.w3.org/2000/svg" id="Bloq" viewBox="0 0 300 300" fill="currentColor">
|
||||
<path d="M264,0H36.05A36,36,0,0,0,0,36.05V264A36,36,0,0,0,36.05,300H264A36,36,0,0,0,300,264V36.05A36,36,0,0,0,264,0Zm2.38,52.68a5.86,5.86,0,0,1-3.53,5.37L152.08,106a5.87,5.87,0,0,1-4.7,0L39.19,58.07a5.87,5.87,0,0,1-3.48-5.35V36.46a5.85,5.85,0,0,1,5.86-5.85H260.48a5.85,5.85,0,0,1,5.85,5.85Z" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { CSSProperties } from "react";
|
||||
import { createSvgIcon } from "../svg-icon.type";
|
||||
|
||||
export function ModelTypePlatformIcon(props: { className?: string; style?: CSSProperties }) {
|
||||
export const ModelTypePlatformIcon = createSvgIcon((props, ref) => {
|
||||
return (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" {...props} fill="currentColor">
|
||||
<svg ref={ref} {...props} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
|
||||
<path d="M0 80c0 26.5 21.5 48 48 48H64v64h64V128h96v64h64V128h96v64h64V128h16c26.5 0 48-21.5 48-48V13.4C512 6 506 0 498.6 0c-1.7 0-3.4 .3-5 1l-49 19.6C425.7 28.1 405.5 32 385.2 32H126.8c-20.4 0-40.5-3.9-59.4-11.4L18.4 1c-1.6-.6-3.3-1-5-1C6 0 0 6 0 13.4V80zM64 288V480c0 17.7 14.3 32 32 32s32-14.3 32-32V288H384V480c0 17.7 14.3 32 32 32s32-14.3 32-32V288h32c17.7 0 32-14.3 32-32s-14.3-32-32-32H32c-17.7 0-32 14.3-32 32s14.3 32 32 32H64z" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { CSSProperties } from "react";
|
||||
import { createSvgIcon } from "../svg-icon.type";
|
||||
|
||||
export function ModelTypeSaberIcon(props: { className?: string; style?: CSSProperties }) {
|
||||
export const ModelTypeSaberIcon = createSvgIcon((props, ref) => {
|
||||
return (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" {...props} fill="currentColor">
|
||||
<svg ref={ref} {...props} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
|
||||
<path d="M234.7 42.7L197 56.8c-3 1.1-5 4-5 7.2s2 6.1 5 7.2l37.7 14.1L248.8 123c1.1 3 4 5 7.2 5s6.1-2 7.2-5l14.1-37.7L315 71.2c3-1.1 5-4 5-7.2s-2-6.1-5-7.2L277.3 42.7 263.2 5c-1.1-3-4-5-7.2-5s-6.1 2-7.2 5L234.7 42.7zM46.1 395.4c-18.7 18.7-18.7 49.1 0 67.9l34.6 34.6c18.7 18.7 49.1 18.7 67.9 0L529.9 116.5c18.7-18.7 18.7-49.1 0-67.9L495.3 14.1c-18.7-18.7-49.1-18.7-67.9 0L46.1 395.4zM484.6 82.6l-105 105-23.3-23.3 105-105 23.3 23.3zM7.5 117.2C3 118.9 0 123.2 0 128s3 9.1 7.5 10.8L64 160l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L128 160l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L128 96 106.8 39.5C105.1 35 100.8 32 96 32s-9.1 3-10.8 7.5L64 96 7.5 117.2zm352 256c-4.5 1.7-7.5 6-7.5 10.8s3 9.1 7.5 10.8L416 416l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L480 416l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L480 352l-21.2-56.5c-1.7-4.5-6-7.5-10.8-7.5s-9.1 3-10.8 7.5L416 352l-56.5 21.2z" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
)
|
||||
});
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import { createSvgIcon } from "../svg-icon.type";
|
||||
|
||||
export const PlaylistIcon = createSvgIcon((props, ref) => {
|
||||
return (
|
||||
<svg ref={ref} {...props} xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="currentColor">
|
||||
<path d="M500-360q42 0 71-29t29-71v-220h80q17 0 28.5-11.5T720-720q0-17-11.5-28.5T680-760h-80q-17 0-28.5 11.5T560-720v180q-13-10-28-15t-32-5q-42 0-71 29t-29 71q0 42 29 71t71 29ZM320-240q-33 0-56.5-23.5T240-320v-480q0-33 23.5-56.5T320-880h480q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H320ZM160-80q-33 0-56.5-23.5T80-160v-520q0-17 11.5-28.5T120-720q17 0 28.5 11.5T160-680v520h520q17 0 28.5 11.5T720-120q0 17-11.5 28.5T680-80H160Z"/>
|
||||
</svg>
|
||||
)
|
||||
})
|
||||
@@ -0,0 +1,10 @@
|
||||
// These types and functions are meant replace the current clunky SVG system (the one with `bsm-icon.component.tsx`)
|
||||
|
||||
import { ForwardedRef, forwardRef } from "react"
|
||||
|
||||
export type SvgIcon = React.ForwardRefExoticComponent<Omit<React.SVGProps<SVGSVGElement>, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
||||
export type SvgRenderFunction = (props: React.SVGProps<SVGSVGElement>, ref: ForwardedRef<SVGSVGElement>) => JSX.Element;
|
||||
|
||||
export function createSvgIcon(render: SvgRenderFunction): SvgIcon {
|
||||
return forwardRef(render);
|
||||
}
|
||||
@@ -16,7 +16,7 @@ export default function TitleBar({ template = "index.html" }: { template: AppWin
|
||||
const ipcService = useService(IpcService);
|
||||
const audio = useService(AudioPlayerService);
|
||||
|
||||
const volume = useObservable(audio.volume$, audio.volume);
|
||||
const volume = useObservable(() => audio.volume$, audio.volume);
|
||||
const color = useThemeColor("first-color");
|
||||
|
||||
const [previewVersion, setPreviewVersion] = useState(null);
|
||||
|
||||
@@ -29,9 +29,9 @@ export function LaunchSlide({ version }: Props) {
|
||||
const [debugMode, setDebugMode] = useState(!!configService.get<boolean>(LaunchMods.DEBUG_MOD));
|
||||
const [advancedLaunch, setAdvancedLaunch] = useState(false);
|
||||
const [additionalArgsString, setAdditionalArgsString] = useState<string>(configService.get<string>("additionnal-args") || "");
|
||||
const versionDownloading = useObservable(bsDownloader.downloadingVersion$);
|
||||
const versionDownloading = useObservable(() => bsDownloader.downloadingVersion$);
|
||||
|
||||
const versionRunning = useObservable(bsLauncherService.versionRunning$);
|
||||
const versionRunning = useObservable(() => bsLauncherService.versionRunning$);
|
||||
|
||||
useEffect(() => {
|
||||
configService.set("additionnal-args", additionalArgsString);
|
||||
|
||||
@@ -17,7 +17,7 @@ export function ModItem({ className, mod, installedVersion, isDependency, isSele
|
||||
const pageState = useService(PageStateService);
|
||||
|
||||
const themeColor = useThemeColor("second-color");
|
||||
const uninstalling = useObservable(modsManager.isUninstalling$);
|
||||
const uninstalling = useObservable(() => modsManager.isUninstalling$);
|
||||
const clickRef = useRef();
|
||||
|
||||
useDoubleClick({
|
||||
|
||||
@@ -35,8 +35,8 @@ export function ModsSlide({ version, onDisclamerDecline }: { version: BSVersion;
|
||||
const [modsInstalled, setModsInstalled] = useState(null as Map<string, Mod[]>);
|
||||
const [modsSelected, setModsSelected] = useState([] as Mod[]);
|
||||
const [moreInfoMod, setMoreInfoMod] = useState(null as Mod);
|
||||
const isOnline = useObservable(os.isOnline$);
|
||||
const installing = useObservable(modsManager.isInstalling$);
|
||||
const isOnline = useObservable(() => os.isOnline$);
|
||||
const installing = useObservable(() => modsManager.isInstalling$);
|
||||
|
||||
const downloadRef = useRef(null);
|
||||
const [downloadWith, setDownloadWidth] = useState(0);
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useConstant } from "./use-constant.hook";
|
||||
|
||||
export function useBehaviorSubject<T>(value: T): [T, BehaviorSubject<T>] {
|
||||
const subject$ = useConstant(() => new BehaviorSubject(value));
|
||||
const subjectValue = useObservable(subject$, value);
|
||||
const subjectValue = useObservable(() => subject$, value);
|
||||
|
||||
return [subjectValue, subject$];
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { Observable } from "rxjs";
|
||||
import { useState, useEffect } from "react";
|
||||
|
||||
export function useObservable<T>(observable: Observable<T>, defaultValue?: T): T {
|
||||
const [obsValue, setObsValue] = useState(defaultValue ?? (null as T));
|
||||
export function useObservable<T>(factory: () => Observable<T>, initValue?: T, deps?: unknown[]): T {
|
||||
const [obsValue, setObsValue] = useState<T>(initValue);
|
||||
|
||||
useEffect(() => {
|
||||
const sub = observable.subscribe(val => setObsValue(() => val));
|
||||
const sub = factory().subscribe(val => setObsValue(() => val));
|
||||
return () => sub.unsubscribe();
|
||||
}, []);
|
||||
}, deps ?? []);
|
||||
|
||||
return obsValue;
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@ export function useThemeColor(themeColor: ThemeColor): string;
|
||||
export function useThemeColor(themeColor?: ThemeColor): string | { firstColor: string; secondColor: string } {
|
||||
const configService = useService(ConfigurationService);
|
||||
|
||||
const firstColor = useObservable(!themeColor ? configService.watch<string>("first-color" as DefaultConfigKey).pipe(throttleTime(16)) : configService.watch<string>(themeColor).pipe(throttleTime(16)));
|
||||
const secondColor = useObservable(!themeColor ? configService.watch<string>("second-color" as DefaultConfigKey).pipe(throttleTime(16)) : of(""));
|
||||
const firstColor = useObservable(() => !themeColor ? configService.watch<string>("first-color" as DefaultConfigKey).pipe(throttleTime(16)) : configService.watch<string>(themeColor).pipe(throttleTime(16)));
|
||||
const secondColor = useObservable(() => !themeColor ? configService.watch<string>("second-color" as DefaultConfigKey).pipe(throttleTime(16)) : of(""));
|
||||
|
||||
if (themeColor) {
|
||||
return firstColor;
|
||||
|
||||
@@ -6,7 +6,7 @@ export function useTranslation(): (translationKey: string, args?: Record<string,
|
||||
|
||||
const i18nService = useService(I18nService);
|
||||
|
||||
useObservable(i18nService.currentLanguage$);
|
||||
useObservable(() => i18nService.currentLanguage$);
|
||||
|
||||
return (key: string, args?: Record<string, string>) => {
|
||||
if (!key) {
|
||||
|
||||
@@ -78,6 +78,24 @@
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.tippy-box[data-theme~='default'] {
|
||||
@apply bg-neutral-900;
|
||||
@apply text-white;
|
||||
}
|
||||
|
||||
.tippy-box[data-theme~='default'][data-placement^='top'] > .tippy-arrow::before {
|
||||
@apply border-t-neutral-900
|
||||
}
|
||||
.tippy-box[data-theme~='default'][data-placement^='bottom'] > .tippy-arrow::before {
|
||||
@apply border-b-neutral-900
|
||||
}
|
||||
.tippy-box[data-theme~='default'][data-placement^='left'] > .tippy-arrow::before {
|
||||
@apply border-l-neutral-900
|
||||
}
|
||||
.tippy-box[data-theme~='default'][data-placement^='right'] > .tippy-arrow::before {
|
||||
@apply border-r-neutral-900
|
||||
}
|
||||
|
||||
@keyframes glowing {
|
||||
0% {
|
||||
background-position: 0 0;
|
||||
|
||||
@@ -22,7 +22,7 @@ export function AvailableVersionsList() {
|
||||
const [selectedVersion, setSelectedVersion] = useState<BSVersion>(null);
|
||||
const contextValue = useMemo(() => ({ selectedVersion, setSelectedVersion }), [selectedVersion]);
|
||||
|
||||
const downloading = useObservable(bsDownloader.downloadingVersion$.pipe(map(v => !!v)));
|
||||
const downloading = useObservable(() => bsDownloader.downloadingVersion$.pipe(map(v => !!v)));
|
||||
const t = useTranslation();
|
||||
|
||||
const startDownload = async () => {
|
||||
|
||||
@@ -77,9 +77,9 @@ export function SettingsPage() {
|
||||
const nav = useNavigate();
|
||||
const t = useTranslation();
|
||||
|
||||
const themeSelected = useObservable(themeService.theme$, "os");
|
||||
const languageSelected = useObservable(i18nService.currentLanguage$, i18nService.getFallbackLanguage());
|
||||
const downloadStore = useObservable(bsDownloader.defaultStore$);
|
||||
const themeSelected = useObservable(() => themeService.theme$, "os");
|
||||
const languageSelected = useObservable(() => i18nService.currentLanguage$, i18nService.getFallbackLanguage());
|
||||
const downloadStore = useObservable(() => bsDownloader.defaultStore$);
|
||||
|
||||
const [installationFolder, setInstallationFolder] = useState(null);
|
||||
const [showSupporters, setShowSupporters] = useState(false);
|
||||
@@ -87,7 +87,7 @@ export function SettingsPage() {
|
||||
const [playlistsDeepLinkEnabled, setPlaylistsDeepLinkEnabled] = useState(false);
|
||||
const [modelsDeepLinkEnabled, setModelsDeepLinkEnabled] = useState(false);
|
||||
const [hasDownloaderSession, setHasDownloaderSession] = useState(false);
|
||||
const appVersion = useObservable(ipcService.sendV2<string>("current-version"));
|
||||
const appVersion = useObservable(() => ipcService.sendV2<string>("current-version"));
|
||||
|
||||
useEffect(() => {
|
||||
loadInstallationFolder();
|
||||
@@ -252,7 +252,7 @@ export function SettingsPage() {
|
||||
</div>
|
||||
</div>
|
||||
<SettingContainer minorTitle="pages.settings.appearance.sub-title" className="mt-3">
|
||||
<SettingRadioArray items={themeItem} selectedItemValue={themeSelected} onItemSelected={handleChangeTheme} />
|
||||
<SettingRadioArray items={themeItem} selectedItemValue={themeSelected as ThemeConfig} onItemSelected={handleChangeTheme} />
|
||||
</SettingContainer>
|
||||
</SettingContainer>
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import { ModalExitCode, ModalService } from "./modale.service";
|
||||
import { OriginalOculusVersionBackupModal } from "renderer/components/modal/modal-types/original-oculus-version-backup.modal";
|
||||
import { CustomError } from "shared/models/exceptions/custom-error.class";
|
||||
import { sToMs } from "shared/helpers/time.helpers";
|
||||
import { NeedLaunchAdminModal } from "renderer/components/modal/modal-types/need-launch-admin-modal.component";
|
||||
|
||||
export class BSLauncherService {
|
||||
private static instance: BSLauncherService;
|
||||
@@ -21,7 +22,7 @@ export class BSLauncherService {
|
||||
private readonly modals: ModalService;
|
||||
|
||||
public readonly versionRunning$: BehaviorSubject<BSVersion> = new BehaviorSubject(null);
|
||||
|
||||
|
||||
public static getInstance(){
|
||||
if(!BSLauncherService.instance){ BSLauncherService.instance = new BSLauncherService(); }
|
||||
return BSLauncherService.instance;
|
||||
@@ -70,7 +71,17 @@ export class BSLauncherService {
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
||||
|
||||
private async doMustStartAsAdmin(): Promise<boolean> {
|
||||
const needAdmin = await lastValueFrom(this.ipcService.sendV2<boolean, void>("bs-launch.need-start-as-admin"));
|
||||
if(!needAdmin){ return false; }
|
||||
if(this.config.get("dont-remind-admin")){ return true; }
|
||||
const modalRes = await this.modals.openModal(NeedLaunchAdminModal);
|
||||
if(modalRes.exitCode !== ModalExitCode.COMPLETED){ throw new Error("Admin launch canceled"); }
|
||||
this.config.set("dont-remind-admin", modalRes.data);
|
||||
return true;
|
||||
}
|
||||
|
||||
public doLaunch(launchOptions: LaunchOption): Observable<BSLaunchEventData>{
|
||||
return this.ipcService.sendV2<BSLaunchEventData, LaunchOption>("bs-launch.launch", {args: launchOptions});
|
||||
}
|
||||
@@ -79,17 +90,21 @@ export class BSLauncherService {
|
||||
|
||||
return new Observable<BSLaunchEventData>(obs => {
|
||||
(async () => {
|
||||
|
||||
|
||||
if(launchOptions.version.metadata?.store === BsStore.OCULUS && !this.notRewindBackupOculus()){
|
||||
const { exitCode, data: notRewind } = await this.modals.openModal(OriginalOculusVersionBackupModal);
|
||||
if(exitCode !== ModalExitCode.COMPLETED){ return; }
|
||||
this.setNotRewindBackupOculus(notRewind);
|
||||
}
|
||||
|
||||
|
||||
if(launchOptions.version.metadata?.store !== BsStore.OCULUS){
|
||||
launchOptions.admin = await this.doMustStartAsAdmin();
|
||||
}
|
||||
|
||||
const launch$ = this.handleLaunchEvents(this.doLaunch(launchOptions));
|
||||
|
||||
await lastValueFrom(launch$);
|
||||
|
||||
|
||||
})().then(() => {
|
||||
obs.complete();
|
||||
}).catch(err => {
|
||||
|
||||
@@ -13,7 +13,7 @@ import { ConfigurationService } from "./configuration.service";
|
||||
import { ArchiveProgress } from "shared/models/archive.interface";
|
||||
import { map, last, catchError } from "rxjs/operators";
|
||||
import { ProgressionInterface } from "shared/models/progress-bar";
|
||||
import { VersionFolderLinkerService, VersionLinkerActionType } from "./version-folder-linker.service";
|
||||
import { FolderLinkState, VersionFolderLinkerService, VersionLinkerActionType } from "./version-folder-linker.service";
|
||||
|
||||
export class MapsManagerService {
|
||||
private static instance: MapsManagerService;
|
||||
@@ -176,6 +176,10 @@ export class MapsManagerService {
|
||||
}
|
||||
|
||||
public $mapsLinkingPending(version: BSVersion): Observable<boolean> {
|
||||
return this.linker.$isVersionFolderPending(version, MapsManagerService.RELATIVE_MAPS_FOLDER);
|
||||
return this.linker.$isPending(version, MapsManagerService.RELATIVE_MAPS_FOLDER);
|
||||
}
|
||||
|
||||
public $mapsFolderLinkState(version: BSVersion): Observable<FolderLinkState> {
|
||||
return this.linker.$folderLinkedState(version, MapsManagerService.RELATIVE_MAPS_FOLDER);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { MSModelType } from "shared/models/models/model-saber.model";
|
||||
import { IpcService } from "../ipc.service";
|
||||
import { VersionFolderLinkerService, VersionLinkerActionListener, VersionLinkerActionType } from "../version-folder-linker.service";
|
||||
import { FolderLinkState, VersionFolderLinkerService, VersionLinkerActionListener, VersionLinkerActionType } from "../version-folder-linker.service";
|
||||
import { MODEL_TYPE_FOLDERS } from "shared/models/models/constants";
|
||||
import { Observable, lastValueFrom, map } from "rxjs";
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
@@ -49,7 +49,11 @@ export class ModelsManagerService {
|
||||
}
|
||||
|
||||
public $modelsLinkingPending(version: BSVersion, type: MSModelType): Observable<boolean> {
|
||||
return this.versionFolderLinked.$isVersionFolderPending(version, MODEL_TYPE_FOLDERS[type]);
|
||||
return this.versionFolderLinked.$isPending(version, MODEL_TYPE_FOLDERS[type]);
|
||||
}
|
||||
|
||||
public $modelsLinkingState(version: BSVersion, type: MSModelType): Observable<FolderLinkState> {
|
||||
return this.versionFolderLinked.$folderLinkedState(version, MODEL_TYPE_FOLDERS[type]);
|
||||
}
|
||||
|
||||
public onModelsFolderLinked(callback: VersionLinkerActionListener): void {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { LinkOptions, UnlinkOptions } from "main/services/folder-linker.service";
|
||||
import { map, distinctUntilChanged, filter, mergeMap, shareReplay } from "rxjs/operators";
|
||||
import { BehaviorSubject, Observable } from "rxjs";
|
||||
import { BehaviorSubject, Observable, of } from "rxjs";
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
import { IpcService } from "./ipc.service";
|
||||
import { ProgressBarService } from "./progress-bar.service";
|
||||
@@ -62,6 +62,13 @@ export class VersionFolderLinkerService {
|
||||
return this.ipcService.sendV2<boolean, VersionLinkerAction>("link-version-folder-action", { args: action });
|
||||
}
|
||||
|
||||
private get currentAction$(): Observable<VersionLinkerAction> {
|
||||
return this._queue$.pipe(
|
||||
map(actions => actions.at(0)),
|
||||
distinctUntilChanged()
|
||||
);
|
||||
}
|
||||
|
||||
public linkVersionFolder(action: VersionLinkFolderAction): Promise<boolean> {
|
||||
const promise = new Promise<boolean>(resolve => {
|
||||
const callBack: VersionLinkerActionListener = (performedAction, linked) => {
|
||||
@@ -122,12 +129,33 @@ export class VersionFolderLinkerService {
|
||||
return this.ipcService.sendV2("is-version-folder-linked", { args: { version, relativeFolder } });
|
||||
}
|
||||
|
||||
public isPending(version: BSVersion, relativeFolder: string): Observable<boolean> {
|
||||
return this.queue$.pipe(map(queue => queue.length > 0 && queue.some(action => action.version === version && action.relativeFolder === relativeFolder), distinctUntilChanged()));
|
||||
public $folderLinkedState(version: BSVersion, relativeFolder: string): Observable<FolderLinkState> {
|
||||
return this._queue$.pipe(
|
||||
mergeMap(queue => {
|
||||
const currentAction = queue.at(0);
|
||||
if(currentAction && equal(currentAction.version, version) && currentAction.relativeFolder === relativeFolder) {
|
||||
return of(FolderLinkState.Processing)
|
||||
}
|
||||
|
||||
if(queue.some(action => equal(action.version, version) && action.relativeFolder === relativeFolder)) {
|
||||
return of(FolderLinkState.Pending);
|
||||
}
|
||||
|
||||
return this.isVersionFolderLinked(version, relativeFolder).pipe(
|
||||
map(linked => linked ? FolderLinkState.Linked : FolderLinkState.Unlinked)
|
||||
);
|
||||
}),
|
||||
distinctUntilChanged(),
|
||||
shareReplay(1)
|
||||
);
|
||||
}
|
||||
|
||||
public isProcessing(version: BSVersion, relativeFolder: string): Observable<boolean> {
|
||||
return this.currentAction$.pipe(map(action => action && action.version === version && action.relativeFolder === relativeFolder));
|
||||
public $isPending(version: BSVersion, relativeFolder: string): Observable<boolean> {
|
||||
return this.$folderLinkedState(version, relativeFolder).pipe(map(state => state === FolderLinkState.Pending));
|
||||
}
|
||||
|
||||
public $isProcessing(version: BSVersion, relativeFolder: string): Observable<boolean> {
|
||||
return this.$folderLinkedState(version, relativeFolder).pipe(map(state => state === FolderLinkState.Processing));
|
||||
}
|
||||
|
||||
public getLinkedFolders(version: BSVersion, options?: { relative?: boolean }): Observable<string[]> {
|
||||
@@ -137,27 +165,6 @@ export class VersionFolderLinkerService {
|
||||
public relinkAllVersionsFolders(): Observable<void> {
|
||||
return this.ipcService.sendV2("relink-all-versions-folders");
|
||||
}
|
||||
|
||||
public $isVersionFolderPending(version: BSVersion, relativeFolder: string): Observable<boolean> {
|
||||
return this.queue$.pipe(
|
||||
mergeMap(async queue => {
|
||||
return queue.some(q => q.relativeFolder.includes(relativeFolder) && equal(q.version, version));
|
||||
}),
|
||||
distinctUntilChanged(),
|
||||
shareReplay(1)
|
||||
);
|
||||
}
|
||||
|
||||
public get currentAction$(): Observable<VersionLinkerAction> {
|
||||
return this._queue$.pipe(
|
||||
map(actions => actions.at(0)),
|
||||
distinctUntilChanged()
|
||||
);
|
||||
}
|
||||
|
||||
public get queue$(): Observable<VersionLinkerAction[]> {
|
||||
return this._queue$.asObservable();
|
||||
}
|
||||
}
|
||||
|
||||
export const enum VersionLinkerActionType {
|
||||
@@ -182,3 +189,10 @@ export interface VersionUnlinkFolderAction extends VersionLinkerAction {
|
||||
}
|
||||
|
||||
export type VersionLinkerActionListener = (action: VersionLinkerAction, linked: boolean) => void;
|
||||
|
||||
export enum FolderLinkState {
|
||||
Linked,
|
||||
Unlinked,
|
||||
Pending,
|
||||
Processing
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@ export default function OneClickDownloadPlaylist() {
|
||||
const mapsContainer = useRef<HTMLDivElement>(null);
|
||||
const playlistUrl = useConstant(() => new URLSearchParams(window.location.search).get("playlistUrl"));
|
||||
const download$ = useConstant(() => playlistDownloader.oneClickInstallPlaylist(playlistUrl));
|
||||
const playlistInfos = useObservable<BPList>(download$.pipe(filter(progress => !!progress.data?.playlistInfos), map(progress => progress.data.playlistInfos), take(1)));
|
||||
const downloadedMaps = useObservable(download$.pipe(filter(progress => !!progress.data?.downloadedMaps), map(progress => progress.data.downloadedMaps)));
|
||||
const playlistInfos = useObservable<BPList>(() => download$.pipe(filter(progress => !!progress.data?.playlistInfos), map(progress => progress.data.playlistInfos), take(1)));
|
||||
const downloadedMaps = useObservable(() => download$.pipe(filter(progress => !!progress.data?.downloadedMaps), map(progress => progress.data.downloadedMaps)));
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ export default function ShortcutLaunch() {
|
||||
|
||||
const t = useTranslation();
|
||||
const color = useThemeColor("second-color");
|
||||
const launchOptions = useObservable(ipc.sendV2<LaunchOption>("shortcut-launch-options").pipe(take(1)), null)
|
||||
const launchOptions = useObservable(() => ipc.sendV2<LaunchOption>("shortcut-launch-options").pipe(take(1)), null)
|
||||
const [rotation, setRotation] = useState(0);
|
||||
const [status, setStatus] = useState<BSLaunchEventType>();
|
||||
|
||||
|
||||
@@ -1,7 +1,22 @@
|
||||
export function tryit<Return>(func: () => Return): {error: Error, result: Return} {
|
||||
import { isPromise } from "./promise.helpers";
|
||||
|
||||
type TryitReturn<Return> = Return extends Promise<any> ? Promise<{ error: Error | null, result: Awaited<Return> | null }> : { error: Error | null, result: Return | null };
|
||||
|
||||
export function tryit<Return>(func: () => Return): TryitReturn<Return> {
|
||||
try {
|
||||
return { error: null, result: func() };
|
||||
const result = func();
|
||||
|
||||
if(isPromise(result)){
|
||||
return result
|
||||
.then((value) => ({ error: null, result: value }))
|
||||
.catch((err) => ({ error: err instanceof Error ? err : new Error(`${err}`), result: null })) as Return extends Promise<any>
|
||||
? Promise<{error: Error, result: undefined} | {error: undefined, result: Awaited<Return>}>
|
||||
: {error: Error, result: undefined} | {error: undefined, result: Return};
|
||||
}
|
||||
|
||||
return { error: undefined, result } as TryitReturn<Return>;
|
||||
|
||||
} catch (err) {
|
||||
return { error: err instanceof Error ? err : new Error(`${err}`), result: null }
|
||||
return { error: err, result: undefined } as TryitReturn<Return>;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
export function isFunction(value: any): value is Function {
|
||||
return !!(value && value.constructor && value.call && value.apply)
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
import { isFunction } from "./function.helpers";
|
||||
|
||||
export type AllSettledHelperOptions = {
|
||||
keepStructure?: boolean;
|
||||
removeFalsy?: boolean;
|
||||
@@ -19,3 +21,10 @@ export async function allSettled<T>(promises: Promise<T>[], options?: AllSettled
|
||||
return acc;
|
||||
}, []);
|
||||
}
|
||||
|
||||
export function isPromise(value: any): value is Promise<unknown> {
|
||||
if(!value) { return false; }
|
||||
if(!value.then) { return false; }
|
||||
if(!isFunction(value.then)) { return false; }
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -5,5 +5,6 @@ export interface LaunchOption {
|
||||
oculus?: boolean,
|
||||
desktop?: boolean,
|
||||
debug?: boolean,
|
||||
additionalArgs?: string[]
|
||||
additionalArgs?: string[],
|
||||
admin?: boolean,
|
||||
}
|
||||
|
||||
+2
-1
@@ -20,7 +20,8 @@
|
||||
"resolveJsonModule": true,
|
||||
"allowJs": true,
|
||||
"outDir": "release/app/dist",
|
||||
"strictNullChecks": false
|
||||
"strictNullChecks": false,
|
||||
"experimentalDecorators": true
|
||||
},
|
||||
"exclude": ["test", "release/build", "release/app/dist", ".erb/dll"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user