Skip to content

Commit

Permalink
Release v0.1.2🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
360tetsu360 committed May 4, 2024
1 parent 271c093 commit fcb7209
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
factory_t31_ZMC6tiIDQN
rootfs_hack.ext2
rootfs_hack.squashfs
atom-skygaze.v*.*.*.zip
*.zip
Cargo.lock
target
Binary file removed atom-skygaze.v0.1.1.zip
Binary file not shown.
5 changes: 0 additions & 5 deletions atomconf.toml

This file was deleted.

4 changes: 3 additions & 1 deletion buildscripts/post_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ cp -r /src/assets /src/output
cd /src/output
VERSION=$(cat /src/configs/skygaze.ver)
ZIP_NAME="/src/atom-skygaze.v$VERSION.zip"
rm "$ZIP_NAME"
if [ -f $ZIP_NAME ]; then
rm "$ZIP_NAME"
fi
zip -r "$ZIP_NAME" .
2 changes: 1 addition & 1 deletion configs/skygaze.ver
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.1
0.1.2
19 changes: 19 additions & 0 deletions output/assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,21 @@
<button id="reboot" class="button">Reboot</button>
</div>
</dialog>
<dialog id="video-dialog" class="dialog">
<div class="control-panel">
<div class="one-line-title">
<p id="video-dialog-title"></p>
<button id="video-dialog-close" class="dialog-close">X</button>
</div>
</div>
<video controls id="videoframe" style="width: 960px;" preload="none"></video>
<div class="control-panel">
<div class="one-line-sub">
Download
<a id="download" class="button">Download</a>
</div>
</div>
</dialog>
<div class="left">
<div class="control-panel">
<div class="one-line-sub">
Expand All @@ -44,6 +59,10 @@
Apply
<button id="app-msk" class="button">Apply</button>
</div>
<div class="one-line-sub">
Clear
<button id="clear-msk" class="button">Clear</button>
</div>
</div>
<div class="control-panel">
<div class="one-line">
Expand Down
40 changes: 32 additions & 8 deletions output/assets/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,15 @@ connection.onmessage = function(event) {
var oneline = document.createElement("div");
oneline.className = "one-line";
oneline.textContent = `[${timestamp}] Meteor Detected`;
var download = document.createElement("a");
download.href = `/download?filename=${record_path}`;
download.textContent = "Download";
oneline.appendChild(download);

new_item.appendChild(oneline);
new_item.onclick = () => {
document.getElementById("video-dialog-title").textContent = `[${timestamp}] Meteor Detected`;
document.getElementById("videoframe").src = `/view?filename=${record_path}`;
document.getElementById("download").href = `/download?filename=${record_path}`;
const dialog = document.getElementById("video-dialog");
dialog.showModal();
};

if (log_box.firstChild) {
log_box.insertBefore(new_item, log_box.firstChild);
Expand Down Expand Up @@ -139,11 +143,14 @@ connection.onmessage = function(event) {
var oneline = document.createElement("div");
oneline.className = "one-line";
oneline.textContent = `[${timestamp}] Meteor Detected`;
var download = document.createElement("a");
download.href = `/download?filename=${record_path}`;
download.textContent = "Download";
oneline.appendChild(download);
new_item.appendChild(oneline);
new_item.onclick = () => {
document.getElementById("video-dialog-title").textContent = `[${timestamp}] Meteor Detected`;
document.getElementById("videoframe").src = `/view?filename=${record_path}`;
document.getElementById("download").href = `/download?filename=${record_path}`;
const dialog = document.getElementById("video-dialog");
dialog.showModal();
};

if (log_box.firstChild) {
log_box.insertBefore(new_item, log_box.firstChild);
Expand Down Expand Up @@ -180,6 +187,11 @@ document.getElementById("wifi-dialog-close").onclick = () => {
dialog.close();
}

document.getElementById("video-dialog-close").onclick = () => {
const dialog = document.getElementById("video-dialog");
dialog.close();
}

document.getElementById("shw_msk").onchange = () => {
let checked = document.getElementById("shw_msk").checked;
var elements = document.getElementsByClassName("grid-item");
Expand All @@ -192,6 +204,18 @@ document.getElementById("app-msk").onclick = () => {
connection.send(grid_state.buffer);
}

document.getElementById("clear-msk").onclick = () => {
for (let row = 0; row < rows; row++) {
for (let col = 0; col < columns; col++) {
if (grid_state[row * columns + col] === 1) {
let grid = document.getElementById(`grid-${row}-${col}`);
grid.style.backgroundColor = "rgba(0, 0, 0, 0.1)";
grid_state[row * columns + col] = 0;
}
}
}
}

document.getElementById("det").onchange= () => {
let checked = document.getElementById("det").checked;
connection.send(`det,${checked? "on":"off"}`);
Expand Down
2 changes: 1 addition & 1 deletion output/assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -348,4 +348,4 @@ dialog .toggle .slider {
.styled-input:focus {
border-color: #3498db;
outline: none;
}
}
27 changes: 0 additions & 27 deletions test.sh

This file was deleted.

0 comments on commit fcb7209

Please sign in to comment.