mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-24 01:23:10 +02:00
Improve test page
This commit is contained in:
parent
9b1612574e
commit
4198497237
2 changed files with 21 additions and 4 deletions
|
@ -145,6 +145,9 @@ root(fill)
|
||||||
font-size 13px
|
font-size 13px
|
||||||
opacity 0.7
|
opacity 0.7
|
||||||
|
|
||||||
|
&:empty
|
||||||
|
display none
|
||||||
|
|
||||||
*
|
*
|
||||||
margin 0
|
margin 0
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,14 @@
|
||||||
<ui-textarea v-model="mfm">
|
<ui-textarea v-model="mfm">
|
||||||
<span>MFM</span>
|
<span>MFM</span>
|
||||||
</ui-textarea>
|
</ui-textarea>
|
||||||
<div>
|
</section>
|
||||||
|
<section>
|
||||||
|
<header>Preview</header>
|
||||||
<misskey-flavored-markdown :text="mfm" :i="$store.state.i"/>
|
<misskey-flavored-markdown :text="mfm" :i="$store.state.i"/>
|
||||||
</div>
|
</section>
|
||||||
|
<section>
|
||||||
|
<header style="margin-bottom:0;">AST</header>
|
||||||
|
<ui-textarea v-model="mfmAst" readonly tall style="margin-top:16px;"></ui-textarea>
|
||||||
</section>
|
</section>
|
||||||
</ui-card>
|
</ui-card>
|
||||||
|
|
||||||
|
@ -16,8 +21,9 @@
|
||||||
<div slot="title">Dialog Generator</div>
|
<div slot="title">Dialog Generator</div>
|
||||||
<section class="fit-top">
|
<section class="fit-top">
|
||||||
<ui-select v-model="dialogType" placeholder="">
|
<ui-select v-model="dialogType" placeholder="">
|
||||||
<option value="info">Info</option>
|
<option value="info">Information</option>
|
||||||
<option value="success">Success</option>
|
<option value="success">Success</option>
|
||||||
|
<option value="warning">Warning</option>
|
||||||
<option value="error">Error</option>
|
<option value="error">Error</option>
|
||||||
</ui-select>
|
</ui-select>
|
||||||
<ui-input v-model="dialogTitle">
|
<ui-input v-model="dialogTitle">
|
||||||
|
@ -35,6 +41,8 @@
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
import parse from '../../../../mfm/parse';
|
||||||
|
import * as JSON5 from 'json5';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
data() {
|
data() {
|
||||||
|
@ -47,6 +55,12 @@ export default Vue.extend({
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
mfmAst(): any {
|
||||||
|
return JSON5.stringify(parse(this.mfm), null, 2);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
showDialog() {
|
showDialog() {
|
||||||
this.$root.alert({
|
this.$root.alert({
|
||||||
|
|
Loading…
Reference in a new issue