diff --git a/.github/workflows/branch-deploy.yml b/.github/workflows/branch-deploy.yml index 8a1f6268d..9b723960d 100644 --- a/.github/workflows/branch-deploy.yml +++ b/.github/workflows/branch-deploy.yml @@ -20,7 +20,7 @@ jobs: steps: - - uses: github/branch-deploy@v9.10.0 + - uses: github/branch-deploy@v10.0.0-rc.1 id: branch-deploy with: admins: the-hideout/core-contributors diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index acace77bd..7a961b0e4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,7 +16,7 @@ jobs: steps: - name: deployment check - uses: github/branch-deploy@v9.10.0 + uses: github/branch-deploy@v10.0.0-rc.1 id: deployment-check with: merge_deploy_mode: "true" # tells the Action to use the merge commit workflow strategy diff --git a/.github/workflows/unlock-on-merge.yml b/.github/workflows/unlock-on-merge.yml index 1a3d92bba..bd80e1103 100644 --- a/.github/workflows/unlock-on-merge.yml +++ b/.github/workflows/unlock-on-merge.yml @@ -14,7 +14,7 @@ jobs: steps: - name: unlock on merge - uses: github/branch-deploy@v9.10.0 + uses: github/branch-deploy@v10.0.0-rc.1 id: unlock-on-merge with: unlock_on_merge_mode: "true" # <-- indicates that this is the "Unlock on Merge Mode" workflow diff --git a/src/components/menu/alert-config.js b/src/components/menu/alert-config.js index 90ad78e2f..2bb170500 100644 --- a/src/components/menu/alert-config.js +++ b/src/components/menu/alert-config.js @@ -1,6 +1,9 @@ const alertConfig = { // set this bool if the site alert should be enabled or not - alertEnabled: false, + alertEnabled: true, + + // if alert should show on page load even if the user has closed it + alwaysShow: true, // valid alert colors alertColors: { @@ -15,7 +18,8 @@ const alertConfig = { // The text to display in the alert banner //text: '🌟 Flea market scanners are currently being leveled, and data for the {{patchVersion}} patch should be appearing soon! 🌟 If you enjoy using tarkov.dev, please consider donating to help keep it running. All donations go directly towards server costs and operational expenses. This banner will only be up for a week. Thank you! ❤️', - text: '🌟 Flea market scanners have been leveled, and flea market prices are being updated for patch {{patchVersion}}! 🌟 If you enjoy using tarkov.dev, please consider donating to help keep it running. All donations go directly towards server costs and operational expenses. This banner will only be up for a week. Thank you! ❤️', + //text: '🌟 Flea market scanners have been leveled, and flea market prices are being updated for patch {{patchVersion}}! 🌟 If you enjoy using tarkov.dev, please consider donating to help keep it running. All donations go directly towards server costs and operational expenses. This banner will only be up for a week. Thank you! ❤️', + text: 'We want to keep Tarkov.dev and its API free for all and without ads, but we\'ve been struggling with increased expenses. If you enjoy using tarkov.dev, please consider donating to help keep it running. All donations go directly towards server costs and operational expenses. Thank you! ❤️', textVariables: {patchVersion: '0.15.0'}, linkEnabled: true, linkText: 'Donate', @@ -24,7 +28,7 @@ const alertConfig = { // when a banner with a specific key is hidden, it never shows for that user again // (unless they clear their browser cache) // use a different key to force new banners to display again - bannerKey: 'alertBanner-0.15.0-scanning' + bannerKey: 'alertBanner-0.15.0-funding' } export default alertConfig diff --git a/src/components/menu/index.js b/src/components/menu/index.js index 2614d269f..87bd8d5ab 100644 --- a/src/components/menu/index.js +++ b/src/components/menu/index.js @@ -1,4 +1,4 @@ -import { useMemo } from 'react'; +import { useMemo, useState } from 'react'; import useStateWithLocalStorage from '../../hooks/useStateWithLocalStorage.jsx'; import { Link } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; @@ -52,7 +52,8 @@ const Menu = () => { setIsOpen(!isOpen); };*/ const { t } = useTranslation(); - const [open, setOpen] = useStateWithLocalStorage(alertConfig.bannerKey, true); + const [alertOpen, setAlertOpen] = useStateWithLocalStorage(alertConfig.bannerKey, true); + const [alertStateOpen, setAlertStateOpen] = useState(alertOpen || alertConfig.alwaysShow); const uniqueMaps = useMapImagesSortedArray(); for (const map of uniqueMaps) { @@ -74,9 +75,9 @@ const Menu = () => { return ( <> {/* ALERT BANNER SECTION */} - {alertConfig?.alertEnabled && alertConfig.alertEnabled === true && ( + {alertConfig?.alertEnabled === true && ( - + { color="inherit" size="small" onClick={() => { - setOpen(false); + setAlertOpen(false); + setAlertStateOpen(false); }} > @@ -102,6 +104,7 @@ const Menu = () => { {t(alertConfig.linkText)}