Skip to content

Commit

Permalink
feat: 新版挂件-插件版极速发布菜单联动
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Jul 31, 2023
1 parent a063926 commit 833af19
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 4 deletions.
6 changes: 4 additions & 2 deletions scripts/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@
print("将dist文件打包成zip,用于挂件版本发布.")

if args.test:
scriptutils.cp_folder(dist_folder, "/Users/terwer/Documents/mydocs/SiYuanWorkspace/public/data/widgets/sy-post-publisher/", True)
print("拷贝文件到本地 public 工作空间测试.")
# scriptutils.cp_folder(dist_folder, "/Users/terwer/Documents/mydocs/SiYuanWorkspace/public/data/widgets/sy-post-publisher/")
# print("拷贝文件到本地 public 工作空间测试.")
scriptutils.cp_folder(dist_folder, "/Users/terwer/Documents/mydocs/SiYuanWorkspace/test/data/widgets/sy-post-publisher/")
print("拷贝文件到本地 test 工作空间测试.")

print("发布完毕.")
2 changes: 2 additions & 0 deletions src/composables/useVueRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import SettingEntry from "~/src/components/set/publish/singleplatform/SettingEnt
import PlatformAddForm from "~/src/components/set/publish/PlatformAddForm.vue"
import PlatformUpdateForm from "~/src/components/set/publish/PlatformUpdateForm.vue"
import PlatformQuickAdd from "~/src/components/set/publish/PlatformQuickAdd.vue"
import QuickPublish from "~/src/workers/quickPublish.vue"

const ApiTest = () => import("~/src/pages/ApiTest.vue")
const SiyuanTest = () => import("~/src/components/test/SiyuanTest.vue")
Expand All @@ -43,6 +44,7 @@ const ZhihuTest = () => import("~/src/components/test/ZhihuTest.vue")

