Skip to content

Commit d51b8a0

Browse files
committed
refactor: remove settings panel and related functionality for cleaner UI
1 parent f3082d1 commit d51b8a0

1 file changed

Lines changed: 7 additions & 97 deletions

File tree

docs/index.html

Lines changed: 7 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -64,69 +64,6 @@
6464
margin: 0 auto;
6565
}
6666

67-
/* Settings bar */
68-
.settings-bar {
69-
display: flex;
70-
justify-content: flex-end;
71-
margin-bottom: 16px;
72-
}
73-
74-
.settings-btn {
75-
background: none;
76-
border: 1px solid var(--border);
77-
color: var(--text-muted);
78-
padding: 6px 12px;
79-
border-radius: var(--radius);
80-
cursor: pointer;
81-
font-size: 13px;
82-
transition: all 0.2s;
83-
}
84-
85-
.settings-btn:hover {
86-
border-color: var(--accent);
87-
color: var(--accent);
88-
}
89-
90-
.settings-panel {
91-
background: var(--surface);
92-
border: 1px solid var(--border);
93-
border-radius: var(--radius);
94-
padding: 16px;
95-
margin-bottom: 16px;
96-
display: none;
97-
}
98-
99-
.settings-panel.open { display: block; }
100-
101-
.settings-panel label {
102-
display: block;
103-
font-size: 13px;
104-
color: var(--text-muted);
105-
margin-bottom: 6px;
106-
}
107-
108-
.settings-panel input {
109-
width: 100%;
110-
padding: 8px 12px;
111-
background: var(--bg);
112-
border: 1px solid var(--border);
113-
border-radius: var(--radius);
114-
color: var(--text);
115-
font-family: var(--font-mono);
116-
font-size: 13px;
117-
}
118-
119-
.settings-panel input:focus {
120-
outline: none;
121-
border-color: var(--accent);
122-
}
123-
124-
.settings-panel .hint {
125-
font-size: 12px;
126-
color: var(--text-muted);
127-
margin-top: 4px;
128-
}
129-
13067
/* Cards */
13168
.card {
13269
background: var(--surface);
@@ -583,17 +520,6 @@ <h1><span class="icon">📦</span> Lambda Python Layer Builder</h1>
583520
<p>Build AWS Lambda Python layers for any architecture. Powered by Docker on EC2 Spot instances.</p>
584521
</header>
585522

586-
<!-- Settings -->
587-
<div class="settings-bar">
588-
<button class="settings-btn" onclick="toggleSettings()">⚙ API Settings</button>
589-
</div>
590-
591-
<div id="settingsPanel" class="settings-panel">
592-
<label for="apiUrl">API Gateway URL</label>
593-
<input type="url" id="apiUrl" placeholder="https://9nij0o9osa.execute-api.eu-central-1.amazonaws.com" />
594-
<div class="hint">From Terraform output: <code>api_url</code>. Saved in browser storage.</div>
595-
</div>
596-
597523
<!-- Build Form -->
598524
<div class="card">
599525
<h2>🔧 New Build</h2>
@@ -670,10 +596,10 @@ <h2>📋 Builds</h2>
670596
<a href="https://github.com/fok666/lambda-python-layer" target="_blank">lambda-python-layer</a>
671597
— Build Lambda layers with Docker on EC2 Spot instances
672598
<p/>
673-
<a href="https://github.com/fok666/lambda-python-layer/actions/workflows/github-code-scanning/codeql"><img src="https://github.com/fok666/lambda-python-layer/actions/workflows/github-code-scanning/codeql/badge.svg" alt="CodeQL" style="margin-left: 12px;" /></a>
674-
<a href="https://github.com/fok666/lambda-python-layer/actions/workflows/dependabot/dependabot-updates"><img src="https://github.com/fok666/lambda-python-layer/actions/workflows/dependabot/dependabot-updates/badge.svg" alt="Dependabot" style="margin-left: 12px;" /></a>
675-
<a href="https://github.com/fok666/lambda-python-layer/actions/workflows/build-and-release.yml"><img src="https://github.com/fok666/lambda-python-layer/actions/workflows/build-and-release.yml/badge.svg" alt="Build and Release" style="margin-left: 12px;" /></a>
676-
<a href="https://github.com/fok666/lambda-python-layer/actions/workflows/static.yml"><img src="https://github.com/fok666/lambda-python-layer/actions/workflows/static.yml/badge.svg" alt="Github Pages" style="margin-left: 12px;" /></a>
599+
<a href="https://github.com/fok666/lambda-python-layer/actions/workflows/github-code-scanning/codeql"><img src="https://github.com/fok666/lambda-python-layer/actions/workflows/github-code-scanning/codeql/badge.svg" alt="CodeQL" /></a>
600+
<a href="https://github.com/fok666/lambda-python-layer/actions/workflows/dependabot/dependabot-updates"><img src="https://github.com/fok666/lambda-python-layer/actions/workflows/dependabot/dependabot-updates/badge.svg" alt="Dependabot" style="margin-left: 4px;" /></a>
601+
<a href="https://github.com/fok666/lambda-python-layer/actions/workflows/build-and-release.yml"><img src="https://github.com/fok666/lambda-python-layer/actions/workflows/build-and-release.yml/badge.svg" alt="Build and Release" style="margin-left: 4px;" /></a>
602+
<a href="https://github.com/fok666/lambda-python-layer/actions/workflows/static.yml"><img src="https://github.com/fok666/lambda-python-layer/actions/workflows/static.yml/badge.svg" alt="Github Pages" style="margin-left: 4px;" /></a>
677603
</footer>
678604
</div>
679605

@@ -686,8 +612,10 @@ <h2>📋 Builds</h2>
686612
const STORAGE_KEY = 'lambda-layer-builder';
687613
const POLL_INTERVAL = 10000; // 10 seconds
688614

615+
const API_URL = 'https://9nij0o9osa.execute-api.eu-central-1.amazonaws.com';
616+
689617
let state = {
690-
apiUrl: '',
618+
apiUrl: API_URL,
691619
builds: [], // { id, status, python_version, architectures, single_file, files, error, created_at }
692620
polling: {}, // buildId -> intervalId
693621
};
@@ -699,12 +627,6 @@ <h2>📋 Builds</h2>
699627
loadState();
700628
renderBuilds();
701629

702-
document.getElementById('apiUrl').value = state.apiUrl;
703-
document.getElementById('apiUrl').addEventListener('change', (e) => {
704-
state.apiUrl = e.target.value.replace(/\/+$/, '');
705-
saveState();
706-
});
707-
708630
document.getElementById('singleFile').addEventListener('change', (e) => {
709631
document.getElementById('singleFileLabel').textContent =
710632
e.target.checked ? 'Combined archive' : 'Individual archives';
@@ -720,12 +642,6 @@ <h2>📋 Builds</h2>
720642
// API
721643
// =========================================================================
722644
function getApiUrl() {
723-
if (!state.apiUrl) {
724-
showToast('Please configure the API URL in settings', 'error');
725-
document.getElementById('settingsPanel').classList.add('open');
726-
document.getElementById('apiUrl').focus();
727-
return null;
728-
}
729645
return state.apiUrl;
730646
}
731647

@@ -849,10 +765,6 @@ <h2>📋 Builds</h2>
849765
// =========================================================================
850766
// UI
851767
// =========================================================================
852-
function toggleSettings() {
853-
document.getElementById('settingsPanel').classList.toggle('open');
854-
}
855-
856768
function toggleArch(el, value) {
857769
const cb = el.querySelector('input');
858770
// Will be toggled by browser after this handler, so check current state
@@ -935,7 +847,6 @@ <h2>📋 Builds</h2>
935847
function saveState() {
936848
try {
937849
localStorage.setItem(STORAGE_KEY, JSON.stringify({
938-
apiUrl: state.apiUrl,
939850
builds: state.builds.slice(0, 50), // Keep last 50 builds
940851
}));
941852
} catch (e) {
@@ -946,7 +857,6 @@ <h2>📋 Builds</h2>
946857
function loadState() {
947858
try {
948859
const saved = JSON.parse(localStorage.getItem(STORAGE_KEY) || '{}');
949-
state.apiUrl = saved.apiUrl || '';
950860
state.builds = saved.builds || [];
951861
} catch (e) {
952862
console.warn('Failed to load state:', e);

0 commit comments

Comments
 (0)