mirror of https://github.com/statping/statping
fixed Theme Editor codemirror inputs, test responses design for notifier
parent
a9ef085024
commit
ef60ba765c
|
@ -1,4 +1,4 @@
|
|||
<template >
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="loaded && !directory" class="jumbotron jumbotron-fluid">
|
||||
<div class="text-center col-12">
|
||||
|
@ -8,7 +8,7 @@
|
|||
</p></span>
|
||||
</div>
|
||||
</div>
|
||||
<form v-if="loaded && directory" @submit.prevent="saveAssets" :disabled="pending">
|
||||
<form v-observe-visibility="visible" v-if="loaded && directory" @submit.prevent="saveAssets" :disabled="pending">
|
||||
<h3>Variables</h3>
|
||||
<codemirror v-show="loaded" v-model="vars" ref="vars" :options="cmOptions" class="codemirrorInput"/>
|
||||
|
||||
|
@ -77,6 +77,13 @@
|
|||
this.changeTab('vars')
|
||||
},
|
||||
methods: {
|
||||
visible(isVisible, entry) {
|
||||
if (isVisible) {
|
||||
this.$refs.vars.codemirror.refresh()
|
||||
this.$refs.base.codemirror.refresh()
|
||||
this.$refs.mobile.codemirror.refresh()
|
||||
}
|
||||
},
|
||||
async fetchTheme() {
|
||||
this.loaded = true
|
||||
this.pending = true
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
<div class="card-body">
|
||||
|
||||
<div v-if="error && !success" class="alert alert-danger col-12" role="alert">
|
||||
{{error}}<p v-if="response">Response:<br>{{response}}</p>
|
||||
{{error}}
|
||||
</div>
|
||||
<div v-if="success" class="alert alert-success col-12" role="alert">
|
||||
<span class="text-capitalize">{{notifier.title}}</span> appears to be working!
|
||||
|
@ -174,7 +174,6 @@ export default {
|
|||
},
|
||||
onCmSuccessReady(cm) {
|
||||
this.success_data = beautify(this.notifier.success_data, this.beautifySettings)
|
||||
console.log('the editor is ready!', cm)
|
||||
setTimeout(function() {
|
||||
cm.refresh();
|
||||
},1);
|
||||
|
|
|
@ -6,7 +6,6 @@ import (
|
|||
"fmt"
|
||||
"github.com/GeertJohan/go.rice"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/russross/blackfriday/v2"
|
||||
"github.com/statping/statping/utils"
|
||||
"os"
|
||||
"os/exec"
|
||||
|
@ -30,12 +29,6 @@ func Assets() error {
|
|||
return err
|
||||
}
|
||||
|
||||
// HelpMarkdown will return the Markdown of help.md into HTML
|
||||
func HelpMarkdown() string {
|
||||
output := blackfriday.Run(CompiledWiki)
|
||||
return string(output)
|
||||
}
|
||||
|
||||
func scssRendered(name string) string {
|
||||
spl := strings.Split(name, "/")
|
||||
path := spl[:len(spl)-2]
|
||||
|
@ -137,6 +130,9 @@ func CreateAllAssets(folder string) error {
|
|||
if err := MakePublicFolder(fp(folder, "assets", "css")); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := MakePublicFolder(fp(folder, "assets", "favicon")); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := MakePublicFolder(fp(folder, "assets", "scss")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue