mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 10:00:13 +01:00
💄 bazaar
This commit is contained in:
parent
1b89ebee28
commit
1181f2977e
3 changed files with 6 additions and 12 deletions
|
|
@ -38,7 +38,6 @@
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: var(--b3-theme-on-background);
|
color: var(--b3-theme-on-background);
|
||||||
|
|
|
||||||
|
|
@ -195,13 +195,8 @@ export const bazaar = {
|
||||||
response.data.packages.forEach((item: IBazaarItem) => {
|
response.data.packages.forEach((item: IBazaarItem) => {
|
||||||
html += `<div data-bazaar="${bazaarType}" data-type="${item.modes?.toString()}" data-downloaded="true" class="b3-card">
|
html += `<div data-bazaar="${bazaarType}" data-type="${item.modes?.toString()}" data-downloaded="true" class="b3-card">
|
||||||
<div class="b3-card__img"><img src="${item.previewURLThumb}"/></div>
|
<div class="b3-card__img"><img src="${item.previewURLThumb}"/></div>
|
||||||
<div class="b3-card__info fn__flex">
|
<div class="b3-card__info">
|
||||||
<span class="fn__flex-center fn__ellipsis">${item.name}</span>
|
${item.name}
|
||||||
<span class="fn__space"></span>
|
|
||||||
<span class="fn__flex-1"></span>
|
|
||||||
<svg class="svg fn__flex-center"><use xlink:href="#iconDownload"></use></svg>
|
|
||||||
<span class="fn__space"></span>
|
|
||||||
<span class="fn__flex-center">${item.downloads}</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="b3-card__actions" data-url="${item.repoURL}" data-name="${item.name}" data-hash="${item.repoHash}">
|
<div class="b3-card__actions" data-url="${item.repoURL}" data-name="${item.name}" data-hash="${item.repoHash}">
|
||||||
<div class="fn__flex-1"></div>
|
<div class="fn__flex-1"></div>
|
||||||
|
|
@ -277,9 +272,9 @@ export const bazaar = {
|
||||||
<div class="${(data.installed || isDownloaded) ? "fn__none" : ""}" data-type="${data.modes?.toString()}">
|
<div class="${(data.installed || isDownloaded) ? "fn__none" : ""}" data-type="${data.modes?.toString()}">
|
||||||
<button class="b3-button" style="width: 168px" data-hash="${data.repoHash}" data-name="${data.name}" data-bazaar="${bazaarType}" data-url="${data.repoURL}" data-type="install">${window.siyuan.languages.download}</button>
|
<button class="b3-button" style="width: 168px" data-hash="${data.repoHash}" data-name="${data.name}" data-bazaar="${bazaarType}" data-url="${data.repoURL}" data-type="install">${window.siyuan.languages.download}</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="fn__hr--b"></div>
|
<div class="fn__hr--b${isDownloaded ? " fn__none" : ""}"></div>
|
||||||
<div class="fn__hr--b"></div>
|
<div class="fn__hr--b${isDownloaded ? " fn__none" : ""}"></div>
|
||||||
<div class="fn__flex" style="justify-content: center;">
|
<div class="fn__flex${isDownloaded ? " fn__none" : ""}" style="justify-content: center;">
|
||||||
<svg class="svg ft__on-surface fn__flex-center"><use xlink:href="#iconGithub"></use></svg>
|
<svg class="svg ft__on-surface fn__flex-center"><use xlink:href="#iconGithub"></use></svg>
|
||||||
<span class="fn__space"></span>
|
<span class="fn__space"></span>
|
||||||
<a href="${data.repoURL}" target="_blank" title="GitHub Repo">Repo</a>
|
<a href="${data.repoURL}" target="_blank" title="GitHub Repo">Repo</a>
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => {
|
||||||
window.siyuan.menus.menu.append(new MenuItem({
|
window.siyuan.menus.menu.append(new MenuItem({
|
||||||
label: window.siyuan.languages.insertRight,
|
label: window.siyuan.languages.insertRight,
|
||||||
icon: "iconRight",
|
icon: "iconRight",
|
||||||
accelerator: "⌥Click",
|
accelerator: window.siyuan.config.keymap.editor.general.refBottom.custom + "/⌥Click",
|
||||||
click() {
|
click() {
|
||||||
fetchPost("/api/block/checkBlockFold", {id: refBlockId}, (foldResponse) => {
|
fetchPost("/api/block/checkBlockFold", {id: refBlockId}, (foldResponse) => {
|
||||||
openFileById({
|
openFileById({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue