优化部分配置项,无需输入反引号

This commit is contained in:
roozen 2023-07-26 14:56:08 +08:00
parent 417588e5bf
commit 30ed4b72fe
7 changed files with 18 additions and 23 deletions

View File

@ -824,10 +824,9 @@ spec:
- $formkit: url - $formkit: url
name: fetchUrl name: fetchUrl
if: $get(enable_footer_group).value if: $get(enable_footer_group).value
value: "`https://moments.0206.ink/randomfriend?num=3`" value: "https://moments.0206.ink/randomfriend?num=3"
label: 页脚友链地址 label: 页脚友链地址
placeholder: 请输入页脚友链地址 placeholder: 请输入页脚友链地址
help: 注意格式 (`友链地址`)
- $formkit: group - $formkit: group
name: footerContent name: footerContent
label: 页脚内容 label: 页脚内容
@ -1197,10 +1196,9 @@ spec:
placeholder: 请输入跳转 url placeholder: 请输入跳转 url
- $formkit: url - $formkit: url
name: apiurl name: apiurl
value: "`https://moments.0206.ink/`" value: "https://moments.0206.ink/"
label: token地址 label: token地址
placeholder: 请输入token地址 placeholder: 请输入token地址
help: 注意格式 (`token地址`)
- $formkit: radio - $formkit: radio
name: fcircleRandomFriendsEnable name: fcircleRandomFriendsEnable
label: 友链鱼塘页面(钓鱼) label: 友链鱼塘页面(钓鱼)
@ -1212,7 +1210,7 @@ spec:
value: false value: false
- $formkit: radio - $formkit: radio
name: linksRandomFriendsEnable name: linksRandomFriendsEnable
label: 页面(钓鱼) label: 页面(钓鱼)
value: true value: true
options: options:
- label: 打开 - label: 打开
@ -1860,7 +1858,7 @@ spec:
- $formkit: group - $formkit: group
if: $get(twikooEnable).value if: $get(twikooEnable).value
name: twikoos name: twikoos
label: Twikoo评论配置(注意填写格式) label: Twikoo评论配置
value: value:
maxBarrage: maxBarrage:
barrageTime: barrageTime:
@ -1882,19 +1880,16 @@ spec:
help: 右下角弹出热评弹幕的间隔时间 help: 右下角弹出热评弹幕的间隔时间
- $formkit: url - $formkit: url
name: envId name: envId
value: "`xxxxxxx`"
label: Twikoo评论 - 环境id/后端URL label: Twikoo评论 - 环境id/后端URL
placeholder: 请输入环境id或URL 格式:`ID或地址` placeholder: 请输入环境id或URL
help: 注意格式,请用反单引号括起来,详情请查看文档 help: 详情请查看文档
- $formkit: text - $formkit: text
name: accessToken name: accessToken
value: "`tokenxxxxx`"
label: Twikoo评论 - 管理员令牌 label: Twikoo评论 - 管理员令牌
placeholder: 请输入token 格式:`tokenxxxxx` placeholder: 请输入token
help: 注意格式,在浏览器F12的控制台中获取用于显示弹幕详情请查看文档 help: 在浏览器F12的控制台中获取用于显示弹幕详情请查看文档
- $formkit: text - $formkit: text
name: mailMd5 name: mailMd5
value: "`xxxxxxxxxx`"
label: Twikoo评论 - 博主邮箱MD5值 label: Twikoo评论 - 博主邮箱MD5值
placeholder: 请输入md5值 placeholder: 请输入md5值
help: 用于验证博主评论可前往cmd5.com加密自己使用的邮箱选择32位小写 help: 用于验证博主评论可前往cmd5.com加密自己使用的邮箱选择32位小写

View File

