diff options
| author | Adam Mathes <adam@adammathes.com> | 2026-02-17 13:51:21 -0800 |
|---|---|---|
| committer | Adam Mathes <adam@adammathes.com> | 2026-02-17 13:51:21 -0800 |
| commit | 7ad8d0079a09e234cb1b01db47957b16e36c8c07 (patch) | |
| tree | 34ec2b4f1c13a648be551a953bba041da1f41871 /frontend-vanilla | |
| parent | 71504966c15db9b506b99a29d6b9cd52e311502b (diff) | |
| download | neko-7ad8d0079a09e234cb1b01db47957b16e36c8c07.tar.gz neko-7ad8d0079a09e234cb1b01db47957b16e36c8c07.tar.bz2 neko-7ad8d0079a09e234cb1b01db47957b16e36c8c07.zip | |
Soft deprecate tags feature in Sidebar and fix lint errors
Diffstat (limited to 'frontend-vanilla')
| -rw-r--r-- | frontend-vanilla/src/main.ts | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/frontend-vanilla/src/main.ts b/frontend-vanilla/src/main.ts index 302c253..4e1d216 100644 --- a/frontend-vanilla/src/main.ts +++ b/frontend-vanilla/src/main.ts @@ -3,7 +3,7 @@ import { apiFetch } from './api'; import { store } from './store'; import type { FilterType } from './store'; import { router } from './router'; -import type { Feed, Item, Category } from './types'; +import type { Feed, Item } from './types'; import { createFeedItem } from './components/FeedItem'; // Extend Window interface for app object (keeping for compatibility if needed, but removing inline dependencies) @@ -49,10 +49,12 @@ export function renderLayout() { <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"> <a href="/v3/settings" data-nav="settings">Settings</a> @@ -218,16 +220,18 @@ export function renderFeeds() { } export function renderTags() { + /* Soft deprecated. + const tagList = document.getElementById('tag-list'); + if (!tagList) return; + const { tags, activeTagName } = store; - const tagListEl = document.getElementById('tag-list'); - if (!tagListEl) return; - tagListEl.innerHTML = tags.map((tag: Category) => ` - <li class="${tag.title === activeTagName ? 'active' : ''}"> - <a href="/v3/tag/${encodeURIComponent(tag.title)}" data-nav="tag" data-value="${tag.title}"> - ${tag.title} - </a> - </li> - `).join(''); + tagList.innerHTML = tags.map(tag => { + const isActive = activeTagName === tag.title; + return `<li class="tag-item ${isActive ? 'active' : ''}"> + <a href="/tag/${encodeURIComponent(tag.title)}" data-nav="tag" data-value="${tag.title}">${tag.title}</a> + </li>`; + }).join(''); + */ } export function renderFilters() { @@ -503,7 +507,7 @@ export function renderSettings() { const input = document.querySelector(`.feed-tag-input[data-id="${id}"]`) as HTMLInputElement; await updateFeed(id, { category: input.value.trim() }); await fetchFeeds(); - await fetchTags(); + // await fetchTags(); renderSettings(); alert('Feed updated'); }); |
