diff options
author | 2022-01-05 19:13:39 +0100 | |
---|---|---|
committer | 2022-01-05 19:13:39 +0100 | |
commit | 87ae988d5d2dff445ddb7db0e3d675b29a870a4d (patch) | |
tree | efa62d567fcb2a1026a3f86e4a56b30db3ae82c4 /src/components | |
parent | Revert "#512 Show updates tab for Mac, Windows and AppImage only" (diff) | |
download | ferdium-app-87ae988d5d2dff445ddb7db0e3d675b29a870a4d.tar.gz ferdium-app-87ae988d5d2dff445ddb7db0e3d675b29a870a4d.tar.zst ferdium-app-87ae988d5d2dff445ddb7db0e3d675b29a870a4d.zip |
#512 Restrict in-app update to Mac, Windows and AppImage
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/settings/settings/EditSettingsForm.js | 78 |
1 files changed, 41 insertions, 37 deletions
diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js index c113bd9eb..24ba644f4 100644 --- a/src/components/settings/settings/EditSettingsForm.js +++ b/src/components/settings/settings/EditSettingsForm.js | |||
@@ -768,46 +768,50 @@ class EditSettingsForm extends Component { | |||
768 | {this.state.activeSetttingsTab === 'updates' && ( | 768 | {this.state.activeSetttingsTab === 'updates' && ( |
769 | <div> | 769 | <div> |
770 | <Toggle field={form.$('automaticUpdates')} /> | 770 | <Toggle field={form.$('automaticUpdates')} /> |
771 | {automaticUpdates && ( | 771 | {(isMac || isWindows || process.env.APPIMAGE) && ( |
772 | <div> | ||
773 | <Toggle field={form.$('beta')} /> | ||
774 | {updateIsReadyToInstall ? ( | ||
775 | <Button | ||
776 | label={intl.formatMessage(messages.buttonInstallUpdate)} | ||
777 | onClick={installUpdate} | ||
778 | /> | ||
779 | ) : ( | ||
780 | <Button | ||
781 | buttonType="secondary" | ||
782 | label={intl.formatMessage(updateButtonLabelMessage)} | ||
783 | onClick={checkForUpdates} | ||
784 | disabled={ | ||
785 | !automaticUpdates || | ||
786 | isCheckingForUpdates || | ||
787 | isUpdateAvailable || | ||
788 | !isOnline | ||
789 | } | ||
790 | loaded={!isCheckingForUpdates || !isUpdateAvailable} | ||
791 | /> | ||
792 | )} | ||
793 | <br /> | ||
794 | </div> | ||
795 | )} | ||
796 | <p> | ||
797 | {intl.formatMessage(messages.currentVersion)} {ferdiVersion} | ||
798 | </p> | ||
799 | {noUpdateAvailable && ( | ||
800 | <> | 772 | <> |
801 | <br /> | 773 | {automaticUpdates && ( |
802 | <br /> | 774 | <> |
803 | {intl.formatMessage(messages.updateStatusUpToDate)}. | 775 | <div> |
776 | <Toggle field={form.$('beta')} /> | ||
777 | {updateIsReadyToInstall ? ( | ||
778 | <Button | ||
779 | label={intl.formatMessage(messages.buttonInstallUpdate)} | ||
780 | onClick={installUpdate} | ||
781 | /> | ||
782 | ) : ( | ||
783 | <Button | ||
784 | buttonType="secondary" | ||
785 | label={intl.formatMessage(updateButtonLabelMessage)} | ||
786 | onClick={checkForUpdates} | ||
787 | disabled={ | ||
788 | !automaticUpdates || | ||
789 | isCheckingForUpdates || | ||
790 | isUpdateAvailable || | ||
791 | !isOnline | ||
792 | } | ||
793 | loaded={!isCheckingForUpdates || !isUpdateAvailable} | ||
794 | /> | ||
795 | )} | ||
796 | <br /> | ||
797 | </div> | ||
798 | <p> | ||
799 | {intl.formatMessage(messages.currentVersion)} {ferdiVersion} | ||
800 | </p> | ||
801 | {noUpdateAvailable && ( | ||
802 | <p> | ||
803 | {intl.formatMessage(messages.updateStatusUpToDate)}. | ||
804 | </p> | ||
805 | )} | ||
806 | {updateFailed && ( | ||
807 | <Infobox type="danger" icon="alert"> | ||
808 | An error occured (check the console for more details) | ||
809 | </Infobox> | ||
810 | )} | ||
811 | </> | ||
812 | )} | ||
804 | </> | 813 | </> |
805 | )} | 814 | )} |
806 | {updateFailed && ( | ||
807 | <Infobox type="danger" icon="alert"> | ||
808 | An error occured (check the console for more details) | ||
809 | </Infobox> | ||
810 | )} | ||
811 | <p className="settings__message"> | 815 | <p className="settings__message"> |
812 | <Icon icon={mdiGithub} /> | 816 | <Icon icon={mdiGithub} /> |
813 | Ferdi is based on{' '} | 817 | Ferdi is based on{' '} |