Skip to content

Commit

Permalink
Fixed the update banner link, added ability to dismiss update banner.
Browse files Browse the repository at this point in the history
  • Loading branch information
theamazingfedex committed Oct 7, 2022
1 parent 65dfa5b commit 2339ba2
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mhmm-web",
"version": "0.1.5",
"version": "0.1.6",
"private": true,
"dependencies": {
"@bugsnag/plugin-react": "^7.18.0",
Expand Down
26 changes: 25 additions & 1 deletion src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,33 @@ input[type=search]::-webkit-search-cancel-button {
/* position: absolute; */
width: 100%;
margin: 0 auto;
padding: 1em;
padding: 1em 0;
/* margin: 1em; */
border-radius: 5px;
}
.dismiss-update {
/* font-size: calc(10px + 2vmin); */
position: relative;
bottom: 0.75em;
right: 0.6em;
/* font-weight: bold; */
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
float: right;
cursor: pointer;
text-shadow: #282c34 3px 3px 3px 0;
color: rgba(255,255,255,0.9);
}
.dismiss-update:hover {
color: rgba(255,255,255,0.7);
/* color: rgba(0,0,0,0.7); */
margin-top: -0.07em;
text-shadow: none;
}
.dismiss-update:active,
.dismiss-update:focus {
margin-top: 0.03em;
}


.drop-target {
Expand Down
5 changes: 3 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,10 @@ function App() {
<img src={mhsLogo} className="logo" alt="Metal: Hellsinger" />
<div className="content-wrapper">
{needsUpdate && (
<div className="update-required-banner" onClick={`location.href='${githubReleasesUrl}'`} style={{cursor: 'pointer'}} title="Download latest version">
<div className="update-required-banner" onClick={() => {window.location.href='https://github.com/theamazingfedex/mhmm/releases'}} style={{cursor: 'pointer'}} title="Download latest version">
UPDATE AVAILABLE &nbsp;-&nbsp;
<a href={githubReleasesUrl}>Click HERE to go to latest releases</a>
<a href="https://github.com/theamazingfedex/mhmm/releases">Click HERE to go to latest releases</a>
<span className="dismiss-update" title="Dismiss" onClick={(e) => {setNeedsUpdate(false); e.stopPropagation();}}>&nbsp;x&nbsp;</span>
</div>
)}
{!!curGameDirectory ? (
Expand Down

0 comments on commit 2339ba2

Please sign in to comment.