add modification after firt review part 1

This commit is contained in:
Shidorien
2024-01-05 16:31:17 +01:00
parent 9401f1cf4a
commit 76ed1b09a1
5 changed files with 17 additions and 29 deletions
@@ -1,6 +1,7 @@
import { BsmButton } from "renderer/components/shared/bsm-button.component";
import { ChangelogVersion } from "renderer/services/auto-updater.service";
import { LinkOpenerService } from "renderer/services/link-opener.service";
import { useService } from "renderer/hooks/use-service.hook";
import { ModalComponent } from "renderer/services/modale.service";
import DOMPurify from 'dompurify';
import './changelog-modal.component.css';
@@ -8,7 +9,7 @@ import Tippy from "@tippyjs/react";
export const ChangelogModal: ModalComponent<void, ChangelogVersion> = ({ resolver, data: changelog }) => {
const linkOpener: LinkOpenerService = LinkOpenerService.getInstance();
const linkOpener = useService(LinkOpenerService);
const openGithub = () => linkOpener.open("https://github.com/Zagrios/bs-manager");
const openTwitter = () => linkOpener.open("https://twitter.com/BSManager_");
const openSupportPage = () => linkOpener.open("https://www.patreon.com/bsmanager");
@@ -27,16 +28,16 @@ export const ChangelogModal: ModalComponent<void, ChangelogVersion> = ({ resolve
</div>
<div className="flex flex-row gap-2 my-auto">
<Tippy content="Twitter" placement="top" className="font-bold !bg-neutral-900" duration={[200, 0]} arrow={false}>
<div><BsmButton onClick={openTwitter} className="rounded-md p-1 w-7 h-7" icon="twitter" withBar={false} typeColor="none" iconColor="#fff" color="#000"/></div>
<div><BsmButton onClick={openTwitter} className="rounded-md p-1 w-7 h-7" icon="twitter" withBar={false} iconColor="#fff" color="#000"/></div>
</Tippy>
<Tippy content="Github" placement="top" className="font-bold !bg-neutral-900" duration={[200, 0]} arrow={false}>
<div><BsmButton onClick={openGithub} className="rounded-md p-1 w-7 h-7" icon="github" withBar={false} typeColor="none" iconColor="#fff" color="#000"/></div>
<div><BsmButton onClick={openGithub} className="rounded-md p-1 w-7 h-7" icon="github" withBar={false} iconColor="#fff" color="#000"/></div>
</Tippy>
<Tippy content="Discord" placement="top" className="font-bold !bg-neutral-900" duration={[200, 0]} arrow={false}>
<div><BsmButton onClick={openDiscord} className="rounded-md p-1 w-7 h-7" icon="discord" withBar={false} typeColor="none" iconColor="#fff" color="#000"/></div>
<div><BsmButton onClick={openDiscord} className="rounded-md p-1 w-7 h-7" icon="discord" withBar={false} iconColor="#fff" color="#000"/></div>
</Tippy>
<Tippy content="Patreon" placement="top" className="font-bold !bg-neutral-900" duration={[200, 0]} arrow={false}>
<div><BsmButton onClick={openSupportPage} className="rounded-md p-1 w-7 h-7 " icon="patreon" withBar={false} typeColor="none" iconColor="#fff" color="#000"/></div>
<div><BsmButton onClick={openSupportPage} className="rounded-md p-1 w-7 h-7 " icon="patreon" withBar={false} iconColor="#fff" color="#000"/></div>
</Tippy>
</div>
</div>
@@ -66,10 +66,6 @@ export function BsmButton({ className, style, imgClassName, iconClassName, icon,
if (typeColor === "success") {
return "bg-green-500";
}
if (typeColor === "none")
{
return "";
}
return "";
})();