-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathindex.html
More file actions
227 lines (215 loc) · 10.8 KB
/
Copy pathindex.html
File metadata and controls
227 lines (215 loc) · 10.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<html>
<title>Axiscope</title>
<head>
<script
src="https://code.jquery.com/jquery-3.7.1.min.js"
integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo="
crossorigin="anonymous"
>
</script>
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH"
crossorigin="anonymous"
>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"
>
</script>
<script src="./js/camera.js"></script>
<script src="./js/index.js"></script>
<script src="./js/tools.js"></script>
<script src="./js/gcode.js"></script>
<link rel="stylesheet" href="./css/camera.css">
<style>
.modal-content {
border-radius: 10px;
}
.form-control:focus {
border-color: #80bdff;
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
#camera-select {
display: none;
}
.camera-option {
cursor: pointer;
transition: background-color 0.2s;
border: 1px solid #dee2e6;
margin-bottom: 10px;
border-radius: 5px;
}
.camera-option:hover {
background-color: #f8f9fa;
}
.camera-option.selected {
border-color: #0d6efd;
background-color: #e7f1ff;
}
.camera-preview {
width: 160px;
height: 120px;
object-fit: cover;
border-radius: 4px;
}
.camera-list-container {
max-height: 400px;
overflow-y: auto;
}
#camContainer {
display: none;
}
</style>
</head>
<body data-bs-theme="dark">
<!-- Printer IP Modal -->
<div class="modal fade" id="printerModal" data-bs-backdrop="static" tabindex="-1" aria-labelledby="printerModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="printerModalLabel">Printer Configuration</h5>
</div>
<div class="modal-body">
<!-- IP Address Input -->
<div class="mb-3">
<label for="printerIp" class="form-label">Printer IP Address</label>
<div class="input-group">
<input type="text" class="form-control" id="printerIp" placeholder="Enter IP address (e.g., 192.168.1.100)">
<button class="btn btn-outline-danger" type="button" id="disconnectBtn" style="display: none;">
Disconnect
</button>
</div>
<div id="ipError" class="text-danger mt-2" style="display: none;">
Invalid IP address format
</div>
</div>
<!-- Camera Selection (initially hidden) -->
<div id="camera-select" class="mb-3">
<label class="form-label">Select Camera</label>
<div class="camera-list-container">
<div id="cameraList" class="list-group">
<!-- Camera options will be inserted here -->
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="saveIpBtn">Save IP</button>
</div>
</div>
</div>
</div>
<div class="container text-center">
<div class="row">
<!-- ----------- body.jinja------------------>
<div class="col p-3">
<div class="border border-secondary-subtle rounded bg-body-tertiary p-2">
<div class="row p-2 pb-2">
<button name="ChangePrinter" id="ChangePrinter">Change Printer / Camera</button>
</div>
<div class="row p-2 pb-2">
<!-- Flip Controls -->
<div class="row p-2">
<div class="col-6">
<button type="button" class="btn btn-secondary w-100" id="flip-horizontal">
<i class="bi bi-arrow-left-right"></i> Flip Horizontal
</button>
</div>
<div class="col-6">
<button type="button" class="btn btn-secondary w-100" id="flip-vertical">
<i class="bi bi-arrow-down-up"></i> Flip Vertical
</button>
</div>
</div>
<div id="camContainer" class="img-overlay-wrap">
<img id="zoom-image" src="" width="800"/>
<svg viewBox="0 0 200 200">
<circle cx="100" cy="75" r="50" stroke="red" stroke-width="0.25" fill="none"/>
<line x1="100" y1="15" x2="100" y2="135" stroke="red" stroke-width="0.25" />
<line x1="40" y1="75" x2="160" y2="75" stroke="red" stroke-width="0.25" />
</svg>
</div>
<div class="row p-2">
<div class="col-1">
<i class="bi bi-zoom-out"></i>
</div>
<div class="col-10">
<input type="range" class="form-range" min="0" max="600" value="0" id="zoom-range">
</div>
<div class="col-1">
<i class="bi bi-zoom-in"></i>
</div>
</div>
<div class="row p-2">
<div class="col-1">
<i class="bi bi-brightness-low"></i>
</div>
<div class="col-10">
<input type="range" class="form-range" min="0" max="400" id="contrast-range">
</div>
<div class="col-1">
<i class="bi bi-brightness-high"></i>
</div>
</div>
</div>
<!---------------------------- positioning --------------------->
<div id="positioning">
<div class="row justify-content-center">
<ul class="list-group list-group-horizontal-sm justify-content-center pb-2">
<li class="list-group-item"><span>X: </span><span id="pos-x">0.0</span></li>
<li class="list-group-item"><span>Y: </span><span id="pos-y">0.0</span></li>
<li class="list-group-item"><span>Z: </span><span id="pos-z">0.0</span></li>
</ul>
</div>
<div class="row">
<div class="btn-toolbar justify-content-center" role="toolbar" aria-label="Homing Toolbar">
<div class="btn-group btn-group-sm ps-5 pe-5 pb-1" role="group" aria-label="">
<button type="button" class="btn btn-danger border" id="home-all" data-homed="false" data-url="">HOME ALL</button>
<button type="button" class="btn btn-danger border" id="qgl" data-qgl="false" data-url="">QGL</button>
<button type="button" class="btn btn-danger border" id="disable-motors" data-motoron="false" data-url="">DISABLE</button>
</div>
</div>
</div>
<div id="BouncePositionBar"></div>
<div id="BigPositionBar"></div>
<!-- Endstop Position Section -->
<div id="endstop-section" class="mt-2 mb-1 border-top border-secondary pt-2" style="display:none;">
<div class="d-flex align-items-center justify-content-between px-2 pb-1">
<small class="text-secondary fw-semibold text-uppercase" style="font-size:10px;letter-spacing:0.05em;">Z Endstop Position</small>
<button type="button" class="btn btn-success btn-sm" id="set-endstop-position" title="Set current position as axiscope endstop position">
<i class="bi bi-crosshair2"></i> Set Current Position
</button>
</div>
<div class="d-flex justify-content-center">
<svg id="bed-map-svg" style="display:block;"></svg>
</div>
<div class="d-flex justify-content-center gap-3 pt-1" style="font-size:10px;color:#888;">
<span><svg width="10" height="10"><line x1="0" y1="5" x2="10" y2="5" stroke="#22c55e" stroke-width="1.5"/><line x1="5" y1="0" x2="5" y2="10" stroke="#22c55e" stroke-width="1.5"/></svg> Z-switch</span>
<span><svg width="10" height="10"><circle cx="5" cy="5" r="4" fill="#3b82f6" fill-opacity="0.8"/></svg> Nozzle</span>
</div>
</div>
</div>
<!-- -------------------------- positioning ------------------- -->
</div>
</div>
<div class="col p-3">
<div class="border border-secondary-subtle rounded bg-body-tertiary p-2 mb-3">
<div class="row p-2 pb-2">
<div class="col-9">
<input type="text" class="w-100 form-control" placeholder="" id="gcode-input">
</div>
<div class="col-3">
<button type="button" class="btn btn-dark w-100" id="gcode-send">Send</button>
</div>
</div>
</div>
<ul class="list-group" id="tool-list"></ul>
</div>
</div>
</div>
</body>
<footer></footer>
</html>