This commit is contained in:
2026-07-23 16:24:02 +08:00
parent 44a7e48c60
commit bc269f91eb
4 changed files with 15 additions and 7 deletions
BIN
View File
Binary file not shown.
+7
View File
@@ -155,5 +155,12 @@ func (a *App) ClearHistory() Response {
return Response{Code: 1, Message: result.Error.Error()} return Response{Code: 1, Message: result.Error.Error()}
} }
if err := os.RemoveAll(publicImagePath); err != nil {
return Response{Code: 1, Message: fmt.Sprintf("failed to remove images: %v", err)}
}
if err := os.MkdirAll(publicImagePath, 0755); err != nil {
return Response{Code: 1, Message: fmt.Sprintf("failed to recreate images dir: %v", err)}
}
return Response{Code: 0, Message: "success"} return Response{Code: 0, Message: "success"}
} }
+1 -1
View File
@@ -23,7 +23,7 @@ const Navbar = () => {
<span><span></span></span> <span><span></span></span>
</div> </div>
<div class="container-right"> <div class="container-right">
<a href="/" onClick={handleNavColor}></a> <a href="/" class="active" onClick={handleNavColor}></a>
<a href="/history" onClick={handleNavColor}></a> <a href="/history" onClick={handleNavColor}></a>
<button onClick={handleClick}></button> <button onClick={handleClick}></button>
</div> </div>
+7 -6
View File
@@ -298,16 +298,16 @@ a
.result .result
width: 35rem width: 35rem
height: 1.5rem min-height: 1.5rem
margin: 0 auto margin: 0 auto
.result-complete .result-complete
display: flex display: flex
align-items: center align-items: center
justify-content: center justify-content: center
height: 2.25rem // height: 2.25rem
gap: 0.75rem gap: 0.75rem
margin-bottom: 1.5rem margin: 0.5rem 0 1.5rem 0
> svg > svg
width: 1.5rem width: 1.5rem
@@ -331,9 +331,10 @@ a
gap: 1.5rem gap: 1.5rem
> img > img
max-width: 8rem width: 8rem
max-height: 8rem height: 8rem
background-color: #333 object-fit: cover
background-color: #333333
border-radius: 0.5rem border-radius: 0.5rem
.result-word .result-word