aboutsummaryrefslogtreecommitdiffstats
path: root/web/dist
diff options
context:
space:
mode:
Diffstat (limited to 'web/dist')
-rw-r--r--web/dist/v3/assets/index-BymDBicy.js189
-rw-r--r--web/dist/v3/assets/index-FN4JJv2k.css1
-rw-r--r--web/dist/v3/index.html4
-rw-r--r--web/dist/v3/themes/codex.css15
-rw-r--r--web/dist/v3/themes/refined.css12
-rw-r--r--web/dist/v3/themes/sakura.css19
-rw-r--r--web/dist/v3/themes/terminal.css26
7 files changed, 57 insertions, 209 deletions
diff --git a/web/dist/v3/assets/index-BymDBicy.js b/web/dist/v3/assets/index-BymDBicy.js
deleted file mode 100644
index abf7242..0000000
--- a/web/dist/v3/assets/index-BymDBicy.js
+++ /dev/null
@@ -1,189 +0,0 @@
-(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const d of o.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function C(e){const n=`; ${document.cookie}`.split(`; ${e}=`);if(n.length===2)return n.pop()?.split(";").shift()}async function h(e,t){const n=t?.method?.toUpperCase()||"GET",i=["POST","PUT","DELETE"].includes(n),s=new Headers(t?.headers||{});if(i){const o=C("csrf_token");o&&s.set("X-CSRF-Token",o)}return fetch(e,{...t,headers:s,credentials:"include"})}function P(){const e=document.cookie.split("; ").find(t=>t.startsWith("neko_sidebar="));return e?e.split("=")[1]==="1":null}function H(e){document.cookie=`neko_sidebar=${e?"1":"0"}; path=/; max-age=31536000; SameSite=Lax`}function M(){const e=P();return e!==null?e:window.innerWidth>1024}class D extends EventTarget{feeds=[];tags=[];items=[];activeFeedId=null;activeTagName=null;filter="unread";searchQuery="";loading=!1;hasMore=!0;theme=localStorage.getItem("neko-theme")||"light";fontTheme=localStorage.getItem("neko-font-theme")||"default";headingFontTheme=localStorage.getItem("neko-heading-font-theme")||"default";styleTheme=localStorage.getItem("neko-style-theme")||"default";sidebarVisible=M();setFeeds(t){this.feeds=t,this.emit("feeds-updated")}setTags(t){this.tags=t,this.emit("tags-updated")}setItems(t,n=!1){n?this.items=[...this.items,...t]:this.items=t,this.emit("items-updated")}setActiveFeed(t){this.activeFeedId=t,this.activeTagName=null,this.emit("active-feed-updated")}setActiveTag(t){this.activeTagName=t,this.activeFeedId=null,this.emit("active-tag-updated")}setFilter(t){this.filter!==t&&(this.filter=t,this.emit("filter-updated"))}setSearchQuery(t){this.searchQuery!==t&&(this.searchQuery=t,this.emit("search-updated"))}setLoading(t){this.loading=t,this.emit("loading-state-changed")}setHasMore(t){this.hasMore=t}setTheme(t){this.theme=t,localStorage.setItem("neko-theme",t),this.emit("theme-updated")}setFontTheme(t){this.fontTheme=t,localStorage.setItem("neko-font-theme",t),this.emit("theme-updated")}setHeadingFontTheme(t){this.headingFontTheme=t,localStorage.setItem("neko-heading-font-theme",t),this.emit("theme-updated")}setStyleTheme(t){this.styleTheme=t,localStorage.setItem("neko-style-theme",t),this.emit("style-theme-updated")}setSidebarVisible(t){this.sidebarVisible=t,H(t),this.emit("sidebar-toggle")}toggleSidebar(){this.setSidebarVisible(!this.sidebarVisible)}emit(t,n){this.dispatchEvent(new CustomEvent(t,{detail:n}))}on(t,n){this.addEventListener(t,n)}}const a=new D;class O extends EventTarget{constructor(){super(),window.addEventListener("popstate",()=>this.handleRouteChange())}handleRouteChange(){this.dispatchEvent(new CustomEvent("route-changed",{detail:this.getCurrentRoute()}))}getCurrentRoute(){const t=new URL(window.location.href),i=t.pathname.replace(/^\/v3\//,"").split("/").filter(Boolean);let s="/";const o={};return i[0]==="feed"&&i[1]?(s="/feed",o.feedId=i[1]):i[0]==="tag"&&i[1]?(s="/tag",o.tagName=decodeURIComponent(i[1])):i[0]==="settings"&&(s="/settings"),{path:s,params:o,query:t.searchParams}}navigate(t,n){let i=`/v3${t}`;if(n){const s=new URLSearchParams(n);i+=`?${s.toString()}`}window.history.pushState({},"",i),this.handleRouteChange()}updateQuery(t){const n=new URL(window.location.href);for(const[i,s]of Object.entries(t))s?n.searchParams.set(i,s):n.searchParams.delete(i);window.history.pushState({},"",n.toString()),this.handleRouteChange()}}const r=new O;function q(e){const t=new Date(e.publish_date).toLocaleDateString();return`
- <li class="feed-item ${e.read?"read":"unread"}" data-id="${e._id}">
- <div class="item-header">
- <a href="${e.url}" target="_blank" rel="noopener noreferrer" class="item-title" data-action="open">
- ${e.title||"(No Title)"}
- </a>
- <button class="star-btn ${e.starred?"is-starred":"is-unstarred"}" title="${e.starred?"Unstar":"Star"}" data-action="toggle-star">
- ★
- </button>
- </div>
- <div class="dateline">
- <a href="${e.url}" target="_blank" rel="noopener noreferrer">
- ${t}
- ${e.feed_title?` - ${e.feed_title}`:""}
- </a>
- <div class="item-actions" style="display: inline-block; float: right;">
- ${e.full_content?"":`
- <button class="scrape-btn" title="Load Full Content" data-action="scrape">
- text
- </button>
- `}
- </div>
- </div>
- ${e.full_content||e.description?`
- <div class="item-description">
- ${e.full_content||e.description}
- </div>
- `:""}
- </li>
- `}const x=new URLSearchParams(window.location.search),L=x.has("debug");function v(...e){L&&console.log("[NEKO-DEBUG]",...e)}typeof window<"u"&&(window.app=window.app||{},window.app.debug=()=>{const e=new URL(window.location.href);e.searchParams.set("debug","1"),window.location.href=e.toString()});const N=["default","refined","terminal","codex","sakura"];function $(e){const t=document.getElementById("style-theme-link");if(t&&t.remove(),e==="default")return;const n=document.createElement("link");n.id="style-theme-link",n.rel="stylesheet",n.href=`/v3/themes/${e}.css`,document.head.appendChild(n)}let m=null,g=null;function U(){g=document.querySelector("#app"),g&&(g.className=`theme-${a.theme} font-${a.fontTheme} heading-font-${a.headingFontTheme}`,g.innerHTML=`
- <div class="layout ${a.sidebarVisible?"sidebar-visible":"sidebar-hidden"}">
- <button class="sidebar-toggle" id="sidebar-toggle-btn" title="Toggle Sidebar">🐱</button>
- <div class="sidebar-backdrop" id="sidebar-backdrop"></div>
- <aside class="sidebar" id="sidebar">
- <div class="sidebar-scroll">
- <section class="sidebar-section">
- <ul id="filter-list">
- <li class="filter-item" data-filter="unread"><a href="/v3/?filter=unread" data-nav="filter" data-value="unread">Unread</a></li>
- <li class="filter-item" data-filter="all"><a href="/v3/?filter=all" data-nav="filter" data-value="all">All</a></li>
- <li class="filter-item" data-filter="starred"><a href="/v3/?filter=starred" data-nav="filter" data-value="starred">Starred</a></li>
- </ul>
- </section>
- <div class="sidebar-search">
- <input type="search" id="search-input" placeholder="Search..." value="${a.searchQuery}">
- </div>
- <section class="sidebar-section">
- <ul>
- <li><a href="/v3/settings" data-nav="settings" class="new-feed-link">+ new</a></li>
- </ul>
- </section>
- <section class="sidebar-section collapsible collapsed" id="section-feeds">
- <h3>Feeds <span class="caret">▶</span></h3>
- <ul id="feed-list"></ul>
- </section>
- <!-- FIXME: Tags feature soft-deprecated
- <section class="sidebar-section collapsible collapsed" id="section-tags">
- <h3>Tags <span class="caret">▶</span></h3>
- <ul id="tag-list"></ul>
- </section>
- -->
- </div>
- <div class="sidebar-footer">
- <div class="sidebar-quick-controls">
- <div class="sidebar-controls-row">
- <button class="sidebar-icon-btn sidebar-theme-btn ${a.theme==="light"?"active":""}" data-theme="light" title="Light mode">☀</button>
- <button class="sidebar-icon-btn sidebar-theme-btn ${a.theme==="dark"?"active":""}" data-theme="dark" title="Dark mode">☽</button>
- </div>
- <hr class="sidebar-controls-rule">
- <div class="sidebar-controls-row">
- <button class="sidebar-icon-btn sidebar-style-btn ${a.styleTheme==="default"?"active":""}" data-style-theme="default" title="Default">○</button>
- <button class="sidebar-icon-btn sidebar-style-btn ${a.styleTheme==="refined"?"active":""}" data-style-theme="refined" title="Refined">◆</button>
- <button class="sidebar-icon-btn sidebar-style-btn ${a.styleTheme==="terminal"?"active":""}" data-style-theme="terminal" title="Terminal">▮</button>
- <button class="sidebar-icon-btn sidebar-style-btn ${a.styleTheme==="codex"?"active":""}" data-style-theme="codex" title="Codex">❧</button>
- <button class="sidebar-icon-btn sidebar-style-btn ${a.styleTheme==="sakura"?"active":""}" data-style-theme="sakura" title="Sakura">❀</button>
- </div>
- </div>
- <a href="/v3/settings" data-nav="settings">Settings</a>
- <a href="#" id="logout-button">Logout</a>
- </div>
- </aside>
- <main class="main-content" id="main-content">
- <div id="content-area"></div>
- </main>
- </div>
- `,j())}function j(){document.getElementById("search-input")?.addEventListener("input",s=>{const o=s.target.value;r.updateQuery({q:o})}),document.getElementById("logo-link")?.addEventListener("click",()=>r.navigate("/")),document.getElementById("logout-button")?.addEventListener("click",s=>{s.preventDefault(),K()}),document.querySelectorAll(".sidebar-theme-btn").forEach(s=>{s.addEventListener("click",()=>{const o=s.getAttribute("data-theme");o&&a.setTheme(o)})}),document.querySelectorAll(".sidebar-style-btn").forEach(s=>{s.addEventListener("click",()=>{const o=s.getAttribute("data-style-theme");o&&a.setStyleTheme(o)})}),document.getElementById("sidebar-toggle-btn")?.addEventListener("click",()=>{a.toggleSidebar()}),document.getElementById("sidebar-backdrop")?.addEventListener("click",()=>{a.setSidebarVisible(!1)}),document.querySelectorAll(".sidebar-section.collapsible h3").forEach(s=>{s.addEventListener("click",()=>{s.parentElement?.classList.toggle("collapsed")})}),document.getElementById("sidebar")?.addEventListener("click",s=>{const o=s.target,d=o.closest("a");if(!d){o.classList.contains("logo")&&(s.preventDefault(),r.navigate("/",{}));return}const u=d.getAttribute("data-nav"),f=Object.fromEntries(r.getCurrentRoute().query.entries());if(u==="filter"){s.preventDefault();const l=d.getAttribute("data-value");r.getCurrentRoute().path==="/settings"?r.navigate("/",{...f,filter:l}):r.updateQuery({filter:l})}else if(u==="tag"){s.preventDefault();const l=d.getAttribute("data-value");r.navigate(`/tag/${encodeURIComponent(l)}`,f)}else if(u==="feed"){s.preventDefault();const l=d.getAttribute("data-value"),c=r.getCurrentRoute();a.activeFeedId===parseInt(l)&&c.path!=="/settings"?r.navigate("/",f):r.navigate(`/feed/${l}`,f)}else u==="settings"&&(s.preventDefault(),r.getCurrentRoute().path==="/settings"?r.navigate("/",f):r.navigate("/settings",f));window.innerWidth<=768&&a.setSidebarVisible(!1)}),document.getElementById("content-area")?.addEventListener("click",s=>{const o=s.target,d=o.closest('[data-action="toggle-star"]');if(d){const c=d.closest("[data-id]");if(c){const b=parseInt(c.getAttribute("data-id"));G(b)}return}const u=o.closest('[data-action="scrape"]');if(u){const c=u.closest("[data-id]");if(c){const b=parseInt(c.getAttribute("data-id"));J(b)}return}const f=o.closest('[data-action="open"]'),l=o.closest(".feed-item");if(l&&!f){const c=parseInt(l.getAttribute("data-id"));m=c;const b=a.items.find(B=>B._id===c);b&&!b.read&&p(c,{read:!0})}})}function F(){const{feeds:e,activeFeedId:t}=a,n=document.getElementById("feed-list");n&&(n.innerHTML=e.map(i=>`
- <li class="${i._id===t?"active":""}">
- <a href="/v3/feed/${i._id}" data-nav="feed" data-value="${i._id}">
- ${i.title||i.url}
- </a>
- </li>
- `).join(""))}function R(){}function _(){const{filter:e}=a,t=document.getElementById("filter-list");t&&t.querySelectorAll("li").forEach(n=>{n.classList.toggle("active",n.getAttribute("data-filter")===e)})}function S(){const{items:e,loading:t}=a,n=document.getElementById("content-area");if(!n||r.getCurrentRoute().path==="/settings")return;if(t&&e.length===0){n.innerHTML='<p class="loading">Loading items...</p>';return}if(e.length===0){n.innerHTML='<p class="empty">No items found.</p>';return}n.innerHTML=`
- <ul class="item-list">
- ${e.map(s=>q(s)).join("")}
- </ul>
- ${a.hasMore?'<div id="load-more-sentinel" class="loading-more">Loading more...</div>':""}
- `;const i=document.getElementById("main-content");if(i){let s=null;i.onscroll=()=>{!a.loading&&a.hasMore&&i.scrollHeight>i.clientHeight&&i.scrollHeight-i.scrollTop-i.clientHeight<200&&w(),s===null&&(s=window.setTimeout(()=>{v("onscroll trigger checkReadItems"),A(i),s=null},250))}}}function A(e){const t=e.getBoundingClientRect();v("checkReadItems start",{containerTop:t.top});const n=e.querySelectorAll(".feed-item");for(const i of n){const s=i.getAttribute("data-id");if(!s)continue;const o=parseInt(s),d=a.items.find(l=>l._id===o);if(!d||d.read)continue;const u=i.getBoundingClientRect(),f=u.bottom<t.top+5;L&&v(`Item ${o} check`,{rectTop:u.top,rectBottom:u.bottom,containerTop:t.top,isPast:f}),f&&(v(`Marking as read (scrolled past): ${o}`),p(o,{read:!0}))}}typeof window<"u"&&setInterval(()=>{const e=document.getElementById("main-content");if(e&&A(e),a.loading||!a.hasMore)return;if(e&&e.scrollHeight>e.clientHeight&&e.scrollHeight-e.scrollTop-e.clientHeight<200){w();return}const t=document.documentElement.scrollHeight||document.body.scrollHeight,n=window.innerHeight,i=window.scrollY||document.documentElement.scrollTop;t>n&&t-n-i<200&&w()},1e3);function y(){const e=document.getElementById("content-area");if(!e)return;e.innerHTML=`
- <div class="settings-view">
- <h2>Settings</h2>
-
- <div class="settings-grid">
- <section class="settings-section">
- <h3>Data</h3>
- <div class="data-group">
- <div class="button-group">
- <a href="/api/export/opml" class="button" target="_blank">EXPORT OPML</a>
- <a href="/api/export/text" class="button" target="_blank">EXPORT TEXT</a>
- <a href="/api/export/json" class="button" target="_blank">EXPORT JSON</a>
- </div>
- </div>
- <div class="data-group" style="margin-top: 1rem;">
- <div class="button-group">
- <button class="import-btn" data-format="opml">IMPORT OPML</button>
- <button class="import-btn" data-format="text">IMPORT TEXT</button>
- <button class="import-btn" data-format="json">IMPORT JSON</button>
- </div>
- <input type="file" id="import-file" style="display: none;">
- </div>
- </section>
-
- <section class="settings-section">
- <h3>Theme</h3>
- <div class="settings-group">
- <div class="theme-options" id="theme-options">
- <button class="${a.theme==="light"?"active":""}" data-theme="light">Light</button>
- <button class="${a.theme==="dark"?"active":""}" data-theme="dark">Dark</button>
- </div>
- </div>
- </section>
-
- <section class="settings-section">
- <h3>Style</h3>
- <div class="settings-group">
- <div class="theme-options" id="style-theme-options">
- ${N.map(i=>`<button class="${a.styleTheme===i?"active":""}" data-style-theme="${i}">${i.charAt(0).toUpperCase()+i.slice(1)}</button>`).join(`
- `)}
- </div>
- </div>
- </section>
-
- <section class="settings-section">
- <h3>Fonts</h3>
- <div class="settings-group">
- <label>System & headings</label>
- <select id="heading-font-selector" style="margin-bottom: 1rem;">
- <option value="default" ${a.headingFontTheme==="default"?"selected":""}>System (Helvetica Neue)</option>
- <option value="serif" ${a.headingFontTheme==="serif"?"selected":""}>Serif (Georgia)</option>
- <option value="sans" ${a.headingFontTheme==="sans"?"selected":""}>Sans-Serif (Inter/System)</option>
- <option value="mono" ${a.headingFontTheme==="mono"?"selected":""}>Monospace</option>
- </select>
-
- <label>article body</label>
- <select id="font-selector">
- <option value="default" ${a.fontTheme==="default"?"selected":""}>Default (Palatino)</option>
- <option value="serif" ${a.fontTheme==="serif"?"selected":""}>Serif (Georgia)</option>
- <option value="sans" ${a.fontTheme==="sans"?"selected":""}>Sans-Serif (Helvetica)</option>
- <option value="mono" ${a.fontTheme==="mono"?"selected":""}>Monospace</option>
- </select>
- </div>
- </section>
- </div>
-
- <section class="settings-section manage-feeds-section">
- <h3>Manage Feeds</h3>
-
- <div class="add-feed-form" style="margin-bottom: 2rem;">
- <input type="url" id="new-feed-url" placeholder="https://example.com/rss.xml">
- <button id="add-feed-btn">ADD FEED</button>
- </div>
-
- <ul class="manage-feed-list">
- ${a.feeds.map(i=>`
- <li class="manage-feed-item">
- <div class="feed-info">
- <div class="feed-title">${i.title||i.url}</div>
- <div class="feed-url">${i.url}</div>
- </div>
- <div class="feed-actions">
- <!-- FIXME: Tags feature is broken/unused in V3. Soft deprecated for now.
- <input type="text" class="feed-tag-input" data-id="${i._id}" value="${i.category||""}" placeholder="Tag">
- <button class="update-feed-tag-btn" data-id="${i._id}">SAVE</button>
- -->
- <button class="delete-feed-btn" data-id="${i._id}">DELETE</button>
- </div>
- </li>
- `).join("")}
- </ul>
- </section>
- </div>
- `,document.getElementById("theme-options")?.addEventListener("click",i=>{const s=i.target.closest("button");s&&(a.setTheme(s.getAttribute("data-theme")),y())}),document.getElementById("style-theme-options")?.addEventListener("click",i=>{const s=i.target.closest("button");s&&a.setStyleTheme(s.getAttribute("data-style-theme"))}),document.getElementById("heading-font-selector")?.addEventListener("change",i=>{a.setHeadingFontTheme(i.target.value)}),document.getElementById("font-selector")?.addEventListener("change",i=>{a.setFontTheme(i.target.value)}),document.getElementById("add-feed-btn")?.addEventListener("click",async()=>{const i=document.getElementById("new-feed-url"),s=i.value.trim();s&&(await Q(s)?(i.value="",alert("Feed added successfully!"),T()):alert("Failed to add feed."))});let t="opml";const n=document.getElementById("import-file");document.querySelectorAll(".import-btn").forEach(i=>{i.addEventListener("click",s=>{t=s.currentTarget.getAttribute("data-format")||"opml",n.click()})}),n?.addEventListener("change",async i=>{const s=i.target.files?.[0];s&&(await V(s,t)?(alert(`Import (${t}) started! check logs.`),T()):alert("Failed to import.")),n.value=""}),document.querySelectorAll(".delete-feed-btn").forEach(i=>{i.addEventListener("click",async s=>{const o=parseInt(s.target.getAttribute("data-id"));confirm("Delete this feed?")&&(await X(o),await T(),y())})})}async function Q(e){try{return(await h("/api/feed",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e})})).ok}catch(t){return console.error("Failed to add feed",t),!1}}async function V(e,t){try{const n=new FormData;n.append("file",e),n.append("format",t);const i=document.cookie.split("; ").find(o=>o.startsWith("csrf_token="))?.split("=")[1];return(await fetch("/api/import",{method:"POST",headers:{"X-CSRF-Token":i||""},body:n})).ok}catch(n){return console.error("Failed to import",n),!1}}async function X(e){try{return(await h(`/api/feed/${e}`,{method:"DELETE"})).ok}catch(t){return console.error("Failed to delete feed",t),!1}}async function G(e){const t=a.items.find(n=>n._id===e);t&&p(e,{starred:!t.starred})}async function J(e){if(a.items.find(n=>n._id===e))try{const n=await h(`/api/item/${e}/content`);if(n.ok){const i=await n.json();i.full_content&&p(e,{full_content:i.full_content})}}catch(n){console.error("Failed to fetch full content",n)}}async function p(e,t){const n=String(e);v("updateItem called",n,t);try{if((await h(`/api/item/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).ok){const s=a.items.find(o=>String(o._id)===n);if(s){Object.assign(s,t);const o=document.querySelector(`.feed-item[data-id="${e}"]`);if(o){if(t.read!==void 0&&o.classList.toggle("read",t.read),t.starred!==void 0){const d=o.querySelector(".star-btn");d&&(d.classList.toggle("is-starred",t.starred),d.classList.toggle("is-unstarred",!t.starred),d.setAttribute("title",t.starred?"Unstar":"Star"))}t.full_content&&S()}}}}catch(i){console.error("Failed to update item",i)}}async function T(){const e=await h("/api/feed/");if(e.ok){const t=await e.json();a.setFeeds(t)}}async function W(){const e=await h("/api/tag");if(e.ok){const t=await e.json();a.setTags(t)}}async function E(e,t,n=!1){a.setLoading(!0);try{const i=new URLSearchParams;e&&i.append("feed_id",e),t&&i.append("tag",t),a.searchQuery&&i.append("q",a.searchQuery),(a.filter==="starred"||a.filter==="all")&&i.append("read_filter","all"),a.filter==="starred"&&i.append("starred","true"),n&&a.items.length>0&&i.append("max_id",String(a.items[a.items.length-1]._id));const s=await h(`/api/stream?${i.toString()}`);if(s.ok){const o=await s.json();a.setHasMore(o.length>0),a.setItems(o,n)}}finally{a.setLoading(!1)}}async function w(){const e=r.getCurrentRoute();E(e.params.feedId,e.params.tagName,!0)}async function K(){await h("/api/logout",{method:"POST"}),window.location.href="/login/"}function I(){const e=r.getCurrentRoute(),t=e.query.get("filter");a.setFilter(t||"unread");const n=e.query.get("q");if(n!==null&&a.setSearchQuery(n),e.path==="/settings"){y();return}if(e.path==="/feed"&&e.params.feedId){const i=parseInt(e.params.feedId);a.setActiveFeed(i),E(e.params.feedId),document.getElementById("section-feeds")?.classList.remove("collapsed")}else e.path==="/tag"&&e.params.tagName?(a.setActiveTag(e.params.tagName),E(void 0,e.params.tagName),document.getElementById("section-tags")?.classList.remove("collapsed")):(a.setActiveFeed(null),a.setActiveTag(null),E())}window.addEventListener("keydown",e=>{if(!["INPUT","TEXTAREA"].includes(e.target.tagName))switch(e.key){case"j":k(1);break;case"k":k(-1);break;case"r":if(m){const t=a.items.find(n=>n._id===m);t&&p(t._id,{read:!t.read})}break;case"s":if(m){const t=a.items.find(n=>n._id===m);t&&p(t._id,{starred:!t.starred})}break;case"/":e.preventDefault(),document.getElementById("search-input")?.focus();break}});function k(e){if(a.items.length===0)return;const t=a.items.findIndex(i=>i._id===m);let n;if(t===-1?n=e>0?0:a.items.length-1:n=t+e,n>=0&&n<a.items.length){m=a.items[n]._id;const i=document.querySelector(`.feed-item[data-id="${m}"]`);i&&i.scrollIntoView({block:"start",behavior:"instant"}),a.items[n].read||p(m,{read:!0})}}a.on("feeds-updated",F);a.on("tags-updated",R);a.on("active-feed-updated",F);a.on("active-tag-updated",R);a.on("filter-updated",_);a.on("search-updated",()=>{const e=document.getElementById("search-input");e&&e.value!==a.searchQuery&&(e.value=a.searchQuery),I()});a.on("theme-updated",()=>{g||(g=document.querySelector("#app")),g&&(g.className=`theme-${a.theme} font-${a.fontTheme} heading-font-${a.headingFontTheme}`),document.querySelectorAll(".sidebar-theme-btn").forEach(e=>{e.classList.toggle("active",e.getAttribute("data-theme")===a.theme)}),r.getCurrentRoute().path==="/settings"&&y()});a.on("sidebar-toggle",()=>{const e=document.querySelector(".layout");e&&(a.sidebarVisible?(e.classList.remove("sidebar-hidden"),e.classList.add("sidebar-visible")):(e.classList.remove("sidebar-visible"),e.classList.add("sidebar-hidden")))});a.on("style-theme-updated",()=>{$(a.styleTheme),document.querySelectorAll(".sidebar-style-btn").forEach(e=>{e.classList.toggle("active",e.getAttribute("data-style-theme")===a.styleTheme)}),r.getCurrentRoute().path==="/settings"&&y()});a.on("items-updated",S);a.on("loading-state-changed",S);r.addEventListener("route-changed",I);window.app={navigate:e=>r.navigate(e)};async function Y(){const e=await h("/api/auth");if(!e||e.status===401){window.location.href="/login/";return}U(),$(a.styleTheme),_();try{await Promise.all([T(),W()])}catch(t){console.error("Initial fetch failed",t)}I()}typeof window<"u"&&!window.__VITEST__&&Y();
diff --git a/web/dist/v3/assets/index-FN4JJv2k.css b/web/dist/v3/assets/index-FN4JJv2k.css
deleted file mode 100644
index 35f31d7..0000000
--- a/web/dist/v3/assets/index-FN4JJv2k.css
+++ /dev/null
@@ -1 +0,0 @@
-:root{--font-body: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;--font-heading-system: "Helvetica Neue", Helvetica, Arial, sans-serif;--font-heading: var(--font-heading-system);--font-sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;--font-mono: "Courier New", Courier, monospace;line-height:1.5;font-size:18px;--bg-color: #ffffff;--text-color: rgba(0, 0, 0, .87);--sidebar-bg: #ccc;--link-color: #0000ee;--border-color: #999;--accent-color: #007bff;color-scheme:light dark}.theme-dark{--bg-color: #1a1a1a;--text-color: #e0e0e0;--sidebar-bg: #2d2d2d;--link-color: #8ab4f8;--border-color: #444;--accent-color: #0056b3}*{box-sizing:border-box}body{margin:0;font-family:var(--font-body);background-color:var(--bg-color);color:var(--text-color);height:100vh;width:100%;max-width:100vw;overflow:hidden}html{overflow-x:hidden;max-width:100vw}#app{height:100%;width:100%}.layout{display:flex;height:100%;width:100%;overflow-x:hidden;position:relative}.sidebar{width:11rem;background:#ffffff0d;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-right:1px solid rgba(255,255,255,.1);display:flex;flex-direction:column;height:100%;overflow:hidden;z-index:100;padding:5rem 1.5rem 1.5rem}.theme-dark .sidebar{background:#0003;border-right-color:#ffffff0d}.sidebar-search{margin-top:1rem;margin-bottom:1rem}.sidebar-search input{width:100%;border-radius:20px;background:#0000000d;border:1px solid rgba(255,255,255,.1);color:var(--text-color);padding:.5rem 1rem;font-size:.9rem}.sidebar-scroll{flex:1;overflow-y:auto;margin:0 -1.5rem;padding:0 1.5rem}.sidebar-section h3{font-family:var(--font-heading);font-size:.7rem;text-transform:uppercase;letter-spacing:.1em;opacity:.5;margin-top:2rem;margin-bottom:.5rem;font-weight:700;display:flex;align-items:center;justify-content:space-between;cursor:pointer;-webkit-user-select:none;user-select:none}.sidebar-section h3:hover{opacity:.8}.sidebar-section .caret{font-size:.6rem;transition:transform .2s ease;transform:rotate(90deg)}.sidebar-section.collapsed .caret{transform:rotate(0)}.sidebar-section.collapsed ul{display:none}.sidebar-section ul{list-style:none;padding:0;margin:0}.sidebar-section li a{display:block;padding:.3rem .8rem;margin:.1rem 0;border-radius:8px;transition:background-color .2s ease,color .2s ease,opacity .2s ease,transform .2s ease;font-weight:500;font-size:.85rem;text-decoration:none;color:var(--text-color);opacity:.8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:var(--font-heading)}.sidebar-section li a:hover{background:#ffffff1a;opacity:1;transform:translate(4px)}.sidebar-section li.active a{background:#ffffff40;opacity:1;font-weight:700;box-shadow:0 4px 12px #0000001a;border:1px solid rgba(255,255,255,.2)}.sidebar-footer{margin-top:auto;padding-top:1.5rem;border-top:1px solid rgba(255,255,255,.1);display:flex;flex-direction:column;gap:.5rem}.sidebar-footer a{opacity:.6;padding:.5rem .8rem;border-radius:8px;text-decoration:none;color:var(--text-color);font-size:.9rem;font-family:var(--font-heading)}.sidebar-footer a:hover{background:#ffffff0d;opacity:1}.sidebar-quick-controls{display:flex;flex-direction:column;gap:0;margin-bottom:.5rem}.sidebar-controls-row{display:flex;align-items:center;gap:.1rem}.sidebar-controls-rule{border:none;border-top:1px solid rgba(128,128,128,.2);margin:.35rem 0}.sidebar-icon-btn{background:none;border:none;cursor:pointer;font-size:1rem;padding:.3rem .4rem;border-radius:5px;color:var(--text-color);opacity:.4;transition:opacity .15s,background .15s;font-family:inherit;text-transform:none;font-weight:400;height:auto;line-height:1;display:inline-flex;align-items:center;justify-content:center}.sidebar-icon-btn:hover{opacity:.85;background:#8080801f;border:none}.sidebar-icon-btn.active{opacity:1;background:#8080802e}.theme-dark .sidebar-icon-btn{color:#000000bf;background:none;border:none}.theme-dark .sidebar-icon-btn:hover{background:#0000001a;border:none}.theme-dark .sidebar-icon-btn.active{background:#00000026}.main-content{width:100%;height:100%;min-width:0;overflow-y:auto;background-color:var(--bg-color);padding:1.5rem 2rem;transition:padding .3s ease}@media(max-width:1024px){.main-content{padding:4rem 1rem 1rem}}.main-content>*{max-width:35em;margin-left:auto;margin-right:auto}.sidebar-toggle{position:fixed;top:1rem;left:1rem;z-index:1001;background:none;border:none;width:3rem;height:3rem;font-size:1.5rem;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:transform .2s cubic-bezier(.175,.885,.32,1.275)}.sidebar-toggle:hover{transform:scale(1.1)}.sidebar-toggle:active{transform:scale(.95)}.sidebar-backdrop{display:none;position:fixed;inset:0;background:#0000004d;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);z-index:999}@media(max-width:1024px){.sidebar-visible .sidebar-backdrop{display:block}.sidebar{position:fixed;top:0;left:0;bottom:0;z-index:1000;transform:translate(-100%);transition:transform .3s cubic-bezier(.4,0,.2,1);box-shadow:none}.sidebar-visible .sidebar{transform:translate(0);box-shadow:10px 0 20px #0000001a}}@media(min-width:1025px){.sidebar{position:fixed;top:0;left:0;bottom:0;z-index:1000;transform:translate(-100%);transition:transform .3s cubic-bezier(.4,0,.2,1)}.sidebar-visible .sidebar{transform:translate(0);box-shadow:10px 0 20px #0000001a}.sidebar-hidden .sidebar{transform:translate(-100%)}}.sidebar-hidden .sidebar,.sidebar-visible .sidebar{display:flex}input[type=text],input[type=url],input[type=search],select{padding:.4rem .8rem;border-radius:8px;border:1px solid var(--border-color);background:var(--bg-color);color:var(--text-color);font-family:inherit;font-size:.9rem}input:focus,select:focus{outline:none;border-color:var(--accent-color);box-shadow:0 0 0 2px #007bff33}.logo{font-size:2.5rem;margin:0 0 1.5rem;cursor:pointer;text-align:center;-webkit-user-select:none;user-select:none}.sidebar .logo{margin-bottom:1.5rem}.item-list{list-style:none;padding:0;margin:0}.feed-item{padding:1rem .5rem;margin-top:2rem;border-bottom:none;border-radius:8px;transition:background-color .2s ease}.item-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:.5rem}.item-title{font-family:var(--font-heading);font-size:1.8rem;font-weight:700;text-decoration:none;color:var(--link-color);display:block;flex:1;cursor:pointer}.item-title:hover{text-decoration:underline}.star-btn{background:none;border:none;cursor:pointer;font-size:1.25rem;padding:0 0 0 .5rem;vertical-align:middle;transition:color .2s;line-height:1}.star-btn.is-starred{color:#00f}.star-btn.is-unstarred{color:var(--text-color);opacity:.3}.dateline{margin-top:0;font-weight:400;font-size:.75em;color:#ccc;margin-bottom:1rem}.dateline a{color:#ccc;text-decoration:none}.item-description{color:var(--text-color);line-height:1.5;font-size:1rem;margin-top:1rem;overflow-wrap:break-word;word-break:break-word}.item-description a{text-decoration:none;color:var(--link-color)}.item-description img,.item-description video,.item-description pre{max-width:100%;height:auto;display:block;margin:1rem 0}.item-description pre{white-space:pre-wrap;word-wrap:break-word;overflow-x:auto;background:#0000000d;padding:1em;border-radius:4px}.scrape-btn{background:var(--bg-color);border:1px solid var(--border-color, #ccc);color:#00f;cursor:pointer;font-family:var(--font-heading);font-weight:700;font-size:.8rem;padding:2px 6px;margin-left:.5rem}.theme-dark{--bg-color: #000000;--text-color: #ffffff;--sidebar-bg: #000000;--link-color: #5ac8fa;--border-color: #333333;--accent-color: #2188ff;--sidebar-text-color: rgba(0, 0, 0, .87)}.theme-dark .sidebar{background:#b4b4b4d9;border-right-color:#00000026}.theme-dark .sidebar-section li a,.theme-dark .sidebar-section h3,.theme-dark .sidebar-footer a{color:#000000de}.theme-dark .sidebar-section li.active a{background:#00000026}.theme-dark .sidebar-section li a:hover{background:#00000014}.theme-dark .sidebar-toggle{background:none}.theme-dark .sidebar-search input{background:#ffffffb3;color:#000000de;border-color:#0003}.font-serif{--font-body: Georgia, "Times New Roman", Times, serif;font-family:var(--font-body)}.font-sans{--font-body: var(--font-heading-system);font-family:var(--font-body)}.font-mono{--font-body: var(--font-mono);font-family:var(--font-body)}.heading-font-default{--font-heading: var(--font-heading-system)}.heading-font-serif{--font-heading: Georgia, "Times New Roman", Times, serif}.heading-font-mono{--font-heading: var(--font-mono)}.heading-font-sans{--font-heading: var(--font-sans)}.theme-dark .settings-view,.theme-dark .settings-view h2,.theme-dark .settings-view h3,.theme-dark .settings-group label,.theme-dark .data-group label{color:var(--text-color)!important}.settings-view{padding-top:2rem;font-family:var(--font-heading);color:var(--text-color)}.settings-view h2{font-size:2rem;font-weight:700;margin-bottom:2rem;letter-spacing:-.02em}.settings-grid{display:flex;flex-direction:column;gap:2rem;margin-bottom:2rem}.settings-section{margin:0;padding:0;border:none}.settings-section h3{font-family:var(--font-heading);font-size:1.2rem;font-weight:700;margin-top:0;margin-bottom:1rem;border:none;padding-bottom:0;color:var(--text-color)}.settings-group label,.data-group label{display:block;font-size:.8rem;font-weight:700;text-transform:uppercase;margin-bottom:.5rem;opacity:.6;font-family:var(--font-heading)}.theme-options{display:flex;gap:.5rem}button,.button{border-radius:6px;border:1px solid var(--border-color);padding:.5rem 1rem;font-size:.8rem;font-weight:700;text-transform:uppercase;font-family:var(--font-heading);background-color:var(--bg-color);cursor:pointer;transition:background-color .2s,color .2s,border-color .2s;color:var(--text-color);text-decoration:none;display:inline-block;text-align:center;height:2.2rem;line-height:1.1;box-sizing:border-box}button:hover,.button:hover{border-color:var(--text-color);background:#0000000d}.theme-dark button,.theme-dark .button{background-color:transparent;color:var(--text-color);border-color:var(--border-color)}.theme-dark button:hover,.theme-dark .button:hover{background:#ffffff1a;border-color:var(--text-color)}button.active,.theme-dark button.active{background-color:var(--text-color);color:var(--bg-color);border-color:var(--text-color)}.add-feed-form{display:flex;gap:.5rem;width:100%}.add-feed-form input{flex:1;height:2.2rem}.button-group{display:flex;gap:.5rem;align-items:center}.manage-feed-list{display:flex;flex-direction:column;padding:0;list-style:none;border-top:1px solid var(--border-color);width:100%}.manage-feed-item{display:flex;align-items:center;padding:1rem 0;border-bottom:1px solid var(--border-color);background:transparent;gap:1rem;width:100%;border-radius:0}.feed-info{flex:1;min-width:0}.feed-title{font-weight:700;font-size:1rem;margin-bottom:.2rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:var(--font-heading)}.feed-url{font-size:.85rem;opacity:.6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:var(--font-heading)}.feed-actions{display:flex;gap:.5rem;align-items:center}.feed-tag-input{width:120px;padding:.4rem;height:2.2rem}.delete-feed-btn{color:var(--error-color, #d32f2f)!important;border-color:var(--error-color, #d32f2f)!important}.delete-feed-btn:hover{background-color:#d32f2f1a!important}.manage-feeds-section{width:100%;margin-top:2rem}@media(max-width:768px){.manage-feed-item{flex-direction:column;align-items:flex-start}.feed-actions{width:100%;margin-top:.5rem}.feed-tag-input{flex:1}}
diff --git a/web/dist/v3/index.html b/web/dist/v3/index.html
index 0cbec97..16f05cf 100644
--- a/web/dist/v3/index.html
+++ b/web/dist/v3/index.html
@@ -5,8 +5,8 @@
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>neko</title>
- <script type="module" crossorigin src="/v3/assets/index-BymDBicy.js"></script>
- <link rel="stylesheet" crossorigin href="/v3/assets/index-FN4JJv2k.css">
+ <script type="module" crossorigin src="/v3/assets/index-BqXsvyTg.js"></script>
+ <link rel="stylesheet" crossorigin href="/v3/assets/index-BaJs_RDt.css">
</head>
<body>
<div id="app"></div>
diff --git a/web/dist/v3/themes/codex.css b/web/dist/v3/themes/codex.css
index 50942e6..fcf4e33 100644
--- a/web/dist/v3/themes/codex.css
+++ b/web/dist/v3/themes/codex.css
@@ -170,7 +170,7 @@ body {
padding: 2.5rem 2rem;
}
-.main-content > * {
+.main-content>* {
max-width: 33em;
}
@@ -182,10 +182,19 @@ body {
border-radius: 0;
padding-bottom: 2.5rem;
border-bottom: none;
+ transition: opacity 0.4s ease;
+}
+
+.feed-item.read {
+ opacity: 0.5;
+}
+
+.feed-item.read .item-title {
+ color: var(--codex-muted);
}
/* Decorative separator between items -- a subtle fleuron */
-.feed-item + .feed-item::before {
+.feed-item+.feed-item::before {
content: '\2766';
display: block;
text-align: center;
@@ -451,4 +460,4 @@ select:focus {
.theme-dark .sidebar-backdrop {
background: rgba(28, 26, 23, 0.6);
-}
+} \ No newline at end of file
diff --git a/web/dist/v3/themes/refined.css b/web/dist/v3/themes/refined.css
index fab2b96..191a5a2 100644
--- a/web/dist/v3/themes/refined.css
+++ b/web/dist/v3/themes/refined.css
@@ -86,6 +86,16 @@ body {
.feed-item {
padding: var(--spacing-md) var(--spacing-sm);
margin-top: var(--spacing-xl);
+ transition: opacity 0.3s ease;
+}
+
+.feed-item.read {
+ opacity: 0.45;
+}
+
+.feed-item.read .item-title {
+ font-weight: 500;
+ opacity: 0.8;
}
.item-title {
@@ -269,4 +279,4 @@ select:focus {
padding: 2px 8px;
border-radius: 4px;
letter-spacing: 0.04em;
-}
+} \ No newline at end of file
diff --git a/web/dist/v3/themes/sakura.css b/web/dist/v3/themes/sakura.css
index 48a1c0a..948e22e 100644
--- a/web/dist/v3/themes/sakura.css
+++ b/web/dist/v3/themes/sakura.css
@@ -184,7 +184,7 @@ body {
padding: 2.5rem 2rem;
}
-.main-content > * {
+.main-content>* {
max-width: 34em;
}
@@ -195,10 +195,20 @@ body {
margin-top: 2.5rem;
border-radius: 0;
border-bottom: none;
+ transition: opacity 0.4s ease;
+}
+
+.feed-item.read {
+ opacity: 0.4;
+}
+
+.feed-item.read .item-title {
+ color: var(--sakura-stone);
+ font-weight: 400;
}
/* Subtle separator -- a single thin rule, Japanese-style restraint */
-.feed-item + .feed-item {
+.feed-item+.feed-item {
border-top: 1px solid var(--sakura-shadow);
padding-top: 2.5rem;
}
@@ -462,6 +472,7 @@ select:focus {
}
/* ---- Loading/Empty ---- */
-.loading, .empty {
+.loading,
+.empty {
color: var(--sakura-stone);
-}
+} \ No newline at end of file
diff --git a/web/dist/v3/themes/terminal.css b/web/dist/v3/themes/terminal.css
index 48164c9..484d3ff 100644
--- a/web/dist/v3/themes/terminal.css
+++ b/web/dist/v3/themes/terminal.css
@@ -68,13 +68,11 @@ body {
height: 100%;
pointer-events: none;
z-index: 9999;
- background: repeating-linear-gradient(
- to bottom,
- transparent,
- transparent 2px,
- rgba(0, 0, 0, 0.03) 2px,
- rgba(0, 0, 0, 0.03) 4px
- );
+ background: repeating-linear-gradient(to bottom,
+ transparent,
+ transparent 2px,
+ rgba(0, 0, 0, 0.03) 2px,
+ rgba(0, 0, 0, 0.03) 4px);
will-change: transform;
}
}
@@ -217,6 +215,15 @@ body {
padding: 1.25rem 0.5rem;
margin-top: 1.5rem;
border-bottom: 1px solid var(--border-color);
+ transition: opacity 0.4s ease;
+}
+
+.feed-item.read {
+ opacity: 0.35;
+}
+
+.feed-item.read .item-title {
+ text-decoration: none;
}
.feed-item.selected {
@@ -482,8 +489,9 @@ select:focus {
}
/* ---- Loading/Empty States ---- */
-.loading, .empty {
+.loading,
+.empty {
color: var(--text-color);
opacity: 0.4;
font-family: inherit;
-}
+} \ No newline at end of file