Skip to content

Commit

Permalink
Delete debug codes
Browse files Browse the repository at this point in the history
  • Loading branch information
360tetsu360 committed May 11, 2024
1 parent c1fca83 commit 182efee
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 24 deletions.
21 changes: 3 additions & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Build atom-skygaze
on:
push:
tags:
- 'build-test'
- 'build'
branches:
- main
- build
Expand Down Expand Up @@ -62,24 +65,6 @@ jobs:
cd build/buildroot-2024.02
$GITHUB_WORKSPACE/buildscripts/make_initramfs.sh
make rootfs-initramfs
- name: Check initramfs dir
run: |
cd build/buildroot-2024.02/output/initramfs_root
ls -la
- name: Find cpio
run: |
CPIO_FILE=$GITHUB_WORKSPACE/build/buildroot-2024.02/output/images/initramfs.cpio
CPIO_NAME=$(basename "$CPIO_FILE")
echo "CPIO_FILE=$CPIO_FILE" >> $GITHUB_ENV
echo "CPIO_NAME=$CPIO_NAME" >> $GITHUB_ENV
- name: Upload cpio
uses: actions/upload-artifact@v4
with:
name: ${{ env.CPIO_NAME }}
path: ${{ env.CPIO_FILE }}
- name: Build linux
run: |
Expand Down
23 changes: 19 additions & 4 deletions output/assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>
<body>
<header>
ATOM-SKYGAZE v0.1.1
ATOM-SKYGAZE v0.1.3
</header>
<dialog id="wifi-dialog" class="dialog">
<div class="control-panel">
Expand Down Expand Up @@ -74,7 +74,9 @@
<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">
<video controls id="videoframe" style="width: 960px;" preload="none"></video>
</div>
<div class="control-panel">
<div class="one-line-sub">
Download
Expand All @@ -101,6 +103,17 @@
</div>
</div>
</dialog>
<dialog id="prev-dialog" class="dialog">
<div class="control-panel">
<div class="one-line-title">
Preview
<button id="prev-dialog-close" class="dialog-close">X</button>
</div>
</div>
<div class="control-panel">
<img id="prev-dialog" class="prev" src="aaa.jpg">
</div>
</dialog>
<div class="left">
<div class="control-panel">
<div class="one-line">
Expand Down Expand Up @@ -158,9 +171,11 @@
</div>
</div>
</div>
<hr class="separator">
<div class="preview">
<img id="prev" src="aaa.jpg">
<div class="prev-box">
<img id="prev" class="prev" src="aaa.jpg">
<img src="zoom.svg" class="zoom" id="zoom">
</div>
<div class="grid-overlay" id="gridOverlay"></div>
<div class="log-title">Logs</div>
<div id="log-box">
Expand Down
15 changes: 14 additions & 1 deletion output/assets/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ connection.onerror = function(error) {
};

var prev = document.getElementById("prev");
var prev_dialog = document.getElementById("prev-dialog");
var blob = null;
connection.onmessage = function(event) {
if (typeof event.data === 'string') {
Expand Down Expand Up @@ -169,7 +170,9 @@ connection.onmessage = function(event) {
}
const binaryData = event.data;
blob = new Blob([binaryData], { type: 'image/jpeg' });
prev.src = URL.createObjectURL(blob);
let url = URL.createObjectURL(blob);
prev.src = url;
prev_dialog.src = url;
} else {
console.log('Unknown message type');
}
Expand Down Expand Up @@ -328,6 +331,16 @@ document.getElementById("detection-dialog-close").onclick = () => {
dialog.close();
}

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

document.getElementById("zoom").onclick = () => {
const dialog = document.getElementById("prev-dialog");
dialog.showModal();
}

function isValidPsk(psk) {
if (psk.length < 8 || psk.length > 63) {
return false;
Expand Down
19 changes: 18 additions & 1 deletion output/assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,28 @@ footer {
z-index: 1;
}

img {
.prev-box {
position: relative;
}

.prev {
width: 100%;
object-fit: cover;
}

.zoom {
position: absolute;
right: 5px;
bottom: 5px;
width: 25px;
height: 25px;
display: none;
}

.prev-box:hover .zoom {
display: block;
}

button {
width: 100px;
height: 30px;
Expand Down

0 comments on commit 182efee

Please sign in to comment.