diff --git a/assets/jsons/translations/en.json b/assets/jsons/translations/en.json index 82f63ca3..71094f8c 100644 --- a/assets/jsons/translations/en.json +++ b/assets/jsons/translations/en.json @@ -63,7 +63,16 @@ "es-ES": "Spanish" } } - } + }, + "patreon":{ + "title":"Support BSManager 💖", + "description": "Support the project and help us to provide continuous improvements to BSManager.", + "buttons":{ + "support": "Support BSManager", + "supporters":"Supporters 👀" + } + + } } }, "notifications":{ diff --git a/assets/jsons/translations/es.json b/assets/jsons/translations/es.json index 99e99e48..b068006a 100644 --- a/assets/jsons/translations/es.json +++ b/assets/jsons/translations/es.json @@ -63,7 +63,15 @@ "es-ES": "Español" } } - } + }, + "patreon":{ + "title":"Apoyo BSManager 💖", + "description": "Apoye el proyecto y ayúdenos a proporcionar mejoras continuas a BSManager.", + "buttons":{ + "support": "Apoyo BSManager", + "supporters":"Apoyos 👀" + } + } } }, diff --git a/assets/jsons/translations/fr.json b/assets/jsons/translations/fr.json index 2b9ea0fe..dbb81c14 100644 --- a/assets/jsons/translations/fr.json +++ b/assets/jsons/translations/fr.json @@ -63,7 +63,16 @@ "es-ES": "Espagnol" } } - } + }, + "patreon":{ + "title":"Soutenir BSManager 💖", + "description": "Soutien le projet et aide-nous à fournir des améliorations continues à BSManager.", + "buttons":{ + "support": "Soutenir BSManager", + "supporters":"Supporteurs 👀" + } + + } } }, "notifications":{ diff --git a/src/renderer/components/shared/bsm-button.component.tsx b/src/renderer/components/shared/bsm-button.component.tsx index 71ae2c05..4589d684 100644 --- a/src/renderer/components/shared/bsm-button.component.tsx +++ b/src/renderer/components/shared/bsm-button.component.tsx @@ -11,6 +11,7 @@ type propsType = { className?: string, style?: React.CSSProperties, imgClassName?: string, + iconClassName?: string, icon?: BsmIconType, image?: string, text?: string, @@ -20,10 +21,11 @@ type propsType = { disabled?: boolean, onClickOutside?: (e: MouseEvent) => void, onClick?: (e: React.MouseEvent) => void, - typeColor?:BsmButtonType + typeColor?:BsmButtonType, + color?: string } -export function BsmButton({className, style, imgClassName, icon, image, text, type, active, withBar = true, disabled, onClickOutside, onClick, typeColor}: propsType) { +export function BsmButton({className, style, imgClassName, iconClassName, icon, image, text, type, active, withBar = true, disabled, onClickOutside, onClick, typeColor, color}: propsType) { const t = useTranslation(); const secondColor = useThemeColor("second-color"); @@ -52,9 +54,9 @@ export function BsmButton({className, style, imgClassName, icon, image, text, ty return ( onClickOutside && onClickOutside(e)}> -
onClick && onClick(e)} className={`${className} overflow-hidden cursor-pointer group ${!withBar && !!typeColor && "hover:brightness-[1.15]"} ${disabled && "brightness-75 cursor-not-allowed"} ${renderTypeColor}`} style={{...style, ...(!!primaryColor && {backgroundColor: primaryColor})}}> +
onClick && onClick(e)} className={`${className} overflow-hidden cursor-pointer group ${!withBar && (!!typeColor || !!color) && "hover:brightness-[1.15]"} ${disabled && "brightness-75 cursor-not-allowed"} ${renderTypeColor}`} style={{...style, ...((!!primaryColor || !!color) && {backgroundColor: primaryColor ?? color})}}> { image && } - { icon && } + { icon && } {text && (type === "submit" ? : {t(text)})} { withBar && (
diff --git a/src/renderer/components/svgs/bsm-icon.component.tsx b/src/renderer/components/svgs/bsm-icon.component.tsx index 4e91c212..ced7ac0e 100644 --- a/src/renderer/components/svgs/bsm-icon.component.tsx +++ b/src/renderer/components/svgs/bsm-icon.component.tsx @@ -18,11 +18,12 @@ import { SteamIcon } from "./icons/steam-icon.component"; import { CSSProperties, memo } from "react"; import EditIcon from "./icons/edit-icon.component"; import { ExportIcon } from "./icons/export-icon.component"; +import PatreonIcon from "./icons/patreon-icon.component"; export type BsmIconType = ( "settings"|"trash"|"favorite"|"folder"|"bsNote"| "terminal"|"desktop"|"oculus"|"add"|"cross"|"task"| - "copy"|"steam"|"edit"|"export"| + "copy"|"steam"|"edit"|"export"|"patreon"| "fr-FR-flag"|"es-ES-flag"|"en-US-flag"|"en-EN-flag" ); @@ -48,6 +49,7 @@ export const BsmIcon = memo(({className, icon, style}: {className?: string, icon if(icon === "steam"){ return } if(icon === "edit"){ return } if(icon === "export"){ return } + if(icon === "patreon"){ return } return } diff --git a/src/renderer/components/svgs/icons/patreon-icon.component.tsx b/src/renderer/components/svgs/icons/patreon-icon.component.tsx new file mode 100644 index 00000000..f77f92ad --- /dev/null +++ b/src/renderer/components/svgs/icons/patreon-icon.component.tsx @@ -0,0 +1,10 @@ +import { CSSProperties } from "react"; + +export default function PatreonIcon(props: {className?: string, style?: CSSProperties}) { + return ( + + + + + ) +} diff --git a/src/renderer/pages/settings-page.component.tsx b/src/renderer/pages/settings-page.component.tsx index 0e59a121..3535908d 100644 --- a/src/renderer/pages/settings-page.component.tsx +++ b/src/renderer/pages/settings-page.component.tsx @@ -106,6 +106,10 @@ export function SettingsPage() { notificationService.notifySuccess({title: "notifications.settings.steam.success.titles.logout", duration: 3000}); }; + const openPatreonPage = () => { + ipcService.sendLazy("new-window", {args: "https://www.patreon.com/bsmanager?fan_landing=true"}) + } + return (
@@ -139,6 +143,13 @@ export function SettingsPage() { + +
+ + +
+
+