implement additional build options for EurekaAdapter

This commit is contained in:
Iris Lightshard 2022-06-18 23:48:39 -06:00
parent 2833ba2574
commit e975a7675b
Signed by: nilix
GPG key ID: 3B7FBC22144E6398
3 changed files with 22 additions and 1 deletions

View file

@ -267,7 +267,24 @@ func (self *EurekaAdapter) Build(buildOptions map[BuildOption]string) BuildStatu
Name: "twtxt",
Type: "string",
}]
rmNewestTwtxt := buildOptions[BuildOption{
Name: "remove newest twtxt",
Type: "bool",
}]
clearThumbs := buildOptions[BuildOption{
Name: "clear thumbnail cache",
Type: "bool",
}]
cmdArgs := []string{}
if clearThumbs != "" {
cmdArgs = append(cmdArgs, "-r")
}
if rmNewestTwtxt != "" {
cmdArgs = append(cmdArgs, "-d")
}
if twtxt != "" {
cmdArgs = append(cmdArgs, "-t")
cmdArgs = append(cmdArgs, twtxt)

View file

@ -370,6 +370,10 @@ input[type="file"]:valid + .file-feedback::after {
position: relative;
}
.build label.bool input {
display: inline;
margin: 0.5em;
}
@media screen and (max-width: 512px) {
body {
font-size: 75%;

View file

@ -11,7 +11,7 @@
<details><summary>Build Options</summary>
{{ range $opt := $buildOpts }}
{{ if eq ($opt).Type "bool" }}
<label>{{($opt).Name}} <input type="checkbox" name="{{($opt).Name}}:{{($opt).Type}}"/></label><br/>
<label class="bool">{{($opt).Name}} <input type="checkbox" name="{{($opt).Name}}:{{($opt).Type}}"/></label><br/>
{{ end }}
{{ end }}
{{ range $opt := $buildOpts }}