Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable25] Bring back menubar without formatting on plain text mode #3437

Merged
merged 3 commits into from Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions js/editor-collab.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/editor-collab.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/editor-rich.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/editor-rich.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/editor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/editor.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/files-modal.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/files-modal.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions js/text-files.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-files.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-public.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-text.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-text.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-viewer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-viewer.js.map

Large diffs are not rendered by default.

15 changes: 13 additions & 2 deletions src/components/Editor.vue
Expand Up @@ -36,7 +36,14 @@
<MainContainer v-if="$editor">
<!-- Readonly -->
<div v-if="readOnly" class="text-editor--readonly-bar">
<ReadonlyBar />
<ReadonlyBar>
<Status :document="document"
:dirty="dirty"
:sessions="filteredSessions"
:sync-error="syncError"
:has-connection-issue="hasConnectionIssue"
:last-saved-string="lastSavedString" />
</ReadonlyBar>
</div>
<!-- Rich Menu -->
<template v-else>
Expand Down Expand Up @@ -266,12 +273,16 @@ export default {
displayed() {
return this.currentSession && this.active
},
renderMenus() {
renderRichEditorMenus() {
return this.contentLoaded
&& this.isRichEditor
&& !this.syncError
&& !this.readOnly
},
renderMenus() {
return this.contentLoaded
&& !this.syncError
},
imagePath() {
return this.relativePath.split('/').slice(0, -1).join('/')
},
Expand Down
4 changes: 0 additions & 4 deletions src/components/Editor/SessionList.vue
Expand Up @@ -144,10 +144,6 @@ export default {
display: inline-flex;
flex-direction: row-reverse;

&:focus {
background-color: #eee;
}

.avatar-wrapper {
margin: 0 -18px 0 0;
z-index: 1;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Menu/MenuBar.vue
Expand Up @@ -184,7 +184,7 @@ export default {
clearInterval(this.$checkInterval)
}

if (isWidthAvailable) {
if (isWidthAvailable || !this.$isRichEditor) {
this.$nextTick(() => {
this.isReady = true
})
Expand Down
6 changes: 6 additions & 0 deletions src/components/Menu/ReadonlyBar.vue
Expand Up @@ -8,6 +8,9 @@
v-bind="{ actionEntry }"
:key="`text-action--${actionEntry.key}`" />
</div>
<div class="text-menubar__slot">
<slot />
</div>
</div>
</template>

Expand All @@ -28,6 +31,9 @@ export default defineComponent({
</script>

<style scoped>
.text-readonly-bar {
display: flex;
}
.text-readonly-bar__entries {
display: flex;
flex-grow: 1;
Expand Down