mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-02 16:38:14 +00:00
UI improvements
This commit is contained in:
1 parent
b1777f74ce
commit
6e766720ca
3 files changed
+9
-36
No files matched your search
@@ -2,41 +2,6 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.App-logo {
|
||||
height: 40vmin;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
.App-logo {
|
||||
animation: App-logo-spin infinite 20s linear;
|
||||
}
|
||||
}
|
||||
|
||||
.App-header {
|
||||
background-color: #282c34;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: calc(10px + 2vmin);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.App-link {
|
||||
color: #61dafb;
|
||||
}
|
||||
|
||||
@keyframes App-logo-spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.track {
|
||||
margin: 10px auto;
|
||||
width: 600px;
|
||||
@@ -50,6 +15,7 @@
|
||||
size: 4em;
|
||||
padding: 1em;
|
||||
background-color: #ccc;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.track_text {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { MainComponent } from './components/MainComponent';
|
||||
const App: React.FC = () => {
|
||||
return (
|
||||
<div className="App">
|
||||
<h1>Test2</h1>
|
||||
<h1>Neural TTS</h1>
|
||||
<MainComponent />
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import * as React from 'react';
|
||||
import Howl from 'howler';
|
||||
import {makeTtsRequest} from '../TtsService'
|
||||
|
||||
interface Props {
|
||||
text: String,
|
||||
@@ -22,6 +23,12 @@ class TextAudioTrack extends React.Component<Props, State> {
|
||||
|
||||
reload = () => {
|
||||
console.log('Reload clicked');
|
||||
|
||||
const sentence = this.props.text.toString();
|
||||
|
||||
makeTtsRequest(sentence).then(response => {
|
||||
response.howl.play();
|
||||
});
|
||||
}
|
||||
|
||||
public render() {
|
||||
|
||||
Reference in new issue
Block a user