diff --git a/src/renderer/src/components/PackageUpdateAvailable/index.jsx b/src/renderer/src/components/PackageUpdateAvailable/index.jsx new file mode 100644 index 0000000..9f96e43 --- /dev/null +++ b/src/renderer/src/components/PackageUpdateAvailable/index.jsx @@ -0,0 +1,49 @@ +import React from "react" +import { Button } from "antd" + +import "./index.less" + +const PackageUpdateAvailable = ({ update, close }) => { + function handleUpdate() { + ipc.exec("pkg:update", update.manifest.id) + + close() + } + + function handleContinue() { + ipc.exec("pkg:execute", update.manifest.id, { + force: true + }) + + close() + } + + return
+

New update available

+ +

This package is ready to be updated.

+ + +

+ {update.current_version} -> {update.new_version} +

+
+ +
+ + + +
+
+} + +export default PackageUpdateAvailable \ No newline at end of file diff --git a/src/renderer/src/components/PackageUpdateAvailable/index.less b/src/renderer/src/components/PackageUpdateAvailable/index.less new file mode 100644 index 0000000..a974b86 --- /dev/null +++ b/src/renderer/src/components/PackageUpdateAvailable/index.less @@ -0,0 +1,26 @@ +.package-update-available { + display: flex; + flex-direction: column; + + gap: 20px; + + h1 { + font-size: 1.5rem; + } + + code { + background-color: var(--background-color-secondary); + color: var(--primary-color); + + padding: 20px; + + border-radius: 12px; + } + + .package-update-available_actions { + display: flex; + flex-direction: row; + + gap: 10px; + } +} \ No newline at end of file