redesign Editor (#360)

This commit is contained in:
BlowaterNostr 2023-12-22 18:48:44 +08:00 committed by GitHub
parent e6a1819b72
commit a7d8f7c5e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -123,7 +123,7 @@ export class Editor extends Component<EditorProps, EditorState> {
const uploadFileInput = createRef(); const uploadFileInput = createRef();
return ( return (
<div class={`flex mb-4 mx-5 items-center`}> <div class={`flex mb-4 mx-4 items-center bg-[${DividerBackgroundColor}] rounded-lg`}>
<button <button
class={`min-w-[3rem] w-[3rem] h-[3rem] hover:bg-[${DividerBackgroundColor}] group ${CenterClass} rounded-[50%] ${NoOutlineClass}`} class={`min-w-[3rem] w-[3rem] h-[3rem] hover:bg-[${DividerBackgroundColor}] group ${CenterClass} rounded-[50%] ${NoOutlineClass}`}
onClick={() => { onClick={() => {
@ -170,7 +170,7 @@ export class Editor extends Component<EditorProps, EditorState> {
class={`hidden`} class={`hidden`}
/> />
<div <div
class={`mx-2 p-[0.75rem] bg-[${DividerBackgroundColor}] rounded-lg flex flex-col flex-1 overflow-hidden`} class={`py-[0.75rem] flex flex-col flex-1 overflow-hidden`}
> >
{this.state.files.length > 0 {this.state.files.length > 0
? ( ? (
@ -266,7 +266,7 @@ export class Editor extends Component<EditorProps, EditorState> {
</div> </div>
<button <button
class={`w-12 h-8 ${CenterClass} ${LinearGradientsClass} rounded`} class={`m-2 w-12 h-8 ${CenterClass} ${LinearGradientsClass} rounded`}
onClick={async () => { onClick={async () => {
await this.sendMessage(); await this.sendMessage();
this.textareaElement.current?.focus(); this.textareaElement.current?.focus();