diff --git a/package.json b/package.json
index 5ef76d2f3..80cae136a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "sub-store-front-end",
- "version": "2.14.179",
+ "version": "2.14.180",
"private": true,
"scripts": {
"dev": "vite --host",
diff --git a/src/locales/en.ts b/src/locales/en.ts
index 1d5535a6f..7dfe8d7ac 100644
--- a/src/locales/en.ts
+++ b/src/locales/en.ts
@@ -30,6 +30,7 @@ export default {
file: 'File',
sync: 'Sync',
my: 'My Profile',
+ editScript: 'Script Edit',
subEditor: 'Subscription Editor',
fileEditor: 'File Editor',
themeSetting: 'Theme Setting',
diff --git a/src/locales/zh.ts b/src/locales/zh.ts
index 0d578d34f..ad02e2f25 100644
--- a/src/locales/zh.ts
+++ b/src/locales/zh.ts
@@ -30,6 +30,7 @@ export default {
file: '文件管理',
sync: '同步',
my: '我的',
+ editScript: '脚本编辑',
subEditor: '订阅编辑',
fileEditor: '文件编辑',
themeSetting: '主题设置',
diff --git a/src/router/index.ts b/src/router/index.ts
index 16f7e7e0d..9fc095c15 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -11,6 +11,7 @@ import NotFound from '@/views/NotFound.vue';
import File from '@/views/File.vue';
import FileEditor from '@/views/FileEditor.vue';
+import editScript from '@/views/editCode/editScript.vue';
import Sub from '@/views/Sub.vue';
import SubEditor from '@/views/SubEditor.vue';
@@ -111,6 +112,15 @@ const router = createRouter({
needNavBack: false,
},
},
+ {
+ path: '/edit/Script/:id',
+ component: editScript,
+ meta: {
+ title: 'editScript',
+ needTabBar: false,
+ needNavBack: true,
+ },
+ },
{
path: '/edit/:editType(files)/:id',
component: FileEditor,
diff --git a/src/store/codeStore.ts b/src/store/codeStore.ts
index 53d1bc3ca..66cc56bb1 100644
--- a/src/store/codeStore.ts
+++ b/src/store/codeStore.ts
@@ -4,12 +4,16 @@ export const useCodeStore = defineStore("cmCodeStore", {
state: (): cmCodeStore => {
return {
CmCode: "",
+ EditCode: {},
};
},
getters: {},
actions: {
setCmCode(i: { toString: () => any }) {
- this.CmCode = i.toString();
+ this.CmCode = i ? i.toString() : "";
+ },
+ setEditCode( id: string , i: { toString: () => any }) {
+ this.EditCode[id] = i ? i.toString() : "";
},
},
});
diff --git a/src/types/store/codeStore.d.ts b/src/types/store/codeStore.d.ts
index 90d56b61c..60d0e31a2 100644
--- a/src/types/store/codeStore.d.ts
+++ b/src/types/store/codeStore.d.ts
@@ -1,3 +1,4 @@
interface cmCodeStore {
CmCode?: string;
+ EditCode?: { [key: string]: string };
}
diff --git a/src/views/FileEditor.vue b/src/views/FileEditor.vue
index 17b787001..8d1564dd4 100644
--- a/src/views/FileEditor.vue
+++ b/src/views/FileEditor.vue
@@ -54,62 +54,63 @@
/>
+ required
+ :label="$t(`editorPage.subConfig.basic.source.label`)"
+ prop="source"
+ >
- {{ $t(`filePage.source.remote`) }}
+
+ {{ $t(`filePage.source.remote`) }}
- {{ $t(`filePage.source.local`) }}
+
+ {{ $t(`filePage.source.local`) }}
-
-
-
-
-
+ required
+ v-if="form.source === 'remote'"
+ :label="$t(`editorPage.subConfig.basic.url.label`)"
+ prop="url"
+ :rules="[
+ {
+ required: true,
+ message: $t(`filePage.url.isEmpty`),
+ },
+ {
+ validator: urlValidator,
+ message: $t(`filePage.url.isIllegal`),
+ },
+ ]"
+ >
+
+
+
+
+
+
+
+
- {{ $t(`editorPage.subConfig.basic.source.noMerge`) }}
+
+ {{ $t(`editorPage.subConfig.basic.source.noMerge`) }}
- {{ $t(`editorPage.subConfig.basic.source.localFirst`) }}
+
+ {{ $t(`editorPage.subConfig.basic.source.localFirst`) }}
- {{ $t(`editorPage.subConfig.basic.source.remoteFirst`) }}
+
+ {{ $t(`editorPage.subConfig.basic.source.remoteFirst`) }}
@@ -148,7 +149,7 @@
class="ignore-failed-wrapper"
>
-
+
@@ -164,9 +165,8 @@
- {{
- $t('editorPage.subConfig.btn.compare')
- }}
+
+ {{ $t("editorPage.subConfig.btn.compare") }}
- {{ $t('editorPage.subConfig.btn.save') }}
+ {{ $t("editorPage.subConfig.btn.save") }}
@@ -188,415 +188,432 @@
diff --git a/src/views/FilePreview.vue b/src/views/FilePreview.vue
index 2006d9c55..5b32d4ae6 100644
--- a/src/views/FilePreview.vue
+++ b/src/views/FilePreview.vue
@@ -21,7 +21,7 @@
-
+
-
+
diff --git a/src/views/editCode/cmView.vue b/src/views/editCode/cmView.vue
index 0b03bdee5..c2a6be323 100644
--- a/src/views/editCode/cmView.vue
+++ b/src/views/editCode/cmView.vue
@@ -23,12 +23,12 @@
+
@@ -358,38 +353,16 @@ const pasteNav = async () => {
}
.cmviewRef {
- // background-color: #fff;
border-radius: 16px;
}
-// @media (prefers-color-scheme: dark) {
-// .cmviewRef {
-// // background-color: #282c34;
-// }
-// }
-
.cm-img-button {
- // padding: 10px 0 12px 0;
display: flex;
- // position: fixed;
- // height: 100px;
- // top: 50px;
- // left: 13px;
padding-top: 10px;
- // width: 90px;
- // margin-right: 40px;
- // background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI0NTBweCIgaGVpZ2h0PSIxMzBweCI+CiAgICA8ZWxsaXBzZSBjeD0iNjUiIGN5PSI2NSIgcng9IjUwIiByeT0iNTIiIHN0cm9rZT0icmdiKDIyMCw2MCw1NCkiIHN0cm9rZS13aWR0aD0iMiIgZmlsbD0icmdiKDIzNywxMDgsOTYpIi8+CiAgICA8ZWxsaXBzZSBjeD0iMjI1IiBjeT0iNjUiIHJ4PSI1MCIgcnk9IjUyIiBzdHJva2U9InJnYigyMTgsMTUxLDMzKSIgc3Ryb2tlLXdpZHRoPSIyIiBmaWxsPSJyZ2IoMjQ3LDE5Myw4MSkiLz4KICAgIDxlbGxpcHNlIGN4PSIzODUiIGN5PSI2NSIgcng9IjUwIiByeT0iNTIiIHN0cm9rZT0icmdiKDI3LDE2MSwzNykiIHN0cm9rZS13aWR0aD0iMiIgZmlsbD0icmdiKDEwMCwyMDAsODYpIi8+Cjwvc3ZnPgo=");
- // background-size: 60px;
- // background-repeat: no-repeat;
- // background-position: 10px 10px;
- // margin-bottom: 10px;
- // position: absolute;
z-index: 10;
min-height: 24px;
width: 98%;
- // display: flex;
justify-content: flex-end;
-
img {
width: 16px;
height: 16px;
@@ -399,8 +372,6 @@ const pasteNav = async () => {
.cm-img-button button {
height: 16px;
background-repeat: no-repeat;
- // background-color: #00000000;
- // border: #00000000;
border: none;
background: none;
padding: 0;
diff --git a/src/views/editCode/editScript.vue b/src/views/editCode/editScript.vue
new file mode 100644
index 000000000..c53fa5b13
--- /dev/null
+++ b/src/views/editCode/editScript.vue
@@ -0,0 +1,105 @@
+
+
+
+
+
+ {{ $t("myPage.btn.cancel") }}
+
+
+
+ {{ $t("editorPage.subConfig.btn.save") }}
+
+
+
+
+
+
+
diff --git a/src/views/editor/components/Script.vue b/src/views/editor/components/Script.vue
index f536d44e2..c752a87d7 100644
--- a/src/views/editor/components/Script.vue
+++ b/src/views/editor/components/Script.vue
@@ -2,12 +2,18 @@
{{ $t(`editorPage.subConfig.nodeActions['${type}'].des[0]`) }}
- {{ $t('subPage.panel.tips.ok') }}
+
+ {{ $t("subPage.panel.tips.ok") }}
+
- {{
- $t(`editorPage.subConfig.nodeActions['${type}'].options[${index}]`)
- }}
+
+ {{
+ $t(`editorPage.subConfig.nodeActions['${type}'].options[${index}]`)
+ }}
@@ -15,89 +21,42 @@
{{ $t(`editorPage.subConfig.nodeActions['${type}'].des[1]`) }}
-->
-
+
-
-
-
+
-
-
@@ -124,17 +83,19 @@ function filter(proxies, targetPlatform) {
return true;
});
} -->
-