diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..ad49110
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,10 @@
+{
+ "files.exclude": {
+ ".directory": true,
+ "**/.angular": true,
+ "**/.github": true,
+ "**/.vscode": true,
+ "**/dist": true,
+ "**/node_modules": true
+ }
+}
\ No newline at end of file
diff --git a/package.json b/package.json
index a8231ec..b9032dd 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "chytanka",
- "version": "0.13.50",
+ "version": "0.13.51",
"scripts": {
"ng": "ng",
"start": "ng serve",
diff --git a/src/app/@site-modules/@common-read/common-read.module.ts b/src/app/@site-modules/@common-read/common-read.module.ts
index fd698ba..06672ba 100644
--- a/src/app/@site-modules/@common-read/common-read.module.ts
+++ b/src/app/@site-modules/@common-read/common-read.module.ts
@@ -3,6 +3,8 @@ import { CommonModule } from '@angular/common';
import { CommonReadComponent } from './ui/common-read/common-read.component';
import { SharedModule } from '../../shared/shared.module';
import { RouterModule } from '@angular/router';
+import { ViewerModule } from '../../viewer/viewer.module';
+import { LinkParserModule } from '../../link-parser/link-parser.module';
@@ -13,10 +15,13 @@ import { RouterModule } from '@angular/router';
imports: [
CommonModule,
RouterModule,
- SharedModule
+ SharedModule,
+ ViewerModule,
+ LinkParserModule
],
exports: [
- CommonReadComponent
+ CommonReadComponent,
+ SharedModule
]
})
export class CommonReadModule { }
diff --git a/src/app/@site-modules/imgchest/imgchest-shell.component.ts b/src/app/@site-modules/imgchest/imgchest-shell.component.ts
index 2439035..ea26d7c 100644
--- a/src/app/@site-modules/imgchest/imgchest-shell.component.ts
+++ b/src/app/@site-modules/imgchest/imgchest-shell.component.ts
@@ -1,4 +1,4 @@
-import { Component } from '@angular/core';
+import { Component, signal } from '@angular/core';
import { ImgchestService } from './imgchest.service';
import { Base64 } from '../../shared/utils';
import { of, switchMap } from 'rxjs';
@@ -9,18 +9,14 @@ import { IMGCHEST_PATH } from '../../app-routing.module';
imports: [CommonReadModule],
selector: 'app-imgchest-shell',
template: `
-
-
-
-
-
-
-
{{lang.ph().imagesVia}}Imgchest
- API.
- {{lang.ph().thanks}}
{{lang.ph().detalisCopy}}
-
`
+
+
+ `
})
export default class ImgchestShellComponent extends ReadBaseComponent {
+ protected readonly sourceName = signal('Imgchest');
+ protected readonly sourceUrl = signal('https://imgchest.com');
+ protected readonly sourceImageSrc = signal('/assets/logos/imgchest.png');
override episode$ = this.combineParamMapAndRefresh()
.pipe(this.tapStartLoading(),
diff --git a/src/app/@site-modules/imgur/imgur-shell.component.ts b/src/app/@site-modules/imgur/imgur-shell.component.ts
index 0932f0a..8bc3b17 100644
--- a/src/app/@site-modules/imgur/imgur-shell.component.ts
+++ b/src/app/@site-modules/imgur/imgur-shell.component.ts
@@ -1,4 +1,4 @@
-import { Component } from '@angular/core';
+import { Component, signal } from '@angular/core';
import { ImgurService } from './imgur.service';
import { Base64 } from '../../shared/utils';
import { of, switchMap } from 'rxjs';
@@ -8,19 +8,15 @@ import { IMGUR_PATH } from '../../app-routing.module';
@Component({
imports: [CommonReadModule],
selector: 'app-imgur-shell',
- template: `
-
-
-
-
{{lang.ph().imagesVia}}Imgur
- API.
- {{lang.ph().thanks}}
{{lang.ph().detalisCopy}}
-
`
+ template: `
+
+
+`
})
export default class ImgurShellComponent extends ReadBaseComponent {
-
+ protected readonly sourceName = signal('Imgur');
+ protected readonly sourceUrl = signal('https://imgur.com');
+ protected readonly sourceImageSrc = signal('/assets/logos/imgur-logo.svg');
override episode$ = this.combineParamMapAndRefresh()
.pipe(this.tapStartLoading(),
switchMap(([params]) => {
diff --git a/src/app/@site-modules/mangadex/mangadex-shell.component.ts b/src/app/@site-modules/mangadex/mangadex-shell.component.ts
index 016042f..3a8ea02 100644
--- a/src/app/@site-modules/mangadex/mangadex-shell.component.ts
+++ b/src/app/@site-modules/mangadex/mangadex-shell.component.ts
@@ -1,4 +1,4 @@
-import { Component } from '@angular/core';
+import { Component, signal } from '@angular/core';
import { forkJoin, map, of, switchMap } from 'rxjs';
import { MangadexService } from './mangadex.service';
import { Base64 } from '../../shared/utils';
@@ -9,21 +9,14 @@ import { MANGADEX_PATH } from '../../app-routing.module';
imports: [CommonReadModule],
selector: 'app-mangadex-shell',
template: `
-
-
-
-
-
-
-
Images via Mangadex API.
- Thanks!
Details on their site. Respect copyrights.
-
-
+
+
`
})
export default class MangadexShellComponent extends ReadBaseComponent {
+ protected readonly sourceName = signal('MangaDex');
+ protected readonly sourceUrl = signal('https://mangadex.org');
+ protected readonly sourceImageSrc = signal('/assets/logos/mangadex-logo.svg');
override episode$ = this.combineParamMapAndRefresh()
.pipe(this.tapStartLoading(),
diff --git a/src/app/@site-modules/nhentai/nhentai.service.ts b/src/app/@site-modules/nhentai/nhentai.service.ts
index 7480de4..fccd67f 100644
--- a/src/app/@site-modules/nhentai/nhentai.service.ts
+++ b/src/app/@site-modules/nhentai/nhentai.service.ts
@@ -32,7 +32,7 @@ export class NhentaiService {
nsfw: true,
images: (data.images.pages.map((item: any, index: number) => {
return {
- src: `https://i7.nhentai.net/galleries/${mediaId}/${index + 1}.${this.imageType.get(item.t)}`,
+ src: `https://i1.nhentai.net/galleries/${mediaId}/${index + 1}.${this.imageType.get(item.t)}`,
height: item.h,
width: item.w
};
diff --git a/src/app/@site-modules/reddit/reddit-shell.component.ts b/src/app/@site-modules/reddit/reddit-shell.component.ts
index 8b94f4d..6934f09 100644
--- a/src/app/@site-modules/reddit/reddit-shell.component.ts
+++ b/src/app/@site-modules/reddit/reddit-shell.component.ts
@@ -9,17 +9,14 @@ import { REDDIT_PATH } from '../../app-routing.module';
imports: [CommonReadModule],
selector: 'app-reddit-shell',
template: `
-
-
-
-{{lang.ph().imagesVia}}Reddit
- API.
- {{lang.ph().thanks}}
{{lang.ph().detalisCopy}}
-
+
+
`
})
export default class RedditShellComponent extends ReadBaseComponent {
-
+ protected readonly sourceName = () => 'Reddit';
+ protected readonly sourceUrl = () => 'https://reddit.com';
+ protected readonly sourceImageSrc = () => '/assets/logos/reddit-logo.svg';
override episode$ = this.combineParamMapAndRefresh()
.pipe(this.tapStartLoading(),
switchMap(([params]) => {
diff --git a/src/app/@site-modules/telegraph/telegraph-shell.component.ts b/src/app/@site-modules/telegraph/telegraph-shell.component.ts
index cbabc03..3dc0ed8 100644
--- a/src/app/@site-modules/telegraph/telegraph-shell.component.ts
+++ b/src/app/@site-modules/telegraph/telegraph-shell.component.ts
@@ -1,4 +1,4 @@
-import { Component, OnDestroy } from '@angular/core';
+import { Component, OnDestroy, signal } from '@angular/core';
import { Base64 } from '../../shared/utils';
import { of, switchMap } from 'rxjs';
import { TelegraphService } from './telegraph.service';
@@ -11,15 +11,15 @@ import { CommonReadModule } from '../@common-read';
imports: [CommonReadModule],
template: `
-
- {{lang.ph().imagesVia}}Telegra.ph
- API.
- {{lang.ph().thanks}}
{{lang.ph().detalisCopy}}
+
+
`
})
export default class TelegraphShellComponent extends ReadBaseComponent implements OnDestroy {
-
+ protected readonly sourceName = signal('Telegra.ph');
+ protected readonly sourceUrl = signal('https://telegra.ph');
+ protected readonly sourceImageSrc = signal('/assets/logos/telegraph-logo.svg');
override episode$ = this.combineParamMapAndRefresh()
.pipe(this.tapStartLoading(),
switchMap(([params]) => {
diff --git a/src/app/@site-modules/yandere/yandere-shell.component.ts b/src/app/@site-modules/yandere/yandere-shell.component.ts
index 63438aa..40ce01e 100644
--- a/src/app/@site-modules/yandere/yandere-shell.component.ts
+++ b/src/app/@site-modules/yandere/yandere-shell.component.ts
@@ -1,4 +1,4 @@
-import { Component, inject, OnDestroy } from '@angular/core';
+import { Component, inject, OnDestroy, signal } from '@angular/core';
import { switchMap, of } from 'rxjs';
import { CommonReadModule, ReadBaseComponent } from '../@common-read';
import { Base64 } from '../../shared/utils';
@@ -10,15 +10,17 @@ import { YANDERE_PATH } from '../../app-routing.module';
imports: [CommonReadModule],
template: `
-
- {{lang.ph().imagesVia}}Yande.re
- API.
- {{lang.ph().thanks}}
{{lang.ph().detalisCopy}}
+
+
`
})
export default class YandereShellComponent extends ReadBaseComponent implements OnDestroy {
yandere = inject(YandereService)
+ protected readonly sourceName = signal('Yande.re');
+ protected readonly sourceUrl = signal('https://yande.re');
+ protected readonly sourceImageSrc = signal('/assets/logos/yandere-logo.png');
+
override episode$ = this.combineParamMapAndRefresh()
.pipe(this.tapStartLoading(),
diff --git a/src/app/@site-modules/zenko/zenko-shell.component.ts b/src/app/@site-modules/zenko/zenko-shell.component.ts
index e0645d0..a1b82a4 100644
--- a/src/app/@site-modules/zenko/zenko-shell.component.ts
+++ b/src/app/@site-modules/zenko/zenko-shell.component.ts
@@ -1,4 +1,4 @@
-import { Component, inject, OnDestroy } from '@angular/core';
+import { Component, inject, OnDestroy, signal } from '@angular/core';
import { switchMap, of } from 'rxjs';
import { ZENKO_PATH } from '../../app-routing.module';
import { CommonReadModule, ReadBaseComponent } from '../@common-read';
@@ -10,15 +10,15 @@ import { ZenkoService } from './zenko.service';
imports: [CommonReadModule],
template: `
-
- {{lang.ph().imagesVia}}Zenko
- API.
- {{lang.ph().thanks}}
{{lang.ph().detalisCopy}}
-
+
+
`
})
export default class ZenkoShellComponent extends ReadBaseComponent implements OnDestroy {
zenko = inject(ZenkoService)
+ protected readonly sourceName = signal('Zenko');
+ protected readonly sourceUrl = signal('https://zenko.online');
+ protected readonly sourceImageSrc = signal('/assets/logos/zenko-logo.svg');
override episode$ = this.combineParamMapAndRefresh()
.pipe(this.tapStartLoading(),
diff --git a/src/app/app.component.html b/src/app/app.component.html
index 3c55ff9..db11b97 100644
--- a/src/app/app.component.html
+++ b/src/app/app.component.html
@@ -1,4 +1,7 @@
-
+@if (gamepad.gamepad.connected()) {
+@defer{}
+}
@defer{}
\ No newline at end of file
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 03325ab..ed72431 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -10,6 +10,7 @@ import { SharedModule } from './shared/shared.module';
import { registerLocaleData } from '@angular/common';
import localeUk from "@angular/common/locales/uk";
+import { parserProviders } from './link-parser/data-access/parser.providers';
registerLocaleData(localeUk)
@@ -34,7 +35,8 @@ registerLocaleData(localeUk)
// includePostRequests: false,
// })
// ),
- provideHttpClient(withFetch())
+ provideHttpClient(withFetch()),
+ ...parserProviders
]
})
export class AppModule { }
diff --git a/src/app/file/mobi/mobi.component.ts b/src/app/file/mobi/mobi.component.ts
index 64cf306..baa688a 100644
--- a/src/app/file/mobi/mobi.component.ts
+++ b/src/app/file/mobi/mobi.component.ts
@@ -4,10 +4,11 @@ import { Router } from '@angular/router';
import { FileService } from '../data-access/file.service';
import { MobiFileReader } from 'readiverse';
import { SharedModule } from '../../shared/shared.module';
+import { ViewerModule } from '../../viewer/viewer.module';
@Component({
selector: 'app-mobi',
- imports: [SharedModule],
+ imports: [SharedModule, ViewerModule],
templateUrl: './mobi.component.html',
styleUrl: './mobi.component.scss'
})
diff --git a/src/app/file/pdf/pdf.component.html b/src/app/file/pdf/pdf.component.html
index 4c52473..0ec8be5 100644
--- a/src/app/file/pdf/pdf.component.html
+++ b/src/app/file/pdf/pdf.component.html
@@ -1,4 +1,3 @@
-
@if(episode && episode.images && episode.images.length > 0){
} @else {
diff --git a/src/app/file/pdf/pdf.component.ts b/src/app/file/pdf/pdf.component.ts
index 4879817..fd6226e 100644
--- a/src/app/file/pdf/pdf.component.ts
+++ b/src/app/file/pdf/pdf.component.ts
@@ -6,6 +6,7 @@ import { Router } from '@angular/router';
import { getDocument, GlobalWorkerOptions, PDFPageProxy } from 'pdfjs-dist';
import { RenderParameters } from 'pdfjs-dist/types/src/display/api';
import { CompositionEpisode } from '../../@site-modules/@common-read';
+import { ViewerModule } from '../../viewer/viewer.module';
GlobalWorkerOptions.workerSrc = '/assets/pdf.worker.min.mjs'
@@ -13,7 +14,7 @@ const MDASH = 'โ';
@Component({
selector: 'app-pdf',
- imports: [SharedModule],
+ imports: [SharedModule, ViewerModule],
templateUrl: './pdf.component.html',
styleUrl: './pdf.component.scss'
})
diff --git a/src/app/file/zip/zip.component.html b/src/app/file/zip/zip.component.html
index 2e84688..0ec8be5 100644
--- a/src/app/file/zip/zip.component.html
+++ b/src/app/file/zip/zip.component.html
@@ -1,6 +1,5 @@
@if(episode && episode.images && episode.images.length > 0){
-
-
+
} @else {
}
\ No newline at end of file
diff --git a/src/app/file/zip/zip.component.ts b/src/app/file/zip/zip.component.ts
index 6a4c1f5..ba32907 100644
--- a/src/app/file/zip/zip.component.ts
+++ b/src/app/file/zip/zip.component.ts
@@ -9,12 +9,11 @@ import { Acbf } from '../../shared/utils/acbf';
import { FileHashService } from '../data-access/file-hash.service';
import { FileHistoryService } from '../data-access/file-history.service';
import { FileSettingsService } from '../data-access/file-settings.service';
-import { map } from 'rxjs';
-import { ViewerComponent } from "../../viewer/viewer.component";
+import { ViewerModule } from '../../viewer/viewer.module';
@Component({
selector: 'app-zip',
- imports: [SharedModule, /*ViewerComponent*/],
+ imports: [SharedModule, ViewerModule],
templateUrl: './zip.component.html',
styleUrl: './zip.component.scss'
})
@@ -152,9 +151,4 @@ export class ZipComponent implements OnInit, OnDestroy {
this.episode = { title: filename, images: [] }
this.worker.postMessage({ arrayBuffer: ab });
}
-
- onPageChange(e: { total: number, current: number[] }) {
- const { current, total } = e
- console.log(`${current}/${total}`);
- }
}
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 9fee102..19a45c4 100644
--- a/src/app/history/ui/history-list/history-list.component.html
+++ b/src/app/history/ui/history-list/history-list.component.html
@@ -1,17 +1,18 @@
-@let files = historyFiles() | async;
-@let sites = historyItems() | async;
+@let files = historyFiles();
+@let sites = historyItems();
-@if (sites && sites.length > 0) {
-
+@let sitesNotEmpty = sites.length > 0;
+@let filesNotEmpty = files.length > 0;
+
+
+@if (sitesNotEmpty) {
+
{{lang.ph().sitesHistory}}
- @if ( sites.length > 0) {
-
@@ -23,19 +24,16 @@
}
-@if (files && files.length > 0) {
+@if (filesNotEmpty) {
{{lang.ph().filesHistory}} |
{{fileSize() | filesize}} |
{{fileCount()}}
- @if ( files.length > 0) {
-
+
๐งน
- }
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 cbe7249..605e98f 100644
--- a/src/app/history/ui/history-list/history-list.component.scss
+++ b/src/app/history/ui/history-list/history-list.component.scss
@@ -16,4 +16,8 @@
gap: 1ch;
align-items: center;
width: calc(100% - 17px);
+
+ button {
+ margin-left: auto;
+ }
}
\ 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 059ecd4..391a644 100644
--- a/src/app/history/ui/history-list/history-list.component.ts
+++ b/src/app/history/ui/history-list/history-list.component.ts
@@ -14,8 +14,8 @@ export class HistoryListComponent {
public fileHistory: FileHistoryService = inject(FileHistoryService);
lang: LangService = inject(LangService);
- historyItems: WritableSignal> = signal(this.displayHistory() ?? []);
- historyFiles: WritableSignal> = signal(this.displayFilesHistory() ?? []);
+ historyItems: WritableSignal = signal([]);
+ historyFiles: WritableSignal = signal([]);
async displayHistory() {
const history = await this.history.getAllHistory();
@@ -23,14 +23,19 @@ export class HistoryListComponent {
return history;
}
+ async ngOnInit() {
+ this.historyItems.set(await this.displayHistory());
+ this.historyFiles.set(await this.displayFilesHistory());
+ }
+
async delById(id: number) {
await this.history.deleteHistoryItem(id);
- this.historyItems.update(value => this.history.getAllHistory())
+ this.historyItems.set(await this.history.getAllHistory());
}
async clearHistory() {
await this.history.clearHistory();
- this.historyItems.update(value => this.history.getAllHistory())
+ this.historyItems.set(await this.history.getAllHistory());
}
async displayFilesHistory() {
@@ -42,21 +47,21 @@ export class HistoryListComponent {
async clearFileHistory() {
await this.fileHistory.clearHistory();
- this.historyFiles.update(value => this.fileHistory.getAllHistory())
+ this.historyFiles.set(await this.fileHistory.getAllHistory());
this.getTotalSizeAndCount()
}
async delFileById(id: number) {
await this.fileHistory.deleteHistoryItem(id);
- this.historyFiles.update(value => this.fileHistory.getAllHistory())
+ this.historyFiles.set(await this.fileHistory.getAllHistory());
this.getTotalSizeAndCount()
}
fileSize = signal(0);
- fileCount= signal(0);
+ fileCount = signal(0);
async getTotalSizeAndCount() {
- const {count, size} = await this.fileHistory.getTotalSizeAndCount()
+ const { count, size } = await this.fileHistory.getTotalSizeAndCount()
this.fileSize.set(size)
this.fileCount.set(count)
diff --git a/src/app/link-parser/data-access/link-parser-settings.service.ts b/src/app/link-parser/data-access/link-parser-settings.service.ts
index 2d94b41..cc33fec 100644
--- a/src/app/link-parser/data-access/link-parser-settings.service.ts
+++ b/src/app/link-parser/data-access/link-parser-settings.service.ts
@@ -54,20 +54,20 @@ export class LinkParserSettingsService {
/**
*
*/
- seasonalTheme!: WritableSignal;
+ seasonalTheme: WritableSignal = signal(false);
initSeasonalTheme() {
if (!isPlatformBrowser(this.platformId)) return;
const n = localStorage.getItem('seasonalTheme') === null ? true : Boolean(localStorage.getItem('seasonalTheme') == 'true');
- this.seasonalTheme = signal(n);
+ this.seasonalTheme.set(n);
this.setSeasonalTheme(n);
}
setSeasonalTheme(n: boolean) {
if (!isPlatformBrowser(this.platformId)) return;
- this.seasonalTheme.update(v => n);
+ this.seasonalTheme.set(n);
localStorage.setItem('seasonalTheme', n.toString())
}
diff --git a/src/app/link-parser/data-access/link-parser.service.ts b/src/app/link-parser/data-access/link-parser.service.ts
index 776b823..27a54d7 100644
--- a/src/app/link-parser/data-access/link-parser.service.ts
+++ b/src/app/link-parser/data-access/link-parser.service.ts
@@ -1,5 +1,6 @@
-import { Injectable, signal } from '@angular/core';
+import { Inject, Injectable, signal, Type } from '@angular/core';
import { LinkParseResult, LinkParser } from '../utils';
+import { LINK_PARSERS } from './parser.tokens';
@Injectable({
providedIn: 'root'
@@ -21,7 +22,9 @@ export class LinkParserService {
parsers: LinkParser[] = [];
- constructor() { }
+ constructor(@Inject(LINK_PARSERS) parserClasses: Type[]) {
+ this.parsers = parserClasses.map(Parser => new Parser());
+ }
parse(link: string): LinkParseResult | null {
diff --git a/src/app/link-parser/data-access/parser.providers.ts b/src/app/link-parser/data-access/parser.providers.ts
new file mode 100644
index 0000000..274e5bf
--- /dev/null
+++ b/src/app/link-parser/data-access/parser.providers.ts
@@ -0,0 +1,19 @@
+// parser.providers.ts
+import { JsonLinkParser, NhentaiLinkParser, PixivLinkParser, RedditLinkParser, TelegraphLinkParser, YandereParser, ZenkoLinkParser, ImgurLinkParser, MangadexLinkParser } from '../utils';
+import { ImgchestLinkParser } from '../utils/imgchest-link-parser';
+import { LINK_PARSERS } from './parser.tokens';
+
+export const parserProviders = [{
+ provide: LINK_PARSERS, useValue: [
+ ImgurLinkParser,
+ MangadexLinkParser,
+ TelegraphLinkParser,
+ RedditLinkParser,
+ ZenkoLinkParser,
+ NhentaiLinkParser,
+ YandereParser,
+ PixivLinkParser,
+ ImgchestLinkParser,
+ JsonLinkParser
+ ]
+}];
\ No newline at end of file
diff --git a/src/app/link-parser/data-access/parser.tokens.ts b/src/app/link-parser/data-access/parser.tokens.ts
new file mode 100644
index 0000000..0779795
--- /dev/null
+++ b/src/app/link-parser/data-access/parser.tokens.ts
@@ -0,0 +1,6 @@
+import { InjectionToken, Type } from '@angular/core';
+import { LinkParser } from '../utils';
+
+export const LINK_PARSERS = new InjectionToken[]>(
+ 'Available link parsers'
+);
\ No newline at end of file
diff --git a/src/app/link-parser/link-parser.module.ts b/src/app/link-parser/link-parser.module.ts
index 90cd26e..a041e6f 100644
--- a/src/app/link-parser/link-parser.module.ts
+++ b/src/app/link-parser/link-parser.module.ts
@@ -11,7 +11,17 @@ import { FooterComponent } from './ui/footer/footer.component';
import { HeaderComponent } from './ui/header/header.component';
import { HistoryModule } from '../history/history.module';
import { ParserFormComponent } from './ui/parser-form/parser-form.component';
+import { GoButtonComponent } from './ui/go-button/go-button.component';
+import { parserProviders } from './data-access/parser.providers';
+import { LinkParserService } from './data-access/link-parser.service';
+import { LinkParserFacade, LinkInitFacade, NavigationFacade, FileNetFacade } from './ui/parser-form/facades';
+const FACADES = [
+ LinkParserFacade,
+ LinkInitFacade,
+ NavigationFacade,
+ FileNetFacade
+];
@NgModule({
declarations: [
@@ -20,7 +30,8 @@ import { ParserFormComponent } from './ui/parser-form/parser-form.component';
SettingsComponent,
FooterComponent,
HeaderComponent,
- ParserFormComponent
+ ParserFormComponent,
+ GoButtonComponent
],
imports: [
CommonModule,
@@ -28,6 +39,9 @@ import { ParserFormComponent } from './ui/parser-form/parser-form.component';
FormsModule,
SharedModule,
HistoryModule
+ ],
+ providers: [
+ ...FACADES
]
})
export class LinkParserModule { }
diff --git a/src/app/link-parser/link-parser/link-parser.component.ts b/src/app/link-parser/link-parser/link-parser.component.ts
index 9c3cfb3..6c72842 100644
--- a/src/app/link-parser/link-parser/link-parser.component.ts
+++ b/src/app/link-parser/link-parser/link-parser.component.ts
@@ -16,7 +16,6 @@ import { FileService } from '../../file/data-access/file.service';
'./themes/halloween.scss',
'./themes/newyear.scss',
'./themes/valentine.scss'
-
],
standalone: false,
changeDetection: ChangeDetectionStrategy.OnPush,
@@ -34,7 +33,7 @@ export class LinkParserComponent {
constructor() { }
ngOnInit() {
- // this.initMeta()
+ this.initMeta()
this.lang.langChanged$.pipe(take(1)).subscribe(() => {
this.initMeta()
});
diff --git a/src/app/link-parser/ui/go-button/go-button.component.html b/src/app/link-parser/ui/go-button/go-button.component.html
new file mode 100644
index 0000000..eb7c85f
--- /dev/null
+++ b/src/app/link-parser/ui/go-button/go-button.component.html
@@ -0,0 +1,9 @@
+@if (data()) {
+
+ {{ ph().letsgo }}
+
+
+ {{ data().id }}
+
+
+}
\ No newline at end of file
diff --git a/src/app/link-parser/ui/go-button/go-button.component.scss b/src/app/link-parser/ui/go-button/go-button.component.scss
new file mode 100644
index 0000000..2de6e19
--- /dev/null
+++ b/src/app/link-parser/ui/go-button/go-button.component.scss
@@ -0,0 +1,37 @@
+.go-btn {
+ display: flex;
+ gap: 1ch;
+ align-items: center;
+ --dot-color: var(--border-color);
+ border: var(--border-size) solid var(--dot-color);
+ --stroke: #002741;
+ --gl: radial-gradient(circle 1px at 0px 0px, var(--dot-color) 1px, transparent 0);
+ --bg-1: var(--gl) 0px 0px / 8px 8px;
+ --bg-2: var(--gl) 0px 0px / 4px 4px, var(--gl) 1.5px 1.5px / 4px 4px;
+ background: var(--bg-1);
+
+ text-transform: uppercase;
+ font-weight: bold;
+ box-shadow: var(--shadow-2);
+
+ @media (prefers-color-scheme: light) {
+ --dot-color: #166496;
+ color: #166496;
+ --stroke: #eceff2;
+ }
+
+ &:hover,
+ &:focus {
+ background: var(--bg-2);
+ color: var(--accent);
+ }
+
+ &:active {
+ box-shadow: 0 0 transparent;
+ }
+}
+
+.favicon {
+ width: 1.25rem;
+ aspect-ratio: 1;
+}
\ No newline at end of file
diff --git a/src/app/link-parser/ui/go-button/go-button.component.ts b/src/app/link-parser/ui/go-button/go-button.component.ts
new file mode 100644
index 0000000..5ff2c18
--- /dev/null
+++ b/src/app/link-parser/ui/go-button/go-button.component.ts
@@ -0,0 +1,14 @@
+import { Component, input } from '@angular/core';
+import { Phrases } from '../../../shared/utils/phrases';
+
+@Component({
+ selector: 'app-go-button',
+ standalone: false,
+
+ templateUrl: './go-button.component.html',
+ styleUrl: './go-button.component.scss'
+})
+export class GoButtonComponent {
+ data = input();
+ ph = input.required();
+}
diff --git a/src/app/link-parser/ui/parser-form/facades/file-net.facade.ts b/src/app/link-parser/ui/parser-form/facades/file-net.facade.ts
new file mode 100644
index 0000000..8797b55
--- /dev/null
+++ b/src/app/link-parser/ui/parser-form/facades/file-net.facade.ts
@@ -0,0 +1,22 @@
+import { Injectable, computed } from '@angular/core';
+import { FileService } from '../../../../file/data-access/file.service';
+import { NetworkService } from '../../../../shared/data-access/network.service';
+import { LangService } from '../../../../shared/data-access/lang.service';
+
+@Injectable({ providedIn: 'root' })
+export class FileNetFacade {
+ constructor(
+ public file: FileService,
+ public net: NetworkService,
+ private lang: LangService
+ ) { }
+
+ readonly openFileLabel = computed(() => {
+ const ph = this.lang.ph();
+ const label = this.net.online()
+ ? `๐ ${ph.orOpenFile}`
+ : `๐ ${ph.openFile}`;
+
+ return `${label} (${this.file.supportFiles()})`;
+ });
+}
\ No newline at end of file
diff --git a/src/app/link-parser/ui/parser-form/facades/index.ts b/src/app/link-parser/ui/parser-form/facades/index.ts
new file mode 100644
index 0000000..35c1b15
--- /dev/null
+++ b/src/app/link-parser/ui/parser-form/facades/index.ts
@@ -0,0 +1,4 @@
+export * from './link-init.facade';
+export * from './link-parser.facade';
+export * from './navigation.facade';
+export * from './file-net.facade';
\ No newline at end of file
diff --git a/src/app/link-parser/ui/parser-form/facades/link-init.facade.ts b/src/app/link-parser/ui/parser-form/facades/link-init.facade.ts
new file mode 100644
index 0000000..0f599d5
--- /dev/null
+++ b/src/app/link-parser/ui/parser-form/facades/link-init.facade.ts
@@ -0,0 +1,39 @@
+import { Injectable, inject } from '@angular/core';
+import { ActivatedRoute } from '@angular/router';
+import { LinkParserSettingsService } from '../../../data-access/link-parser-settings.service';
+import { LinkParserFacade } from './link-parser.facade';
+
+@Injectable()
+export class LinkInitFacade {
+ private route = inject(ActivatedRoute);
+ public setts = inject(LinkParserSettingsService);
+ private linkFacade = inject(LinkParserFacade);
+
+ async init() {
+ const routeUrl = this.route.snapshot.paramMap.get('url');
+ const queryUrl = this.route.snapshot.queryParamMap.get('url');
+
+ if (routeUrl) {
+ this.linkFacade.setLink(routeUrl);
+ return 'route';
+ }
+
+ if (queryUrl) {
+ this.linkFacade.setLink(queryUrl);
+ return 'query';
+ }
+
+ if (this.setts.autoPasteLink && this.setts.autoPasteLink()) {
+ try {
+ const text = await navigator.clipboard.readText();
+ this.linkFacade.setLink(text ?? '');
+ if (!this.linkFacade.linkParams()) this.linkFacade.clear();
+ return 'clipboard';
+ } catch {
+ return 'none';
+ }
+ }
+
+ return 'none';
+ }
+}
\ No newline at end of file
diff --git a/src/app/link-parser/ui/parser-form/facades/link-parser.facade.ts b/src/app/link-parser/ui/parser-form/facades/link-parser.facade.ts
new file mode 100644
index 0000000..bdf2661
--- /dev/null
+++ b/src/app/link-parser/ui/parser-form/facades/link-parser.facade.ts
@@ -0,0 +1,55 @@
+// link-parser.facade.ts
+import { Injectable, computed, signal, Signal } from '@angular/core';
+import { LinkParserService } from '../../../data-access/link-parser.service';
+import { Base64 } from '../../../../shared/utils';
+import { LinkParseResult } from '../../../utils';
+
+const FAVICONS: Map = new Map([
+ ['zenko', '//zenko.online/favicon.ico'],
+ ['reddit', '//reddit.com/favicon.ico'],
+ ['imgur', '//imgur.com/favicon.ico'],
+ ['mangadex', '//mangadex.org/favicon.ico'],
+ ['telegraph', '//telegra.ph/favicon.ico'],
+ ['nhentai', '//nhentai.net/favicon.ico'],
+ ['yandere', '//yande.re/favicon.ico'],
+ ['pixiv', '//pixiv.net/favicon.ico'],
+ ['imgchest', '//imgchest.com/assets/img/favicons/favicon-32x32.png?v=2'],
+ ['read', 'data:image/svg+xml,']
+]);
+
+@Injectable()
+export class LinkParserFacade {
+ constructor(private parser: LinkParserService) { }
+
+ readonly link = signal('');
+
+ readonly linkParams: Signal = computed(() =>
+ this.parser.parse(this.link())
+ );
+
+ readonly linkData = computed(() => {
+ const params = this.linkParams();
+ if (!params) return null;
+
+ return {
+ site: params.site,
+ id: params.id,
+ id64: Base64.toBase64(params.id),
+ favicon: FAVICONS.get(params.site)
+ };
+ });
+
+ setLink(value: string) {
+ this.link.set(value);
+ }
+
+ inputLink(event: Event) {
+ const v: string = (event.target as HTMLInputElement).value;
+
+ this.setLink(v)
+ }
+
+ clear() {
+ this.setLink('');
+ }
+}
\ No newline at end of file
diff --git a/src/app/link-parser/ui/parser-form/facades/navigation.facade.ts b/src/app/link-parser/ui/parser-form/facades/navigation.facade.ts
new file mode 100644
index 0000000..ac72eef
--- /dev/null
+++ b/src/app/link-parser/ui/parser-form/facades/navigation.facade.ts
@@ -0,0 +1,14 @@
+import { Injectable } from '@angular/core';
+import { Router } from '@angular/router';
+import { LinkParserFacade } from './link-parser.facade';
+
+@Injectable()
+export class NavigationFacade {
+ constructor(private router: Router, private linkFacade: LinkParserFacade) { }
+
+ goToParsedLink() {
+ const data = this.linkFacade.linkData();
+ if (!data) return;
+ this.router.navigateByUrl(`/${data.site}/${data.id64}`);
+ }
+}
\ No newline at end of file
diff --git a/src/app/link-parser/ui/parser-form/parser-form.component.html b/src/app/link-parser/ui/parser-form/parser-form.component.html
index fa4fffe..87f690e 100644
--- a/src/app/link-parser/ui/parser-form/parser-form.component.html
+++ b/src/app/link-parser/ui/parser-form/parser-form.component.html
@@ -1,6 +1,5 @@
@let ph = lang.ph();
-@let online = net.online();
-@let openFileLabel = (online) ? '๐ '+ph.orOpenFile: '๐ '+ph.openFile;
+@let online = fileNetFacade.net.online();
@if (online === false ) {
@@ -9,37 +8,21 @@
}
-
+
@if (online) {
-
}
-
-
+
\ No newline at end of file
diff --git a/src/app/link-parser/ui/parser-form/parser-form.component.scss b/src/app/link-parser/ui/parser-form/parser-form.component.scss
index 3d67cda..ba828dd 100644
--- a/src/app/link-parser/ui/parser-form/parser-form.component.scss
+++ b/src/app/link-parser/ui/parser-form/parser-form.component.scss
@@ -98,10 +98,7 @@ input[type=url]::placeholder {
opacity: 0.6;
}
-.favicon {
- width: 1.25rem;
- aspect-ratio: 1;
-}
+
.site-name {
text-transform: uppercase;
@@ -127,38 +124,7 @@ input[type=url]::placeholder {
text-wrap: balance;
}
-.go-btn {
- display: flex;
- gap: 1ch;
- align-items: center;
- --dot-color: var(--border-color);
- border: var(--border-size) solid var(--dot-color);
- --stroke: #002741;
- --gl: radial-gradient(circle 1px at 0px 0px, var(--dot-color) 1px, transparent 0);
- --bg-1: var(--gl) 0px 0px / 8px 8px;
- --bg-2: var(--gl) 0px 0px / 4px 4px, var(--gl) 1.5px 1.5px / 4px 4px;
- background: var(--bg-1);
-
- text-transform: uppercase;
- font-weight: bold;
- box-shadow: var(--shadow-2);
-
- @media (prefers-color-scheme: light) {
- --dot-color: #166496;
- color: #166496;
- --stroke: #eceff2;
- }
- &:hover,
- &:focus {
- background: var(--bg-2);
- color: var(--accent);
- }
-
- &:active {
- box-shadow: 0 0 transparent;
- }
-}
.offline-banner {
border-radius: .5ch;
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 cad0761..5df1f2e 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
@@ -1,13 +1,6 @@
-import { ChangeDetectionStrategy, Component, computed, inject, PLATFORM_ID, signal, Signal, WritableSignal } from '@angular/core';
-import { ActivatedRoute, Router } from '@angular/router';
+import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
import { LangService } from '../../../shared/data-access/lang.service';
-import { Base64 } from '../../../shared/utils';
-import { LinkParserSettingsService } from '../../data-access/link-parser-settings.service';
-import { LinkParserService } from '../../data-access/link-parser.service';
-import { ImgurLinkParser, MangadexLinkParser, TelegraphLinkParser, RedditLinkParser, ZenkoLinkParser, NhentaiLinkParser, YandereParser, PixivLinkParser, JsonLinkParser } from '../../utils';
-import { ImgchestLinkParser } from '../../utils/imgchest-link-parser';
-import { NetworkService, BrowserService } from '../../../shared/data-access/';
-import { FileService } from '../../../file/data-access/file.service';
+import { FileNetFacade, LinkInitFacade, LinkParserFacade, NavigationFacade } from './facades';
@Component({
selector: 'app-parser-form',
@@ -17,114 +10,17 @@ import { FileService } from '../../../file/data-access/file.service';
changeDetection: ChangeDetectionStrategy.OnPush
})
export class ParserFormComponent {
- private router: Router = inject(Router);
- private route: ActivatedRoute = inject(ActivatedRoute);
- file = inject(FileService);
- setts = inject(LinkParserSettingsService)
- net = inject(NetworkService);
- browser = inject(BrowserService);
- platformId = inject(PLATFORM_ID)
- link: WritableSignal = signal('');
- linkParams: Signal = computed(() => this.parser.parse(this.link()));
- linkParams64: Signal = computed(() => {
- const foo = this.linkParams()
- return {
- site: foo.site,
- id: Base64.toBase64(foo.id)
- };
- });
-
- osAcceptSupport = signal(["Windows", "Android", "Linux"].includes(this.browser.brouserInfo().os));
-
- constructor(public parser: LinkParserService, public lang: LangService) {
- 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 ImgchestLinkParser)
- // this.parser.parsers.push(new BlankaryLinkParser)
- this.parser.parsers.push(new JsonLinkParser)
- }
-
- inputLink(event: Event) {
- const v: string = (event.target as HTMLInputElement).value;
-
- this.link.set(v)
- }
+ protected lang = inject(LangService);
+ protected linkFacade = inject(LinkParserFacade);
+ protected navFacade = inject(NavigationFacade);
+ protected fileNetFacade = inject(FileNetFacade);
+ protected linkInit = inject(LinkInitFacade);
ngOnInit() {
- this.initUrl()
- }
-
- async initFromclipboard() {
- try {
- const text = await navigator.clipboard?.readText()
- this.link.set(text ?? '')
- } catch (error) { }
-
- if (!this.linkParams()) { this.link.set('') }
- }
-
- initUrl() {
-
- const routeParamUrl: string | null = this.route.snapshot.paramMap.get('url');
-
- if (routeParamUrl) {
-
- this.link.set(routeParamUrl);
-
- this.onSubmit();
-
- return;
- }
-
- const queryParamUrl: string | null = this.route.snapshot.queryParamMap.get('url');
-
- if (queryParamUrl) {
- this.link.set(queryParamUrl ?? '')
- } else {
- if (this.setts.autoPasteLink && this.setts.autoPasteLink()) this.initFromclipboard();
- }
- }
-
- onSubmit() {
- if (!this.linkParams) return;
-
- const link = `/${this.linkParams().site}/${this.linkParams64().id}`
-
- this.router.navigateByUrl(link);
+ this.linkInit.init().then(source => {
+ if (source === 'route') {
+ this.navFacade.goToParsedLink();
+ }
+ });
}
-
- favicons: any = {
- zenko: '//zenko.online/favicon.ico',
- reddit: '//reddit.com/favicon.ico',
- imgur: '//imgur.com/favicon.ico',
- mangadex: '//mangadex.org/favicon.ico',
- telegraph: '//telegra.ph/favicon.ico',
- nhentai: '//nhentai.net/favicon.ico',
- // comick: '//comick.art/favicon.ico',
- yandere: '//yande.re/favicon.ico',
- pixiv: '//pixiv.net/favicon.ico',
- imgchest: '//imgchest.com/assets/img/favicons/favicon-32x32.png?v=2',
- // blankary: '//blankary.com/favicon.ico',
- read: 'data:image/svg+xml,'
- }
-
- seasonalTheme = signal(new Map([
- ["pride", { class: 'slogan-rainbow', phrase: "sloganPride", emoji: '๐ณ๏ธโ๐' }],
- ["halloween", { class: 'slogan-halloween', phrase: 'sloganHalloween', emoji: '๐ท๏ธ' }],
- ["newyear", { class: 'slogan-newyear', phrase: 'sloganNewYear', emoji: '๐' }],
- ["valentine", { class: 'slogan-valentine', phrase: 'sloganValentine', emoji: 'โค๏ธ๐' }]
- ]));
-
}
diff --git a/src/app/list/list-shell/list-shell.component.ts b/src/app/list/list-shell/list-shell.component.ts
index 632842e..07d609d 100644
--- a/src/app/list/list-shell/list-shell.component.ts
+++ b/src/app/list/list-shell/list-shell.component.ts
@@ -1,10 +1,8 @@
-import { Component, EffectCleanupRegisterFn, WritableSignal, computed, effect, inject, signal } from '@angular/core';
+import { Component, WritableSignal, computed, inject, signal } from '@angular/core';
import { LinkParserService } from '../../link-parser/data-access/link-parser.service';
-import { BlankaryLinkParser, ImgurLinkParser, JsonLinkParser, LinkParser, MangadexLinkParser, NhentaiLinkParser, PixivLinkParser, RedditLinkParser, TelegraphLinkParser, YandereParser, ZenkoLinkParser } from '../../link-parser/utils';
+import { JsonLinkParser, LinkParser } from '../../link-parser/utils';
import { DomManipulationService } from '../../shared/data-access';
import { LangService } from '../../shared/data-access/lang.service';
-import { ComickLinkParser } from '../../link-parser/utils/comick-link-parser';
-import { ImgchestLinkParser } from '../../link-parser/utils/imgchest-link-parser';
@Component({
@@ -75,29 +73,11 @@ export class ListShellComponent {
}
}
- constructor() {
- this.initParser();
- }
+ constructor() { }
firstLink = computed(() => this.listValue()[0] ?? '');
parsedFirstLink = computed(() => this.parser.parse(this.firstLink() ?? ''))
- 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 ImgchestLinkParser)
- // this.parser.parsers.push(new BlankaryLinkParser)
- this.parser.parsers.push(new JsonLinkParser)
- }
-
copy() {
this.domMan.copyToClipboard(JSON.stringify(this.outputValue()))
}
diff --git a/src/app/list/list.module.ts b/src/app/list/list.module.ts
index 6ebf97d..58314f0 100644
--- a/src/app/list/list.module.ts
+++ b/src/app/list/list.module.ts
@@ -5,6 +5,8 @@ import { ListRoutingModule } from './list-routing.module';
import { ListShellComponent } from './list-shell/list-shell.component';
import { FormsModule } from '@angular/forms';
import { SharedModule } from '../shared/shared.module';
+import { LinkParserService } from '../link-parser/data-access/link-parser.service';
+import { parserProviders } from '../link-parser/data-access/parser.providers';
@NgModule({
diff --git a/src/app/shared/data-access/dom-manipulation.service.ts b/src/app/shared/data-access/dom-manipulation.service.ts
index 9328adf..9e8dd81 100644
--- a/src/app/shared/data-access/dom-manipulation.service.ts
+++ b/src/app/shared/data-access/dom-manipulation.service.ts
@@ -99,4 +99,8 @@ export class DomManipulationService {
this._lastHover = el;
}
+
+ isInteractiveElement(el: HTMLElement) {
+ return ['INPUT', 'TEXTAREA', 'SELECT', 'SUMMARY'].includes(el.nodeName);
+ }
}
diff --git a/src/app/shared/data-access/viewer.service.ts b/src/app/shared/data-access/viewer.service.ts
index 38f8fd9..9b635db 100644
--- a/src/app/shared/data-access/viewer.service.ts
+++ b/src/app/shared/data-access/viewer.service.ts
@@ -84,10 +84,7 @@ export class ViewerService {
const currentOpt = this.viewModeOption();
const currentIndex = this.viewModeOptions.indexOf(currentOpt);
const nextIndex = (currentIndex + 1) % this.viewModeOptions.length;
-
-
const nextOpt = this.viewModeOptions[nextIndex];
- console.log(currentIndex, this.viewModeOptions, nextOpt.hintPhraceKey);
this.setViewModeOption(nextOpt);
}
}
diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts
index f2c79fa..62ccd91 100644
--- a/src/app/shared/shared.module.ts
+++ b/src/app/shared/shared.module.ts
@@ -2,7 +2,6 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { TruncatePipe } from './utils/truncate.pipe';
import { TextEmbracerComponent } from './ui/text-embracer/text-embracer.component';
-import { ViewerComponent } from './ui/viewer/viewer.component';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import { WarmFilterComponent } from './ui/warm-filter/warm-filter.component';
@@ -17,46 +16,25 @@ import { LangToggleComponent } from './ui/lang-toggle/lang-toggle.component';
import { TitleCardComponent } from './ui/title-card/title-card.component';
import { LoadingComponent } from './ui/loading/loading.component';
import { SeparatorComponent } from './ui/separator/separator.component';
-import { MangaPageComponent } from './ui/manga-page/manga-page.component';
-import { HintPageComponent } from './ui/viewer/components/hint-page/hint-page.component';
-import { ViewerFooterComponent } from './ui/viewer/components/viewer-footer/viewer-footer.component';
-import { ViewerHeaderComponent } from './ui/viewer/components/viewer-header/viewer-header.component';
-import { MangaPageEvenComponent } from './ui/manga-page/manga-page-even.component';
import { FileChangeComponent } from './ui/file-change/file-change.component';
import { ChytankaLogoWithTagsComponent } from './ui/chytanka-logo-with-tags/chytanka-logo-with-tags.component';
import { FileSizePipe } from './pipes/filesize.pipe';
import { RoughPaperComponent } from './ui/filters/rough-paper/rough-paper.component';
import { SharpenComponent } from './ui/filters/sharpen/sharpen.component';
-import { ThanksPageComponent } from './ui/viewer/components/thanks-page/thanks-page.component';
import { ImgMetaDirective } from './directives/img-meta.directive';
import { NewTabDirective } from './directives/new-tab.directive';
import { VibrateHapticDirective } from './directives/vibrate-haptic.directive';
import { GamepadCursorComponent } from './ui/gamepad-cursor/gamepad-cursor.component';
import { SircleBlurComponent } from './ui/filters/sircle-blur/sircle-blur.component';
-import { PageComponent } from './ui/viewer/components/page/page.component';
-import { EpisodeInfoTableComponent } from './ui/viewer/components/episode-info-table/episode-info-table.component';
-import { EpisodeShareFormComponent } from './ui/viewer/components/episode-share-form/episode-share-form.component';
-import { EpisodeDownloadFormComponent } from './ui/viewer/components/episode-download-form/episode-download-form.component';
import { DropZoneComponent } from './ui/drop-zone/drop-zone.component';
+import { SourceCopyrightComponent } from './ui/source-copyright/source-copyright.component';
+import { SourceCopyrightLogoComponent } from './ui/source-copyright-logo/source-copyright-logo.component';
+import { SloganComponent } from './ui/slogan/slogan.component';
-const components = [GamepadCursorComponent, TruncatePipe, TextEmbracerComponent, ViewerComponent, OverlayComponent, ViewModeBarComponent, MadeInUkraineComponent, DialogComponent, LangToggleComponent, TitleCardComponent, LoadingComponent, SeparatorComponent, FileChangeComponent, ChytankaLogoWithTagsComponent, FileSizePipe, VibrateHapticDirective, SircleBlurComponent, PageComponent, EpisodeInfoTableComponent, EpisodeShareFormComponent, EpisodeDownloadFormComponent, DropZoneComponent]
+const components = [GamepadCursorComponent, TruncatePipe, TextEmbracerComponent, OverlayComponent, ViewModeBarComponent, MadeInUkraineComponent, DialogComponent, LangToggleComponent, TitleCardComponent, LoadingComponent, SeparatorComponent, FileChangeComponent, ChytankaLogoWithTagsComponent, FileSizePipe, VibrateHapticDirective, SircleBlurComponent, DropZoneComponent, SourceCopyrightComponent, SourceCopyrightLogoComponent, SloganComponent, NsfwWarningComponent, ImgMetaDirective, NewTabDirective, PagesIndicatorComponent, WarmFilterComponent, WarmControlComponent]
@NgModule({
- declarations: [
- WarmFilterComponent,
- WarmControlComponent,
- PagesIndicatorComponent,
- NsfwWarningComponent,
- MangaPageComponent,
- HintPageComponent,
- ViewerFooterComponent,
- ViewerHeaderComponent,
- MangaPageEvenComponent,
- ThanksPageComponent,
- ImgMetaDirective,
- NewTabDirective,
- ...components
- ],
+ declarations: [...components],
imports: [
CommonModule,
FormsModule,
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 af75abe..d49b595 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,6 +1,6 @@
@let online = net.isReallyOnline();
-
+