From 58076f9ab87199472ec97cc2518aaa7cdb19b478 Mon Sep 17 00:00:00 2001 From: "Mr. Stallion" Date: Sun, 19 Apr 2020 12:06:50 -0500 Subject: [PATCH] Cleanup --- chat/CharacterSearch.vue | 25 +++++++++++++++++++------ chat/CharacterSearchHistory.vue | 2 +- chat/ChatView.vue | 7 +++---- chat/ads/ad-manager.ts | 6 +++--- chat/vue-raven.ts | 4 ++-- electron/Index.vue | 2 +- electron/Window.vue | 7 ++----- electron/tsconfig-main.json | 6 ++++-- electron/tsconfig-renderer.json | 6 ++++-- mobile/Index.vue | 2 +- readme.md | 2 +- tsconfig.json | 6 ++++-- 12 files changed, 45 insertions(+), 30 deletions(-) diff --git a/chat/CharacterSearch.vue b/chat/CharacterSearch.vue index 197481a..46ff894 100644 --- a/chat/CharacterSearch.vue +++ b/chat/CharacterSearch.vue @@ -109,8 +109,21 @@ resultsComplete = false; characterImage = characterImage; options!: ExtendedSearchData; - data: ExtendedSearchData = {kinks: [], genders: [], orientations: [], languages: [], furryprefs: [], roles: [], positions: [], species: []}; - listItems: ReadonlyArray = ['genders', 'orientations', 'languages', 'furryprefs', 'roles', 'positions']; // SearchData is correct + + data: ExtendedSearchData = { + kinks: [], + genders: [], + orientations: [], + languages: [], + furryprefs: [], + roles: [], + positions: [], + species: [] + }; + + listItems: ReadonlyArray = [ + 'genders', 'orientations', 'languages', 'furryprefs', 'roles', 'positions' + ]; // SearchData is correct searchString = ''; @@ -233,15 +246,15 @@ return false; } - return !!_.find(this.data.species, (s) => (s.id === species)); + return !!_.find(this.data.species, (s: SearchSpecies) => (s.id === species)); } getSpeciesOptions(): SearchSpecies[] { const species = _.map( _.filter(Species, (s) => (_.isString(s))) as unknown[] as string[], - (speciesName: string) => { - const speciesId = (Species as any)[speciesName]; + (speciesName: keyof typeof Species): SearchSpecies => { + const speciesId: number = Species[speciesName]; if (speciesId in speciesNames) { return { @@ -255,7 +268,7 @@ id: speciesId }; } - ); + ) as unknown[] as SearchSpecies[]; return _.sortBy(species, 'name'); } diff --git a/chat/CharacterSearchHistory.vue b/chat/CharacterSearchHistory.vue index 508258f..c6c76eb 100644 --- a/chat/CharacterSearchHistory.vue +++ b/chat/CharacterSearchHistory.vue @@ -38,7 +38,7 @@ @Prop({required: true}) readonly curSearch!: ExtendedSearchData | undefined; - history: (ExtendedSearchData|SearchData)[] = []; + history: (ExtendedSearchData | SearchData)[] = []; selectedSearch: number | null = null; diff --git a/chat/ChatView.vue b/chat/ChatView.vue index 2697b61..a9673f0 100644 --- a/chat/ChatView.vue +++ b/chat/ChatView.vue @@ -101,8 +101,7 @@