| | |
| | | try TagDatabase.exportTo(url) |
| | | } catch { |
| | | fputs("[TagLauncher] Export failed: \(error)\n", stderr) |
| | | showDataAlert(title: tr("settings.exportFailed"), message: error.localizedDescription) |
| | | } |
| | | } |
| | | } |
| | |
| | | scanApps() |
| | | } catch { |
| | | fputs("[TagLauncher] Import failed: \(error)\n", stderr) |
| | | // Show alert on failure |
| | | showDataAlert(title: tr("settings.importFailed"), message: error.localizedDescription) |
| | | } |
| | | } |
| | | } |
| | | |
| | | private func showDataAlert(title: String, message: String) { |
| | | let alert = NSAlert() |
| | | alert.messageText = tr("settings.importFailed") |
| | | alert.informativeText = error.localizedDescription |
| | | alert.messageText = title |
| | | alert.informativeText = message |
| | | alert.alertStyle = .warning |
| | | alert.runModal() |
| | | } |
| | | } |
| | | } |
| | | |
| | | private var appVersion: String { |