2021-10-18 08:49:16 +00:00
|
|
|
{{define "home"}}
|
|
|
|
{{template "base/header" .}}
|
2021-10-20 15:58:14 +00:00
|
|
|
{{template "components/error" .}}
|
|
|
|
<script>
|
2021-10-23 04:56:24 +00:00
|
|
|
var Active = "{{.File.Name}}";
|
2021-10-20 15:58:14 +00:00
|
|
|
</script>
|
2021-10-18 18:38:28 +00:00
|
|
|
|
2021-10-20 15:58:14 +00:00
|
|
|
<section class="hero is-small is-primary">
|
2021-10-21 08:04:57 +00:00
|
|
|
<div class="hero-body" id="title">
|
2021-10-20 15:58:14 +00:00
|
|
|
<p class="title">
|
2021-10-23 04:56:24 +00:00
|
|
|
{{.AppName}}
|
2021-10-20 15:58:14 +00:00
|
|
|
</p>
|
2021-10-18 08:49:16 +00:00
|
|
|
</div>
|
2021-10-20 15:58:14 +00:00
|
|
|
</section>
|
2021-10-18 18:38:28 +00:00
|
|
|
|
2021-10-20 15:58:14 +00:00
|
|
|
<div class="columns">
|
|
|
|
<div class="column is-one-quarter">
|
|
|
|
<div class="box">
|
2021-10-19 09:28:38 +00:00
|
|
|
{{template "components/menu" .}}
|
2021-10-18 18:38:28 +00:00
|
|
|
</div>
|
2021-11-09 03:27:58 +00:00
|
|
|
{{if .Actions}}
|
|
|
|
<div class="box">
|
|
|
|
<p class="menu-label has-text-left">Actions</p>
|
|
|
|
<div class="buttons are-small">
|
|
|
|
{{- range .Actions -}}
|
|
|
|
<button class="button has-tooltip-arrow" id="actbtn-{{.Name|normal}}"
|
|
|
|
data-tooltip="{{.Cmd}}" onclick="toolDoAction('{{.Name}}')">
|
|
|
|
<span>{{- .Name -}}</span>
|
|
|
|
</button>
|
|
|
|
{{- end -}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{if .Integrations}}
|
|
|
|
<div class="box">
|
|
|
|
<p class="menu-label has-text-left">Integrations</p>
|
|
|
|
<div class="buttons are-small">
|
|
|
|
{{- range .Integrations -}}
|
|
|
|
<button class="button has-tooltip-arrow" id="itgbtn-{{.Name|normal}}"
|
|
|
|
data-tooltip="{{.Description}}" onclick="toolDoIntegration('{{.Name}}')">
|
|
|
|
<span>{{- .Name -}}</span>
|
|
|
|
</button>
|
|
|
|
{{- end -}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
2021-10-20 15:58:14 +00:00
|
|
|
<div class="box has-text-centered">
|
2021-10-24 07:06:02 +00:00
|
|
|
<a href="{{.BaseUrl}}api/export" class="button is-small">Export Files</a>
|
2021-10-18 18:38:28 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-10-20 15:58:14 +00:00
|
|
|
<div class="column">
|
|
|
|
<div class="box">
|
2021-10-23 04:56:24 +00:00
|
|
|
{{if and .HideConfig (eq .File.Name .AppName)}}
|
|
|
|
Home
|
|
|
|
{{else}}
|
2021-10-19 09:28:38 +00:00
|
|
|
{{template "components/editor" .}}
|
2021-10-23 04:56:24 +00:00
|
|
|
{{end}}
|
2021-10-18 18:38:28 +00:00
|
|
|
</div>
|
2021-10-23 04:56:24 +00:00
|
|
|
{{if .ResultBellow}}
|
|
|
|
<div class="box">
|
|
|
|
<div id="result_editor"></div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
2021-10-18 18:38:28 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-11-09 03:27:58 +00:00
|
|
|
|
|
|
|
<script>
|
|
|
|
async function toolDoAction(name){
|
|
|
|
let el = document.getElementById('actbtn-'+name.replaceAll(" ","-"));
|
|
|
|
el.classList.add("is-loading")
|
|
|
|
el.classList.remove("has-tooltip-arrow")
|
|
|
|
await DoAction('action',name)
|
|
|
|
el.classList.remove("is-loading")
|
|
|
|
el.classList.add("has-tooltip-arrow")
|
|
|
|
{{if not .ResultBellow}}ResultViewTog(){{end}}
|
|
|
|
}
|
|
|
|
|
|
|
|
async function toolDoIntegration(name){
|
|
|
|
let el = document.getElementById('itgbtn-'+name.replaceAll(" ","-"));
|
|
|
|
el.classList.add("is-loading")
|
|
|
|
el.classList.remove("has-tooltip-arrow")
|
|
|
|
await DoAction('integration',name)
|
|
|
|
el.classList.remove("is-loading")
|
|
|
|
el.classList.add("has-tooltip-arrow")
|
|
|
|
{{if not .ResultBellow}}ResultViewTog(){{end}}
|
|
|
|
}
|
|
|
|
</script>
|
2021-10-23 04:56:24 +00:00
|
|
|
{{if not .ResultBellow}}
|
2021-10-20 15:58:14 +00:00
|
|
|
{{template "components/result" .}}
|
2021-10-23 04:56:24 +00:00
|
|
|
{{end}}
|
2021-10-18 08:49:16 +00:00
|
|
|
{{template "base/footer" .}}
|
|
|
|
{{end}}
|