Compare commits

..

3 Commits

Author SHA1 Message Date
Magnus Åhall
51502bd694 Bumped to v18 2024-01-09 17:20:02 +01:00
Magnus Åhall
39c26f77bc Fixed config for upload path 2024-01-09 17:19:54 +01:00
Magnus Åhall
02c427da23 Fixed orphaned markdown elements 2024-01-09 17:15:05 +01:00
3 changed files with 19 additions and 10 deletions

View File

@ -80,6 +80,12 @@ func main() { // {{{
}
logger.Info("application", "version", VERSION)
config, err = ConfigRead(flagConfig)
if err != nil {
logger.Error("application", "error", err)
os.Exit(1)
}
service, err = webservice.New(flagConfig, VERSION, logger)
if err != nil {
logger.Error("application", "error", err)

View File

@ -311,7 +311,7 @@ class NodeContent extends Component {
var element
if (node.RenderMarkdown.value)
element = html`<div id="markdown"></div>`
element = html`<${MarkdownContent} key='markdown-content' content=${content} />`
else
element = html`
<div class="grow-wrap">
@ -322,18 +322,10 @@ class NodeContent extends Component {
return element
}//}}}
componentDidMount() {//{{{
const markdown = document.getElementById('markdown')
if (markdown)
markdown.innerHTML = marked.parse(this.props.node.content())
this.resize()
window.addEventListener('resize', () => this.resize())
}//}}}
componentDidUpdate() {//{{{
const markdown = document.getElementById('markdown')
if (markdown)
markdown.innerHTML = marked.parse(this.props.node.content())
this.resize()
}//}}}
contentChanged(evt) {//{{{
@ -371,6 +363,17 @@ class NodeContent extends Component {
}//}}}
}
class MarkdownContent extends Component {
render({ content }) {
return html`<div id="markdown"></div>`
}
componentDidMount() {//{{{
const markdown = document.getElementById('markdown')
if (markdown)
markdown.innerHTML = marked.parse(this.props.content)
}//}}}
}
class NodeFiles extends Component {
render({ node }) {//{{{
if (node.Files === null || node.Files.length == 0)

View File

@ -1 +1 @@
v17
v18