Adapt react-client to use the real backend API (#1545)

Co-authored-by: Philip Molares <philip.molares@udo.edu>
Co-authored-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Erik Michelson 2022-04-15 23:03:15 +02:00 committed by GitHub
parent 3399ed2023
commit 26f90505ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
227 changed files with 4726 additions and 2310 deletions

View file

@ -13,7 +13,7 @@ const log = new Logger('DebuggerMarkdownExtension')
export class DebuggerMarkdownExtension extends MarkdownExtension {
public configureMarkdownItPost(markdownIt: MarkdownIt): void {
if (isDevMode()) {
if (isDevMode) {
markdownIt.core.ruler.push('printStateToConsole', (state) => {
log.debug('Current state', state)
return false

View file

@ -20,7 +20,7 @@ export const ProxyImageFrame: React.FC<React.ImgHTMLAttributes<HTMLImageElement>
return
}
getProxiedUrl(src)
.then((proxyResponse) => setImageUrl(proxyResponse.src))
.then((proxyResponse) => setImageUrl(proxyResponse.url))
.catch((err) => log.error(err))
}, [imageProxyEnabled, src])

View file

@ -7,7 +7,6 @@
import { MarkdownExtension } from '../markdown-extension'
import type MarkdownIt from 'markdown-it'
import plantuml from 'markdown-it-plantuml'
import type { RenderRule } from 'markdown-it/lib/renderer'
import type Renderer from 'markdown-it/lib/renderer'
import type Token from 'markdown-it/lib/token'
import type { Options } from 'markdown-it/lib'
@ -15,12 +14,12 @@ import type { ComponentReplacer } from '../../replace-components/component-repla
import { PlantumlNotConfiguredComponentReplacer } from './plantuml-not-configured-component-replacer'
export class PlantumlMarkdownExtension extends MarkdownExtension {
constructor(private plantumlServer: string | null) {
constructor(private plantumlServer?: string) {
super()
}
private plantumlError(markdownIt: MarkdownIt): void {
const defaultRenderer: RenderRule = markdownIt.renderer.rules.fence || (() => '')
const defaultRenderer: Renderer.RenderRule = markdownIt.renderer.rules.fence || (() => '')
markdownIt.renderer.rules.fence = (tokens: Token[], idx: number, options: Options, env, slf: Renderer) => {
return tokens[idx].info === 'plantuml'
? '<plantuml-not-configured></plantuml-not-configured>'