Initial scaffold: Flask webui + APScheduler + Playwright automation for MassPrice rule scheduling
Some checks failed
Deploy / deploy (push) Failing after 51s

Drives massprice.tcgplayer.com's Run Rule action per-rule on a
user-configured schedule (multiple times/day, day-of-week toggles),
replacing MassPrice's native scheduler (capped at 15 schedules
account-wide, one run/day, with observed clock drift). Deployed via
Forgejo push-to-deploy on Unraid, matching arr-summary/card-grader.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H6TgffxTvYhqxykAbVQg2v
This commit is contained in:
Barely Removable 2026-08-31 17:31:53 -07:00
commit 2fdb9be9b9
19 changed files with 1197 additions and 0 deletions

159
static/css/style.css Normal file
View file

@ -0,0 +1,159 @@
:root {
--bg: #12161c;
--panel: #1b212b;
--panel-alt: #232a35;
--border: #2b3340;
--text: #e6e9ef;
--text-dim: #9aa4b2;
--accent: #3b82f6;
--accent-dim: #1e3a5f;
--success: #34d399;
--failure: #f87171;
--radius: 8px;
}
* { box-sizing: border-box; }
body {
margin: 0;
background: var(--bg);
color: var(--text);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
font-size: 15px;
}
h1 { font-size: 1.4rem; margin: 0; }
.topbar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 24px;
border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; font-size: 1.1rem; }
.brand span { color: var(--text-dim); font-weight: 400; }
nav a {
color: var(--text-dim);
text-decoration: none;
margin-left: 20px;
font-size: 0.9rem;
}
nav a:hover, nav a.active { color: var(--text); }
main { max-width: 1100px; margin: 0 auto; padding: 24px; }
footer {
text-align: center;
color: var(--text-dim);
font-size: 0.75rem;
padding: 24px;
}
.page-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
flex-wrap: wrap;
gap: 12px;
}
.page-header-meta { display: flex; align-items: center; gap: 12px; }
.muted { color: var(--text-dim); }
.small { font-size: 0.78rem; }
.btn {
background: var(--panel-alt);
color: var(--text);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 8px 14px;
cursor: pointer;
font-size: 0.85rem;
}
.btn:hover { border-color: var(--accent); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: white; }
.btn-small { padding: 6px 10px; font-size: 0.8rem; }
.rule-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 16px;
}
.rule-card {
background: var(--panel);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 18px;
display: flex;
flex-direction: column;
gap: 12px;
}
.rule-card-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rule-card-header h2 { font-size: 1.05rem; margin: 0; }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.slider {
position: absolute; inset: 0; background: var(--panel-alt);
border: 1px solid var(--border); border-radius: 22px; cursor: pointer; transition: .15s;
}
.slider::before {
content: ""; position: absolute; height: 16px; width: 16px; left: 2px; top: 2px;
background: var(--text-dim); border-radius: 50%; transition: .15s;
}
.switch input:checked + .slider { background: var(--accent-dim); border-color: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(18px); background: var(--accent); }
.rule-last-run { font-size: 0.82rem; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.status-dot.status-success { background: var(--success); }
.status-dot.status-failure { background: var(--failure); }
.status-row-failure td { color: #f2a3a3; }
.schedule-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.schedule-chip {
display: flex; align-items: center; gap: 10px;
background: var(--panel-alt); border: 1px solid var(--border); border-radius: 6px;
padding: 6px 10px; font-size: 0.82rem;
}
.chip-time { font-variant-numeric: tabular-nums; font-weight: 600; }
.chip-days { color: var(--text-dim); flex: 1; text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.72rem; }
.chip-remove { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 1.1rem; line-height: 1; }
.chip-remove:hover { color: var(--failure); }
.schedule-add { display: flex; flex-direction: column; gap: 8px; border-top: 1px dashed var(--border); padding-top: 12px; }
.schedule-add-row { display: flex; gap: 8px; }
.new-time {
background: var(--panel-alt); border: 1px solid var(--border); color: var(--text);
border-radius: 6px; padding: 6px 8px; font-size: 0.85rem; flex: 1;
}
.day-toggles { display: flex; gap: 4px; flex-wrap: wrap; }
.day-toggle {
background: var(--panel-alt); border: 1px solid var(--border); color: var(--text-dim);
border-radius: 6px; padding: 4px 8px; font-size: 0.72rem; cursor: pointer; text-transform: uppercase;
}
.day-toggle.active { background: var(--accent-dim); border-color: var(--accent); color: var(--text); }
.rule-actions { display: flex; justify-content: flex-end; }
.login-card {
max-width: 320px; margin: 80px auto; background: var(--panel);
border: 1px solid var(--border); border-radius: var(--radius); padding: 28px;
display: flex; flex-direction: column; gap: 12px;
}
.login-card input {
background: var(--panel-alt); border: 1px solid var(--border); color: var(--text);
border-radius: 6px; padding: 10px; font-size: 1rem;
}
.error { color: var(--failure); font-size: 0.85rem; }
.empty-state { color: var(--text-dim); }
.activity-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.activity-table th, .activity-table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.activity-table th { color: var(--text-dim); font-weight: 500; font-size: 0.75rem; text-transform: uppercase; }