mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
ctrl+tab and ctrl+shift+tab can be used to switch tabs
This commit is contained in:
parent
d36bff2a97
commit
aef0e552a0
@ -88,34 +88,24 @@
|
|||||||
.chrome-tabs .chrome-tab .chrome-tab-close {
|
.chrome-tabs .chrome-tab .chrome-tab-close {
|
||||||
flex-grow: 0;
|
flex-grow: 0;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
position: relative;
|
|
||||||
top: 3px;
|
|
||||||
width: 16px;
|
|
||||||
height: 16px;
|
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path stroke='rgba(0, 0, 0, .65)' stroke-linecap='square' stroke-width='1.5' d='M0 0 L8 8 M8 0 L0 8'></path></svg>");
|
z-index: 100;
|
||||||
background-position: center center;
|
width: 24px;
|
||||||
background-repeat: no-repeat;
|
height: 24px;
|
||||||
background-size: 8px 8px;
|
text-align: center;
|
||||||
}
|
}
|
||||||
@media (hover: hover) {
|
|
||||||
.chrome-tabs .chrome-tab .chrome-tab-close:hover {
|
.chrome-tabs .chrome-tab .chrome-tab-close span {
|
||||||
background-color: var(--more-accented-background-color);
|
font-size: 24px;
|
||||||
}
|
position: relative;
|
||||||
.chrome-tabs .chrome-tab .chrome-tab-close:hover:active {
|
top: -6px;
|
||||||
background-color: var(--more-accented-background-color);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@media not all and (hover: hover) {
|
|
||||||
.chrome-tabs .chrome-tab .chrome-tab-close:active {
|
.chrome-tabs .chrome-tab .chrome-tab-close:hover {
|
||||||
background-color: #dadce0;
|
background-color: var(--hover-item-background-color);
|
||||||
}
|
color: var(--hover-item-text-color);
|
||||||
}
|
|
||||||
@media (hover: hover) {
|
|
||||||
.chrome-tabs .chrome-tab:not([active]) .chrome-tab-close:not(:hover):not(:active) {
|
|
||||||
opacity: 0.8;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.chrome-tabs .chrome-tab[is-smaller] .chrome-tab-close {
|
.chrome-tabs .chrome-tab[is-smaller] .chrome-tab-close {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
@ -47,6 +47,7 @@ async function reloadAllTabs() {
|
|||||||
const note = await loadNote(noteContext.note.noteId);
|
const note = await loadNote(noteContext.note.noteId);
|
||||||
|
|
||||||
await loadNoteDetailToContext(noteContext, note);
|
await loadNoteDetailToContext(noteContext, note);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -271,6 +272,22 @@ if (utils.isElectron()) {
|
|||||||
|
|
||||||
chromeTabs.removeTab(chromeTabs.activeTabEl);
|
chromeTabs.removeTab(chromeTabs.activeTabEl);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
utils.bindShortcut('ctrl+tab', () => {
|
||||||
|
const nextTab = chromeTabs.nextTabEl;
|
||||||
|
|
||||||
|
if (nextTab) {
|
||||||
|
chromeTabs.setCurrentTab(nextTab);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
utils.bindShortcut('ctrl+shift+tab', () => {
|
||||||
|
const prevTab = chromeTabs.previousTabEl;
|
||||||
|
|
||||||
|
if (prevTab) {
|
||||||
|
chromeTabs.setCurrentTab(prevTab);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// this makes sure that when user e.g. reloads the page or navigates away from the page, the note's content is saved
|
// this makes sure that when user e.g. reloads the page or navigates away from the page, the note's content is saved
|
||||||
|
@ -39,6 +39,10 @@ button.close {
|
|||||||
color: var(--main-text-color);
|
color: var(--main-text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
button.close:hover {
|
||||||
|
color: var(--hover-item-text-color);
|
||||||
|
}
|
||||||
|
|
||||||
.modal-content {
|
.modal-content {
|
||||||
background-color: var(--modal-background-color) !important;
|
background-color: var(--modal-background-color) !important;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user