Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/nanoid-3.3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
GrantBirki authored Dec 12, 2024
2 parents fa17f8c + 004f146 commit e73508f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/branch-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unlock-on-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 7 additions & 3 deletions src/components/menu/alert-config.js
Original file line number Diff line number Diff line change
@@ -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: {
Expand All @@ -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',
Expand All @@ -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
13 changes: 8 additions & 5 deletions src/components/menu/index.js
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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) {
Expand All @@ -74,9 +75,9 @@ const Menu = () => {
return (
<>
{/* ALERT BANNER SECTION */}
{alertConfig?.alertEnabled && alertConfig.alertEnabled === true && (
{alertConfig?.alertEnabled === true && (
<Box>
<Collapse in={open}>
<Collapse in={alertStateOpen}>
<Alert
severity={alertConfig.alertLevel}
variant='filled'
Expand All @@ -87,7 +88,8 @@ const Menu = () => {
color="inherit"
size="small"
onClick={() => {
setOpen(false);
setAlertOpen(false);
setAlertStateOpen(false);
}}
>
<Icon path={mdiClose} size={0.8} className="icon-with-text" />
Expand All @@ -102,6 +104,7 @@ const Menu = () => {
<Link
to={alertConfig.link}
style={{ color: 'inherit', textDecoration: 'underline' }}
target="_blank"
>
{t(alertConfig.linkText)}
</Link>
Expand Down

0 comments on commit e73508f

Please sign in to comment.