diff --git a/src/assets.rs b/src/assets.rs
index 8f311fb..c181676 100644
--- a/src/assets.rs
+++ b/src/assets.rs
@@ -37,8 +37,6 @@ pub fn file_from_string(file_path: &str) -> Option<(String, &'static [u8])> {
"/css/bulma.min.css",
"/css/main.css",
"/fonts/roboto-v18-latin-regular.eot",
- "/fonts/roboto-v18-latin-regular.svg",
- "/fonts/roboto-v18-latin-regular.ttf",
"/fonts/roboto-v18-latin-regular.woff",
"/fonts/roboto-v18-latin-regular.woff2",
"/js/vue.min.js",
@@ -46,7 +44,8 @@ pub fn file_from_string(file_path: &str) -> Option<(String, &'static [u8])> {
"/js/vue-router.min.js",
"/js/vue-router.js",
"/js/helpers.js",
- "/js/views.js"
+ "/js/views.js",
+ "/js/main.js"
)?;
Some((string_mime, contents))
diff --git a/static/css/main.css b/static/css/main.css
index 248ec8c..b95523f 100644
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -5,11 +5,8 @@
font-weight: 400;
src: url('../fonts/roboto-v18-latin-regular.eot'); /* IE9 Compat Modes */
src: local('Roboto'), local('Roboto-Regular'),
- url('../fonts/roboto-v18-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/roboto-v18-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
- url('../fonts/roboto-v18-latin-regular.woff') format('woff'), /* Modern Browsers */
- url('../fonts/roboto-v18-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
- url('../fonts/roboto-v18-latin-regular.svg#Roboto') format('svg'); /* Legacy iOS */
+ url('../fonts/roboto-v18-latin-regular.woff') format('woff');
}
html, body {
diff --git a/static/fonts/roboto-v18-latin-regular.svg b/static/fonts/roboto-v18-latin-regular.svg
deleted file mode 100644
index 627f5a3..0000000
--- a/static/fonts/roboto-v18-latin-regular.svg
+++ /dev/null
@@ -1,308 +0,0 @@
-
-
-
diff --git a/static/fonts/roboto-v18-latin-regular.ttf b/static/fonts/roboto-v18-latin-regular.ttf
deleted file mode 100644
index b91bf3f..0000000
Binary files a/static/fonts/roboto-v18-latin-regular.ttf and /dev/null differ
diff --git a/static/index.html b/static/index.html
index 4b7243d..d0beaf9 100644
--- a/static/index.html
+++ b/static/index.html
@@ -1,5 +1,5 @@
-
+
-
-
+
Welcome to the {{ attrs.name }} installer!
@@ -29,211 +28,16 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/static/js/main.js b/static/js/main.js
new file mode 100644
index 0000000..b026980
--- /dev/null
+++ b/static/js/main.js
@@ -0,0 +1,54 @@
+// 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(' ');
+ 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]);
+}
+
+document.getElementById("window-title").innerText = base_attributes.name + " Installer";
+
+function selectFileCallback(name) {
+ app.install_location = name;
+}
+
+var app = new Vue({
+ router: router,
+ data: {
+ attrs: base_attributes,
+ config : {},
+ install_location : "",
+ // If the option to pick an install location should be provided
+ show_install_location : true,
+ metadata : {
+ database : [],
+ install_path : "",
+ preexisting_install : false
+ }
+ },
+ methods: {
+ "exit": function() {
+ ajax("/api/exit", function() {});
+ }
+ }
+}).$mount("#app");
diff --git a/static/js/views.js b/static/js/views.js
index bf93c1f..d419bd6 100644
--- a/static/js/views.js
+++ b/static/js/views.js
@@ -34,7 +34,7 @@ const DownloadConfig = {
console.error("Got error while downloading config: "
+ e);
- if (app.is_launcher) {
+ if (app.metadata.is_launcher) {
// Just launch the target application
app.exit();
} else {