mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
[bugfix] added hyperlinks for can't connect to beatmods
This commit is contained in:
@@ -16,6 +16,7 @@ import { MODEL_TYPE_FOLDERS } from "shared/models/models/constants";
|
||||
import { PlaylistsManagerService } from "renderer/services/playlists-manager.service";
|
||||
import { MapsManagerService } from "renderer/services/maps-manager.service";
|
||||
import { map } from "rxjs";
|
||||
import { DISCORD_URL } from "shared/constants";
|
||||
|
||||
export const LinkContentModal: ModalComponent<void, {version: BSVersion, contentType: "maps"|"playlists"|"avatars"|"sabers"|"platforms"|"blocks"}> = ({options: { data: { version, contentType } }, resolver }) => {
|
||||
const { text: t, element: te } = useTranslationV2();
|
||||
@@ -97,7 +98,7 @@ export const LinkContentModal: ModalComponent<void, {version: BSVersion, content
|
||||
<p className="max-w-sm w-full italic my-2 text-warning-400">{t("modals.link-contents.warning", {contentType: t(`misc.${contentType}`).toLowerCase()})}</p>
|
||||
<div className="flex justify-center items-center gap-3 *:underline *:text-sm *:text-neutral-200">
|
||||
<BsmLink href="https://en.qrwp.org/Symbolic_link">{t("modals.link-contents.what-is-a-symbolic-link")}</BsmLink>
|
||||
<BsmLink href="https://discord.gg/uSqbHVpKdV">{t("modals.link-contents.i-need-help")}</BsmLink>
|
||||
<BsmLink href={DISCORD_URL}>{t("modals.link-contents.i-need-help")}</BsmLink>
|
||||
</div>
|
||||
<div className="grid grid-flow-col grid-cols-2 gap-2 mt-4 h-8">
|
||||
<BsmButton typeColor="cancel" className="rounded-md text-center transition-all flex justify-center items-center" onClick={() => resolver({ exitCode: ModalExitCode.CANCELED })} withBar={false} text="misc.cancel" />
|
||||
|
||||
@@ -16,6 +16,7 @@ import { MODEL_TYPE_FOLDERS } from "shared/models/models/constants";
|
||||
import { useConstant } from "renderer/hooks/use-constant.hook";
|
||||
import { MapsManagerService } from "renderer/services/maps-manager.service";
|
||||
import { BsmLink } from "renderer/components/shared/bsm-link.component";
|
||||
import { DISCORD_URL } from "shared/constants";
|
||||
|
||||
export const UnlinkContentsModal: ModalComponent<boolean, {version: BSVersion, contentType: "maps"|"playlists"|"avatars"|"sabers"|"platforms"|"blocks"}> = ({options: { data: { version, contentType } }, resolver }) => {
|
||||
const { text: t, element: te } = useTranslationV2();
|
||||
@@ -86,7 +87,7 @@ export const UnlinkContentsModal: ModalComponent<boolean, {version: BSVersion, c
|
||||
</p>
|
||||
<div className="flex justify-center items-center gap-3 *:underline *:text-sm *:text-neutral-200">
|
||||
<BsmLink href="https://en.qrwp.org/Symbolic_link">{t("modals.link-contents.what-is-a-symbolic-link")}</BsmLink>
|
||||
<BsmLink href="https://discord.gg/uSqbHVpKdV">{t("modals.link-contents.i-need-help")}</BsmLink>
|
||||
<BsmLink href={DISCORD_URL}>{t("modals.link-contents.i-need-help")}</BsmLink>
|
||||
</div>
|
||||
<Tippy content={t("modals.unlink-contents.do-not-copy-contents-tip", { contentType: t(`misc.${contentType}`).toLowerCase() })} theme="default">
|
||||
<div className="relative h-5 flex my-3 items-center w-fit">
|
||||
|
||||
@@ -23,6 +23,8 @@ import Tippy from "@tippyjs/react";
|
||||
import { ProgressBarService } from "renderer/services/progress-bar.service";
|
||||
import { Dropzone } from "renderer/components/shared/dropzone.component";
|
||||
import { ModsGridStatus } from "shared/models/mods/mod-ipc.model";
|
||||
import { BsmLink } from "renderer/components/shared/bsm-link.component";
|
||||
import { DISCORD_URL, GITHUB_URL } from "shared/constants";
|
||||
|
||||
export type ModsSlideRef = {
|
||||
loadMods: () => Promise<void>;
|
||||
@@ -267,12 +269,34 @@ export const ModsSlide = forwardRef<ModsSlideRef, Props>(({ version, isActive, o
|
||||
}
|
||||
}, [modsAvailable]);
|
||||
|
||||
const renderStatus = () => {
|
||||
if (gridStatus === ModsGridStatus.BEATMODS_DOWN) {
|
||||
const [ textStart, textEnd ] = t("pages.version-viewer.mods.status.beatmods-down")
|
||||
.split("{links}");
|
||||
return <ModStatus image={BeatConflictImg}>
|
||||
<span className="text-xl text-center px-2 mt-3 italic">
|
||||
{textStart}
|
||||
<BsmLink className="text-blue-500 underline" href={DISCORD_URL}>
|
||||
Discord
|
||||
</BsmLink>
|
||||
/
|
||||
<BsmLink className="text-blue-500 underline" href={GITHUB_URL}>
|
||||
GitHub
|
||||
</BsmLink>
|
||||
{textEnd}
|
||||
</span>
|
||||
</ModStatus>
|
||||
}
|
||||
|
||||
return <ModStatus text={`pages.version-viewer.mods.status.${gridStatus}`} image={BeatConflictImg} />;
|
||||
}
|
||||
|
||||
const renderContent = () => {
|
||||
if (!isOnline) {
|
||||
return <ModStatus text="pages.version-viewer.mods.no-internet" image={BeatConflictImg} />;
|
||||
}
|
||||
if (gridStatus !== ModsGridStatus.OK) {
|
||||
return <ModStatus text={`pages.version-viewer.mods.status.${gridStatus}`} image={BeatConflictImg} />;
|
||||
return renderStatus();
|
||||
}
|
||||
if (!modsAvailable) {
|
||||
return <ModStatus text="pages.version-viewer.mods.loading-mods" image={BeatWaitingImg} spin />;
|
||||
@@ -343,13 +367,13 @@ export const ModsSlide = forwardRef<ModsSlideRef, Props>(({ version, isActive, o
|
||||
);
|
||||
});
|
||||
|
||||
function ModStatus({ text, image, spin = false, children }: { text: string; image: string; spin?: boolean, children?: ReactNode}) {
|
||||
function ModStatus({ text, image, spin = false, children }: { text?: string; image: string; spin?: boolean, children?: ReactNode}) {
|
||||
const { text: t } = useTranslationV2();
|
||||
|
||||
return (
|
||||
<div className="w-full h-full flex flex-col items-center justify-center text-gray-800 dark:text-gray-200">
|
||||
<img className={`w-32 h-32 ${spin ? "spin-loading" : ""}`} src={image} alt=" " />
|
||||
<span className="text-xl text-center px-2 mt-3 italic">{t(text)}</span>
|
||||
{text && <span className="text-xl text-center px-2 mt-3 italic">{t(text)}</span>}
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -47,6 +47,7 @@ import { tryit } from "shared/helpers/error.helpers";
|
||||
import { InstallationLocationService } from "renderer/services/installation-location.service";
|
||||
import { AutoUpdaterService } from "renderer/services/auto-updater.service";
|
||||
import { OculusDownloaderService } from "renderer/services/bs-version-download/oculus-downloader.service";
|
||||
import { DISCORD_URL } from "shared/constants";
|
||||
|
||||
export function SettingsPage() {
|
||||
|
||||
@@ -240,7 +241,7 @@ export function SettingsPage() {
|
||||
const openGithub = () => linkOpener.open("https://github.com/Zagrios/bs-manager");
|
||||
const openReportBug = () => linkOpener.open("https://github.com/Zagrios/bs-manager/issues/new?assignees=Zagrios&labels=bug&template=-bug--bug-report.md&title=%5BBUG%5D+%3A+");
|
||||
const openRequestFeatures = () => linkOpener.open("https://github.com/Zagrios/bs-manager/issues/new?assignees=Zagrios&labels=enhancement&template=-feat---feature-request.md&title=%5BFEAT.%5D+%3A+");
|
||||
const openDiscord = () => linkOpener.open("https://discord.gg/uSqbHVpKdV");
|
||||
const openDiscord = () => linkOpener.open(DISCORD_URL);
|
||||
const openTwitter = () => linkOpener.open("https://twitter.com/BSManager_");
|
||||
|
||||
const openLogs = () => lastValueFrom(ipcService.sendV2("open-logs"));
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
export const DISCORD_URL = "https://discord.gg/uSqbHVpKdV";
|
||||
export const GITHUB_URL = "https://github.com/Zagrios/bs-manager";
|
||||
|
||||
Reference in New Issue
Block a user