diff --git a/assets/images/gifs/yuruyuri-dance.gif b/assets/images/gifs/yuruyuri-dance.gif deleted file mode 100644 index 03524548..00000000 Binary files a/assets/images/gifs/yuruyuri-dance.gif and /dev/null differ diff --git a/assets/jsons/translations/en.json b/assets/jsons/translations/en.json index fa86f981..72422ef0 100644 --- a/assets/jsons/translations/en.json +++ b/assets/jsons/translations/en.json @@ -8,7 +8,9 @@ "playlists": "Playlists", "models": "Models", "cancel": "Cancel", - "delete": "Delete" + "delete": "Delete", + "accept": "Accept", + "refuse": "Refuse" }, "pages": { "version-viewer": { @@ -134,6 +136,9 @@ "supporters": "Supporters" } }, + "discord": { + "description": "Join the BSManager community by joining our Discord!" + }, "contribution": { "description": "Suggest new features or report a bug to help improve BSManager!", "buttons": { @@ -249,6 +254,14 @@ "error":{ "description":"An unknown error occurred." } + }, + "check-all-enabled":{ + "title": "OneClick Disabled", + "description": "One or more OneClick installations are disabled. Go to settings to enable them.", + "actions":{ + "settings": "Settings", + "not-remind": "Do not remind me" + } } } } @@ -481,6 +494,14 @@ "download-maps": { "search-btn": "Search", "loading-maps": "Loading maps..." + }, + "mods-disclaimer":{ + "title": "disclaimer", + "p-1": "By choosing to use mods, you understand that:", + "li-1": "You may experience problems that don't exist in the vanilla game. 99.9% of bugs, crashes, and lag are due to mods.", + "li-2": "Mods are subject to being broken by updates and that's normal - be patient and respectful when this happens, as modders are volunteers with real lives.", + "li-3": "Beat Games aren't purposefully trying to break mods. They wish to work on the codebase and sometimes this breaks mods, but they are not out to kill mods.", + "p-2": "Do not attack the game developers for issues related to mods, and vice versa - modders and game developers are two separate groups. Just don't be a jerk ok." } }, "maps": { diff --git a/assets/jsons/translations/es.json b/assets/jsons/translations/es.json index 579b8f1f..8c453fd6 100644 --- a/assets/jsons/translations/es.json +++ b/assets/jsons/translations/es.json @@ -8,7 +8,9 @@ "playlists": "Playlists", "models": "Modelos", "cancel": "Cancelar", - "delete": "Borrar" + "delete": "Borrar", + "accept": "Aceptar", + "refuse": "Rechazar" }, "pages": { "version-viewer": { @@ -134,6 +136,9 @@ "supporters": "Apoyos" } }, + "discord": { + "description": "¡Únete a la comunidad de BSManager uniéndote a nuestro Discord!" + }, "contribution": { "description": "¡Sugiera nuevas características o reporte un error para ayudar a mejorar BSManager!", "buttons": { @@ -249,6 +254,14 @@ "error":{ "description":"Ocurrió un error desconocido." } + }, + "check-all-enabled":{ + "title": "OneClick deshabilitado", + "description": "Una o más instalaciones de OneClick están deshabilitadas. Vaya a la configuración para habilitarlas.", + "actions":{ + "settings": "Ajustes", + "not-remind": "No volver a recordarme" + } } } } @@ -481,6 +494,14 @@ "download-maps": { "search-btn": "buscar", "loading-maps": "Cargando mapas..." + }, + "mods-disclaimer":{ + "title": "descargo de responsabilidad", + "p-1": "Al elegir usar mods, entiendes y aceptas que:", + "li-1": "Es posible que encuentres problemas que no existen en el juego base. El 99,9% de los errores, bloqueos y ralentizaciones son debidos a los mods.", + "li-2": "Es probable que los mods dejen de funcionar debido a las actualizaciones y eso es normal. Sé paciente y respetuoso cuando suceda esto, ya que los modders son voluntarios y tienen una vida.", + "li-3": "Beat Games no está intencionalmente tratando de romper los mods. Quieren mejorar el juego base y a veces esto rompe los mods, pero no es su objetivo matar a los mods.", + "p-2": "No ataques a los desarrolladores por problemas relacionados con los mods y viceversa. Los modders y los desarrolladores son dos grupos distintos. No seas tonto, ¿de acuerdo?" } }, "maps": { diff --git a/assets/jsons/translations/fr.json b/assets/jsons/translations/fr.json index 74cd70dc..69801494 100644 --- a/assets/jsons/translations/fr.json +++ b/assets/jsons/translations/fr.json @@ -8,7 +8,9 @@ "playlists": "Playlists", "models": "Modèles", "cancel": "Annuler", - "delete": "Supprimer" + "delete": "Supprimer", + "accept": "Accepter", + "refuse": "Refuser" }, "pages": { "version-viewer": { @@ -134,6 +136,9 @@ "supporters": "Supporteurs" } }, + "discord":{ + "description": "Prends part à la communauté de BSManager en rejoignant notre Discord !" + }, "contribution": { "description": "Propose de nouvelles fonctionnalités ou signale un bug pour contribuer à l'amélioration de BSManager !", "buttons": { @@ -249,6 +254,14 @@ "error":{ "description":"Une erreur inconnue s'est produite." } + }, + "check-all-enabled":{ + "title": "OneClick désactivée(s)", + "description": "Une ou plusieurs installations OneClick sont désactivées. Rendez-vous dans les paramètres pour les activer.", + "actions":{ + "settings": "Paramètres", + "not-remind": "Ne plus me rappeler" + } } } } @@ -481,6 +494,14 @@ "download-maps": { "search-btn": "Rechercher", "loading-maps": "Chargement des maps..." + }, + "mods-disclaimer":{ + "title": "avis de non-responsabilité", + "p-1": "En choisissant d'utiliser des mods, vous comprenez et acceptez que :", + "li-1": "Vous pouvez rencontrer des problèmes qui n'existent pas dans le jeu de base. 99.9% des bugs, plantages et ralentissements sont dus aux mods.", + "li-2": "Les mods sont susceptibles de ne plus fonctionner à cause des mises à jour et c'est normal - soyez patient et respectueux lorsque cela se produit, parce que les moddeurs sont bénévoles et ont une vie.", + "li-3": "Beat Games ne cherche pas volontairement à casser les mods. Ils souhaitent améliorer la base du jeu et parfois cela casse les mods, mais ce n'est pas dans leur objectif de tuer les mods.", + "p-2": "N'attaquez pas les développeurs pour des problèmes relatifs aux mods, et inversement - les moddeurs et les développeurs sont deux groupes distincts. Ne sois pas idiot, d'accord ?" } }, "maps": { diff --git a/package-lock.json b/package-lock.json index c3ec072d..198d71cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10354,7 +10354,8 @@ "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true }, "object-hash": { "version": "3.0.0", @@ -11280,6 +11281,7 @@ "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dev": true, "requires": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -11672,7 +11674,8 @@ "react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true }, "react-range": { "version": "1.8.14", @@ -11737,14 +11740,6 @@ } } }, - "react-visibility-sensor": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/react-visibility-sensor/-/react-visibility-sensor-5.1.1.tgz", - "integrity": "sha512-cTUHqIK+zDYpeK19rzW6zF9YfT4486TIgizZW53wEZ+/GPBbK7cNS0EHyJVyHYacwFEvvHLEKfgJndbemWhB/w==", - "requires": { - "prop-types": "^15.7.2" - } - }, "read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", diff --git a/package.json b/package.json index e4873efe..ec84ada6 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,8 @@ "target": [ "nsis" ], - "icon": "assets/favicon.ico" + "icon": "assets/favicon.ico", + "certificateSha1": "f3363a89b084f8f6b616babea3c91f9d79e15000" }, "linux": { "target": [ @@ -244,7 +245,6 @@ "react-dom": "^18.2.0", "react-range": "^1.8.14", "react-router-dom": "^6.3.0", - "react-visibility-sensor": "^5.1.1", "regedit": "^5.1.1", "rxjs": "^7.5.6", "sanitize-filename": "^1.6.3", diff --git a/src/main/ipcs/bs-download-ipcs.ts b/src/main/ipcs/bs-download-ipcs.ts index 6d592c01..d9e8b748 100644 --- a/src/main/ipcs/bs-download-ipcs.ts +++ b/src/main/ipcs/bs-download-ipcs.ts @@ -5,6 +5,7 @@ import { IpcRequest } from 'shared/models/ipc'; import { InstallationLocationService } from '../services/installation-location.service'; import { UtilsService } from '../services/utils.service'; import { BsmException } from 'shared/models/bsm-exception.model'; +import { LocalMapsManagerService } from '../services/additional-content/local-maps-manager.service'; export interface InitDownloadInfoInterface { @@ -25,7 +26,8 @@ export interface DownloadInfo { } ipcMain.on('bs-download.start', async (event, request: IpcRequest) => { - BSInstallerService.getInstance().downloadBsVersion(request.args).then(res => { + BSInstallerService.getInstance().downloadBsVersion(request.args).then(async res => { + await LocalMapsManagerService.getInstance().linkVersionMaps(request.args.bsVersion, true).catch(e => {}); UtilsService.getInstance().ipcSend(request.responceChannel, {success: true, data: res}); }).catch(e => { UtilsService.getInstance().ipcSend(request.responceChannel, {success: false, data: e}); diff --git a/src/renderer/components/available-versions/available-versions-slider.component.tsx b/src/renderer/components/available-versions/available-versions-slider.component.tsx index 01bf8fe7..e87439ce 100644 --- a/src/renderer/components/available-versions/available-versions-slider.component.tsx +++ b/src/renderer/components/available-versions/available-versions-slider.component.tsx @@ -23,7 +23,7 @@ export function AvailableVersionsSlider() { return (
- +
    { availableYears.map(year => diff --git a/src/renderer/components/maps-mangement-components/maps-playlists-panel.component.tsx b/src/renderer/components/maps-mangement-components/maps-playlists-panel.component.tsx index d0170256..4c9a1fb7 100644 --- a/src/renderer/components/maps-mangement-components/maps-playlists-panel.component.tsx +++ b/src/renderer/components/maps-mangement-components/maps-playlists-panel.component.tsx @@ -82,7 +82,7 @@ export function MapsPlaylistsPanel({version}: Props) { {index === 0 &&(
    {isOnline && ( - {e.stopPropagation(); onClickAdd(index)}}> + {e.stopPropagation(); onClickAdd(index)}}> @@ -128,7 +128,7 @@ export function MapsPlaylistsPanel({version}: Props) {
    - +
    diff --git a/src/renderer/components/modal/modal-types/mods-disclaimer-modal.component.tsx b/src/renderer/components/modal/modal-types/mods-disclaimer-modal.component.tsx new file mode 100644 index 00000000..3dfa2d5f --- /dev/null +++ b/src/renderer/components/modal/modal-types/mods-disclaimer-modal.component.tsx @@ -0,0 +1,28 @@ +import { BsmButton } from "renderer/components/shared/bsm-button.component"; +import { BsmImage } from "renderer/components/shared/bsm-image.component"; +import { useTranslation } from "renderer/hooks/use-translation.hook"; +import { ModalComponent, ModalExitCode } from "renderer/services/modale.service"; +import BeatConflict from '../../../../../assets/images/apngs/beat-conflict.png' + +export const ModsDisclaimerModal: ModalComponent = ({resolver}) => { + + const t = useTranslation(); + + return ( +
    +

    {t("modals.mods-disclaimer.title")}

    + +

    {t("modals.mods-disclaimer.p-1")}

    +
      +
    • {t("modals.mods-disclaimer.li-1")}
    • +
    • {t("modals.mods-disclaimer.li-2")}
    • +
    • {t("modals.mods-disclaimer.li-3")}
    • +
    +

    {t("modals.mods-disclaimer.p-2")}

    +
    + {resolver({exitCode: ModalExitCode.CANCELED})}} withBar={false} text="misc.refuse"/> + {resolver({exitCode: ModalExitCode.COMPLETED})}} withBar={false} text="misc.accept"/> +
    + + ) +} \ No newline at end of file diff --git a/src/renderer/components/notification/notification-item.component.tsx b/src/renderer/components/notification/notification-item.component.tsx index a0838bd9..3e9522fb 100644 --- a/src/renderer/components/notification/notification-item.component.tsx +++ b/src/renderer/components/notification/notification-item.component.tsx @@ -37,7 +37,7 @@ export function NotificationItem({resolver, notification}: {resolver?: (value: N } return ( - +
    diff --git a/src/renderer/components/settings/setting-container.component.tsx b/src/renderer/components/settings/setting-container.component.tsx index 9b625748..e86ced16 100644 --- a/src/renderer/components/settings/setting-container.component.tsx +++ b/src/renderer/components/settings/setting-container.component.tsx @@ -1,12 +1,21 @@ import { ReactNode } from "react"; import { useTranslation } from "renderer/hooks/use-translation.hook"; -export function SettingContainer({className, title, minorTitle, description, children}: {className?: string, title?: string, minorTitle?: string, description?: string, children?: ReactNode}) { +type Props = { + id?: string, + className?: string, + title?: string, + minorTitle?: string, + description?: string, + children?: ReactNode +} + +export function SettingContainer({id, className, title, minorTitle, description, children}: Props) { const t = useTranslation(); return ( -
    +
    { title &&

    {t(title)}

    } { minorTitle &&

    {t(minorTitle)}

    } { description &&

    {t(description)}

    } diff --git a/src/renderer/components/shared/UwU/spoiler-click.component.tsx b/src/renderer/components/shared/UwU/spoiler-click.component.tsx deleted file mode 100644 index a9f6e1a6..00000000 --- a/src/renderer/components/shared/UwU/spoiler-click.component.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import {motion, useCycle} from "framer-motion" -import { useState } from "react" - -type Props = {className?: string, nbClickToShow?: number, children?: JSX.Element} - -export function SpoilerClick({className, children, nbClickToShow = 5}: Props) { - - const [remainingClicks, setRemainingClicks] = useState(nbClickToShow); - const [translateY, setTranslateY] = useState("100%"); - - const handleClicks = () => { - if(remainingClicks - 1 > 0){ setRemainingClicks(nb => nb - 1); } - setTranslateY(`${(((remainingClicks - 1) / nbClickToShow) * 100)}%`) - } - - return ( - - {children} - - ) -} diff --git a/src/renderer/components/shared/tab-nav-bar.component.tsx b/src/renderer/components/shared/tab-nav-bar.component.tsx index 4907d3cb..68fdfb0f 100644 --- a/src/renderer/components/shared/tab-nav-bar.component.tsx +++ b/src/renderer/components/shared/tab-nav-bar.component.tsx @@ -1,8 +1,9 @@ -import { DetailedHTMLProps, Fragment, useState } from "react"; +import { DetailedHTMLProps, Fragment } from "react"; import { useThemeColor } from "renderer/hooks/use-theme-color.hook"; import { useTranslation } from "renderer/hooks/use-translation.hook"; type Props = { + tabIndex: number tabsText: string[], onTabChange: (index: number) => void, className?: string, @@ -11,12 +12,12 @@ type Props = { export function TabNavBar(props: Props) { - const [currentTabIndex, setCurrentTabIndex] = useState(0); + const currentIndex = props.tabIndex ?? 0; + const t = useTranslation(); const secondColor = useThemeColor("second-color"); const selectTab = (index: number) => { - setCurrentTabIndex(index); props.onTabChange(index); } @@ -24,7 +25,7 @@ export function TabNavBar(props: Props) {