feat: trusted-domains OAuth popups, og:image bookmark posters, periodic updater

- main.js: trusted-domains list with default Google/Yandex/GitHub/etc.;
  cross-domain confirmation skipped for trusted; setWindowOpenHandler
  returns action:'allow' for trusted so OAuth popups work (postMessage
  back to opener, popup self-closes). Fixes YouTube/Google login reset.
- main.js: get-page-meta IPC extracts og:image / twitter:image / JSON-LD
  image from current view; HDRezka also tries .b-sidecover img for hi-res.
- Header: bookmark button pulls og:image as poster and the page's title;
  duplicate detection switched from hostname to full URL so multiple
  movies from same site can coexist.
- BookmarksBar: site icon rendered next to source domain when distinct
  from poster; img onerror falls back to placeholder.
- Settings: trusted domains chip list with add/remove/reset.
- Updater: proper semver compare (only show if latest > current),
  direct installer URL detection per platform, hourly re-check.

Bookmark schema gains optional siteIcon; existing bookmarks remain valid.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-16 18:56:12 +03:00
parent 6c314b614d
commit 2857a40d1e
8 changed files with 358 additions and 63 deletions

View File

@@ -1227,7 +1227,22 @@ body {
line-height: 1.35;
}
.bookmark-source { font-size: 10px; color: #555; }
.bookmark-source { font-size: 10px; color: #777; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bookmark-source-row {
display: flex;
align-items: center;
gap: 4px;
min-width: 0;
}
.bookmark-source-icon {
width: 12px;
height: 12px;
border-radius: 2px;
object-fit: contain;
flex-shrink: 0;
}
.bookmark-remove {
position: absolute;
@@ -1253,6 +1268,70 @@ body {
.bookmark-card:hover .bookmark-remove { opacity: 1; }
.bookmark-remove:hover { color: #fff; background: rgba(200,40,40,0.85); }
/* ---- Trusted Domains ---- */
.settings-section-head-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
}
.settings-reset-btn {
background: transparent;
border: 1px solid var(--border);
color: #888;
font-size: 11px;
padding: 4px 10px;
border-radius: 4px;
cursor: pointer;
transition: color 0.15s, border-color 0.15s;
}
.settings-reset-btn:hover { color: #ccc; border-color: #555; }
.trusted-domains-list {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin: 8px 0;
}
.trusted-domain-chip {
display: inline-flex;
align-items: center;
gap: 4px;
background: rgba(255,255,255,0.04);
border: 1px solid var(--border);
border-radius: 12px;
padding: 3px 4px 3px 10px;
font-size: 11px;
color: #bbb;
line-height: 1;
}
.trusted-domain-remove {
background: transparent;
border: none;
color: #666;
cursor: pointer;
width: 16px;
height: 16px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 10px;
line-height: 1;
padding: 0;
}
.trusted-domain-remove:hover { color: #fff; background: rgba(200,40,40,0.7); }
.trusted-domain-add {
display: flex;
gap: 6px;
align-items: center;
}
.trusted-domain-add .settings-input { flex: 1; }
/* ---- Modal Dialog ---- */
.modal-overlay {
position: fixed;