提交 253062cf 编写于 作者: AndroidLeaves's avatar AndroidLeaves

update

上级 9e79fef6
......@@ -23,6 +23,9 @@ await downloadLSPDependency();
if (typeof require === 'undefined') require = importModule
// 引入相关方法
const {
useFileManager,
base64Encode,
base64Decode,
scaleFontSize,
getSFSymbol,
writeWidgetSetting,
......@@ -465,6 +468,7 @@ await presentViewInApp({
type: 'cell',
icon: { name: 'lasso.and.sparkles', color: '#7743DB', },
needLoading: false,
showDesc: false,
},
{
name: 'otherSetting',
......@@ -631,6 +635,7 @@ await presentViewInApp({
break;
case 'quickStart':
const ufm = useFileManager();
const index = await presentSheet({
title: '快捷启动设置',
message: '⊱配置各个快捷按钮的启动配置⊰',
......@@ -642,9 +647,9 @@ await presentViewInApp({
],
});
if (index >= 0 && index <= 3) {
const localQuickConfigs = widgetSetting.quickStart;
const localQuickConfigs = ufm.readStringCache('quickStart');
const quickConfigJSON = localQuickConfigs ? localQuickConfigs : JSON.stringify(defaultPreference.quickConfigs);
const quickConfigArr = JSON.parse(quickConfigJSON);
const quickConfigArr = JSON.parse(base64Decode(quickConfigJSON));
const quickStack = quickConfigArr[index];
await generateInputAlert({
title: '快捷启动设置',
......@@ -658,7 +663,7 @@ await presentViewInApp({
quickStack.icon = inputArr[0].value;
quickStack.name = inputArr[1].value;
quickStack.scheme = inputArr[2].value;
widgetSetting.quickStart = JSON.stringify(quickConfigArr);
ufm.writeStringCache('quickStart', base64Encode(JSON.stringify(quickConfigArr)));
});
}
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册