mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-16 14:16:16 -08:00
refactor(runtime): gate settings backup file save by capability
This commit is contained in:
1 parent
c9a0d5210e
commit
582422c512
4 files changed
+81
-2
No files matched your search
@@ -137,6 +137,7 @@ export class SettingsComponent implements OnInit, OnDestroy {
|
||||
|
||||
/** Flag that indicates whether the app runs in electron environment */
|
||||
readonly isDesktop = this.runtime.isElectron;
|
||||
readonly supportsDesktopFileSave = this.runtime.supportsDesktopFileSave;
|
||||
readonly supportsEpg = this.runtime.supportsEpg;
|
||||
readonly supportsExternalPlayerPathSettings =
|
||||
this.runtime.supportsExternalPlayerPathSettings;
|
||||
@@ -699,7 +700,7 @@ export class SettingsComponent implements OnInit, OnDestroy {
|
||||
try {
|
||||
const backup = await this.playlistBackupService.exportBackup();
|
||||
|
||||
if (this.isDesktop && window.electron?.saveFileDialog) {
|
||||
if (this.supportsDesktopFileSave && window.electron) {
|
||||
const savePath = await window.electron.saveFileDialog(
|
||||
backup.defaultFileName,
|
||||
[
|
||||
|
||||
Reference in new issue
Block a user