This commit is contained in:
Mr. Stallion 2020-04-19 12:06:50 -05:00
parent 4263ea2af4
commit 58076f9ab8
12 changed files with 45 additions and 30 deletions

View File

@ -109,8 +109,21 @@
resultsComplete = false;
characterImage = characterImage;
options!: ExtendedSearchData;
data: ExtendedSearchData = {kinks: [], genders: [], orientations: [], languages: [], furryprefs: [], roles: [], positions: [], species: []};
listItems: ReadonlyArray<keyof SearchData> = ['genders', 'orientations', 'languages', 'furryprefs', 'roles', 'positions']; // SearchData is correct
data: ExtendedSearchData = {
kinks: [],
genders: [],
orientations: [],
languages: [],
furryprefs: [],
roles: [],
positions: [],
species: []
};
listItems: ReadonlyArray<keyof SearchData> = [
'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');
}

View File

@ -38,7 +38,7 @@
@Prop({required: true})
readonly curSearch!: ExtendedSearchData | undefined;
history: (ExtendedSearchData|SearchData)[] = [];
history: (ExtendedSearchData | SearchData)[] = [];
selectedSearch: number | null = null;

View File

@ -101,8 +101,7 @@
<script lang="ts">
import {Component, Hook} from '@f-list/vue-ts';
import * as SortableBase from 'sortablejs';
const Sortable = (SortableBase as any).Sortable;
import Sortable from 'sortablejs';
import Vue from 'vue';
import {Keys} from '../keys';
@ -159,7 +158,7 @@
Sortable.create(<HTMLElement>this.$refs['privateConversations'], {
animation: 50,
fallbackTolerance: 5,
onEnd: async(e: any) => {
onEnd: async(e) => {
if(e.oldIndex === e.newIndex) return;
return core.conversations.privateConversations[e.oldIndex!].sort(e.newIndex!);
}
@ -167,7 +166,7 @@
Sortable.create(<HTMLElement>this.$refs['channelConversations'], {
animation: 50,
fallbackTolerance: 5,
onEnd: async(e: any) => {
onEnd: async(e) => {
if(e.oldIndex === e.newIndex) return;
return core.conversations.channelConversations[e.oldIndex!].sort(e.newIndex!);
}

View File

@ -181,11 +181,11 @@ export class AdManager {
}
protected static recoverableCharacter: string = '';
protected static recoverableCharacter = '';
protected static recoverableAds: RecoverableAd[] = [];
static onConnectionClosed() {
static onConnectionClosed(): void {
AdManager.recoverableCharacter = core.characters.ownCharacter.name;
AdManager.recoverableAds = _.map(
@ -210,7 +210,7 @@ export class AdManager {
}
static onNewChannelAvailable(channel: ChannelConversation) {
static onNewChannelAvailable(channel: ChannelConversation): void {
if (AdManager.recoverableCharacter !== core.characters.ownCharacter.name) {
AdManager.recoverableAds = [];
AdManager.recoverableCharacter = '';

View File

@ -1,4 +1,4 @@
import * as Raven from 'raven-js';
import Raven from 'raven-js';
import Vue from 'vue';
/*tslint:disable:no-unsafe-any no-any*///hack
@ -68,4 +68,4 @@ export function setupRaven(dsn: string, version: string): void {
(<Window & {onunhandledrejection(e: PromiseRejectionEvent): void}>window).onunhandledrejection = (e: PromiseRejectionEvent) => {
Raven.captureException(<Error>e.reason);
};
}
}

View File

@ -85,7 +85,7 @@
import * as fs from 'fs';
import * as path from 'path';
import * as qs from 'querystring';
import * as Raven from 'raven-js';
import Raven from 'raven-js';
import {promisify} from 'util';
import Vue from 'vue';
import Chat from '../chat/Chat.vue';

View File

@ -34,10 +34,7 @@
</template>
<script lang="ts">
import * as SortableBase from 'sortablejs';
const Sortable = (SortableBase as any).Sortable;
import * as _ from 'lodash';
import Sortable from 'sortablejs';
import {Component, Hook} from '@f-list/vue-ts';
import * as electron from 'electron';
@ -155,7 +152,7 @@
Sortable.create(<HTMLElement>this.$refs['tabs'], {
animation: 50,
onEnd: (e: any) => {
onEnd: (e) => {
if(e.oldIndex === e.newIndex) return;
const tab = this.tabs.splice(e.oldIndex!, 1)[0];
this.tabs.splice(e.newIndex!, 0, tab);

View File

@ -9,7 +9,9 @@
"forceConsistentCasingInFileNames": true,
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true
"noUnusedParameters": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true
},
"include": ["main.ts"]
}
}

View File

@ -10,7 +10,9 @@
"strict": true,
"forceConsistentCasingInFileNames": true,
"noUnusedLocals": true,
"noUnusedParameters": true
"noUnusedParameters": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true
},
"include": ["chat.ts", "window.ts", "../**/*.d.ts"]
}
}

View File

@ -60,7 +60,7 @@
import {Component, Hook} from '@f-list/vue-ts';
import Axios from 'axios';
import * as qs from 'qs';
import * as Raven from 'raven-js';
import Raven from 'raven-js';
import Vue from 'vue';
import Chat from '../chat/Chat.vue';
import core from '../chat/core';

View File

@ -84,7 +84,6 @@ This repository contains a heavily customized version of the mainline F-Chat 3.0
1. 'Underage' kink is considered to apply to characters aged 16 or above; 'ageplay' kink is considered to apply to characters aged 16 or below.
1. 'Older characters' and 'younger characters' kink preferences are interpreted as age difference of 5+ years.
1. Comparison results will get faster over time, as more and more character data is cached.
1. Loading animation
## Todo / Ideas
@ -97,6 +96,7 @@ This repository contains a heavily customized version of the mainline F-Chat 3.0
* Bug? Usually submissive vs usually submissive shows up as 'maybe'
* Bug? YOU have 'loves humans'; THEY have 'no furry characters, just humans' -- THEIR ad shows green, not red -- your side of comparison is fully green, they just have 'no furry pairings' in red
* Bug? [color] acts weird
* Add new chat is case sensitive
# F-List Exported

View File

@ -9,7 +9,9 @@
"forceConsistentCasingInFileNames": true,
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true
"noUnusedParameters": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true
},
"include": ["./electron/main.ts"]
}
}