Skip to content

Commit

Permalink
fix: #338 联动Sofill=主题,提供统一的hook入口,除了js片段之外,新增挂件触发插槽显示
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Jan 30, 2023
1 parent 1350ff6 commit c55437e
Show file tree
Hide file tree
Showing 16 changed files with 549 additions and 394 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
"vue-i18n": "^9.2.2"
},
"devDependencies": {
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
"@esbuild-plugins/node-modules-polyfill": "^0.2.0",
"@esbuild-plugins/node-globals-polyfill": "^0.1.1",
"@esbuild-plugins/node-modules-polyfill": "^0.1.4",
"@types/express": "^4.17.13",
"@types/node": "^16.18.11",
"@typescript-eslint/eslint-plugin": "^5.0.0",
Expand Down
12 changes: 7 additions & 5 deletions pages/anki/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Terwer . All rights reserved.
* Copyright (c) 2022-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
Expand All @@ -26,7 +26,9 @@
import pageUtil from "~/utils/pageUtil"
import anki from "./App.vue"

// 创建统一的Vue实例
const app = pageUtil.createPage(anki)
// 挂载Vue
app.mount("#app")
;(async () => {
// 创建统一的Vue实例
const app = await pageUtil.createPage(anki)
// 挂载Vue
app.mount("#app")
})()
12 changes: 7 additions & 5 deletions pages/blog/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Terwer . All rights reserved.
* Copyright (c) 2022-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
Expand All @@ -26,7 +26,9 @@
import pageUtil from "~/utils/pageUtil"
import blog from "./App.vue"

// 创建统一的Vue实例
const app = pageUtil.createPage(blog)
// 挂载Vue
app.mount("#app")
;(async () => {
// 创建统一的Vue实例
const app = await pageUtil.createPage(blog)
// 挂载Vue
app.mount("#app")
})()
12 changes: 7 additions & 5 deletions pages/detail/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Terwer . All rights reserved.
* Copyright (c) 2022-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
Expand All @@ -26,7 +26,9 @@
import pageUtil from "~/utils/pageUtil"
import detail from "./App.vue"

// 创建统一的Vue实例
const app = pageUtil.createPage(detail)
// 挂载Vue
app.mount("#app")
;(async () => {
// 创建统一的Vue实例
const app = await pageUtil.createPage(detail)
// 挂载Vue
app.mount("#app")
})()
12 changes: 7 additions & 5 deletions pages/index/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Terwer . All rights reserved.
* Copyright (c) 2022-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
Expand All @@ -26,7 +26,9 @@
import pageUtil from "~/utils/pageUtil"
import index from "./App.vue"

// 创建统一的Vue实例
const app = pageUtil.createPage(index)
// 挂载Vue
app.mount("#app")
;(async () => {
// 创建统一的Vue实例
const app = await pageUtil.createPage(index)
// 挂载Vue
app.mount("#app")
})()
12 changes: 7 additions & 5 deletions pages/picgo/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Terwer . All rights reserved.
* Copyright (c) 2022-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
Expand All @@ -26,7 +26,9 @@
import pageUtil from "~/utils/pageUtil"
import picgo from "./App.vue"

// 创建统一的Vue实例
const app = pageUtil.createPage(picgo)
// 挂载Vue
app.mount("#app")
;(async () => {
// 创建统一的Vue实例
const app = await pageUtil.createPage(picgo)
// 挂载Vue
app.mount("#app")
})()
12 changes: 7 additions & 5 deletions pages/publish/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Terwer . All rights reserved.
* Copyright (c) 2022-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
Expand All @@ -26,7 +26,9 @@
import pageUtil from "~/utils/pageUtil"
import publish from "./App.vue"

// 创建统一的Vue实例
const app = pageUtil.createPage(publish)
// 挂载Vue
app.mount("#app")
;(async () => {
// 创建统一的Vue实例
const app = await pageUtil.createPage(publish)
// 挂载Vue
app.mount("#app")
})()
16 changes: 8 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions public/lib/json-localstorage/json-localstorage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* 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.
*/

// 警告⚠️:请勿在非思源笔记浏览器环境调用此文件中的任何方法

// JsonLocalStorage
const initJsonLocalStorage = () => {}

0 comments on commit c55437e

Please sign in to comment.