-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
227 lines (193 loc) · 7.93 KB
/
index.html
File metadata and controls
227 lines (193 loc) · 7.93 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bambu Filament Manager</title>
<link rel="stylesheet" href="./styles/app.css">
</head>
<body>
<div class="app-shell">
<header class="hero">
<div class="hero-copy">
<span class="eyebrow">Local-First Filament Dashboard</span>
<h1>Bambu Filament Manager</h1>
<p>
Track the full catalog, your owned inventory, open rolls, low-stock spools, wishlist items,
and per-project usage in a clean Bambu Studio-inspired workspace.
</p>
</div>
<div class="hero-actions">
<button class="ghost-button" id="importDataButton" type="button">Import JSON</button>
<button class="ghost-button" id="saveJsonButton" type="button">Save JSON Files</button>
<button class="ghost-button" id="backupDataButton" type="button">Download Backup</button>
<button class="danger-button" id="resetDataButton" type="button">Reset Local Changes</button>
</div>
</header>
<section class="source-bar" id="sourceStatus"></section>
<section class="status-banner" id="appStatus" hidden aria-live="polite"></section>
<section class="toolbar-panel">
<div class="toolbar-grid">
<label class="field wide-field">
<span>Search</span>
<input id="searchInput" type="search" placeholder="Search by material, color, notes, or brand">
</label>
<label class="field">
<span>Material Family</span>
<select id="familyFilter">
<option value="all">All families</option>
</select>
</label>
<label class="toggle">
<input id="ownedOnlyFilter" type="checkbox">
<span>Owned only</span>
</label>
<label class="toggle">
<input id="openOnlyFilter" type="checkbox">
<span>Open only</span>
</label>
<label class="toggle">
<input id="lowOnlyFilter" type="checkbox">
<span>Low stock only</span>
</label>
<label class="toggle">
<input id="amsOnlyFilter" type="checkbox">
<span>AMS compatible</span>
</label>
</div>
</section>
<section class="stats-grid" id="statsGrid"></section>
<section class="main-panel">
<div class="panel-topbar">
<nav class="view-tabs" id="viewTabs" aria-label="Inventory views"></nav>
<div class="panel-actions">
<button class="ghost-button" id="clearFiltersButton" type="button">Clear Filters</button>
</div>
</div>
<div class="active-filter-row" id="activeFilterRow"></div>
<div class="collection-header">
<div>
<h2 id="resultsHeading">Inventory</h2>
<p id="resultsMeta"></p>
</div>
<div class="result-pills" id="resultPills"></div>
</div>
<div class="card-grid" id="catalogGrid"></div>
<div class="empty-state" id="emptyState"></div>
</section>
</div>
<div class="modal-overlay" id="inventoryModalOverlay" hidden>
<div class="modal-card">
<div class="modal-head">
<div>
<span class="modal-kicker">Inventory Editor</span>
<h2 id="inventoryModalTitle">Edit Inventory</h2>
<p id="inventoryModalSubtitle"></p>
</div>
<button class="icon-button" id="closeInventoryModalButton" type="button" aria-label="Close inventory modal">×</button>
</div>
<form id="inventoryForm" class="modal-form">
<input id="inventoryCatalogId" type="hidden">
<label class="toggle inline-toggle">
<input id="inventoryOwned" type="checkbox">
<span>Currently owned</span>
</label>
<div class="modal-grid">
<label class="field">
<span>Total rolls</span>
<input id="inventoryQty" type="number" min="0" step="1">
</label>
<label class="field">
<span>Open rolls</span>
<input id="inventoryOpenQty" type="number" min="0" step="1">
</label>
<label class="field">
<span>Remaining %</span>
<input id="inventoryRemainingPct" type="number" min="0" max="100" step="1">
</label>
<label class="field">
<span>Low-stock threshold %</span>
<input id="inventoryLowThreshold" type="number" min="0" max="100" step="1">
</label>
</div>
<label class="toggle inline-toggle">
<input id="inventoryWishlist" type="checkbox">
<span>Wishlist this catalog item</span>
</label>
<label class="field">
<span>Notes</span>
<textarea id="inventoryNotes" rows="4" placeholder="Refill, prototype spool, special use, preferred profile, or anything helpful."></textarea>
</label>
<div class="modal-actions">
<button class="ghost-button" id="deleteInventoryEntryButton" type="button">Clear Entry</button>
<button class="primary-button" type="submit">Save Inventory</button>
</div>
</form>
</div>
</div>
<div class="modal-overlay" id="usageModalOverlay" hidden>
<div class="modal-card">
<div class="modal-head">
<div>
<span class="modal-kicker">Usage Log</span>
<h2 id="usageModalTitle">Log Print Usage</h2>
<p id="usageModalSubtitle"></p>
</div>
<button class="icon-button" id="closeUsageModalButton" type="button" aria-label="Close usage modal">×</button>
</div>
<form id="usageForm" class="modal-form">
<input id="usageCatalogId" type="hidden">
<div class="modal-grid">
<label class="field span-2">
<span>Project</span>
<input id="usageProject" type="text" maxlength="120" placeholder="Gridfinity bins, jig bracket, enclosure clip">
</label>
<label class="field">
<span>Grams used</span>
<input id="usageGrams" type="number" min="1" step="1">
</label>
<label class="field">
<span>Date</span>
<input id="usageDate" type="date">
</label>
</div>
<div class="modal-actions">
<button class="ghost-button" id="cancelUsageButton" type="button">Cancel</button>
<button class="primary-button" type="submit">Add Usage Entry</button>
</div>
</form>
</div>
</div>
<div class="modal-overlay" id="resetModalOverlay" hidden>
<div class="modal-card modal-card--confirm">
<div class="modal-head">
<div>
<span class="modal-kicker">Reset Local Data</span>
<h2 id="resetModalTitle">Clear browser-saved changes?</h2>
<p id="resetModalSubtitle">
This removes localStorage edits for catalog, inventory, and usage, then reloads from JSON files or bundled seed data.
</p>
</div>
<button class="icon-button" id="closeResetModalButton" type="button" aria-label="Close reset confirmation">×</button>
</div>
<div class="confirm-copy">
<strong>Use this when you want a clean local reset.</strong>
<p>
Your editable JSON files are not deleted. This only clears the browser-saved layer so the app can rehydrate from its base data sources.
</p>
</div>
<div class="modal-actions">
<button class="ghost-button" id="cancelResetButton" type="button">Keep Local Changes</button>
<button class="danger-button" id="confirmResetButton" type="button">Reset Local Data</button>
</div>
</div>
</div>
<input id="importFileInput" type="file" accept=".json,application/json" multiple hidden>
<script src="./scripts/seed-catalog.js"></script>
<script src="./scripts/data-store.js"></script>
<script src="./scripts/filters.js"></script>
<script src="./scripts/render.js"></script>
<script src="./scripts/modals.js"></script>
<script src="./scripts/app.js"></script>
</body>
</html>