@ -33,7 +33,7 @@
<div id="random-post"></div> <div id="random-post"></div>
<script type="text/javascript"> <script type="text/javascript">
var fdataUser = { var fdataUser = {
apiurl: [[${theme.config.fcircle.apiurl}]], apiurl: "[(${theme.config.fcircle.apiurl})]",
defaultFish: 500, defaultFish: 500,
hungryFish: 500, hungryFish: 500,
} }
@ -52,7 +52,7 @@
<script> <script>
let UserConfig = { let UserConfig = {
// 填写你的api地址 // 填写你的api地址
private_api_url: [[${theme.config.fcircle.apiurl}]], private_api_url: "[(${theme.config.fcircle.apiurl})]",
// 点击加载更多时一次最多加载几篇文章默认10 // 点击加载更多时一次最多加载几篇文章默认10
page_turning_number: 12, page_turning_number: 12,
// 头像加载失败时,默认头像地址 // 头像加载失败时,默认头像地址

View File

@ -15,10 +15,10 @@
//弹幕显示间隔时间ms //弹幕显示间隔时间ms
barrageTime: [[${ theme.config.comments.twikoos.barrageTime }]], barrageTime: [[${ theme.config.comments.twikoos.barrageTime }]],
//twikoo部署地址腾讯云的为环境ID //twikoo部署地址腾讯云的为环境ID
twikooUrl: [[${ theme.config.comments.twikoos.envId }]], twikooUrl: "[(${theme.config.comments.twikoos.envId})]",
//token获取见上方 //token获取见上方
accessToken: [[${ theme.config.comments.twikoos.accessToken }]], accessToken: "[(${theme.config.comments.twikoos.accessToken})]",
mailMd5: [[${ theme.config.comments.twikoos.mailMd5 }]], mailMd5: "[(${theme.config.comments.twikoos.mailMd5})]",
pageUrl: window.location.pathname, pageUrl: window.location.pathname,
barrageTimer: [], barrageTimer: [],
barrageList: [], barrageList: [],

View File

@ -14,7 +14,7 @@
const init = () => { const init = () => {
twikoo.init(Object.assign({ twikoo.init(Object.assign({
el: '#twikoo-wrap', el: '#twikoo-wrap',
envId: [[${theme.config.comments.twikoos.envId}]], envId: "[(${theme.config.comments.twikoos.envId})]",
region: '', region: '',
onCommentLoaded: function () { onCommentLoaded: function () {
btf.loadLightbox(document.querySelectorAll('#twikoo .tk-content img:not(.vemoji)')) btf.loadLightbox(document.querySelectorAll('#twikoo .tk-content img:not(.vemoji)'))
@ -36,7 +36,7 @@
const getCount = () => { const getCount = () => {
twikoo.getCommentsCount({ twikoo.getCommentsCount({
envId: [[${theme.config.comments.twikoos.envId}]], envId: "[(${theme.config.comments.twikoos.envId})]",
region: '', region: '',
urls: [window.location.pathname], urls: [window.location.pathname],
includeReply: true includeReply: true

View File

@ -8,7 +8,7 @@
addFriendLinksInFooter: function () { addFriendLinksInFooter: function () {
var linksUrl = '[[${theme.config.link.linksUrl}]]' var linksUrl = '[[${theme.config.link.linksUrl}]]'
var fetchUrl = [[${theme.config.footer.footer_group.fetchUrl}]] var fetchUrl = "[(${theme.config.footer.footer_group.fetchUrl})]"
fetch(fetchUrl) fetch(fetchUrl)
.then(res => res.json()) .then(res => res.json())
.then(json => { .then(json => {

View File

@ -11,7 +11,7 @@
const defaultpagesize = 5; const defaultpagesize = 5;
const finalpagesize = pagesize <= 0 ? defaultpagesize : pagesize; const finalpagesize = pagesize <= 0 ? defaultpagesize : pagesize;
twikoo.getRecentComments({ twikoo.getRecentComments({
envId: [[${ theme.config.comments.twikoos.envId }]], // 环境 ID envId: "[(${theme.config.comments.twikoos.envId})]", // 环境 ID
// region: 'ap-guangzhou', // 环境地域,默认为 ap-shanghai如果您的环境地域不是上海需传此参数 // region: 'ap-guangzhou', // 环境地域,默认为 ap-shanghai如果您的环境地域不是上海需传此参数
pageSize: finalpagesize, // 获取多少条默认10最大100 pageSize: finalpagesize, // 获取多少条默认10最大100
includeReply: false // 是否包括最新回复默认false includeReply: false // 是否包括最新回复默认false

View File

@ -24,7 +24,7 @@
const getComment = () => { const getComment = () => {
const runTwikoo = () => { const runTwikoo = () => {
twikoo.getRecentComments({ twikoo.getRecentComments({
envId: [[${ theme.config.comments.twikoos.envId }]], envId: "[(${theme.config.comments.twikoos.envId})]",
region: '', region: '',
pageSize: 6, pageSize: 6,
includeReply: true includeReply: true