More settings
This commit is contained in:
parent
f4b122c681
commit
ef123fdddc
|
@ -1,5 +1,9 @@
|
|||
# Changelog
|
||||
|
||||
## Canary
|
||||
* More conifugrable settings for F-Chat Rising
|
||||
|
||||
|
||||
## 1.3.0
|
||||
* Improved species search and matching
|
||||
* Toggle ads button shows up in channels list if you have set up ads for the channel
|
||||
|
|
|
@ -36,10 +36,10 @@
|
|||
<div v-for="character in results" :key="character.name" class="search-result" :class="'status-' + character.status">
|
||||
<template v-if="character.status === 'looking'" v-once>
|
||||
<img :src="characterImage(character.name)" v-if="showAvatars"/>
|
||||
<user :character="character" :showStatus="true" :match="true"></user>
|
||||
<user :character="character" :showStatus="true" :match="shouldShowMatch"></user>
|
||||
<bbcode :text="character.statusText"></bbcode>
|
||||
</template>
|
||||
<user v-else :character="character" :showStatus="true" :match="true" v-once></user>
|
||||
<user v-else :character="character" :showStatus="true" :match="shouldShowMatch" v-once></user>
|
||||
</div>
|
||||
</div>
|
||||
</modal>
|
||||
|
@ -110,6 +110,7 @@
|
|||
resultsComplete = false;
|
||||
characterImage = characterImage;
|
||||
options!: ExtendedSearchData;
|
||||
shouldShowMatch = true;
|
||||
|
||||
data: ExtendedSearchData = {
|
||||
kinks: [],
|
||||
|
@ -354,6 +355,9 @@
|
|||
this.results = undefined;
|
||||
return;
|
||||
}
|
||||
|
||||
this.shouldShowMatch = core.state.settings.risingComparisonInSearch;
|
||||
|
||||
this.error = '';
|
||||
const data: Connection.ClientCommands['FKS'] & {[key: string]: (string | number)[]} = {kinks: []};
|
||||
for(const key in this.data) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<modal :action="l('settings.action')" @submit="submit" @open="load()" id="settings" dialogClass="w-100">
|
||||
<tabs style="flex-shrink:0;margin-bottom:10px" v-model="selectedTab"
|
||||
:tabs="[l('settings.tabs.general'), l('settings.tabs.notifications'), 'Rising', l('settings.tabs.hideAds'), l('settings.tabs.import')]"></tabs>
|
||||
:tabs="[l('settings.tabs.general'), l('settings.tabs.notifications'), 'F-Chat Rising 🦄', l('settings.tabs.hideAds'), l('settings.tabs.import')]"></tabs>
|
||||
<div v-show="selectedTab === '0'">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="disallowedTags">{{l('settings.disallowedTags')}}</label>
|
||||
|
@ -119,22 +119,70 @@
|
|||
</div>
|
||||
</div>
|
||||
<div v-show="selectedTab === '2'">
|
||||
<h5>Matching</h5>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="risingAdScore">
|
||||
<input type="checkbox" id="risingAdScore" v-model="risingAdScore"/>
|
||||
Colorize ads, profiles, and names of compatible and incompatible characters
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="risingComparisonInUserMenu">
|
||||
<input type="checkbox" id="risingComparisonInUserMenu" v-model="risingComparisonInUserMenu"/>
|
||||
Show quick match results in the right click character menu
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="risingComparisonInSearch">
|
||||
<input type="checkbox" id="risingComparisonInSearch" v-model="risingComparisonInSearch"/>
|
||||
Show quick match results in search results
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group">-->
|
||||
<!-- <label class="control-label" for="hideProfileComparisonSummary">-->
|
||||
<!-- <input type="checkbox" id="hideProfileComparisonSummary" :checked="!hideProfileComparisonSummary" @input="hideProfileComparisonSummary = !$event.target.checked"/>-->
|
||||
<!-- Show quick match results at the top of the character profile-->
|
||||
<!-- </label>-->
|
||||
<!-- </div>-->
|
||||
|
||||
|
||||
<h5>Preview</h5>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="risingLinkPreview">
|
||||
<input type="checkbox" id="risingLinkPreview" v-model="risingLinkPreview"/>
|
||||
Show link previews when the mouse hovers over a link
|
||||
Show a link/image preview when the mouse hovers over a link
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="risingCharacterPreview">
|
||||
<input type="checkbox" id="risingCharacterPreview" v-model="risingCharacterPreview"/>
|
||||
Show a character preview when mouse hovers over a character name
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
<h5>Profile</h5>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="risingAutoCompareKinks">
|
||||
<input type="checkbox" id="risingAutoCompareKinks" v-model="risingAutoCompareKinks"/>
|
||||
Automatically compare kinks when viewing a character profile
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="risingAutoExpandCustomKinks">
|
||||
<input type="checkbox" id="risingAutoExpandCustomKinks" v-model="risingAutoExpandCustomKinks"/>
|
||||
Automatically expand custom kinks
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-show="selectedTab === '3'">
|
||||
<template v-if="hidden.length">
|
||||
|
@ -197,6 +245,12 @@
|
|||
risingLinkPreview!: boolean;
|
||||
risingAutoCompareKinks!: boolean;
|
||||
|
||||
risingAutoExpandCustomKinks!: boolean;
|
||||
risingCharacterPreview!: boolean;
|
||||
risingComparisonInUserMenu!: boolean;
|
||||
risingComparisonInSearch!: boolean;
|
||||
|
||||
|
||||
async load(): Promise<void> {
|
||||
const settings = core.state.settings;
|
||||
this.playSound = settings.playSound;
|
||||
|
@ -224,6 +278,11 @@
|
|||
this.risingAdScore = settings.risingAdScore;
|
||||
this.risingLinkPreview = settings.risingLinkPreview;
|
||||
this.risingAutoCompareKinks = settings.risingAutoCompareKinks;
|
||||
|
||||
this.risingAutoExpandCustomKinks = settings.risingAutoExpandCustomKinks;
|
||||
this.risingCharacterPreview = settings.risingCharacterPreview;
|
||||
this.risingComparisonInUserMenu = settings.risingComparisonInUserMenu;
|
||||
this.risingComparisonInSearch = settings.risingComparisonInSearch;
|
||||
}
|
||||
|
||||
async doImport(): Promise<void> {
|
||||
|
@ -270,7 +329,12 @@
|
|||
|
||||
risingAdScore: this.risingAdScore,
|
||||
risingLinkPreview: this.risingLinkPreview,
|
||||
risingAutoCompareKinks: this.risingAutoCompareKinks
|
||||
risingAutoCompareKinks: this.risingAutoCompareKinks,
|
||||
|
||||
risingAutoExpandCustomKinks: this.risingAutoExpandCustomKinks,
|
||||
risingCharacterPreview: this.risingCharacterPreview,
|
||||
risingComparisonInUserMenu: this.risingComparisonInUserMenu,
|
||||
risingComparisonInSearch: this.risingComparisonInSearch
|
||||
};
|
||||
if(this.notifications) await core.notifications.requestPermission();
|
||||
}
|
||||
|
@ -282,4 +346,4 @@
|
|||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
@ -238,14 +238,16 @@ import _ from 'lodash';
|
|||
this.position = {left: `${touch.clientX}px`, top: `${touch.clientY}px`};
|
||||
this.match = null;
|
||||
|
||||
const myProfile = core.characters.ownProfile;
|
||||
const theirProfile = await core.cache.profileCache.get(this.character.name);
|
||||
if (core.state.settings.risingComparisonInUserMenu) {
|
||||
const myProfile = core.characters.ownProfile;
|
||||
const theirProfile = await core.cache.profileCache.get(this.character.name);
|
||||
|
||||
if (myProfile && theirProfile) {
|
||||
const match = Matcher.identifyBestMatchReport(myProfile.character, theirProfile.character.character);
|
||||
if (myProfile && theirProfile) {
|
||||
const match = Matcher.identifyBestMatchReport(myProfile.character, theirProfile.character.character);
|
||||
|
||||
if (_.keys(match.merged).length > 0) {
|
||||
this.match = match.merged;
|
||||
if (_.keys(match.merged).length > 0) {
|
||||
this.match = match.merged;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,6 +46,11 @@ export class Settings implements ISettings {
|
|||
risingAdScore = true;
|
||||
risingLinkPreview = true;
|
||||
risingAutoCompareKinks = true;
|
||||
|
||||
risingAutoExpandCustomKinks = true;
|
||||
risingCharacterPreview = true;
|
||||
risingComparisonInUserMenu = true;
|
||||
risingComparisonInSearch = true;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -211,6 +211,11 @@ export namespace Settings {
|
|||
readonly risingAdScore: boolean;
|
||||
readonly risingLinkPreview: boolean;
|
||||
readonly risingAutoCompareKinks: boolean;
|
||||
|
||||
readonly risingAutoExpandCustomKinks: boolean;
|
||||
readonly risingCharacterPreview: boolean;
|
||||
readonly risingComparisonInUserMenu: boolean;
|
||||
readonly risingComparisonInSearch: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<bbcode :text="character.character.description"></bbcode>
|
||||
</div>
|
||||
|
||||
<character-kinks :character="character" :oldApi="oldApi" ref="tab0"></character-kinks>
|
||||
<character-kinks :character="character" :oldApi="oldApi" ref="tab0" :autoExpandCustoms="autoExpandCustoms"></character-kinks>
|
||||
</div>
|
||||
<div role="tabpanel" v-show="tab === '1'" id="infotags">
|
||||
<character-infotags :character="character" ref="tab1" :characterMatch="characterMatch"></character-infotags>
|
||||
|
@ -135,6 +135,7 @@
|
|||
refreshing = false;
|
||||
error = '';
|
||||
tab = '0';
|
||||
autoExpandCustoms = false;
|
||||
|
||||
/* guestbookPostCount: number | null = null;
|
||||
friendCount: number | null = null;
|
||||
|
@ -173,6 +174,8 @@
|
|||
@Watch('name')
|
||||
async onCharacterSet(): Promise<void> {
|
||||
this.tab = '0';
|
||||
this.autoExpandCustoms = core.state.settings.risingAutoExpandCustomKinks;
|
||||
|
||||
await this.load();
|
||||
|
||||
// Kludge kluge
|
||||
|
|
|
@ -89,6 +89,9 @@
|
|||
readonly character!: Character;
|
||||
@Prop
|
||||
readonly oldApi?: true;
|
||||
@Prop({required: true})
|
||||
readonly autoExpandCustoms!: boolean;
|
||||
|
||||
shared = Store;
|
||||
characterToCompare = Utils.settings.defaultCharacter;
|
||||
highlightGroup: number | undefined;
|
||||
|
@ -193,6 +196,8 @@
|
|||
if ((this.character) && (this.character.is_self))
|
||||
return;
|
||||
|
||||
this.expandedCustoms = this.autoExpandCustoms;
|
||||
|
||||
if (core.state.settings.risingAutoCompareKinks) {
|
||||
await this.compareKinks(core.characters.ownProfile, true);
|
||||
}
|
||||
|
@ -203,6 +208,8 @@
|
|||
if ((this.character) && (this.character.is_self))
|
||||
return;
|
||||
|
||||
this.expandedCustoms = this.autoExpandCustoms;
|
||||
|
||||
if (core.state.settings.risingAutoCompareKinks) {
|
||||
await this.compareKinks(core.characters.ownProfile, true);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue