frontend: fix typing issues

This commit is contained in:
wea_ondara
2023-12-02 20:58:10 +01:00
parent f5606b5293
commit 9887f45cf2
2 changed files with 2 additions and 2 deletions

View File

@@ -28,7 +28,6 @@ type CellData<I, V> = {
@Options({ @Options({
name: 'MangaListTable', name: 'MangaListTable',
methods: {decode},
components: {BTable, MangaEntryDetailsModal}, components: {BTable, MangaEntryDetailsModal},
}) })
export default class MangaListTable extends Vue { export default class MangaListTable extends Vue {
@@ -43,6 +42,7 @@ export default class MangaListTable extends Vue {
latestChaptersSorted = latestChaptersSorted; latestChaptersSorted = latestChaptersSorted;
latestChapterString = latestChapterString; latestChapterString = latestChapterString;
newChapterCount = newChapterCount; newChapterCount = newChapterCount;
decode = decode;
get fields(): TableFieldObject<ViewEntry>[] { get fields(): TableFieldObject<ViewEntry>[] {
return [{ return [{

View File

@@ -58,7 +58,7 @@ export default class MangaUpdatesDataService {
return str.toLowerCase().replaceAll('"', '\'').replaceAll(' - ', ' ').replaceAll(': ', ' '); return str.toLowerCase().replaceAll('"', '\'').replaceAll(' - ', ' ').replaceAll(': ', ' ');
}; };
matching = results.results matching = results.results
.filter(e => stringSimilarity(cleaner(title), cleaner(decode(e.record.title)), 2, false) >= 0.95) .filter(e => stringSimilarity(cleaner(title ?? ""), cleaner(decode(e.record.title)), 2, false) >= 0.95)
.filter(e => allowedTypes.has(e.record.type.toLowerCase())) //check if a manga or similar but not novel .filter(e => allowedTypes.has(e.record.type.toLowerCase())) //check if a manga or similar but not novel
.filter(e => m.startDate.year - 1 <= parseInt('' + e.record.year) .filter(e => m.startDate.year - 1 <= parseInt('' + e.record.year)
&& parseInt('' + e.record.year) <= m.startDate.year + 1); //check year +-1 && parseInt('' + e.record.year) <= m.startDate.year + 1); //check year +-1