Brain Service: - Playwright stealth crawler replacing browserless (og:image, Readability, Reddit JSON API) - AI classification with tag definitions and folder assignment - YouTube video download via yt-dlp - Karakeep migration complete (96 items) - Taxonomy management (folders with icons/colors, tags) - Discovery shuffle, sort options, search (Meilisearch + pgvector) - Item tag/folder editing, card color accents RSS Reader Service: - Custom FastAPI reader replacing Miniflux - Feed management (add/delete/refresh), category support - Full article extraction via Readability - Background content fetching for new entries - Mark all read with confirmation - Infinite scroll, retention cleanup (30/60 day) - 17 feeds migrated from Miniflux iOS App (SwiftUI): - Native iOS 17+ app with @Observable architecture - Cookie-based auth, configurable gateway URL - Dashboard with custom background photo + frosted glass widgets - Full fitness module (today/templates/goals/food library) - AI assistant chat (fitness + brain, raw JSON state management) - 120fps ProMotion support AI Assistants (Gateway): - Unified dispatcher with fitness/brain domain detection - Fitness: natural language food logging, photo analysis, multi-item splitting - Brain: save/append/update/delete notes, search & answer, undo support - Madiha user gets fitness-only (brain disabled) Firefox Extension: - One-click save to Brain from any page - Login with platform credentials - Right-click context menu (save page/link/image) - Notes field for URL saves - Signed and published on AMO Other: - Reader bookmark button routes to Brain (was Karakeep) - Fitness food library with "Add" button + add-to-meal popup - Kindle send file size check (25MB SMTP2GO limit) - Atelier UI as default (useAtelierShell=true) - Mobile upload box in nav drawer Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
260 lines
7.4 KiB
HTML
260 lines
7.4 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<style>
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
|
|
body {
|
|
width: 340px;
|
|
font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
|
|
background: #f5efe6;
|
|
color: #1e1812;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 14px 16px;
|
|
border-bottom: 1px solid rgba(35,26,17,0.1);
|
|
}
|
|
.header-left {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
.header-mark {
|
|
width: 28px; height: 28px;
|
|
border-radius: 8px;
|
|
background: linear-gradient(135deg, #211912, #5d4c3f);
|
|
color: white;
|
|
display: grid; place-items: center;
|
|
font-size: 12px; font-weight: 700;
|
|
}
|
|
.header-title {
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
letter-spacing: -0.02em;
|
|
}
|
|
.header-user {
|
|
font-size: 11px;
|
|
color: #8c7b69;
|
|
}
|
|
.logout-btn {
|
|
background: none; border: none;
|
|
color: #8c7b69; font-size: 11px;
|
|
cursor: pointer; text-decoration: underline;
|
|
}
|
|
|
|
/* ── Login ── */
|
|
.login-view { padding: 24px 16px; }
|
|
.login-title {
|
|
font-size: 16px; font-weight: 600;
|
|
margin-bottom: 4px;
|
|
}
|
|
.login-sub {
|
|
font-size: 12px; color: #8c7b69;
|
|
margin-bottom: 16px;
|
|
}
|
|
.field { margin-bottom: 12px; }
|
|
.field label {
|
|
display: block; font-size: 11px; font-weight: 600;
|
|
text-transform: uppercase; letter-spacing: 0.06em;
|
|
color: #6b6256; margin-bottom: 4px;
|
|
}
|
|
.field input {
|
|
width: 100%; padding: 10px 12px;
|
|
border: 1px solid rgba(35,26,17,0.15);
|
|
border-radius: 10px; font-size: 14px;
|
|
background: rgba(255,255,255,0.7);
|
|
color: #1e1812; outline: none;
|
|
font-family: inherit;
|
|
}
|
|
.field input:focus {
|
|
border-color: rgba(35,26,17,0.35);
|
|
}
|
|
.login-btn, .save-btn {
|
|
width: 100%; padding: 12px;
|
|
border: none; border-radius: 12px;
|
|
background: linear-gradient(135deg, #211912, #5d4c3f);
|
|
color: white; font-size: 14px; font-weight: 600;
|
|
cursor: pointer; font-family: inherit;
|
|
transition: opacity 150ms;
|
|
}
|
|
.login-btn:hover, .save-btn:hover { opacity: 0.9; }
|
|
.login-btn:disabled, .save-btn:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
.login-error {
|
|
color: #8f3928; font-size: 12px;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
/* ── Save view ── */
|
|
.save-view { padding: 12px 16px 16px; }
|
|
|
|
.mode-tabs {
|
|
display: flex; gap: 4px;
|
|
margin-bottom: 12px;
|
|
}
|
|
.mode-tab {
|
|
flex: 1; padding: 8px;
|
|
border: 1px solid rgba(35,26,17,0.12);
|
|
border-radius: 10px;
|
|
background: rgba(255,255,255,0.4);
|
|
color: #6b6256; font-size: 12px; font-weight: 600;
|
|
cursor: pointer; text-align: center;
|
|
font-family: inherit;
|
|
transition: all 150ms;
|
|
}
|
|
.mode-tab.active {
|
|
background: rgba(255,255,255,0.9);
|
|
color: #1e1812;
|
|
border-color: rgba(35,26,17,0.25);
|
|
}
|
|
|
|
.url-preview {
|
|
padding: 10px 12px;
|
|
border-radius: 10px;
|
|
background: rgba(255,255,255,0.6);
|
|
border: 1px solid rgba(35,26,17,0.08);
|
|
margin-bottom: 10px;
|
|
}
|
|
.url-title {
|
|
font-size: 13px; font-weight: 600;
|
|
white-space: nowrap; overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
.url-domain {
|
|
font-size: 11px; color: #8c7b69;
|
|
white-space: nowrap; overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.note-toggle {
|
|
background: none; border: none;
|
|
color: #8c7b69; font-size: 12px;
|
|
cursor: pointer; padding: 0;
|
|
margin-bottom: 8px;
|
|
font-family: inherit;
|
|
}
|
|
.note-toggle:hover { color: #1e1812; }
|
|
|
|
.note-area {
|
|
width: 100%; min-height: 80px;
|
|
padding: 10px 12px;
|
|
border: 1px solid rgba(35,26,17,0.15);
|
|
border-radius: 10px; font-size: 13px;
|
|
background: rgba(255,255,255,0.7);
|
|
color: #1e1812; outline: none;
|
|
font-family: inherit; resize: vertical;
|
|
margin-bottom: 10px;
|
|
}
|
|
.note-area:focus {
|
|
border-color: rgba(35,26,17,0.35);
|
|
}
|
|
|
|
/* ── Success state ── */
|
|
.success-view {
|
|
padding: 32px 16px;
|
|
text-align: center;
|
|
}
|
|
.success-check {
|
|
width: 48px; height: 48px;
|
|
border-radius: 50%;
|
|
background: #059669;
|
|
display: inline-flex; align-items: center; justify-content: center;
|
|
margin-bottom: 12px;
|
|
}
|
|
.success-check svg { color: white; }
|
|
.success-text {
|
|
font-size: 16px; font-weight: 600;
|
|
}
|
|
.success-sub {
|
|
font-size: 12px; color: #8c7b69;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
/* ── Error ── */
|
|
.error-msg {
|
|
padding: 8px 12px;
|
|
border-radius: 8px;
|
|
background: rgba(143,57,40,0.08);
|
|
color: #8f3928;
|
|
font-size: 12px;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.hidden { display: none; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<!-- Login View -->
|
|
<div id="login-view" class="login-view hidden">
|
|
<div class="login-title">Sign in to Brain</div>
|
|
<div class="login-sub">Use your Platform credentials</div>
|
|
<div id="login-error" class="login-error hidden"></div>
|
|
<div class="field">
|
|
<label>Username</label>
|
|
<input id="login-user" type="text" placeholder="admin" autocomplete="username">
|
|
</div>
|
|
<div class="field">
|
|
<label>Password</label>
|
|
<input id="login-pass" type="password" placeholder="" autocomplete="current-password">
|
|
</div>
|
|
<button id="login-btn" class="login-btn">Sign in</button>
|
|
</div>
|
|
|
|
<!-- Save View -->
|
|
<div id="save-view" class="hidden">
|
|
<div class="header">
|
|
<div class="header-left">
|
|
<div class="header-mark">B</div>
|
|
<div>
|
|
<div class="header-title">Brain</div>
|
|
<div class="header-user" id="user-name"></div>
|
|
</div>
|
|
</div>
|
|
<button class="logout-btn" id="logout-btn">Logout</button>
|
|
</div>
|
|
|
|
<div class="save-view">
|
|
<div class="mode-tabs">
|
|
<button class="mode-tab active" id="tab-link" data-mode="link">Save page</button>
|
|
<button class="mode-tab" id="tab-note" data-mode="note">Quick note</button>
|
|
</div>
|
|
|
|
<!-- Link mode -->
|
|
<div id="link-mode">
|
|
<div class="url-preview">
|
|
<div class="url-title" id="page-title"></div>
|
|
<div class="url-domain" id="page-url"></div>
|
|
</div>
|
|
<button class="note-toggle" id="note-toggle-btn">+ Add a note</button>
|
|
<textarea id="link-note" class="note-area hidden" placeholder="Optional note about this page..."></textarea>
|
|
<button id="save-link-btn" class="save-btn">Save page</button>
|
|
</div>
|
|
|
|
<!-- Note mode -->
|
|
<div id="note-mode" class="hidden">
|
|
<textarea id="note-text" class="note-area" placeholder="Write a note..." style="min-height:120px;"></textarea>
|
|
<button id="save-note-btn" class="save-btn">Save note</button>
|
|
</div>
|
|
|
|
<div id="save-error" class="error-msg hidden"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Success View -->
|
|
<div id="success-view" class="success-view hidden">
|
|
<div class="success-check">
|
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round"><path d="M20 6L9 17l-5-5"/></svg>
|
|
</div>
|
|
<div class="success-text">Saved!</div>
|
|
<div class="success-sub">AI is classifying in the background</div>
|
|
</div>
|
|
|
|
<script src="popup.js"></script>
|
|
</body>
|
|
</html>
|