mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 11:56:00 +00:00
41 lines
761 B
Svelte
41 lines
761 B
Svelte
<script lang="ts" context="module">
|
|
export const matchingProps = [];
|
|
</script>
|
|
|
|
<script lang="ts">
|
|
import { onMount } from 'svelte';
|
|
import LoadingInfo from '../elements/LoadingInfo.svelte';
|
|
import Markdown from '../elements/Markdown.svelte';
|
|
import { apiCall } from '../utility/api';
|
|
|
|
let isLoading = false;
|
|
let text = null;
|
|
|
|
const handleLoad = async () => {
|
|
isLoading = true;
|
|
const resp = await apiCall('config/changelog');
|
|
text = resp;
|
|
isLoading = false;
|
|
};
|
|
|
|
onMount(() => {
|
|
handleLoad();
|
|
});
|
|
</script>
|
|
|
|
{#if isLoading}
|
|
<LoadingInfo message="Loading changelog" />
|
|
{:else}
|
|
<div>
|
|
<Markdown source={text || ''} />
|
|
</div>
|
|
{/if}
|
|
|
|
<style>
|
|
div {
|
|
padding: 10px;
|
|
overflow: auto;
|
|
flex: 1;
|
|
}
|
|
</style>
|