diff --git a/app/src/main/assets/web/css/style.css b/app/src/main/assets/web/css/style.css index 7c22ab2..43d814a 100644 --- a/app/src/main/assets/web/css/style.css +++ b/app/src/main/assets/web/css/style.css @@ -127,3 +127,16 @@ html, body { .add-modal form input[type=submit] { font-size: 1.05em; } + +.splash { + width: 100vw; + height: 100vh; + position: absolute; + background: white; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + font-size: 1.2em; + z-index: 1000; +} diff --git a/app/src/main/assets/web/img/icon.png b/app/src/main/assets/web/img/icon.png new file mode 120000 index 0000000..9ca39a4 --- /dev/null +++ b/app/src/main/assets/web/img/icon.png @@ -0,0 +1 @@ +../../../res/mipmap-xxxhdpi/ic_launcher.png \ No newline at end of file diff --git a/app/src/main/assets/web/index.html b/app/src/main/assets/web/index.html index 8ba1231..3d660f6 100644 --- a/app/src/main/assets/web/index.html +++ b/app/src/main/assets/web/index.html @@ -9,6 +9,15 @@
+
+
+ +
+
+ Platypush +
+
+
Loading...
@@ -48,47 +57,7 @@
- - methods: { - refresh: function() { - this.services = { - ...this.services, - ...JSON.parse(app.pollServices()), - } - }, - - onClick: function(service) { - this.loadService(service.host, service.port) - }, - - onConnect: function() { - this.loadService(this.addModalHost, this.addModalPort) - }, - - loadService: function(host, port) { - this.loading = true - app.stopServicesPoll() - window.location.href = `http://${host}:${port}/` - }, - }, - - mounted: function() { - app.startServicesPoll() - window.setInterval(this.refresh, 2000) - } - }) - diff --git a/app/src/main/assets/web/js/main.js b/app/src/main/assets/web/js/main.js new file mode 100644 index 0000000..e2545ee --- /dev/null +++ b/app/src/main/assets/web/js/main.js @@ -0,0 +1,50 @@ +new Vue({ + el: '#app', + data: function() { + return { + loading: false, + splash: false, + services: {}, + addModalVisible: false, + addModalHost: undefined, + addModalPort: 8008, + } + }, + + methods: { + refresh: function() { + this.services = { + ...this.services, + ...JSON.parse(app.pollServices()), + } + }, + + onClick: function(service) { + this.loadService(service.host, service.port) + }, + + onConnect: function() { + this.loadService(this.addModalHost, this.addModalPort) + }, + + loadService: function(host, port) { + this.loading = true + app.stopServicesPoll() + window.location.href = `http://${host}:${port}/` + }, + + splashScreen: function(duration) { + var self = this + this.splash = true + window.setTimeout(() => { + self.splash = false + }, duration) + }, + }, + + mounted: function() { + this.splashScreen(3000) + app.startServicesPoll() + window.setInterval(this.refresh, 500) + } +}) diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png index 260a0e2..4499d88 100644 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png index abf3082..49d9e89 100644 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png index aba2828..5ddc9d3 100644 Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png index 4ade1e1..8378865 100644 Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png index d784fa4..f950817 100644 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png index d177f06..e39a18a 100644 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index 65d177b..9581760 100644 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png index 41ad949..c54dcd4 100644 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index 4e0c669..4498ead 100644 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png index 6e4cba6..4cce3ef 100644 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