Profile navigation
This commit is contained in:
parent
f7a63893d6
commit
60bdcc6c99
|
@ -1,5 +1,10 @@
|
|||
# Changelog
|
||||
|
||||
## 1.2.0
|
||||
* Hide/show current character profile with Ctrl+P or Command+P
|
||||
* Navigate back and forward in character profile view history
|
||||
|
||||
|
||||
## 1.1.0
|
||||
* Upgraded to Electron 10.x
|
||||
* Upgraded to Keytar 6.x – you will need to re-enter your password
|
||||
|
@ -20,7 +25,6 @@
|
|||
|
||||
|
||||
## 1.0.1
|
||||
|
||||
* Enabled auto-updates for Windows; MacOS and Linux not supported, sorry!
|
||||
* Reviewed security with:
|
||||
* [Electron Security](https://www.electronjs.org/docs/tutorial/security)
|
||||
|
@ -32,7 +36,6 @@
|
|||
|
||||
|
||||
## 1.0.0
|
||||
|
||||
* Channel Conversations
|
||||
* Highlight ads from characters most interesting to you
|
||||
* Hide clearly unmatched ads
|
||||
|
|
11
README.md
11
README.md
|
@ -1,7 +1,7 @@
|
|||
# Download
|
||||
[Windows](https://github.com/mrstallion/fchat-rising/releases/download/v1.1.0/F-Chat-Rising-v1.1.0-win.exe) (75 MB)
|
||||
| [MacOS](https://github.com/mrstallion/fchat-rising/releases/download/v1.1.0/F-Chat-Rising-v1.1.0-macos.dmg) (76 MB)
|
||||
| [Linux](https://github.com/mrstallion/fchat-rising/releases/download/v1.1.0/F-Chat-Rising-v1.1.0-linux.AppImage) (76 MB)
|
||||
[Windows](https://github.com/mrstallion/fchat-rising/releases/download/v1.1.0/F-Chat-Rising-v1.2.0-win.exe) (75 MB)
|
||||
| [MacOS](https://github.com/mrstallion/fchat-rising/releases/download/v1.1.0/F-Chat-Rising-v1.2.0-macos.dmg) (76 MB)
|
||||
| [Linux](https://github.com/mrstallion/fchat-rising/releases/download/v1.1.0/F-Chat-Rising-v1.2.0-linux.AppImage) (76 MB)
|
||||
|
||||
|
||||
# F-Chat Rising
|
||||
|
@ -46,6 +46,8 @@ This repository contains a heavily customized version of the mainline F-Chat 3.0
|
|||
* Cleaner guestbook view
|
||||
* Profiles, images, guestbook posts, and groups are cached for faster view
|
||||
* Character view tabs (overview, images, etc.) stick to the top
|
||||
* Show/hide current profile with Ctrl+P or Command+P
|
||||
* Navigate back and forward in character profile view history
|
||||
* Character Search
|
||||
* Search results are sorted based on match scores
|
||||
* Display match score in search results
|
||||
|
@ -112,6 +114,9 @@ This repository contains a heavily customized version of the mainline F-Chat 3.0
|
|||
* Bug? [color] acts weird
|
||||
* Bug? inline images act weird on profiles
|
||||
* Better disconnect management / API tickets?
|
||||
* Ctrl+P to re-open closed profile; navigate back and forward in profiles (e.g. when you click one); 'back to top' button
|
||||
* What are the things that would make your profile more compatible with others?
|
||||
|
||||
|
||||
|
||||
# F-List Exported
|
||||
|
|
|
@ -49,12 +49,12 @@ theme: jekyll-theme-slate
|
|||
changelog: https://github.com/mrstallion/fchat-rising/blob/master/CHANGELOG.md
|
||||
|
||||
download:
|
||||
version: v1.1.0
|
||||
win_url: https://github.com/mrstallion/fchat-rising/releases/download/v1.1.0/F-Chat-Rising-v1.1.0-win.exe
|
||||
version: v1.2.0
|
||||
win_url: https://github.com/mrstallion/fchat-rising/releases/download/v1.2.0/F-Chat-Rising-v1.2.0-win.exe
|
||||
win_size: 75 MB
|
||||
mac_url: https://github.com/mrstallion/fchat-rising/releases/download/v1.1.0/F-Chat-Rising-v1.1.0-macos.dmg
|
||||
mac_url: https://github.com/mrstallion/fchat-rising/releases/download/v1.2.0/F-Chat-Rising-v1.2.0-macos.dmg
|
||||
mac_size: 76 MB
|
||||
linux_url: https://github.com/mrstallion/fchat-rising/releases/download/v1.1.0/F-Chat-Rising-v1.1.0-linux.AppImage
|
||||
linux_url: https://github.com/mrstallion/fchat-rising/releases/download/v1.2.0/F-Chat-Rising-v1.2.0-linux.AppImage
|
||||
linux_size: 76 MB
|
||||
|
||||
|
||||
|
|
|
@ -73,6 +73,11 @@
|
|||
<a class="btn" @click="reloadCharacter"><i class="fa fa-sync" /></a>
|
||||
|
||||
<i class="fas fa-circle-notch fa-spin profileRefreshSpinner" v-show="isRefreshingProfile()"></i>
|
||||
|
||||
<div class="profile-title-right">
|
||||
<button class="btn" @click="prevProfile" :disabled="!prevProfileAvailable()"><i class="fas fa-arrow-left"></i></button>
|
||||
<button class="btn" @click="nextProfile" :disabled="!nextProfileAvailable()"><i class="fas fa-arrow-right"></i></button>
|
||||
</div>
|
||||
</template>
|
||||
</modal>
|
||||
<modal :action="l('fixLogs.action')" ref="fixLogsModal" @submit="fixLogs" buttonClass="btn-danger">
|
||||
|
@ -89,7 +94,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import {Component, Hook} from '@f-list/vue-ts';
|
||||
import { Component, Hook, Watch } from '@f-list/vue-ts';
|
||||
import Axios from 'axios';
|
||||
import * as electron from 'electron';
|
||||
import log from 'electron-log'; //tslint:disable-line:match-default-export-name
|
||||
|
@ -108,12 +113,13 @@
|
|||
import Modal from '../components/Modal.vue';
|
||||
import {SimpleCharacter} from '../interfaces';
|
||||
import {Keys} from '../keys';
|
||||
// import { BetterSqliteStore } from '../learn/store/better-sqlite3';
|
||||
// import { Sqlite3Store } from '../learn/store/sqlite3';
|
||||
// import { BetterSqliteStore } from '../learn/store/better-sqlite3';
|
||||
// import { Sqlite3Store } from '../learn/store/sqlite3';
|
||||
import CharacterPage from '../site/character_page/character_page.vue';
|
||||
import {defaultHost, GeneralSettings, nativeRequire} from './common';
|
||||
import { fixLogs /*SettingsStore, Logs as FSLogs*/ } from './filesystem';
|
||||
import * as SlimcatImporter from './importer';
|
||||
import _ from 'lodash';
|
||||
// import Bluebird from 'bluebird';
|
||||
// import Connection from '../fchat/connection';
|
||||
// import Notifications from './notifications';
|
||||
|
@ -145,14 +151,17 @@
|
|||
|
||||
/* tslint:disable: no-any no-unsafe-any */ //because this is hacky
|
||||
//
|
||||
const keyStore = nativeRequire<{
|
||||
|
||||
const keyStore = nativeRequire<
|
||||
{
|
||||
getPassword(service: string, account: string): Promise<string>
|
||||
setPassword(service: string, account: string, password: string): Promise<void>
|
||||
deletePassword(service: string, account: string): Promise<void>
|
||||
findCredentials(service: string): Promise<{ account: string, password: string }>,
|
||||
findCredentials(service: string): Promise<{ account: string, password: string }>
|
||||
findPassword(service: string): Promise<string>
|
||||
[key: string]: (...args: any[]) => Promise<any>
|
||||
}>('keytar/build/Release/keytar.node');
|
||||
}
|
||||
>('keytar/build/Release/keytar.node');
|
||||
|
||||
// const keyStore = import('keytar');
|
||||
//
|
||||
|
@ -184,6 +193,9 @@
|
|||
|
||||
shouldShowSpinner = false;
|
||||
|
||||
profileNameHistory: string[] = [];
|
||||
profilePointer = 0;
|
||||
|
||||
|
||||
async startAndUpgradeCache(): Promise<void> {
|
||||
log.debug('init.chat.cache.start');
|
||||
|
@ -209,6 +221,24 @@
|
|||
}
|
||||
|
||||
|
||||
@Watch('profileName')
|
||||
onProfileNameChange(newName: string): void {
|
||||
if (this.profileNameHistory[this.profilePointer] !== newName) {
|
||||
this.profileNameHistory = _.takeRight(
|
||||
_.filter(
|
||||
_.take(this.profileNameHistory, this.profilePointer + 1),
|
||||
(n) => (n !== newName)
|
||||
),
|
||||
30
|
||||
);
|
||||
|
||||
this.profileNameHistory.push(newName);
|
||||
|
||||
this.profilePointer = this.profileNameHistory.length - 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Hook('mounted')
|
||||
onMounted(): void {
|
||||
log.debug('init.chat.mounted');
|
||||
|
@ -229,14 +259,33 @@
|
|||
Vue.set(core.state, 'generalSettings', this.settings);
|
||||
|
||||
electron.ipcRenderer.on('settings',
|
||||
(_: Event, settings: GeneralSettings) => core.state.generalSettings = this.settings = settings);
|
||||
(_e: Event, settings: GeneralSettings) => core.state.generalSettings = this.settings = settings);
|
||||
|
||||
electron.ipcRenderer.on('open-profile', (_: Event, name: string) => {
|
||||
electron.ipcRenderer.on('open-profile', (_e: Event, name: string) => {
|
||||
const profileViewer = <Modal>this.$refs['profileViewer'];
|
||||
this.profileName = name;
|
||||
profileViewer.show();
|
||||
});
|
||||
|
||||
electron.ipcRenderer.on('reopen-profile', (_e: Event) => {
|
||||
if (
|
||||
(this.profileNameHistory.length > 0)
|
||||
&& (this.profilePointer < this.profileNameHistory.length)
|
||||
&& (this.profilePointer >= 0)
|
||||
) {
|
||||
const name = this.profileNameHistory[this.profilePointer];
|
||||
const profileViewer = <Modal>this.$refs['profileViewer'];
|
||||
|
||||
if ((this.profileName === name) && (profileViewer.isShown)) {
|
||||
profileViewer.hide();
|
||||
return;
|
||||
}
|
||||
|
||||
this.profileName = name;
|
||||
profileViewer.show();
|
||||
}
|
||||
});
|
||||
|
||||
electron.ipcRenderer.on('fix-logs', async() => {
|
||||
this.fixCharacters = await core.settingsStore.getAvailableCharacters();
|
||||
this.fixCharacter = this.fixCharacters[0];
|
||||
|
@ -389,6 +438,36 @@
|
|||
}
|
||||
|
||||
|
||||
nextProfile(): void {
|
||||
if (!this.nextProfileAvailable()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.profilePointer++;
|
||||
this.profileName = this.profileNameHistory[this.profilePointer];
|
||||
}
|
||||
|
||||
|
||||
nextProfileAvailable(): boolean {
|
||||
return (this.profilePointer < this.profileNameHistory.length - 1);
|
||||
}
|
||||
|
||||
|
||||
prevProfile(): void {
|
||||
if (!this.prevProfileAvailable()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.profilePointer--;
|
||||
this.profileName = this.profileNameHistory[this.profilePointer];
|
||||
}
|
||||
|
||||
|
||||
prevProfileAvailable(): boolean {
|
||||
return (this.profilePointer > 0);
|
||||
}
|
||||
|
||||
|
||||
get styling(): string {
|
||||
try {
|
||||
return `<style>${fs.readFileSync(path.join(__dirname, `themes/${this.settings.theme}.css`), 'utf8').toString()}</style>`;
|
||||
|
@ -424,6 +503,21 @@
|
|||
}
|
||||
|
||||
|
||||
.profile-viewer {
|
||||
.modal-title {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
|
||||
.profile-title-right {
|
||||
float: right;
|
||||
bottom: 7px;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.initializer {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
async mounted(): Promise<void> {
|
||||
log.debug('init.window.mounting');
|
||||
// top bar devtools
|
||||
// browserWindow.webContents.openDevTools({ mode: 'detach' });
|
||||
browserWindow.webContents.openDevTools({ mode: 'detach' });
|
||||
|
||||
updateSupportedLanguages(browserWindow.webContents.session.availableSpellCheckerLanguages);
|
||||
|
||||
|
@ -119,6 +119,7 @@
|
|||
electron.ipcRenderer.on('update-available', (_e: Event, available: boolean) => this.hasUpdate = available);
|
||||
electron.ipcRenderer.on('fix-logs', () => this.activeTab!.view.webContents.send('fix-logs'));
|
||||
electron.ipcRenderer.on('quit', () => this.destroyAllTabs());
|
||||
electron.ipcRenderer.on('reopen-profile', () => this.activeTab!.view.webContents.send('reopen-profile'));
|
||||
electron.ipcRenderer.on('update-dictionaries', (_e: Event, langs: string[]) => {
|
||||
// console.log('UPDATE DICTIONARIES', langs);
|
||||
|
||||
|
|
|
@ -493,6 +493,14 @@ function onReady(): void {
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Show/hide current profile',
|
||||
click: (_m: Electron.MenuItem, w: Electron.BrowserWindow) => {
|
||||
w.webContents.send('reopen-profile');
|
||||
},
|
||||
accelerator: 'CmdOrCtrl+p'
|
||||
},
|
||||
|
||||
|
||||
{type: 'separator'},
|
||||
{role: 'minimize'},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "fchat",
|
||||
"version": "1.1.0",
|
||||
"version": "1.2.0",
|
||||
"author": "The F-List Team and Mister Stallion (Esq.)",
|
||||
"description": "F-List.net Chat Client",
|
||||
"main": "main.js",
|
||||
|
|
|
@ -190,7 +190,7 @@ export const speciesMapping: SpeciesMap = {
|
|||
'appaloosa', 'friesian', 'draft', 'draught', 'alicorn', 'amazon', 'amazonian', 'horsie', 'hoss', 'pegasus', 'colt', 'filly'],
|
||||
[Species.Feline]: ['cat', 'kitten', 'catgirl', 'neko', 'tiger', 'puma', 'lion', 'lioness',
|
||||
'tigress', 'feline', 'jaguar', 'cheetah', 'lynx', 'leopard', 'cougar', 'kitty', 'migote', 'miqo\'te', 'miqote', 'ocelot',
|
||||
'sabertooth', 'saber tooth', 'tabby', 'liger'],
|
||||
'sabertooth', 'saber tooth', 'tabby', 'liger', 'serval'],
|
||||
[Species.Canine]: ['dog', 'wolf', 'dingo', 'coyote', 'jackal', 'canine', 'doberman', 'husky', 'hound', 'akita', 'pitbull', 'pit bull', 'terrier',
|
||||
'bull terrier', 'australian shepherd', 'australian shepard', 'german shepherd', 'german shepard', 'malinois', 'woof', 'labrador', 'collie',
|
||||
'canis', 'canid', 'chihuahua', 'poodle', 'chinchilla', 'chowchow', 'corgi', 'anubis', 'anubian', 'dalmatian', 'inumimi', 'lupine', 'malamute', 'mastiff',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "f-list-rising",
|
||||
"version": "1.1.0",
|
||||
"version": "1.2.0",
|
||||
"author": "The F-List Team and and Mister Stallion (Esq.)",
|
||||
"description": "A heavily modded F-Chat 3.0 client for F-List",
|
||||
"license": "MIT",
|
||||
|
|
Loading…
Reference in New Issue