diff --git a/README.md b/README.md
index 4e4773bb..3515e59d 100644
--- a/README.md
+++ b/README.md
@@ -72,6 +72,10 @@ Here are some of the major database solutions that are supported:
+## Contributors
+
+---
+
## Stargazers over time
---
diff --git a/web/console-fe/src/i18n/langs/en/common.ts b/web/console-fe/src/i18n/langs/en/common.ts
index 679423d7..ee87583a 100644
--- a/web/console-fe/src/i18n/langs/en/common.ts
+++ b/web/console-fe/src/i18n/langs/en/common.ts
@@ -36,5 +36,6 @@ export default {
format: 'Format',
snippet: 'Snippet',
submit: 'Submit',
- updateTime: 'Update Time'
+ updateTime: 'Update Time',
+ quote: 'Quote'
}
diff --git a/web/console-fe/src/i18n/langs/zhCn/common.ts b/web/console-fe/src/i18n/langs/zhCn/common.ts
index 18726315..08005383 100644
--- a/web/console-fe/src/i18n/langs/zhCn/common.ts
+++ b/web/console-fe/src/i18n/langs/zhCn/common.ts
@@ -36,5 +36,6 @@ export default {
format: '格式化',
snippet: '片段',
submit: '提交',
- updateTime: "更新时间"
+ updateTime: '更新时间',
+ quote: '引用'
}
diff --git a/web/console-fe/src/router/index.ts b/web/console-fe/src/router/index.ts
index 8ce14b1b..32a80ee2 100644
--- a/web/console-fe/src/router/index.ts
+++ b/web/console-fe/src/router/index.ts
@@ -46,6 +46,7 @@ const routes: Array = [
},
children: [
{
+ name: 'ConsoleIndex',
path: "index",
component: () => import("../views/pages/console/ConsoleOnline.vue")
}
diff --git a/web/console-fe/src/views/layout/Layout.vue b/web/console-fe/src/views/layout/Layout.vue
index 70cf1910..8a0a2788 100644
--- a/web/console-fe/src/views/layout/Layout.vue
+++ b/web/console-fe/src/views/layout/Layout.vue
@@ -9,37 +9,7 @@
-
+
@@ -48,10 +18,11 @@ import LayoutContent from "@/views/layout/components/LayoutContent.vue";
import LayoutFooter from "@/views/layout/components/LayoutFooter.vue";
import LayoutHeader from "@/views/layout/components/LayoutHeader.vue";
import {useI18n} from 'vue-i18n';
+import LayoutAffix from "@/views/layout/components/LayoutAffix.vue";
export default {
name: "LayoutContainer",
- components: {LayoutHeader, LayoutContent, LayoutFooter},
+ components: {LayoutAffix, LayoutHeader, LayoutContent, LayoutFooter},
computed: {},
setup()
{
diff --git a/web/console-fe/src/views/layout/components/LayoutAffix.vue b/web/console-fe/src/views/layout/components/LayoutAffix.vue
new file mode 100644
index 00000000..bdb6e58a
--- /dev/null
+++ b/web/console-fe/src/views/layout/components/LayoutAffix.vue
@@ -0,0 +1,65 @@
+
+
+
+
+
diff --git a/web/console-fe/src/views/pages/admin/snippet/SnippetConsole.vue b/web/console-fe/src/views/pages/admin/snippet/SnippetConsole.vue
index 06a527dd..46ab0f16 100644
--- a/web/console-fe/src/views/pages/admin/snippet/SnippetConsole.vue
+++ b/web/console-fe/src/views/pages/admin/snippet/SnippetConsole.vue
@@ -16,14 +16,18 @@
-
- {{ $t('common.modify') }}
-
-
-
-
-
-
+
+
+ {{ $t('common.modify') }}
+
+
+
+
+
+ {{ $t('common.quote') }}
+
+
+
@@ -58,6 +62,7 @@ import {useI18n} from 'vue-i18n';
import Common from "@/common/Common";
import {createHeaders} from "@/views/pages/admin/snippet/SnippetGenerate";
import {SnippetService} from "@/services/SnippetService";
+import router from "@/router";
export default defineComponent({
name: "SnippetConsoleView",
@@ -148,6 +153,10 @@ export default defineComponent({
this.visibleSnippetInfo = false;
this.applyId = 0;
this.handlerInitialize(this.pagination.current, this.pagination.pageSize);
+ },
+ handlerGoConsoleIndex(id: number)
+ {
+ router.push('/console/index?id=' + id + '&from=snippet');
}
}
});
diff --git a/web/console-fe/src/views/pages/console/ConsoleOnline.vue b/web/console-fe/src/views/pages/console/ConsoleOnline.vue
index 525732a8..462e4932 100644
--- a/web/console-fe/src/views/pages/console/ConsoleOnline.vue
+++ b/web/console-fe/src/views/pages/console/ConsoleOnline.vue
@@ -113,6 +113,8 @@ import * as monaco from 'monaco-editor';
import MonacoEditor from 'monaco-editor-vue3';
import {defineComponent} from "vue";
import SnippetDetails from "@/views/pages/admin/snippet/SnippetDetails.vue";
+import {useRouter} from "vue-router";
+import {SnippetService} from "@/services/SnippetService";
export default defineComponent({
name: "DashboardConsoleView",
@@ -139,7 +141,29 @@ export default defineComponent({
snippetDetails: false
}
},
+ created()
+ {
+ this.handlerInitialize();
+ },
methods: {
+ handlerInitialize()
+ {
+ const router = useRouter();
+ if (router.currentRoute?.value?.query) {
+ const id = router.currentRoute.value.query.id as unknown as number;
+ const from = router.currentRoute.value.query.from;
+ if (id && from) {
+ if (from === 'snippet') {
+ new SnippetService().getById(id)
+ .then((response) => {
+ if (response.status) {
+ this.editorValue = response.data.code;
+ }
+ });
+ }
+ }
+ }
+ },
handlerEditorDidMount(editor: any)
{
const suggestions = new LanguageService().transSuggestions([]);