mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 09:28:11 +00:00
optimize model / category UI for power use
This commit is contained in:
1 parent
6ebfaef5aa
commit
e4e3ac2d2e
5 files changed
+43
-26
No files matched your search
@@ -89,6 +89,10 @@ class FrontendUrlConfig {
|
||||
static contributePage() : string {
|
||||
return '/contribute';
|
||||
}
|
||||
|
||||
static createCategoryPage(): string {
|
||||
return '/category/create';
|
||||
}
|
||||
|
||||
// Moderation links
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import React from 'react';
|
||||
import { SessionWrapper } from '../../../session/SessionWrapper';
|
||||
import { Link } from "react-router-dom";
|
||||
import { DiscordLink } from '../_common/DiscordLink';
|
||||
import { FrontendUrlConfig } from '../../../common/FrontendUrlConfig';
|
||||
|
||||
interface Props {
|
||||
sessionWrapper: SessionWrapper,
|
||||
@@ -54,7 +55,7 @@ function ContributeIndexPage(props: Props) {
|
||||
<p>Help us organize the models!</p>
|
||||
|
||||
<Link
|
||||
to="/category/create"
|
||||
to={FrontendUrlConfig.createCategoryPage()}
|
||||
className="button is-info is-large is-fullwidth"
|
||||
>{categoryActionName} category</Link>
|
||||
|
||||
|
||||
@@ -267,6 +267,13 @@ function ModerationTtsCategoryListPage(props: Props) {
|
||||
</p>
|
||||
|
||||
<br />
|
||||
|
||||
<Link
|
||||
to={FrontendUrlConfig.createCategoryPage()}
|
||||
className="button is-info is-large is-fullwidth"
|
||||
>Create new category</Link>
|
||||
|
||||
<br />
|
||||
|
||||
<BackLink link={FrontendUrlConfig.moderationMain()} text="Back to moderation" />
|
||||
</div>
|
||||
|
||||
@@ -218,6 +218,10 @@ function TtsEditCategoriesPage(props: Props) {
|
||||
|
||||
{errorFlash}
|
||||
|
||||
<p>
|
||||
<BackLink link={FrontendUrlConfig.indexPage()} text="Back to main" />
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<BackLink link={modelLink} text="Back to model" />
|
||||
</p>
|
||||
|
||||
@@ -362,31 +362,6 @@ function TtsModelViewFc(props: Props) {
|
||||
<BackLink link="/" text="Back to all models" />
|
||||
</p>
|
||||
|
||||
<h4 className="title is-4"> Use Model </h4>
|
||||
|
||||
<form onSubmit={handleFormSubmit}>
|
||||
<textarea
|
||||
onChange={handleChangeText}
|
||||
value={props.textBuffer}
|
||||
className="textarea is-large"
|
||||
placeholder="Textual shenanigans go here..."></textarea>
|
||||
|
||||
<div className="button-group">
|
||||
<div className="columns is-mobile">
|
||||
<div className="column has-text-centered">
|
||||
<button className="button is-info is-large" >Speak</button>
|
||||
</div>
|
||||
<div className="column has-text-centered">
|
||||
<button className="button is-info is-light is-large" onClick={handleClearClick}>Clear</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<br />
|
||||
|
||||
<SessionTtsInferenceResultListFc ttsInferenceJobs={props.ttsInferenceJobs} />
|
||||
|
||||
{modelDescription}
|
||||
|
||||
{modelCategoriesSection}
|
||||
@@ -443,6 +418,32 @@ function TtsModelViewFc(props: Props) {
|
||||
{deleteModelButton}
|
||||
|
||||
<br />
|
||||
|
||||
<h4 className="title is-4"> Use Model </h4>
|
||||
|
||||
<form onSubmit={handleFormSubmit}>
|
||||
<textarea
|
||||
onChange={handleChangeText}
|
||||
value={props.textBuffer}
|
||||
className="textarea is-large"
|
||||
placeholder="Textual shenanigans go here..."></textarea>
|
||||
|
||||
<div className="button-group">
|
||||
<div className="columns is-mobile">
|
||||
<div className="column has-text-centered">
|
||||
<button className="button is-info is-large" >Speak</button>
|
||||
</div>
|
||||
<div className="column has-text-centered">
|
||||
<button className="button is-info is-light is-large" onClick={handleClearClick}>Clear</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<br />
|
||||
|
||||
<SessionTtsInferenceResultListFc ttsInferenceJobs={props.ttsInferenceJobs} />
|
||||
|
||||
<br />
|
||||
<BackLink link="/" text="Back to all models" />
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user