feat: adding hydra shop constant

This commit is contained in:
Chubby Granny Chaser 2025-02-16 19:36:02 +00:00
parent f428c522b6
commit 6e35600ffe
No known key found for this signature in database
6 changed files with 15 additions and 9 deletions

View file

@ -89,7 +89,12 @@ const handleDeepLinkPath = (uri?: string) => {
}
if (url.host === "profile") {
WindowManager.redirect(`profile${url.search}`);
const userId = url.searchParams.get("userId");
if (userId) {
WindowManager.redirect(`profile/${userId}`);
}
return;
}

View file

@ -15,4 +15,4 @@ export const DOWNLOADER_NAME = {
export const MAX_MINUTES_TO_SHOW_IN_PLAYTIME = 120;
export const WEB_STORE_URL = "https://hydrathemes.shop";
export const THEME_WEB_STORE_URL = "https://hydrathemes.shop";

View file

@ -1,6 +1,7 @@
import type { GameShop } from "@types";
import Color from "color";
import { THEME_WEB_STORE_URL } from "./constants";
export const formatDownloadProgress = (
progress?: number,
@ -61,7 +62,7 @@ export const injectCustomCss = (css: string) => {
currentCustomCss.remove();
}
if (css.startsWith("https://hydrathemes.shop/")) {
if (css.startsWith(THEME_WEB_STORE_URL)) {
const link = document.createElement("link");
link.id = "custom-css";
link.rel = "stylesheet";

View file

@ -4,7 +4,7 @@ import { useTranslation } from "react-i18next";
import { AddThemeModal, DeleteAllThemesModal } from "../index";
import "./theme-actions.scss";
import { useState } from "react";
import { WEB_STORE_URL } from "@renderer/constants";
import { THEME_WEB_STORE_URL } from "@renderer/constants";
interface ThemeActionsProps {
onListUpdated: () => void;
@ -41,7 +41,7 @@ export const ThemeActions = ({
theme="primary"
className="settings-appearance__button"
onClick={() => {
window.open(WEB_STORE_URL, "_blank");
window.open(THEME_WEB_STORE_URL, "_blank");
}}
>
<GlobeIcon />

View file

@ -7,7 +7,7 @@ import "./theme-card.scss";
import { useState } from "react";
import { DeleteThemeModal } from "../modals/delete-theme-modal";
import { injectCustomCss, removeCustomCss } from "@renderer/helpers";
import { WEB_STORE_URL } from "@renderer/constants";
import { THEME_WEB_STORE_URL } from "@renderer/constants";
interface ThemeCardProps {
theme: Theme;
@ -104,7 +104,7 @@ export const ThemeCard = ({ theme, onListUpdated }: ThemeCardProps) => {
<div className="theme-card__actions__right">
<Button
className={
theme.code.startsWith(WEB_STORE_URL)
theme.code.startsWith(THEME_WEB_STORE_URL)
? "theme-card__actions__right--external"
: ""
}

View file

@ -5,7 +5,7 @@ import "./modals.scss";
import { Theme, UserProfile } from "@types";
import { injectCustomCss, removeCustomCss } from "@renderer/helpers";
import { useToast } from "@renderer/hooks";
import { WEB_STORE_URL } from "@renderer/constants";
import { THEME_WEB_STORE_URL } from "@renderer/constants";
interface ImportThemeModalProps {
visible: boolean;
@ -37,7 +37,7 @@ export const ImportThemeModal = ({
isActive: false,
author: author?.id,
authorName: author?.displayName,
code: `${WEB_STORE_URL}/themes/${themeName}/theme.css`,
code: `${THEME_WEB_STORE_URL}/themes/${themeName}/theme.css`,
createdAt: new Date(),
updatedAt: new Date(),
};