aaa
This commit is contained in:
@@ -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"}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user