Skip to content

Commit

Permalink
+ cmcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Keywos committed Mar 18, 2024
1 parent 4e37d23 commit 1878265
Show file tree
Hide file tree
Showing 12 changed files with 704 additions and 594 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sub-store-front-end",
"version": "2.14.179",
"version": "2.14.180",
"private": true,
"scripts": {
"dev": "vite --host",
Expand Down
1 change: 1 addition & 0 deletions src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions src/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export default {
file: '文件管理',
sync: '同步',
my: '我的',
editScript: '脚本编辑',
subEditor: '订阅编辑',
fileEditor: '文件编辑',
themeSetting: '主题设置',
Expand Down
10 changes: 10 additions & 0 deletions src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 5 additions & 1 deletion src/store/codeStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() : "";
},
},
});
1 change: 1 addition & 0 deletions src/types/store/codeStore.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
interface cmCodeStore {
CmCode?: string;
EditCode?: { [key: string]: string };
}
Loading

0 comments on commit 1878265

Please sign in to comment.