generated from halo-dev/plugin-starter
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Read custom insert via absolute path
- Loading branch information
1 parent
7634c89
commit 12b8d53
Showing
8 changed files
with
105 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ const lang: I18nLang = { | |
title: "标题", | ||
link: "链接", | ||
password: "密码", | ||
quick_insert: "快速插入", | ||
}; | ||
|
||
export default lang; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ const lang: I18nLang = { | |
title: "標題", | ||
link: "鏈接", | ||
password: "密碼", | ||
quick_insert: "快速插入", | ||
}; | ||
|
||
export default lang; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import type {QuickInsert} from "@/type/editor"; | ||
|
||
export const fetchAllQuickInsert = async (): Promise<QuickInsert[]> => { | ||
const quickInsertList: QuickInsert[] = []; | ||
// Get Default Path | ||
try { | ||
const response = await fetch("/plugins/vditor-mde/assets/static/test.json"); | ||
const quickInsertJson: QuickInsert = await response.json(); | ||
quickInsertList.push(quickInsertJson); | ||
} catch (e) { | ||
// ignore this | ||
} | ||
return quickInsertList; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"name": "Joe Theme", | ||
"tip": "Joe自定义模块", | ||
"provider": "halo-theme-joe-3.0", | ||
"icon": "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 -960 960 960\" width=\"24\"><path d=\"M480-80q-26 0-47-12.5T400-126q-33 0-56.5-23.5T320-206v-142q-59-39-94.5-103T190-590q0-121 84.5-205.5T480-880q121 0 205.5 84.5T770-590q0 77-35.5 140T640-348v142q0 33-23.5 56.5T560-126q-12 21-33 33.5T480-80Zm-80-126h160v-36H400v36Zm0-76h160v-38H400v38Zm-8-118h58v-108l-88-88 42-42 76 76 76-76 42 42-88 88v108h58q54-26 88-76.5T690-590q0-88-61-149t-149-61q-88 0-149 61t-61 149q0 63 34 113.5t88 76.5Zm88-162Zm0-38Z\"/></svg>", | ||
"schema": [ | ||
{ | ||
"type": "template", | ||
"id": "joe-progress", | ||
"icon": "", | ||
"name": "进度条", | ||
"formKit": [ | ||
{ | ||
"$formkit": "text", | ||
"name": "percentage", | ||
"label": "进度", | ||
"help": "This is the percentage for progress bar.", | ||
"value": "0" | ||
}, | ||
{ | ||
"$formkit": "color", | ||
"name": "color", | ||
"label": "颜色", | ||
"help": "This is the color for progress bar.", | ||
"value": "#ffffff" | ||
} | ||
], | ||
"template": "<joe-progress percentage=\"$percentage$%\" color=\"$color$\"></joe-progress>" | ||
} | ||
] | ||
} |