Skip to content

Commit

Permalink
Fix sharing in sidebar
Browse files Browse the repository at this point in the history
Signed-off-by: Arne Hamann <[email protected]>
  • Loading branch information
tacruc committed Jan 23, 2023
1 parent 3895980 commit 154e4f9
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 10 deletions.
32 changes: 23 additions & 9 deletions src/components/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@
:on-update="tab.update"
:on-destroy="tab.destroy"
:on-scroll-bottom-reached="tab.scrollBottomReached"
:file-info="fileInfo" />
:file-info="fileInfo">
<template v-if="tab.iconSvg !== undefined" #icon>
<!-- eslint-disable-next-line vue/no-v-html -->
<span class="svg-icon" v-html="tab.iconSvg" />
</template>
</SidebarTab>
</template>
</NcAppSidebar>
</template>
Expand Down Expand Up @@ -619,23 +624,32 @@ export default {
}
.app-sidebar {
&--full {
position: fixed !important;
z-index: 2025 !important;
top: 0 !important;
height: 100% !important;
}
&--has-preview::v-deep {
.app-sidebar-header__figure {
background-size: cover;
}
&[data-mimetype='text/plain'],
&[data-mimetype='text/markdown'] {
&[data-mimetype="text/plain"],
&[data-mimetype="text/markdown"] {
.app-sidebar-header__figure {
background-size: contain;
}
}
}
&--full {
position: fixed !important;
z-index: 2025 !important;
top: 0 !important;
height: 100% !important;
}
.svg-icon {
::v-deep svg {
width: 20px;
height: 20px;
fill: currentColor;
}
}
}
</style>
5 changes: 4 additions & 1 deletion src/components/Sidebar/SidebarTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
:name="name"
:icon="icon"
@bottomReached="onScrollBottomReached">
<template #icon>
<slot name="icon" />
</template>
<!-- Fallback loading -->
<NcEmptyContent v-if="loading" icon="icon-loading" />

Expand Down Expand Up @@ -63,7 +66,7 @@ export default {
},
icon: {
type: String,
required: true,
required: false,
},

/**
Expand Down

0 comments on commit 154e4f9

Please sign in to comment.