From 47f1c1aa383b7894b80d52f675b61cbdb6ce8fc3 Mon Sep 17 00:00:00 2001 From: James Date: Wed, 19 Sep 2018 12:22:40 +1000 Subject: [PATCH] Clean up positioning of buttons --- static/css/main.css | 28 ++++++++++++++++++++++++ static/index.html | 21 ++++++++++-------- static/js/main.js | 43 +++++++++++++++++++----------------- static/js/views.js | 53 +++++++++++++++++++++++++++++++-------------- 4 files changed, 100 insertions(+), 45 deletions(-) diff --git a/static/css/main.css b/static/css/main.css index f4ffe26..c6ccda1 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -36,6 +36,7 @@ pre { .has-padding { padding: 2rem; + position: relative; } .clickable-box { @@ -45,3 +46,30 @@ pre { .clickable-box label { pointer-events: none; } + +.is-max-height { + height: 100%; +} + +.is-bottom-floating { + position: absolute; + bottom: 0; +} + +.is-right-floating { + position: absolute; + right: 0; +} + +.has-padding .is-right-floating { + right: 1rem; +} + +.is-left-floating { + position: absolute; + left: 0; +} + +.has-padding .is-left-floating { + left: 1rem; +} diff --git a/static/index.html b/static/index.html index bb02f25..503182e 100644 --- a/static/index.html +++ b/static/index.html @@ -13,23 +13,26 @@ - -
-
-
-
+ +
+
+
+
-

+
+
+ +

Welcome to the {{ attrs.name }} installer! -

+

We will have you up and running in just a few moments.

-

+

Welcome to the {{ attrs.name }} maintenance tool. -

+
diff --git a/static/js/main.js b/static/js/main.js index 8ec80ab..c95179a 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -1,29 +1,32 @@ // Overwrite loggers with the logging backend -window.onerror = function(msg, url, line) { - window.external.invoke(JSON.stringify({ - Log: { - kind: "error", - msg: msg + " @ " + url + ":" + line - } - })); -}; - -// Borrowed from http://tobyho.com/2012/07/27/taking-over-console-log/ -function intercept(method){ - console[method] = function(){ - var message = Array.prototype.slice.apply(arguments).join(' '); +if (window.external !== undefined && window.external.invoke !== undefined) { + window.onerror = function(msg, url, line) { + old_onerror(msg, url, line); window.external.invoke(JSON.stringify({ Log: { - kind: method, - msg: message + kind: "error", + msg: msg + " @ " + url + ":" + line } })); - } -} + }; -var methods = ['log', 'warn', 'error']; -for (var i = 0; i < methods.length; i++) { - intercept(methods[i]); + // Borrowed from http://tobyho.com/2012/07/27/taking-over-console-log/ + function intercept(method){ + console[method] = function(){ + var message = Array.prototype.slice.apply(arguments).join(' '); + window.external.invoke(JSON.stringify({ + Log: { + kind: method, + msg: message + } + })); + } + } + + var methods = ['log', 'warn', 'error']; + for (var i = 0; i < methods.length; i++) { + intercept(methods[i]); + } } // Disable F5 diff --git a/static/js/views.js b/static/js/views.js index c86a31d..5562b08 100644 --- a/static/js/views.js +++ b/static/js/views.js @@ -96,7 +96,7 @@ const DownloadConfig = { const SelectPackages = { template: `
-

Select your preferred settings:

+

Select which packages you want to install:

@@ -129,16 +129,29 @@ const SelectPackages = {
-
- Advanced... - Install - Modify +
+
+

+ Advanced... +

+

+ Install +

+

+ Modify +

+
+
+ +
+

+ Back +

- Back
`, data: function() { @@ -268,7 +281,11 @@ const ErrorView = {
{{ msg }}
- Back +
+

+ Back +

+
`, data: function() { @@ -301,7 +318,11 @@ const CompleteView = {

{{ $root.$data.attrs.name }} has been uninstalled.

- Exit +
+

+ Exit +

+
`, data: function() { @@ -322,19 +343,19 @@ const ModifyView = {