Skip to content

Commit

Permalink
fix(outline): fix mobile detection and box shadow
Browse files Browse the repository at this point in the history
Also enable outline on mobile in read-write mode.

Fixes: #6410

Fixes: #6693

Signed-off-by: Jonas <jonas@freesources.org>

[skip ci]
  • Loading branch information
mejo- authored and backportbot[bot] committed Dec 5, 2024
1 parent a5f0b4c commit b7427bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/components/Editor/EditorOutline.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div data-text-el="editor-outline" class="editor--outline" :class="{ 'editor--outline-mobile': mobile }">
<div data-text-el="editor-outline" class="editor--outline" :class="{ 'editor--outline-mobile': $isMobile }">
<header class="editor--outline__header">
<NcButton class="editor--outline__btn-close"
type="tertiary"
Expand All @@ -21,6 +21,7 @@ import TableOfContents from './TableOfContents.vue'
import { useOutlineStateMixin, useOutlineActions } from './Wrapper.provider.js'
import { Close } from './../icons.js'
import useStore from '../../mixins/store.js'
import { useIsMobileMixin } from '../Editor.provider.js'
export default {
name: 'EditorOutline',
Expand Down Expand Up @@ -63,7 +64,8 @@ export default {
max-height: calc(100% - 204px);
&-mobile {
box-shadow: 8px 0 17px -19px var(--color-box-shadow);
border-radius: var(--border-radius-large);
box-shadow: 0 1px 10px var(--color-box-shadow);
background-color: var(--color-main-background-translucent);
z-index: 1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Editor/Wrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default {
return false
}

return this.viewWidth > 1265
return true
},
},

Expand Down

0 comments on commit b7427bc

Please sign in to comment.