16
16
class =" icon-error-color"
17
17
@click =" onManualSave"
18
18
/>
19
- <button v-show =" actionsOpen && !fullscreen"
20
- v-tooltip =" t('notes', 'Toggle sidebar')"
21
- class =" icon-details"
22
- @click =" onToggleSidebar"
23
- />
24
- <button v-show =" actionsOpen"
25
- v-tooltip =" t('notes', 'Toggle preview')"
26
- class =" icon-toggle"
27
- :class =" { active: preview }"
28
- @click =" onTogglePreview"
29
- />
30
- <button v-show =" actionsOpen"
31
- v-tooltip =" t('notes', 'Toggle fullscreen mode')"
32
- class =" icon-fullscreen"
33
- :class =" { active: fullscreen }"
34
- @click =" onToggleDistractionFree"
35
- />
36
- <button
37
- v-tooltip =" t('notes', 'Toggle action menu')"
38
- class =" icon-more"
39
- :class =" { active: actionsOpen }"
40
- @click =" onToggleActions"
41
- />
19
+ <Actions :open.sync =" actionsOpen" menuAlign =" right" >
20
+ <ActionButton v-show =" !sidebarOpen && !fullscreen"
21
+ icon =" icon-details"
22
+ @click =" onToggleSidebar"
23
+ >
24
+ {{ t('notes', 'Show sidebar') }}
25
+ </ActionButton >
26
+ <ActionButton v-show =" !preview"
27
+ icon =" icon-toggle"
28
+ @click =" onTogglePreview"
29
+ >
30
+ {{ t('notes', 'Show preview') }}
31
+ </ActionButton >
32
+ <ActionButton v-show =" preview"
33
+ icon =" icon-rename"
34
+ @click =" onTogglePreview"
35
+ >
36
+ {{ t('notes', 'Edit note') }}
37
+ </ActionButton >
38
+ <ActionButton
39
+ icon =" icon-fullscreen"
40
+ :class =" { active: fullscreen }"
41
+ @click =" onToggleDistractionFree"
42
+ >
43
+ {{ t('notes', 'Fullscreen mode') }}
44
+ </ActionButton >
45
+ </Actions >
42
46
</span >
43
47
</div >
44
48
</AppContent >
45
49
</template >
46
50
<script >
47
51
48
52
import {
53
+ Actions ,
54
+ ActionButton ,
49
55
AppContent ,
50
56
Tooltip ,
51
57
} from ' nextcloud-vue'
@@ -58,6 +64,8 @@ export default {
58
64
name: ' Note' ,
59
65
60
66
components: {
67
+ Actions,
68
+ ActionButton,
61
69
AppContent,
62
70
TheEditor,
63
71
ThePreview,
@@ -191,10 +199,6 @@ export default {
191
199
this .actionsOpen = false
192
200
},
193
201
194
- onToggleActions () {
195
- this .actionsOpen = ! this .actionsOpen
196
- },
197
-
198
202
onEdit (newContent ) {
199
203
if (this .note .content !== newContent) {
200
204
const note = {
@@ -274,11 +278,16 @@ export default {
274
278
/* main editor button */
275
279
.action-buttons {
276
280
position : fixed ;
277
- bottom : 4 px ;
281
+ top : 50 px ;
278
282
right : 20px ;
283
+ margin-top : 1em ;
279
284
z-index : 2000 ;
280
285
}
281
286
287
+ .note-container.fullscreen .action-buttons {
288
+ top : 0px ;
289
+ }
290
+
282
291
.action-buttons button {
283
292
padding : 15px ;
284
293
}
0 commit comments