diff options
author | 2021-12-24 18:37:45 +0100 | |
---|---|---|
committer | 2021-12-24 18:37:45 +0100 | |
commit | de536064f400f5c8b0f444b7ac74bbb646991424 (patch) | |
tree | c7ad29dc067a04a18ed3abeaf444b9cf071e3f1a | |
parent | Prevent error swallowing on autoUpdate event (diff) | |
download | ferdium-app-de536064f400f5c8b0f444b7ac74bbb646991424.tar.gz ferdium-app-de536064f400f5c8b0f444b7ac74bbb646991424.tar.zst ferdium-app-de536064f400f5c8b0f444b7ac74bbb646991424.zip |
Apply .update-available badge to settings/updates tabs
-rw-r--r-- | src/components/settings/navigation/SettingsNavigation.js | 5 | ||||
-rw-r--r-- | src/components/settings/settings/EditSettingsForm.js | 3 | ||||
-rw-r--r-- | src/styles/layout.scss | 12 | ||||
-rw-r--r-- | src/styles/settings.scss | 2 |
4 files changed, 21 insertions, 1 deletions
diff --git a/src/components/settings/navigation/SettingsNavigation.js b/src/components/settings/navigation/SettingsNavigation.js index e8370d2ef..b58956f51 100644 --- a/src/components/settings/navigation/SettingsNavigation.js +++ b/src/components/settings/navigation/SettingsNavigation.js | |||
@@ -137,6 +137,11 @@ class SettingsNavigation extends Component { | |||
137 | activeClassName="is-active" | 137 | activeClassName="is-active" |
138 | > | 138 | > |
139 | {intl.formatMessage(globalMessages.settings)} | 139 | {intl.formatMessage(globalMessages.settings)} |
140 | {stores.settings.app.automaticUpdates && | ||
141 | (stores.app.updateStatus === stores.app.updateStatusTypes.AVAILABLE || | ||
142 | stores.app.updateStatus === stores.app.updateStatusTypes.DOWNLOADED) && ( | ||
143 | <span className="update-available">•</span> | ||
144 | )} | ||
140 | </Link> | 145 | </Link> |
141 | <Link | 146 | <Link |
142 | to="/settings/support" | 147 | to="/settings/support" |
diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js index 01e609580..3b2fe4af4 100644 --- a/src/components/settings/settings/EditSettingsForm.js +++ b/src/components/settings/settings/EditSettingsForm.js | |||
@@ -378,6 +378,9 @@ class EditSettingsForm extends Component { | |||
378 | }} | 378 | }} |
379 | > | 379 | > |
380 | {intl.formatMessage(messages.headlineUpdates)} | 380 | {intl.formatMessage(messages.headlineUpdates)} |
381 | {automaticUpdates && (updateIsReadyToInstall || isUpdateAvailable) && ( | ||
382 | <span className="update-available">•</span> | ||
383 | )} | ||
381 | </h2> | 384 | </h2> |
382 | </div> | 385 | </div> |
383 | 386 | ||
diff --git a/src/styles/layout.scss b/src/styles/layout.scss index abd38b506..8454814b0 100644 --- a/src/styles/layout.scss +++ b/src/styles/layout.scss | |||
@@ -58,7 +58,7 @@ html { | |||
58 | } | 58 | } |
59 | } | 59 | } |
60 | 60 | ||
61 | .app .sidebar .sidebar__button .update-available { | 61 | .update-available { |
62 | align-items: center; | 62 | align-items: center; |
63 | background: $theme-brand-danger; | 63 | background: $theme-brand-danger; |
64 | border-radius: 20px; | 64 | border-radius: 20px; |
@@ -79,6 +79,16 @@ html { | |||
79 | animation-iteration-count: 6; | 79 | animation-iteration-count: 6; |
80 | } | 80 | } |
81 | 81 | ||
82 | .badge .update-available { | ||
83 | right: -10px; | ||
84 | } | ||
85 | |||
86 | .settings-navigation__link .update-available { | ||
87 | position: relative; | ||
88 | bottom: 0; | ||
89 | right: 0; | ||
90 | } | ||
91 | |||
82 | body.win32:not(.isFullScreen) .app .app__content { | 92 | body.win32:not(.isFullScreen) .app .app__content { |
83 | height: calc(100% - 28px); | 93 | height: calc(100% - 28px); |
84 | } | 94 | } |
diff --git a/src/styles/settings.scss b/src/styles/settings.scss index 8f59fc57a..00744df88 100644 --- a/src/styles/settings.scss +++ b/src/styles/settings.scss | |||
@@ -218,6 +218,7 @@ | |||
218 | 218 | ||
219 | .badge { | 219 | .badge { |
220 | margin-right: 10px; | 220 | margin-right: 10px; |
221 | position: relative; | ||
221 | } | 222 | } |
222 | 223 | ||
223 | &::-webkit-scrollbar { | 224 | &::-webkit-scrollbar { |
@@ -519,6 +520,7 @@ | |||
519 | overflow: hidden; | 520 | overflow: hidden; |
520 | 521 | ||
521 | .settings-navigation__link { | 522 | .settings-navigation__link { |
523 | position: relative; | ||
522 | align-items: center; | 524 | align-items: center; |
523 | justify-content: space-between; | 525 | justify-content: space-between; |
524 | color: $theme-text-color; | 526 | color: $theme-text-color; |