Skip to content

Commit

Permalink
feat✨: update
Browse files Browse the repository at this point in the history
  • Loading branch information
EldersJavas committed Jan 18, 2023
1 parent acca8ba commit ed54275
Show file tree
Hide file tree
Showing 10 changed files with 255 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ func (a *App) Greet(name string) string {
return "Greet"
}

func (a *App) TestTime() string {
func (a *App) Test() string {
return "时间:" + time.Now().Format("2006-01-02 15:04:05")
}
158 changes: 158 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"preview": "vite preview"
},
"dependencies": {
"clipboard": "^2.0.11",
"react": "^18.0.0",
"react-copy-to-clipboard": "^5.1.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.3.0",
"react-windows-ui": "^4.2.1"
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0be9b244598407468588292ee7f57c65
7bca1781412add2fe0042a6bbc989b4b
4 changes: 2 additions & 2 deletions frontend/src/App.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
:root {
--PrimaryColor: #0078D7; /* Change of your choice */
--PrimaryColor: #0056d7; /* Change of your choice */
--PrimaryColorLight: #47aeff; /* Lighter version of --PrimaryColor for DarkMode */
}
body {
font-family: system-ui,"AlibabaPuHuiTi";
font-family: "HarmonyOS",system-ui;
}
::selection {
color: #ffffff;
Expand Down
Binary file added frontend/src/assets/fonts/HarmonyOS.woff2
Binary file not shown.
20 changes: 14 additions & 6 deletions frontend/src/pages/textarea.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import {Button, NavPageContainer, TextArea} from "react-windows-ui";
import {Button, NavPageContainer} from "react-windows-ui";
import {useState} from "react";
import "../../wailsjs/runtime";
import {CopyToClipboard} from 'react-copy-to-clipboard';

const Textareapage = (pop) => {

const [resultText, setResultText] = useState("text");
const updateResultText = (result) => setResultText(result);
return (
Expand All @@ -23,12 +25,18 @@ const Textareapage = (pop) => {
margin: "auto",
}}
>
<Button icon={<i className="icons10-home"></i>} value={"格式化"} type={"primary"} onClick={()=>{}}/>
<Button icon={<i className="icons10-home"></i>} value={"格式化"} type={"primary"} onClick={()=>{}}/>
<Button icon={<i className="icons10-home"></i>} value={"粘贴自剪切板"} type={"primary-outline"} onClick={()=>{

}}/>
<Button icon={<i className="icons10-home"></i>} value={"复制到剪切板"} type={"primary-outline"} onClick={()=>{
}}/>

<CopyToClipboard text={resultText}>
<Button
icon={<i className="icons10-home"></i>}
value={"复制到剪切板"}
type={"primary-outline"}
onClick={()=>{}}>
</Button>
</CopyToClipboard>
<Button icon={<i className="icons10-home"></i>} value={"清除"} type={"primary-outline"} onClick={()=>{
document.getElementById("t1").value="";
document.getElementById("t2").value="";
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/style.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@font-face {
font-family: "AlibabaPuHuiTi";
font-family: "HarmonyOS";
font-style: normal;
font-weight: 400;
src: local(""),
url("assets/fonts/AlibabaPuHuiTi-2-55-Regular.woff2") format("woff2");
url("assets/fonts/HarmonyOS.woff2") format("woff2");
}
Loading

0 comments on commit ed54275

Please sign in to comment.