Skip to content

Commit

Permalink
Merge pull request #10883 from DestinyItemManager/incompatible-error
Browse files Browse the repository at this point in the history
Show a more helpful error when the browser is too old to run DIM
  • Loading branch information
bhollis authored Jan 5, 2025
2 parents 4573fe6 + ab0113b commit fbb7809
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
4 changes: 3 additions & 1 deletion config/i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@
"Title": "Something went wrong"
},
"ErrorPanel": {
"BrowserTooOldTitle": "Incompatible browser",
"BrowserTooOld": "Your browser is too old to use DIM. Please update your browser to the latest version.",
"Description": "Try loading your inventory in the Destiny 2 Companion App to see if Bungie.net is down.",
"Troubleshooting": "Troubleshooting Guide",
"SystemDown": "This affects all Destiny apps, and the DIM team cannot fix or bypass it.",
Expand Down Expand Up @@ -1524,4 +1526,4 @@
},
"wrong-level": "wrong-level",
"no-space": "no-space"
}
}
2 changes: 2 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

## 8.52.0 <span class="changelog-date">(2024-12-22)</span>

* Minimum browser version for DIM has been raised to Chrome 126+ (or equivalent Chromium-based browsers) and iOS 16.4+. DIM may not load at all on older browsers. Firefox and Desktop Safari are still only supported on their most recent two versions. Note that Firefox 115 ESR is not supported, but may work if you're stuck on Windows 7.

## 8.51.0 <span class="changelog-date">(2024-12-15)</span>

* Added a wishlist refresh button in Settings to help with wishlist development. Note that GitHub can take upwards of 10min to actually reflect your changes. Refreshing won't speed up GitHub.
Expand Down
3 changes: 2 additions & 1 deletion src/app/shell/ErrorPanel.m.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
@use '../variables.scss' as *;

.errorPanel {
margin: 16px 0;
margin: 16px auto;
max-width: 900px;
padding: 0.85em;
background: color.scale($red, $lightness: -90%);
border-top: 4px solid $red;
Expand Down
10 changes: 8 additions & 2 deletions src/app/shell/ErrorPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,19 @@ export default function ErrorPanel({
}
}

const name = underlyingError?.name || error?.name;
const message = error?.message || fallbackMessage;
let name = underlyingError?.name || error?.name;
let message = error?.message || fallbackMessage;

const ourFault = !(
underlyingError instanceof BungieError || underlyingError instanceof HttpStatusError
);

if (message?.includes('toSorted')) {
title = t('ErrorPanel.BrowserTooOldTitle');
name = 'BrowserTooOld';
message = t('ErrorPanel.BrowserTooOld');
}

const content = (
<>
<h2>
Expand Down
2 changes: 2 additions & 0 deletions src/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@
"Title": "Something went wrong"
},
"ErrorPanel": {
"BrowserTooOld": "Your browser is too old to use DIM. Please update your browser to the latest version.",
"BrowserTooOldTitle": "Incompatible browser",
"Description": "Try loading your inventory in the Destiny 2 Companion App to see if Bungie.net is down.",
"ReadTheGuide": "Read our User Guide (linked from the menu) for troubleshooting steps.",
"SystemDown": "This affects all Destiny apps, and the DIM team cannot fix or bypass it.",
Expand Down

0 comments on commit fbb7809

Please sign in to comment.