Compare commits
No commits in common. "3d68117ff43af29e83c8338df70b1b37128af27c" and "9645fb00525689741215fe60abf4c0ba567e26e3" have entirely different histories.
3d68117ff4
...
9645fb0052
4 changed files with 24 additions and 113 deletions
30
.drone.yml
30
.drone.yml
|
@ -45,32 +45,4 @@ steps:
|
||||||
settings:
|
settings:
|
||||||
folder: web
|
folder: web
|
||||||
ssh_key:
|
ssh_key:
|
||||||
from_secret: gitea-ssh-key
|
from_secret: gitea-ssh-key
|
||||||
|
|
||||||
trigger:
|
|
||||||
ref:
|
|
||||||
- refs/tags/v*
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
name: release
|
|
||||||
depends_on:
|
|
||||||
- build-receiver-windows
|
|
||||||
- build-and-deploy-web
|
|
||||||
steps:
|
|
||||||
- name: download-receiver
|
|
||||||
image: alpine/curl
|
|
||||||
commands:
|
|
||||||
- curl https://itsblue.dev/api/packages/dorian/generic/ok-ready-go/$DRONE_COMMIT_SHA/receiver-windows.exe -o receiver-windows.exe
|
|
||||||
|
|
||||||
- name: gitea-release
|
|
||||||
image: plugins/gitea-release
|
|
||||||
settings:
|
|
||||||
base_url: https://itsblue.dev
|
|
||||||
api_key:
|
|
||||||
from_secret: gitea-token
|
|
||||||
files: ./receiver-windows.exe
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
ref:
|
|
||||||
- refs/tags/v*
|
|
|
@ -28,21 +28,12 @@
|
||||||
animation: blinker 2s ease infinite;
|
animation: blinker 2s ease infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
html {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
main {
|
main {
|
||||||
padding-top: 0 !important;
|
padding-top: 0 !important;
|
||||||
height: 100%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.timer-container-div {
|
.timer-container-div {
|
||||||
height: 100%;
|
height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
@ -59,21 +50,4 @@ main {
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
|
||||||
|
|
||||||
.hide-before-init {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.remote-connection-card {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 10px;
|
|
||||||
left: 0;
|
|
||||||
background-color: var(--background-color);
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
details {
|
|
||||||
border-bottom: 0;
|
|
||||||
padding-bottom: 0;
|
|
||||||
}
|
}
|
|
@ -30,72 +30,47 @@
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="timer-container-div hide-after-init">
|
<script>
|
||||||
<h1 class="loading" aria-busy="true">Initializing...</h1>
|
const event = new Event('wasm-loaded');
|
||||||
</div>
|
wasm_bindgen('lib/crypto_helper_bg.wasm').then(() => {
|
||||||
<main class="container hide-before-init" x-data>
|
document.dispatchEvent(event);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<main class="container" x-data>
|
||||||
<div class="timer-container-div" x-show="$store.localState._state !== 5">
|
<div class="timer-container-div" x-show="$store.localState._state !== 5">
|
||||||
<div @click="$store.localState.next()" class="tap-area" x-show="$store.localState._state === 2"></div>
|
<div @click="$store.localState.next()" class="tap-area" x-show="$store.localState._state === 2"></div>
|
||||||
<div @click="$store.localState.next()" class="timer-div">
|
<div @click="$store.localState.next()" class="timer-div">
|
||||||
<hgroup>
|
<hgroup>
|
||||||
<h1>OK! .. READY! ... GO!</h1>
|
<h1>OK! .. READY! ... GO!</h1>
|
||||||
<h2><span x-text="$store.localState.stateHint"></span> <b x-show="$store.mqtt.connected">(connected)</b></h2>
|
<h2 x-text="$store.localState.stateHint"></h2>
|
||||||
</hgroup>
|
</hgroup>
|
||||||
|
|
||||||
<div x-data="Timer">
|
<div x-data="Timer">
|
||||||
<p :class="'timer' + (over ? ($store.localState._state === 3 ? ' sending':' over'):'')"
|
<p :class="'timer' + (over ? ($store.localState._state === 3 ? ' sending':' over'):'')" x-text="time + 's'"></p>
|
||||||
x-text="time + 's'"></p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div x-show="$store.localState._state === 0" class="remote-connection-card">
|
<div x-show="$store.localState._state === 0">
|
||||||
<div class="container">
|
|
||||||
<details>
|
<details>
|
||||||
<div class="container">
|
<summary>Remote connection</summary>
|
||||||
<p>If you want to automatically transfer the time to a computer, follow these steps:</p>
|
|
||||||
|
|
||||||
<div x-show="!$store.mqtt.connected">
|
<div x-show="!$store.mqtt.connected">
|
||||||
<ul>
|
<p>To send the times to a computer, please enter a password here:</p>
|
||||||
<li>Enter a password and press tap connect</li>
|
<form x-data="PasswordForm()" @submit.prevent="submitForm">
|
||||||
|
<label for="passwordForm_password">Password:</label>
|
||||||
<li>
|
<input id="passwordForm_password" type="text" x-model="formData.password" placeholder="Password" />
|
||||||
<form x-data="PasswordForm()" @submit.prevent="submitForm">
|
<small>Make sure, this is exactly the same on your computer!</small>
|
||||||
<label for="passwordForm_password">Password:</label>
|
<button type="submit">Connect</button>
|
||||||
<input id="passwordForm_password" type="text" x-model="formData.password"
|
</form>
|
||||||
placeholder="Password" />
|
|
||||||
<small>Make sure, this is exactly the same on your computer!</small>
|
|
||||||
<button type="submit">Connect</button>
|
|
||||||
</form>
|
|
||||||
</li>
|
|
||||||
<li>Download the receiver tool from <a
|
|
||||||
href="https://itsblue.dev/dorian/ok-ready-go/releases/latest">here</a> to your computer
|
|
||||||
</li>
|
|
||||||
<li>Start the receiver tool on your computer</li>
|
|
||||||
<li>Enter the same password on the receiver tool and click connect</li>
|
|
||||||
<li>Done!</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div x-show="$store.mqtt.connected">
|
<div x-show="$store.mqtt.connected">
|
||||||
<ul>
|
<p>Connected</p>
|
||||||
<li>Download the receiver tool from <a
|
<button @click="$store.localState.password = ''">Disconnect</button>
|
||||||
href="https://itsblue.dev/dorian/ok-ready-go/releases/latest">here</a> to your computer
|
|
||||||
</li>
|
|
||||||
<li>Start the receiver tool on your computer</li>
|
|
||||||
<li>Enter the password '<b x-text="$store.localState.password"></b>' on the receiver tool and click connect</li>
|
|
||||||
<li>Done!</li>
|
|
||||||
<li>
|
|
||||||
<p>If you no longer want to send the time, tap Disconnect</p>
|
|
||||||
<button @click="$store.localState.password = ''">Disconnect</button>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<summary role="button">Remote connection</summary>
|
|
||||||
</details>
|
</details>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="timer-container-div" x-show="$store.localState._state === 5">
|
<div class="timer-container-div" x-show="$store.localState._state === 5">
|
||||||
<h1 class="loading" aria-busy="true">Connecting...</h1>
|
<h1 class="loading" aria-busy="true">Connecting...</h1>
|
||||||
|
|
|
@ -59,14 +59,4 @@ function Timer() {
|
||||||
}, 10);
|
}, 10);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const event = new Event('wasm-loaded');
|
|
||||||
wasm_bindgen('lib/crypto_helper_bg.wasm').then(() => {
|
|
||||||
document.dispatchEvent(event);
|
|
||||||
});
|
|
||||||
|
|
||||||
document.addEventListener("alpine:init", () => {
|
|
||||||
document.getElementsByClassName("hide-after-init").item(0).outerHTML = ""
|
|
||||||
document.getElementsByClassName("hide-before-init").item(0).classList.remove("hide-before-init")
|
|
||||||
});
|
|
Loading…
Reference in a new issue