This commit is contained in:
Vanessa 2022-10-15 15:34:13 +08:00
parent 9480d7e3dd
commit 0957fe2fe6
4 changed files with 11 additions and 15 deletions

View file

@ -182,10 +182,6 @@
border-left-color: transparent !important; border-left-color: transparent !important;
box-shadow: inset 0 -2px 0 0 var(--b3-theme-background-light); box-shadow: inset 0 -2px 0 0 var(--b3-theme-background-light);
.item__text::after {
background: linear-gradient(90deg, rgba(0, 0, 0, 0.001), var(--b3-theme-background));
}
& + .item { & + .item {
border-left-color: transparent !important; border-left-color: transparent !important;
} }
@ -218,10 +214,8 @@
} }
&__text { &__text {
padding: 4px 0 4px 8px;
min-width: 56px; min-width: 56px;
@include text-clamp(1); @include text-clamp(1);
flex: 1;
text-align: center; text-align: center;
-webkit-font-smoothing: subpixel-antialiased; -webkit-font-smoothing: subpixel-antialiased;
color: var(--b3-theme-on-surface); color: var(--b3-theme-on-surface);

View file

@ -31,11 +31,11 @@ export const bazaar = {
const loadingHTML = `<div style="height: ${bazaar.element.clientHeight - 72}px;display: flex;align-items: center;justify-content: center;"><img src="/stage/loading-pure.svg"></div>`; const loadingHTML = `<div style="height: ${bazaar.element.clientHeight - 72}px;display: flex;align-items: center;justify-content: center;"><img src="/stage/loading-pure.svg"></div>`;
return `<div class="fn__flex-column" style="height: 100%"> return `<div class="fn__flex-column" style="height: 100%">
<div class="layout-tab-bar fn__flex"> <div class="layout-tab-bar fn__flex">
<div data-type="theme" class="item item--focus"><span class="item__text">${window.siyuan.languages.theme}</span></div> <div data-type="theme" class="item item--focus"><span class="fn__flex-1"></span><span class="item__text">${window.siyuan.languages.theme}</span><span class="fn__flex-1"></span></div>
<div data-type="template" class="item"><span class="item__text">${window.siyuan.languages.template}</span></div> <div data-type="template" class="item"><span class="fn__flex-1"></span><span class="item__text">${window.siyuan.languages.template}</span><span class="fn__flex-1"></span></div>
<div data-type="icon" class="item"><span class="item__text">${window.siyuan.languages.icon}</span></div> <div data-type="icon" class="item"><span class="fn__flex-1"></span><span class="item__text">${window.siyuan.languages.icon}</span><span class="fn__flex-1"></span></div>
<div data-type="widget" class="item"><span class="item__text">${window.siyuan.languages.widget}</span></div> <div data-type="widget" class="item"><span class="fn__flex-1"></span><span class="item__text">${window.siyuan.languages.widget}</span><span class="fn__flex-1"></span></div>
<div data-type="downloaded" class="item"><span class="item__text">${window.siyuan.languages.downloaded}</span></div> <div data-type="downloaded" class="item"><span class="fn__flex-1"></span><span class="item__text">${window.siyuan.languages.downloaded}</span><span class="fn__flex-1"></span></div>
</div> </div>
<div class="fn__flex-1"> <div class="fn__flex-1">
<div data-type="theme" class="bazaarPanel" data-init="true"> <div data-type="theme" class="bazaarPanel" data-init="true">

View file

@ -40,7 +40,9 @@ export class Tab {
} else if (options.docIcon) { } else if (options.docIcon) {
iconHTML = `<span class="item__icon">${unicode2Emoji(options.docIcon)}</span>`; iconHTML = `<span class="item__icon">${unicode2Emoji(options.docIcon)}</span>`;
} }
this.headElement.innerHTML = `${iconHTML}<span class="item__text">${escapeHtml(options.title)}</span> this.headElement.innerHTML = `<span class="fn__flex-1"></span>
${iconHTML}<span class="item__text">${escapeHtml(options.title)}</span>
<span class="fn__flex-1"></span>
<span class="item__close"><svg><use xlink:href='#iconClose'></use></svg></span>`; <span class="item__close"><svg><use xlink:href='#iconClose'></use></svg></span>`;
this.headElement.addEventListener("mouseenter", (event) => { this.headElement.addEventListener("mouseenter", (event) => {
event.stopPropagation(); event.stopPropagation();

View file

@ -222,9 +222,9 @@ export const openHistory = () => {
const dialog = new Dialog({ const dialog = new Dialog({
content: `<div class="fn__flex-column" style="height: 100%;"> content: `<div class="fn__flex-column" style="height: 100%;">
<div class="layout-tab-bar fn__flex" style="border-radius: 4px 4px 0 0"> <div class="layout-tab-bar fn__flex" style="border-radius: 4px 4px 0 0">
<div data-type="doc" class="item item--focus"><span class="item__text">${window.siyuan.languages.fileHistory}</span></div> <div data-type="doc" class="item item--focus"><span class="fn__flex-1"></span><span class="item__text">${window.siyuan.languages.fileHistory}</span><span class="fn__flex-1"></span></div>
<div data-type="notebook" class="item"><span class="item__text">${window.siyuan.languages.removedNotebook}</span></div> <div data-type="notebook" class="item"><span class="fn__flex-1"></span><span class="item__text">${window.siyuan.languages.removedNotebook}</span><span class="fn__flex-1"></span></div>
<div data-type="repo" class="item"><span class="item__text">${window.siyuan.languages.dataSnapshot}</span></div> <div data-type="repo" class="item"><span class="fn__flex-1"></span><span class="item__text">${window.siyuan.languages.dataSnapshot}</span><span class="fn__flex-1"></span></div>
</div> </div>
<div class="fn__flex-1 fn__flex" id="historyContainer"> <div class="fn__flex-1 fn__flex" id="historyContainer">
<div data-type="doc" class="history__repo fn__block" data-init="true"> <div data-type="doc" class="history__repo fn__block" data-init="true">