From 8e6b490c07623e0ba0754379b1dbad00750ead11 Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Fri, 19 Aug 2022 22:09:26 +0200 Subject: [PATCH] Add update page (not done!) --- src/client/assets/css/checkingUpdate.css | 68 ++++++++++++++++++++++++ src/client/assets/js/checkingUpdate.js | 24 +++++++++ src/client/checkingUpdate.html | 36 +++++++++++++ src/server/main.js | 2 +- 4 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 src/client/assets/css/checkingUpdate.css create mode 100644 src/client/assets/js/checkingUpdate.js create mode 100644 src/client/checkingUpdate.html diff --git a/src/client/assets/css/checkingUpdate.css b/src/client/assets/css/checkingUpdate.css new file mode 100644 index 0000000..f8decbb --- /dev/null +++ b/src/client/assets/css/checkingUpdate.css @@ -0,0 +1,68 @@ +* { + box-sizing: border-box; +} + +html{ + height: 100%; +} + +body{ + background-color: black; + background-image: url("../images/background.jpg"); + background-size: cover; + background-repeat: no-repeat; + margin:0; + height:100%; + font-family: "Roboto", sans-serif; + color: black; +} + +.dots-3 { + width: 60px; + aspect-ratio: 2; + --_g: no-repeat radial-gradient(circle closest-side,#000 90%,#0000); + background: + var(--_g) 0% 50%, + var(--_g) 50% 50%, + var(--_g) 100% 50%; + background-size: calc(100%/3) 50%; + animation: d3 1s infinite linear; + position: relative; + left: 50%; + transform: translateX(-50%); +} + +@keyframes d3 { + 20%{background-position:0% 0%, 50% 50%,100% 50%} + 40%{background-position:0% 100%, 50% 0%,100% 50%} + 60%{background-position:0% 50%, 50% 100%,100% 0%} + 80%{background-position:0% 50%, 50% 50%,100% 100%} +} + +#fullscreen { + position: absolute; + top: 28px; + width: 100%; + height: calc(100% - 28px); + background-color: rgba(0, 0, 0, 0.6); + z-index: 10; +} + +#close { + position: absolute; + top: 28px; + left: 5px; + color: white; + cursor: pointer; +} + +#fullscreen-content { + position: relative; + top: 50%; + transform: translateY(-50%); + width: 100%; + background: white; + max-height: 80vh; + text-align: center; + padding: 25px 0; +} \ No newline at end of file diff --git a/src/client/assets/js/checkingUpdate.js b/src/client/assets/js/checkingUpdate.js new file mode 100644 index 0000000..ec8ac02 --- /dev/null +++ b/src/client/assets/js/checkingUpdate.js @@ -0,0 +1,24 @@ +app = vue.createApp({ + data() { + return { + displayFullscreen: "block", + fullscreenText: "Checking for updates..." + } + }, + mounted() { + }, + methods: { + sendCheckingUpdate() { + ipcRenderer.send("checking-update"); + }, + closeFullscreen () { + this.displayFullscreen = "none" + } + }, +}); + +app.mount("#vue"); + +ipcRenderer.on("update-status", (event, arg) => { + +}); \ No newline at end of file diff --git a/src/client/checkingUpdate.html b/src/client/checkingUpdate.html new file mode 100644 index 0000000..2054d00 --- /dev/null +++ b/src/client/checkingUpdate.html @@ -0,0 +1,36 @@ + + + + + Altarik Launcher + + + + + + + + +
+ +
+
close
+
+

{{ fullscreenText }}

+
+
+
+
+ + + + + diff --git a/src/server/main.js b/src/server/main.js index 15ddea5..4dd8830 100644 --- a/src/server/main.js +++ b/src/server/main.js @@ -26,7 +26,7 @@ function createWindow () { frame: false }) //Menu.setApplicationMenu(null) - win.loadFile('src/client/login.html').then(() => { + win.loadFile('src/client/checkingUpdate.html').then(() => { require('./updater.js').configUpdater(app, autoUpdater, dialog, logger, showNotification) }) win.on("close", () => {