mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 13:05:32 +09:00
feat(app): Flatpak options and fixes with updater (#1509)
This commit is contained in:
1 parent
9d33993413
commit
bf004e6d72
3 files changed
+23
-4
No files matched your search
@@ -556,11 +556,11 @@ class Updater {
|
||||
if (this.isNative && this.nativeDownloadInFlight) {
|
||||
return;
|
||||
}
|
||||
if (this.isNative && this.nativeUnsupported?.reason === 'managed-package') {
|
||||
if (this.isNative && this.nativeUnsupported?.reason === 'managed-package' && !this.updateInfo.web.available) {
|
||||
pushUnsupportedUpdateModal('managed-package');
|
||||
return;
|
||||
}
|
||||
if (this.isNative && this.nativeManualUpdateAvailable) {
|
||||
if (this.isNative && this.nativeManualUpdateAvailable && !this.nativeUnsupported) {
|
||||
this.showManualNativeUpdateModal();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import type {UpdaterDownloadOption} from '@app/features/platform/types/Electron'
|
||||
import * as ModalCommands from '@app/features/ui/commands/ModalCommands';
|
||||
import {modal} from '@app/features/ui/commands/ModalCommands';
|
||||
import {Combobox} from '@app/features/ui/components/form/FormCombobox';
|
||||
import {openExternalUrl} from '@app/features/ui/utils/NativeUtils';
|
||||
import {openExternalUrl, isCanaryDesktop} from '@app/features/ui/utils/NativeUtils';
|
||||
import styles from '@app/features/updater/commands/UpdaterModalCommands.module.css';
|
||||
import {i18n} from '@lingui/core';
|
||||
import {msg} from '@lingui/core/macro';
|
||||
@@ -76,6 +76,10 @@ const SYSTEM_MANAGED_UPDATE_BODY_DESCRIPTOR = msg({
|
||||
message: 'This install is managed by your system. Update {productName} from your software center or package manager.',
|
||||
comment: 'Desktop updater modal body for managed package builds such as Flatpak. productName is the app name.',
|
||||
});
|
||||
const OPEN_SOFTWARE_CENTER_DESCRIPTOR = msg({
|
||||
message: 'Open software center',
|
||||
comment: 'Button label that opens the software center via appstream protocol.',
|
||||
});
|
||||
const OPEN_DESKTOP_DOWNLOADS_DESCRIPTOR = msg({
|
||||
message: 'Open desktop downloads',
|
||||
comment: 'Button label that opens the Fluxer desktop downloads page in a browser.',
|
||||
@@ -291,7 +295,15 @@ export function pushUnsupportedUpdateModal(
|
||||
<ConfirmModal
|
||||
title={i18n._(SYSTEM_MANAGED_INSTALL_DESCRIPTOR)}
|
||||
description={i18n._(SYSTEM_MANAGED_UPDATE_BODY_DESCRIPTOR, {productName: PRODUCT_NAME})}
|
||||
primaryText={i18n._(OPEN_SOFTWARE_CENTER_DESCRIPTOR)}
|
||||
secondaryText={i18n._(CLOSE_DESCRIPTOR)}
|
||||
onPrimary={() => {
|
||||
const appstreamUrl = isCanaryDesktop()
|
||||
? 'appstream://app.fluxer.FluxerCanary'
|
||||
: 'appstream://app.fluxer.Fluxer';
|
||||
|
||||
void openExternalUrl(appstreamUrl);
|
||||
}}
|
||||
data-flx="updater.updater-modal-commands.push-unsupported-update-modal.confirm-modal"
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user