From 7661d70a3f495b1fd0b78975ca82c7a0d9c91272 Mon Sep 17 00:00:00 2001 From: Andrii Rodzyk Date: Sat, 28 Mar 2026 12:56:19 +0200 Subject: [PATCH 1/4] feat: enhance ImgurService image filtering, add new phrases and update UI for no pages found scenario --- src/app/@site-modules/imgur/imgur.service.ts | 4 +++- src/app/shared/utils/phrases.ts | 3 +++ .../components/thanks-page/thanks-page.component.html | 2 +- src/app/viewer/viewer/viewer.component.html | 8 ++++++-- src/assets/langs/uk.json | 5 ++++- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/app/@site-modules/imgur/imgur.service.ts b/src/app/@site-modules/imgur/imgur.service.ts index fc28141..421aa43 100644 --- a/src/app/@site-modules/imgur/imgur.service.ts +++ b/src/app/@site-modules/imgur/imgur.service.ts @@ -47,7 +47,9 @@ export class ImgurService { title: data.title, episode: 0, nsfw: (data.nsfw) as unknown as boolean, - images: data.images.map((i): CompositionImage => { + images: data.images + .filter(i => i.type.startsWith('image/')) + .map((i): CompositionImage => { return { src: i.link, width: i.width, diff --git a/src/app/shared/utils/phrases.ts b/src/app/shared/utils/phrases.ts index d3aa4a6..5f097f0 100644 --- a/src/app/shared/utils/phrases.ts +++ b/src/app/shared/utils/phrases.ts @@ -67,6 +67,9 @@ export class Phrases { filesHistory = "Files history" noInternet = "No internet connection" readlist = "Readlist" + noPagesFound = "No pages found" + noPagesFoundDesc = "This episode might only have videos or text" + episodeEnd = "End of episode" getByKey = (key: string) => (Object.keys(this).includes(key)) ? this[key as keyof Phrases] : null; static getTemplate(phrase: string, value: string) { diff --git a/src/app/viewer/viewer/components/thanks-page/thanks-page.component.html b/src/app/viewer/viewer/components/thanks-page/thanks-page.component.html index 28613cc..86040d0 100644 --- a/src/app/viewer/viewer/components/thanks-page/thanks-page.component.html +++ b/src/app/viewer/viewer/components/thanks-page/thanks-page.component.html @@ -6,7 +6,7 @@
-

Кінець епізоду

+

{{lang.ph().episodeEnd}}

@if (getNextIndex() >=0 && playlist()[getNextIndex()]; as next) { - } @empty { - 👀 } + @if(episode().images.length > 0) { + } @else { +

😢 {{lang.ph().noPagesFound}}

+

{{lang.ph().noPagesFoundDesc}}

+
🏠 + } diff --git a/src/assets/langs/uk.json b/src/assets/langs/uk.json index 53ed1b8..43e396a 100644 --- a/src/assets/langs/uk.json +++ b/src/assets/langs/uk.json @@ -63,5 +63,8 @@ "sitesHistory": "Історія сайтів", "filesHistory": "Історія файлів", "noInternet": "Немає підключення до інтернету", - "readlist": "Список для читання" + "readlist": "Список для читання", + "noPagesFound": "Сторінок не знайдено", + "noPagesFoundDesc": "Цей епізод певно містить лише відео або текст", + "episodeEnd": "Кінець епізоду" } \ No newline at end of file From 89e56f1ddaf11845b1e67e183bbd4bbda44e5607 Mon Sep 17 00:00:00 2001 From: Andrii Rodzyk Date: Sat, 28 Mar 2026 15:42:45 +0200 Subject: [PATCH 2/4] Refactor styles in chytanka-logo-with-tags component - Removed commented-out styles for overflow and alignment. - Adjusted grid properties to use gap and align-content for better layout. - Cleaned up version class by removing absolute positioning. - Simplified ul styles by removing unnecessary absolute positioning. - Added background color for nhentai class. --- .../ui/parser-form/parser-form.component.ts | 1 + .../chytanka-logo-with-tags.component.html | 32 ++++++++----------- .../chytanka-logo-with-tags.component.scss | 23 +++---------- 3 files changed, 20 insertions(+), 36 deletions(-) diff --git a/src/app/link-parser/ui/parser-form/parser-form.component.ts b/src/app/link-parser/ui/parser-form/parser-form.component.ts index 5df1f2e..496888f 100644 --- a/src/app/link-parser/ui/parser-form/parser-form.component.ts +++ b/src/app/link-parser/ui/parser-form/parser-form.component.ts @@ -17,6 +17,7 @@ export class ParserFormComponent { protected linkInit = inject(LinkInitFacade); ngOnInit() { + this.linkFacade.setLink(''); this.linkInit.init().then(source => { if (source === 'route') { this.navFacade.goToParsedLink(); diff --git a/src/app/shared/ui/chytanka-logo-with-tags/chytanka-logo-with-tags.component.html b/src/app/shared/ui/chytanka-logo-with-tags/chytanka-logo-with-tags.component.html index d49b595..968ac9c 100644 --- a/src/app/shared/ui/chytanka-logo-with-tags/chytanka-logo-with-tags.component.html +++ b/src/app/shared/ui/chytanka-logo-with-tags/chytanka-logo-with-tags.component.html @@ -1,7 +1,6 @@ @let online = net.isReallyOnline();
- - -
    - @if(online) { - @for (tag of siteTags(); track $index) { -
  • - {{formatTagname(tag)}}
  • - } - } - - @for (tag of fileTags(); track $index) { - -
  • - {{formatTagname(tag)}}
  • - } -
- - +
    + @if(online) { + @for (tag of siteTags(); track $index) { +
  • + {{formatTagname(tag)}}
  • + } + } + + @for (tag of fileTags(); track $index) { + +
  • + {{formatTagname(tag)}}
  • + } +
v{{version}} \ No newline at end of file diff --git a/src/app/shared/ui/chytanka-logo-with-tags/chytanka-logo-with-tags.component.scss b/src/app/shared/ui/chytanka-logo-with-tags/chytanka-logo-with-tags.component.scss index 2f84823..0c0b89f 100644 --- a/src/app/shared/ui/chytanka-logo-with-tags/chytanka-logo-with-tags.component.scss +++ b/src/app/shared/ui/chytanka-logo-with-tags/chytanka-logo-with-tags.component.scss @@ -1,12 +1,10 @@ :host { position: relative; - // overflow: hidden; min-height: 0; min-width: 0; display: grid; - // place-items: stretch; - align-items: anchor-center; - + gap: 1ch; + align-content: center; } #logoPath { @@ -44,9 +42,6 @@ img { } .version { - // position: absolute; - // top: 50%; left: 50%; - // transform: translate(-50%,-50%); font-weight: bold; text-align: center; opacity: .5; @@ -67,8 +62,6 @@ img { } ul { - position: absolute; - bottom: 0; display: flex; flex-wrap: wrap; gap: 1ch; @@ -98,12 +91,6 @@ ul { list-style: none; text-box: trim-both cap alphabetic; - // &:hover { - // cursor: none; - // scale: 1.5 !important; - // z-index: 2; - // } - &.reddit { --b: #FF4500; --f: white; @@ -119,8 +106,6 @@ ul { --f: white; } - // &.comick {} - &.imgur { --b: #1bb76e; } @@ -129,7 +114,9 @@ ul { --b: #ff6740; } - // &.nhentai {} + &.nhentai { + --b: #ed2553; + } &.zenko { --b: #078DEE; From 664fea3291e26338ccd3353670900069b0feb9af Mon Sep 17 00:00:00 2001 From: Andrii Rodzyk Date: Sat, 28 Mar 2026 17:23:01 +0200 Subject: [PATCH 3/4] feat(history-list): implement site filtering and enhance UI for history items --- .../history-list/history-list.component.html | 14 +++++++- .../history-list/history-list.component.scss | 36 +++++++++++++++++++ .../ui/history-list/history-list.component.ts | 21 ++++++++++- 3 files changed, 69 insertions(+), 2 deletions(-) diff --git a/src/app/history/ui/history-list/history-list.component.html b/src/app/history/ui/history-list/history-list.component.html index 19a45c4..3fd6de1 100644 --- a/src/app/history/ui/history-list/history-list.component.html +++ b/src/app/history/ui/history-list/history-list.component.html @@ -1,5 +1,5 @@ @let files = historyFiles(); -@let sites = historyItems(); +@let sites = historyItemsFiltered(); @let sitesNotEmpty = sites.length > 0; @let filesNotEmpty = files.length > 0; @@ -17,6 +17,18 @@
+ + @if(historyItemsSites().length > 1) { +
    +
  • All +
  • + @for (tag of historyItemsSites(); track $index) { +
  • + {{tag}}
  • + } +
+ } + @for (item of sites; track $index) { } diff --git a/src/app/history/ui/history-list/history-list.component.scss b/src/app/history/ui/history-list/history-list.component.scss index 605e98f..da26e17 100644 --- a/src/app/history/ui/history-list/history-list.component.scss +++ b/src/app/history/ui/history-list/history-list.component.scss @@ -20,4 +20,40 @@ button { margin-left: auto; } +} + +ul { + position: sticky; + top: -1ch; + background-color: var(--surface); + display: inline-flex; + // gap: 1ch; + list-style: none; + border-radius: .5ch; + padding: 0; + margin: 0; + overflow-x: auto; + scrollbar-width: none; + z-index: 1; + border-radius: .5ch; + box-shadow: var(--shadow-1); + + li { + // border-radius: inherit; + padding: 1ch; + // border-bottom: 1px solid transparent; + cursor: pointer; + + &.active, &:hover { + color: #caa902; + border-color: currentColor; + } + + &:first-child { + position: sticky; + left: 0; + z-index: 1; + background-color: inherit; + } + } } \ No newline at end of file diff --git a/src/app/history/ui/history-list/history-list.component.ts b/src/app/history/ui/history-list/history-list.component.ts index 391a644..f64e77e 100644 --- a/src/app/history/ui/history-list/history-list.component.ts +++ b/src/app/history/ui/history-list/history-list.component.ts @@ -1,4 +1,4 @@ -import { Component, WritableSignal, inject, signal } from '@angular/core'; +import { Component, WritableSignal, computed, inject, signal } from '@angular/core'; import { HistoryService } from '../../data-access/history.service'; import { LangService } from '../../../shared/data-access/lang.service'; import { FileHistoryService } from '../../../file/data-access/file-history.service'; @@ -17,6 +17,25 @@ export class HistoryListComponent { historyItems: WritableSignal = signal([]); historyFiles: WritableSignal = signal([]); + historyItemsSites = computed(() => { + const sites = this.historyItems().map(item => item.site); + const unique = [...new Set(sites.flat())]; + return unique; + }); + historySitesFilter = signal('all'); + + setHistorySitesFilter(site: string = 'all') { + this.historySitesFilter.set(site); + } + + historyItemsFiltered = computed(() => { + const filter = this.historySitesFilter(); + if (filter === 'all') { + return this.historyItems(); + } + return this.historyItems().filter(item => item.site.includes(filter)); + }); + async displayHistory() { const history = await this.history.getAllHistory(); From 11efb1420e23f87a6a989d029db3032c3a4cf84b Mon Sep 17 00:00:00 2001 From: Andrii Rodzyk Date: Sat, 28 Mar 2026 18:06:14 +0200 Subject: [PATCH 4/4] refactor(playlist): remove unused link parsers and initialization method --- .../playlist/data-access/playlist.service.ts | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/app/playlist/data-access/playlist.service.ts b/src/app/playlist/data-access/playlist.service.ts index dfd52a8..ac918e1 100644 --- a/src/app/playlist/data-access/playlist.service.ts +++ b/src/app/playlist/data-access/playlist.service.ts @@ -2,8 +2,6 @@ import { HttpClient } from '@angular/common/http'; import { Injectable, WritableSignal, signal } from '@angular/core'; import { Observable, catchError, tap, throwError } from 'rxjs'; import { LinkParserService } from '../../link-parser/data-access/link-parser.service'; -import { BlankaryLinkParser, ImgurLinkParser, JsonLinkParser, MangadexLinkParser, NhentaiLinkParser, PixivLinkParser, RedditLinkParser, TelegraphLinkParser, YandereParser, ZenkoLinkParser } from '../../link-parser/utils'; -import { ComickLinkParser } from '../../link-parser/utils/comick-link-parser'; export interface EpisodeOptionalField { episode?: number; @@ -50,22 +48,6 @@ export class PlaylistService { playlist: WritableSignal = signal([]) constructor(private http: HttpClient, public parser: LinkParserService) { - this.initParser(); - } - - initParser() { - this.parser.parsers = []; - this.parser.parsers.push(new ImgurLinkParser) - this.parser.parsers.push(new MangadexLinkParser) - this.parser.parsers.push(new TelegraphLinkParser) - this.parser.parsers.push(new RedditLinkParser) - this.parser.parsers.push(new ZenkoLinkParser) - this.parser.parsers.push(new NhentaiLinkParser) - // this.parser.parsers.push(new ComickLinkParser) - this.parser.parsers.push(new YandereParser) - this.parser.parsers.push(new PixivLinkParser) - // this.parser.parsers.push(new BlankaryLinkParser) - this.parser.parsers.push(new JsonLinkParser) } getPlaylist(url: string): Observable {