mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
tab bar is automatically hidden for only one tab
This commit is contained in:
parent
4ea27e604f
commit
bfc61f8b36
@ -5,6 +5,8 @@
|
|||||||
background: var(--main-background-color);
|
background: var(--main-background-color);
|
||||||
border-radius: 5px 5px 0 0;
|
border-radius: 5px 5px 0 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
grid-area: tabs;
|
||||||
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
.chrome-tabs * {
|
.chrome-tabs * {
|
||||||
box-sizing: inherit;
|
box-sizing: inherit;
|
||||||
|
@ -69,6 +69,7 @@
|
|||||||
this.setupEvents()
|
this.setupEvents()
|
||||||
this.layoutTabs()
|
this.layoutTabs()
|
||||||
this.setupDraggabilly()
|
this.setupDraggabilly()
|
||||||
|
this.setVisibility()
|
||||||
}
|
}
|
||||||
|
|
||||||
emit(eventName, data) {
|
emit(eventName, data) {
|
||||||
@ -93,6 +94,10 @@
|
|||||||
this.tabEls.forEach((tabEl) => this.setTabCloseEventListener(tabEl))
|
this.tabEls.forEach((tabEl) => this.setTabCloseEventListener(tabEl))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setVisibility() {
|
||||||
|
this.el.style.display = this.tabEls.length > 1 ? "block" : "none";
|
||||||
|
}
|
||||||
|
|
||||||
get tabEls() {
|
get tabEls() {
|
||||||
return Array.prototype.slice.call(this.el.querySelectorAll('.chrome-tab'))
|
return Array.prototype.slice.call(this.el.querySelectorAll('.chrome-tab'))
|
||||||
}
|
}
|
||||||
@ -191,6 +196,7 @@
|
|||||||
|
|
||||||
tabProperties = Object.assign({}, defaultTapProperties, tabProperties)
|
tabProperties = Object.assign({}, defaultTapProperties, tabProperties)
|
||||||
this.tabContentEl.appendChild(tabEl)
|
this.tabContentEl.appendChild(tabEl)
|
||||||
|
this.setVisibility()
|
||||||
this.setTabCloseEventListener(tabEl)
|
this.setTabCloseEventListener(tabEl)
|
||||||
this.updateTab(tabEl, tabProperties)
|
this.updateTab(tabEl, tabProperties)
|
||||||
this.emit('tabAdd', { tabEl })
|
this.emit('tabAdd', { tabEl })
|
||||||
@ -275,6 +281,7 @@
|
|||||||
this.cleanUpPreviouslyDraggedTabs()
|
this.cleanUpPreviouslyDraggedTabs()
|
||||||
this.layoutTabs()
|
this.layoutTabs()
|
||||||
this.setupDraggabilly()
|
this.setupDraggabilly()
|
||||||
|
this.setVisibility()
|
||||||
}
|
}
|
||||||
|
|
||||||
removeAllTabsExceptForThis(remainingTabEl) {
|
removeAllTabsExceptForThis(remainingTabEl) {
|
||||||
|
@ -15,7 +15,7 @@ body {
|
|||||||
1fr;
|
1fr;
|
||||||
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
grid-gap: 10px;
|
grid-gap: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#container.distraction-free-mode {
|
#container.distraction-free-mode {
|
||||||
@ -31,6 +31,7 @@ body {
|
|||||||
#note-tab-container {
|
#note-tab-container {
|
||||||
grid-area: tab-container;
|
grid-area: tab-container;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
|
padding-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#search-box {
|
#search-box {
|
||||||
@ -81,9 +82,9 @@ body {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
padding: 10px 0 10px 0;
|
padding: 10px 0 10px 0;
|
||||||
margin: 0 10px 0 10px;
|
|
||||||
border: 1px solid var(--main-border-color);
|
border: 1px solid var(--main-border-color);
|
||||||
border-radius: 7px;
|
border-radius: 7px;
|
||||||
|
margin: 10px 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-menu {
|
.dropdown-menu {
|
||||||
@ -160,4 +161,10 @@ li.dropdown-submenu:hover > ul.dropdown-menu {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -1px;
|
top: -1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.note-title-row {
|
||||||
|
flex-grow: 0;
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin-top: 10px;
|
||||||
}
|
}
|
@ -53,6 +53,7 @@ html, body {
|
|||||||
.note-title-row {
|
.note-title-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding-left: 15px;
|
padding-left: 15px;
|
||||||
|
padding-top: 10px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<div style="flex-grow: 0; flex-shrink: 0;">
|
<div class="note-title-row">
|
||||||
<div style="display: flex; align-items: center;">
|
<div style="display: flex; align-items: center;">
|
||||||
<div class="dropdown hide-toggle">
|
<div class="dropdown hide-toggle">
|
||||||
<button class="btn btn-sm dropdown-toggle note-path-list-button" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
<button class="btn btn-sm dropdown-toggle note-path-list-button" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user