const routes: RouteRecordRaw[] = [
{ path: "/", component: Home },
{ path: "/workers/quickPublish/:key/:id", component: QuickPublish },
{
path: "/test",
component: ApiTest,
Expand Down
1 change: 0 additions & 1 deletion src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
*/

export const isDev = process.env.DEV_MODE === "true"
export const moduleBase = process.env.APP_BASE

/**
* 动态配置key,全系统唯一,请勿更改
Expand Down
2 changes: 1 addition & 1 deletion src/utils/svgIcons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ export const svgIcons = {
iconIFCSDN: `<svg t="1690721786570" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3120" width="16" height="16"><path d="M512 0c282.784 0 512 229.216 512 512s-229.216 512-512 512S0 794.784 0 512 229.216 0 512 0z m189.952 752l11.2-108.224c-31.904 9.536-100.928 16.128-147.712 16.128-134.464 0-205.728-47.296-195.328-146.304 11.584-110.688 113.152-145.696 232.64-145.696 54.784 0 122.432 8.8 151.296 18.336L768 272.704C724.544 262.24 678.272 256 599.584 256c-203.2 0-388.704 94.88-406.4 263.488C178.336 660.96 303.584 768 535.616 768c80.672 0 138.464-6.432 166.336-16z" p-id="3121"></path></svg>`,
iconIFJianshu: `<svg t="1690723639888" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5035" width="16" height="16"><path d="M654.791 38.495h-286.53c-95.005 0-142.412 0-193.612 16.118-55.94 20.48-99.935 64.474-120.225 120.226-16.308 51.2-16.308 98.607-16.308 193.611v286.53c0 95.005 0 142.602 16.118 193.613 20.29 55.75 64.285 99.745 120.036 120.035 51.2 16.119 98.607 16.119 193.611 16.119h286.53c95.005 0 142.413 0 193.613-16.119 55.75-20.29 99.745-64.284 120.225-120.035 16.118-51.2 16.118-98.608 16.118-193.612V368.45c0-95.005 0-142.412-16.118-193.612-20.29-55.752-64.285-99.746-120.225-120.226-50.821-16.118-98.228-16.118-193.233-16.118z m0 0" p-id="5036"></path><path d="M235.52 456.818h70.732v370.346H235.52V456.818z m40.012-112.45c17.825 32.995 29.203 65.8 34.512 98.796h77.18c-10.62-42.097-23.894-74.903-39.823-98.797h-71.87z m0 0" fill="#a0cfff" p-id="5037"></path><path d="M427.804 278.566h85.144v-46.649H358.59c1.706-3.603 4.361-10.05 7.964-19.153 1.707-7.395 3.603-12.705 5.31-16.497H292.03c-12.326 49.303-40.77 85.902-85.144 109.795v46.65c58.595-14.602 100.124-39.254 124.966-73.956H358.4c8.913 23.703 14.222 46.648 15.929 68.645h74.524c-5.12-25.79-12.326-48.734-21.049-68.835z m-34.702 148.1h320.664v301.701c1.707 27.497-10.62 40.202-37.167 38.306h-43.995v54.803h63.906c62.009 1.896 92.16-26.549 90.453-85.144V371.864h-393.86v54.803z m0 0" fill="#a0cfff" p-id="5038"></path><path d="M643.224 476.16H382.483v277.049H563.39c56.699 1.896 83.437-25.6 79.834-82.3V476.16z m-188.871 49.304h117.001v63.146H454.353v-63.146z m82.488 178.252h-82.488v-68.457h117.001v32.996c1.707 25.41-9.671 37.357-34.513 35.46zM645.88 229.262c0-1.896 0.948-4.55 2.654-8.154l7.965-24.652h-79.834c-12.516 51.2-39.823 89.695-82.49 115.295v43.805c54.993-14.602 96.712-40.202 124.967-76.8h37.167c8.913 23.703 14.222 46.648 15.929 68.645h71.87c-1.707-18.204-8.913-41.15-21.239-68.645h93.108v-49.304H645.88z m0 0" fill="#a0cfff" p-id="5039"></path></svg>`,
iconIFJuejin: `<svg t="1690725319716" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6174" width="16" height="16"><path d="M465.189 161.792c-22.967 18.14-44.325 35.109-47.397 37.742l-5.851 4.68 10.971 8.632c5.998 4.827 11.85 9.508 13.02 10.532 1.17 1.024 17.993 14.336 37.156 29.696l34.962 27.795 5.267-3.95c2.925-2.194 23.259-18.432 45.348-35.986 21.943-17.555 41.253-32.768 42.716-33.646 1.609-1.024 2.779-2.194 2.779-2.78 0-0.438-9.655-8.63-21.504-17.846-11.995-9.363-22.674-17.847-23.845-18.871-15.945-13.02-49.737-39.059-50.76-39.059-0.586 0.147-19.896 14.922-42.862 33.061z m233.325 180.37C507.465 493.275 508.928 492.105 505.417 489.911c-3.072-1.902-11.556-8.485-64.073-50.03-9.07-7.168-18.578-14.775-21.358-16.823-2.78-2.194-8.777-6.875-13.312-10.532-4.68-3.657-10.679-8.339-13.312-10.533-13.165-10.24-71.095-56.027-102.107-80.457-5.852-4.681-11.41-8.485-12.142-8.485-0.731 0-10.971 7.754-22.674 17.116-11.703 9.508-22.674 18.286-24.284 19.456-1.755 1.17-5.12 3.95-7.46 6.144-2.34 2.34-4.828 4.096-5.413 4.096-3.072 0-0.731 3.072 6.437 8.777 4.096 3.218 8.777 6.875 10.094 8.046 1.316 1.024 10.24 8.045 19.748 15.506s23.26 18.286 30.428 23.99c19.31 15.215 31.89 25.308 127.853 101.084 47.836 37.742 88.796 69.779 90.844 71.095 3.657 2.487 3.95 2.487 7.46-0.292a1041.42 1041.42 0 0 0 16.092-12.727c6.875-5.413 14.775-11.703 17.554-13.897 30.135-23.699 80.018-63.05 81.774-64.512 1.17-1.024 12.434-9.802 24.868-19.603s37.888-29.696 56.32-44.324c18.579-14.629 46.227-36.425 61.733-48.567 15.506-12.142 27.794-22.528 27.502-23.26-0.878-1.17-57.637-47.104-59.978-48.274-0.731-0.439-18.578 12.727-39.497 29.257z" p-id="6175"></path><path d="M57.93 489.326c-15.215 12.288-28.527 23.405-29.697 24.576-2.34 2.194-5.412-0.44 80.018 66.852 33.207 26.185 32.622 25.747 57.637 45.495 10.386 8.192 36.279 28.672 57.783 45.495 38.18 30.135 44.91 35.401 52.663 41.545 2.048 1.756 22.967 18.14 46.372 36.572 23.26 18.432 74.167 58.514 112.933 89.088 38.912 30.573 71.095 55.734 71.826 56.027 0.732 0.293 7.46-4.389 14.921-10.386 21.797-16.97 90.259-70.949 101.523-79.872 5.705-4.535 12.873-10.24 15.945-12.58 3.072-2.488 6.436-5.12 7.314-5.852 0.878-0.878 11.85-9.509 24.283-19.31 20.773-16.091 59.1-46.226 64.366-50.615 1.17-1.024 5.12-4.096 8.777-6.875 3.657-2.78 7.9-6.29 9.509-7.607 1.609-1.317 14.775-11.703 29.257-23.113 29.11-22.82 42.277-33.207 88.503-69.632 17.262-13.605 32.475-25.454 33.646-26.478 2.486-2.048 31.451-24.869 44.617-35.255 4.827-3.657 9.07-7.168 9.508-7.607 0.44-0.585 5.998-4.827 12.435-9.8 6.436-4.828 13.165-10.24 15.067-11.85l3.365-2.926-9.948-7.753c-5.412-4.388-10.24-8.192-10.679-8.63-1.17-1.317-22.381-18.433-30.135-24.284-3.95-3.072-7.314-5.998-7.606-6.73-1.317-3.071-6.73 0.147-29.258 17.994-13.458 10.532-25.746 20.187-27.355 21.504-1.61 1.463-10.533 8.338-19.749 15.652-9.216 7.168-17.115 13.459-17.554 13.898-0.439 0.438-6.583 5.412-13.897 10.971-7.168 5.559-15.214 11.703-17.7 13.75-4.974 4.097-5.413 4.39-20.334 16.239-5.56 4.388-11.264 8.777-12.435 9.8-1.17 1.025-20.333 16.092-42.422 33.354-22.09 17.408-41.546 32.768-43.155 34.084-1.609 1.463-14.482 11.557-28.525 22.528s-40.814 32.037-59.539 46.812c-18.578 14.775-42.276 33.353-52.516 41.399s-23.26 18.285-28.965 22.82l-10.386 8.339-4.389-3.072c-2.34-1.756-4.68-3.511-5.12-3.95-0.439-0.439-4.973-4.096-10.24-8.046-11.849-9.216-14.482-11.264-16.676-13.166-0.878-0.877-4.243-3.51-7.46-5.851-3.22-2.487-6.145-4.681-6.584-5.12-0.439-0.439-6.875-5.705-14.482-11.703-7.607-5.851-14.921-11.556-16.091-12.58-1.317-1.17-17.116-13.605-35.255-27.795-17.993-14.19-35.109-27.648-38.035-29.842-5.705-4.681-33.499-26.624-125.074-98.743-34.523-27.209-72.704-57.344-84.846-66.852-49.737-39.498-55.15-43.594-56.905-43.447-0.877 0-14.043 10.24-29.257 22.528z" p-id="6176"></path></svg>`,
iconIFWechat: `<svg t="1690726490823" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7276" width="200" height="200"><path d="M996.427776 623.853568c0-139.354112-138.063872-251.815936-291.87072-251.815936-162.281472 0-290.656256 112.461824-290.656256 251.815936 0 139.352064 128.374784 251.807744 290.656256 251.807744 35.119104 0 69.031936-11.001856 104.148992-18.331648l92.043264 52.559872-24.2176-88.014848c67.821568-50.122752 119.896064-119.791616 119.896064-198.02112z m-386.338816-45.24032c-16.95744 0-33.906688-15.890432-33.906688-31.77472 0-19.562496 16.95744-35.446784 33.906688-35.446784 25.438208 0 43.599872 15.890432 43.599872 35.446784 0.002048 15.884288-18.161664 31.77472-43.599872 31.77472z m190.144512 0c-18.167808 0-33.910784-15.890432-33.910784-31.77472 0-19.562496 15.745024-35.446784 33.910784-35.446784 24.219648 0 42.387456 15.890432 42.387456 35.446784 0 15.884288-18.169856 31.77472-42.387456 31.77472z" p-id="7277"></path><path d="M683.97056 352.48128c9.68704 0 20.588544 1.216512 32.700416 3.672064-29.063168-141.809664-178.03264-242.044928-345.155584-242.044928-188.925952 0-343.943168 127.127552-343.943168 293.373952 0 94.130176 50.868224 171.145216 136.855552 232.25344l-35.131392 105.132032 122.318848-62.347264c42.385408 12.232704 75.087872 19.562496 119.90016 19.562496 9.68704 0 20.594688 0 30.27968-1.216512-6.053888-24.45312-9.684992-47.681536-9.684992-73.34912 0-150.355968 127.156224-275.03616 291.86048-275.03616z m-185.2928-91.686912c26.64448 0 43.599872 15.890432 43.599872 42.78272 0 25.675776-16.955392 42.784768-43.599872 42.784768-25.432064 0-49.657856-17.1008-49.657856-42.784768 0-26.894336 24.225792-42.78272 49.657856-42.78272z m-239.794176 85.573632c-25.432064 0-52.076544-17.115136-52.076544-42.79296 0-26.894336 26.64448-42.78272 52.076544-42.78272 24.223744 0 43.599872 15.890432 43.599872 42.78272 0 25.677824-19.376128 42.79296-43.599872 42.79296z" p-id="7278"></path></svg>`,
iconIFWechat: `<svg t="1690726490823" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7276" width="16" height="16"><path d="M996.427776 623.853568c0-139.354112-138.063872-251.815936-291.87072-251.815936-162.281472 0-290.656256 112.461824-290.656256 251.815936 0 139.352064 128.374784 251.807744 290.656256 251.807744 35.119104 0 69.031936-11.001856 104.148992-18.331648l92.043264 52.559872-24.2176-88.014848c67.821568-50.122752 119.896064-119.791616 119.896064-198.02112z m-386.338816-45.24032c-16.95744 0-33.906688-15.890432-33.906688-31.77472 0-19.562496 16.95744-35.446784 33.906688-35.446784 25.438208 0 43.599872 15.890432 43.599872 35.446784 0.002048 15.884288-18.161664 31.77472-43.599872 31.77472z m190.144512 0c-18.167808 0-33.910784-15.890432-33.910784-31.77472 0-19.562496 15.745024-35.446784 33.910784-35.446784 24.219648 0 42.387456 15.890432 42.387456 35.446784 0 15.884288-18.169856 31.77472-42.387456 31.77472z" p-id="7277"></path><path d="M683.97056 352.48128c9.68704 0 20.588544 1.216512 32.700416 3.672064-29.063168-141.809664-178.03264-242.044928-345.155584-242.044928-188.925952 0-343.943168 127.127552-343.943168 293.373952 0 94.130176 50.868224 171.145216 136.855552 232.25344l-35.131392 105.132032 122.318848-62.347264c42.385408 12.232704 75.087872 19.562496 119.90016 19.562496 9.68704 0 20.594688 0 30.27968-1.216512-6.053888-24.45312-9.684992-47.681536-9.684992-73.34912 0-150.355968 127.156224-275.03616 291.86048-275.03616z m-185.2928-91.686912c26.64448 0 43.599872 15.890432 43.599872 42.78272 0 25.675776-16.955392 42.784768-43.599872 42.784768-25.432064 0-49.657856-17.1008-49.657856-42.784768 0-26.894336 24.225792-42.78272 49.657856-42.78272z m-239.794176 85.573632c-25.432064 0-52.076544-17.115136-52.076544-42.79296 0-26.894336 26.64448-42.78272 52.076544-42.78272 24.223744 0 43.599872 15.890432 43.599872 42.78272 0 25.677824-19.376128 42.79296-43.599872 42.79296z" p-id="7278"></path></svg>`,
// FontAwesome svgIcons
}
36 changes: 36 additions & 0 deletions src/workers/quickPublish.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!--
- Copyright (c) 2023, Terwer . All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Terwer designates this
- particular file as subject to the "Classpath" exception as provided
- by Terwer in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com
- or visit www.terwer.space if you need additional information or have any
- questions.
-->

<script setup lang="ts">
</script>

<template>
<div>quick publishing...</div>
</template>

<style scoped lang="stylus">
</style>

0 comments on commit 833af19

Please sign in to comment.