From 7bad57e3625b909b07f244f9d87b587e117218b7 Mon Sep 17 00:00:00 2001 From: Aylong <69762909+AyIong@users.noreply.github.com> Date: Thu, 18 Apr 2024 20:14:42 +0300 Subject: [PATCH] Upgrade TTS Seed Explorer (#119) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## About The Pull Request Улучшенный ТТС эксплорер, адаптированные под ТГ Пришлось насрать точечным хардкодом, но оно того стоит В частности в квирках перетащить 1 аргумент в правильное место и добавить grow к page content ## Картиночки ![image](https://github.com/ss220club/Bandastation/assets/69762909/c3130c47-7f62-4d43-b82b-98178a0664c9) ![image](https://github.com/ss220club/Bandastation/assets/69762909/ff4cbdc9-5acd-4d0c-ad16-0e472a64583c) ## Changelog :cl: qol: Выбор голоса ТТС стал красивее и удобнее /:cl: --- .../CharacterPreferenceWindow.tsx | 4 +- .../interfaces/PreferencesMenu/QuirksPage.tsx | 4 +- .../interfaces/PreferencesMenu/VoicePage.tsx | 134 ++++++++++++------ 3 files changed, 95 insertions(+), 47 deletions(-) diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/CharacterPreferenceWindow.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/CharacterPreferenceWindow.tsx index bde56f429d63c..c8936780eed67 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/CharacterPreferenceWindow.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/CharacterPreferenceWindow.tsx @@ -88,7 +88,7 @@ export const CharacterPreferenceWindow = (props) => { return ( - + { - {pageContents} + {pageContents} diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/QuirksPage.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/QuirksPage.tsx index c145b7eb3db34..3b81944754168 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/QuirksPage.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/QuirksPage.tsx @@ -391,7 +391,7 @@ export function QuirksPage(props) { }; return ( - + @@ -450,7 +450,7 @@ export function QuirksPage(props) { - + diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/VoicePage.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/VoicePage.tsx index b9175b91e6759..7f62658556510 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/VoicePage.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/VoicePage.tsx @@ -3,23 +3,24 @@ import { useState } from 'react'; import { useBackend } from '../../backend'; import { BlockQuote, - Box, Button, Dropdown, Icon, Input, LabeledList, Section, + Stack, Table, } from '../../components'; import { PreferencesMenuData } from './data'; const donatorTiers = { - 0: 'Бесплатные', + 0: 'Free', 1: 'Tier I', 2: 'Tier II', 3: 'Tier III', 4: 'Tier IV', + 5: 'Tier V', }; const gendersIcons = { @@ -69,9 +70,16 @@ const getCheckboxGroup = ( export const VoicePage = (props) => { const { act, data } = useBackend(); - const { providers, seeds, phrases, tts_seed } = data; + const { + providers, + seeds, + tts_seed, + phrases, + // donator_level, + // character_gender, + } = data; - const donator_level = 5; + const donator_level = 5; // Remove after tiers implementation const categories = seeds .map((seed) => seed.category) @@ -82,6 +90,7 @@ export const VoicePage = (props) => { const donatorLevels = seeds .map((seed) => seed.donator_level) .filter((level, i, a) => a.indexOf(level) === i) + .sort((a, b) => a - b) .map((level) => donatorTiers[level]); const [selectedProviders, setSelectedProviders] = useState(providers); @@ -117,8 +126,7 @@ export const VoicePage = (props) => { let phrasesSelect = ( setSelectedPhrase(value)} /> ); @@ -126,7 +134,7 @@ export const VoicePage = (props) => { let searchBar = ( setSearchtext(value)} /> ); @@ -167,18 +175,16 @@ export const VoicePage = (props) => { donator_level < seed.donator_level && 'Требуется более высокий уровень подписки' } - tooltipPosition="right" - textAlign="left" - onClick={() => act('select_voice', { seed: seed.name })} + onClick={() => act('select', { seed: seed.name })} />