Skip to content

Commit

Permalink
refactor(editor): rename autohide to hideMenu and isHidden
Browse files Browse the repository at this point in the history
Signed-off-by: Max <[email protected]>
  • Loading branch information
max-nextcloud committed Jan 2, 2024
1 parent e90ebda commit 2f2be40
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/components/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<template v-else>
<MenuBar v-if="renderMenus"
ref="menubar"
:autohide="autohide"
:is-hidden="hideMenu"
:loaded.sync="menubarLoaded">
<Status :document="document"
:dirty="dirty"
Expand Down Expand Up @@ -213,7 +213,7 @@ export default {
type: String,
default: null,
},
autohide: {
hideMenu: {
type: Boolean,
default: false,
},
Expand Down
8 changes: 4 additions & 4 deletions src/components/Menu/MenuBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
:class="{
'text-menubar--ready': isReady,
'text-menubar--show': isVisible,
'text-menubar--autohide': autohide,
'text-menubar--hide': isHidden,
'text-menubar--is-workspace': $isRichWorkspace
}">
<HelpModal v-if="displayHelp" @close="hideHelp" />
Expand Down Expand Up @@ -136,7 +136,7 @@ export default {
return val
},
props: {
autohide: {
isHidden: {
type: Boolean,
default: false,
},
Expand Down Expand Up @@ -274,13 +274,13 @@ export default {
justify-content: flex-end;
align-items: center;

&.text-menubar--ready:not(.text-menubar--autohide) {
&.text-menubar--ready:not(.text-menubar--hide) {
visibility: visible;
animation-name: fadeInDown;
animation-duration: 0.3s;
}

&.text-menubar--autohide {
&.text-menubar--hide {
opacity: 0;
transition: visibility 0.2s 0.4s, opacity 0.2s 0.4s;
&.text-menubar--show {
Expand Down
8 changes: 4 additions & 4 deletions src/views/RichWorkspace.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
:share-token="shareToken"
:mime="file.mimetype"
:autofocus="autofocus"
:autohide="autohide"
:hide-menu="hideMenu"
active
rich-workspace
@ready="ready=true"
Expand Down Expand Up @@ -87,7 +87,7 @@ export default {
loaded: false,
ready: false,
autofocus: false,
autohide: true,
hideMenu: true,
darkTheme: OCA.Accessibility && OCA.Accessibility.theme === 'dark',
enabled: OCA.Text.RichWorkspaceEnabled,
}
Expand Down Expand Up @@ -136,7 +136,7 @@ export default {
methods: {
onFocus() {
this.focus = true
this.autohide = false
this.hideMenu = false
this.unlistenKeydownEvents()
},
reset() {
Expand Down Expand Up @@ -199,7 +199,7 @@ export default {
},
onKeydown(e) {
if (e.key === 'Tab') {
this.autohide = false
this.hideMenu = false
}
},
onFileCreated(node) {
Expand Down

0 comments on commit 2f2be40

Please sign in to comment.