Skip to content

Commit

Permalink
fix: 优化移动端图标展示
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed May 24, 2023
1 parent c968df1 commit 116fe33
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 13 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ Import epub, docx, html, etc. into Siyuan notes. Currently supported formats: .e
After the installation is complete, find the `Importer` icon on the top right toolbar, and click to follow the pop-up window.

## Changelog
**v1.5.3 major update**
* Optimize the icon display on the mobile terminal, note: there is no pandoc on the mobile terminal, and the import function is temporarily unavailable

**v1.5.2 major update**
* hash temporary path lowercase ([38a2972](https://github.com/terwer/siyuan-plugin-importer/commit/38a29729b76c477d217e01d2770ccc4da793944d))
* New verification, temporary files must be cleared before batch import ([508999d](https://github.com/terwer/siyuan-plugin-importer/commit/508999d5cb01246a69c2c979f08f370933cc4630))
Expand Down
3 changes: 3 additions & 0 deletions README_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
安装完成后,在顶部右侧工具栏找到 `导入工具` 图标,点击按照弹窗操作即可。

## 更新历史
**v1.5.3 主要更新**
* 优化移动端图标展示,注:移动端没有pandoc,导入功能暂不可用

**v1.5.2 主要更新**
* hash临时路径小写 ([38a2972](https://github.com/terwer/siyuan-plugin-importer/commit/38a29729b76c477d217e01d2770ccc4da793944d))
* 新增校验,批量导入之前必须清除临时文件 ([508999d](https://github.com/terwer/siyuan-plugin-importer/commit/508999d5cb01246a69c2c979f08f370933cc4630))
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"importNotRecursive": "Not recursive",
"importTipNotAllowed": "File type is not allowed:",
"importError": "Import error:",
"cleanTemp": "clean up temporary files",
"cleanTemp": "Clean up temporary files",
"tempTotal": "Total",
"clean": "Delete",
"tempCount": "temporary files",
"tempCountExists": "Please clean up the temporary files before batch import",
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"importNotRecursive": "不递归",
"importTipNotAllowed": "不允许的文件类型:",
"importError": "导入出错:",
"cleanTemp": "清理临时文件,共",
"cleanTemp": "清理临时文件",
"tempTotal": "",
"clean": "删除",
"tempCount": "个临时文件",
"tempCountExists": "请先清理临时文件在进行批量导入",
Expand Down
28 changes: 18 additions & 10 deletions src/lib/ImportForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -367,16 +367,24 @@
</button>
</div>

<div class="b3-label config-assets">
<label class="fn__flex">
{pluginInstance.i18n.cleanTemp} <span class="selected"> [ {tempCount} ] </span>
{pluginInstance.i18n.tempCount}
<div class="fn__flex-1" />
<button id="removeAll" class="b3-button b3-button--outline fn__flex-center fn__size200" on:click={cleanTemp}>
<svg class="svg"><use xlink:href="#iconTrashcan" /></svg>
{pluginInstance.i18n.clean}
</button>
</label>
<div class="fn__flex b3-label config__item">
<div class="fn__flex-1 fn__flex-center">
{pluginInstance.i18n.cleanTemp}
<div class="b3-label__text">
{pluginInstance.i18n.tempTotal} <span class="selected"> [ {tempCount} ] </span>
{pluginInstance.i18n.tempCount}
</div>
</div>
<span class="fn__space" />
<button
id="removeAll"
class="b3-button b3-button--outline fn__flex-center fn__size200"
style="position: relative"
>
<input id="batchRemoveData" class="b3-form__upload" on:click={cleanTemp} />
<svg class="svg"><use xlink:href="#iconTrashcan" /></svg>
{pluginInstance.i18n.clean}
</button>
</div>

<div class="fn__flex b3-label config__item">{pluginInstance.i18n.supportedTypes}</div>
Expand Down
2 changes: 1 addition & 1 deletion src/utils/svg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
*/

export const iconImporter = {
iconImporter: `<span class="importer-topbar-icon"><svg t="1684307075455" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2348" width="16" height="16"><path d="M558.933333 1024c-10.666667 0-21.333333-4.266667-25.6-14.933333l-352-512c-6.4-10.666667-8.533333-23.466667-2.133333-32 6.4-10.666667 17.066667-17.066667 29.866667-17.066667h189.866666c-12.8-168.533333-132.266667-317.866667-296.533333-366.933333-12.8-4.266667-21.333333-17.066667-21.333333-29.866667S89.6 25.6 104.533333 21.333333c42.666667-14.933333 89.6-21.333333 134.4-21.333333 253.866667 0 462.933333 198.4 480 448h192c12.8 0 23.466667 6.4 27.733334 17.066667 6.4 10.666667 4.266667 23.466667-2.133334 32l-352 512c-4.266667 10.666667-14.933333 14.933333-25.6 14.933333zM268.8 512l290.133333 424.533333L851.2 512h-162.133333c-17.066667 0-32-14.933333-32-32C657.066667 249.6 469.333333 64 238.933333 64h-17.066666c145.066667 85.333333 241.066667 243.2 241.066666 416 0 17.066667-14.933333 32-32 32h-162.133333z m452.266667-32z" p-id="2349"></path></svg></span>`,
iconImporter: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="32" height="32"><path d="M4 15H6V20H18V4H6V9H4V3C4 2.44772 4.44772 2 5 2H19C19.5523 2 20 2.44772 20 3V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V15ZM10 11V8L15 12L10 16V13H2V11H10Z"></path></svg>`,
}

0 comments on commit 116fe33

Please sign in to comment.