Skip to content

Commit

Permalink
make style for links and bold words in alert messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinir committed Sep 11, 2021
1 parent a73f3c5 commit f820252
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
8 changes: 8 additions & 0 deletions css/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion css/main.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions js/interface/MiniPadderUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class MiniPadderUpdater extends Updater {
this.updateTasks = this.loadUpdateTasks()
this.alert = alertCallback || (() => false)
this.lastAlertMessage = ''
this.lastAlertType = 'info'

MiniPadderUpdater.announceMessage('Checking for updated changes...')
const lastFoundVersionString =
Expand All @@ -16,7 +17,8 @@ class MiniPadderUpdater extends Updater {
if (this.lastAlertMessage) {
// `Update: message` or `Update x.x.x: message`
this.alert(
`Update${this.lastAlertMessage}`
`Update${this.lastAlertMessage}`,
this.lastAlertType
)
}
MiniPadderUpdater.announceMessage('Finished updating.')
Expand All @@ -31,7 +33,8 @@ class MiniPadderUpdater extends Updater {
static announceMessage = MPCommon.announceMessageFrom('Updater')

loadUpdateTasks () {
const setLastAlertMessage = (message, version) => {
const setLastAlertMessage = (message, version, type = 'info') => {
this.lastAlertType = type
if (!message) {
this.lastAlertMessage = null
} else {
Expand Down
12 changes: 12 additions & 0 deletions scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -199,17 +199,29 @@ sub {
font-family: Segoe UI Emoji, monospace;
margin-right: 0.2em;
}
a {
color: #303030;
}
b {
display: inline;
}
&.caution {
background-color: #c1c08b;
&:before {
content: '⚠️ ';
}
a {
color: #30301c;
}
}
&.info {
background-color: #8ba8c1;
&:before {
content: 'ℹ️ ';
}
a {
color: #1c2730;
}
}
}

Expand Down

0 comments on commit f820252

Please sign in to comment.