Skip to content

Commit 54ed311

Browse files
committed
use Actions and ActionButton components
1 parent 73ed711 commit 54ed311

File tree

1 file changed

+29
-7
lines changed

1 file changed

+29
-7
lines changed

src/components/EditorEasyMDE.vue

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,26 @@
11
<template>
22
<div>
33
<div class="upload-button">
4-
<button class="icon-upload" @click="onClickUpload" />
5-
<button class="icon-files" @click="onClickSelect" />
4+
<Actions
5+
container=".upload-button"
6+
default-icon="icon-picture"
7+
menu-align="right"
8+
>
9+
<ActionButton
10+
icon="icon-upload"
11+
:close-after-click="true"
12+
@click="onClickUpload"
13+
>
14+
{{ t('notes', 'Upload image') }}
15+
</ActionButton>
16+
<ActionButton
17+
icon="icon-picture"
18+
:close-after-click="true"
19+
@click="onClickSelect"
20+
>
21+
{{ t('notes', 'Insert image') }}
22+
</ActionButton>
23+
</Actions>
624
</div>
725
<div class="markdown-editor" @click="onClickEditor">
826
<textarea />
@@ -17,10 +35,19 @@ import { generateUrl } from '@nextcloud/router'
1735
import store from '../store'
1836
import { showError } from '@nextcloud/dialogs'
1937
import '@nextcloud/dialogs/styles/toast.scss'
38+
import {
39+
Actions,
40+
ActionButton,
41+
} from '@nextcloud/vue'
2042
2143
export default {
2244
name: 'EditorEasyMDE',
2345
46+
components: {
47+
Actions,
48+
ActionButton,
49+
},
50+
2451
props: {
2552
value: {
2653
type: String,
@@ -337,13 +364,8 @@ export default {
337364
}
338365
339366
.upload-button {
340-
margin-right: 15px;
341367
right: 64px;
342368
position: fixed;
343369
height: 40px;
344370
}
345-
.upload-button button {
346-
height: 100%;
347-
width: 40px;
348-
}
349371
</style>

0 commit comments

Comments
 (0)