Skip to content

Commit

Permalink
feat: Add YAML format to CodeMirror
Browse files Browse the repository at this point in the history
  • Loading branch information
ssongliu committed Dec 11, 2024
1 parent 335a823 commit 9c86071
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
},
"dependencies": {
"@codemirror/lang-html": "^6.4.9",
"@codemirror/lang-yaml": "^6.1.2",
"@codemirror/lang-javascript": "^6.2.2",
"@codemirror/lang-php": "^6.0.1",
"@codemirror/language": "^6.10.2",
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/app-store/detail/install/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,14 @@ import { useRouter } from 'vue-router';
import Params from '../params/index.vue';
import Header from '@/components/drawer-header/index.vue';
import { Codemirror } from 'vue-codemirror';
import { javascript } from '@codemirror/lang-javascript';
import { yaml } from '@codemirror/lang-yaml';
import { oneDark } from '@codemirror/theme-one-dark';
import i18n from '@/lang';
import { MsgError } from '@/utils/message';
import { Container } from '@/api/interface/container';
import { loadResourceLimit } from '@/api/modules/container';
const extensions = [javascript(), oneDark];
const extensions = [yaml(), oneDark];
const router = useRouter();
interface InstallRrops {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/app-store/installed/detail/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,13 @@ import { Rules, checkNumberRange } from '@/global/form-rules';
import { MsgSuccess } from '@/utils/message';
import i18n from '@/lang';
import { Codemirror } from 'vue-codemirror';
import { javascript } from '@codemirror/lang-javascript';
import { yaml } from '@codemirror/lang-yaml';
import { oneDark } from '@codemirror/theme-one-dark';
import { getLanguage } from '@/utils/util';
import { Container } from '@/api/interface/container';
import { loadResourceLimit } from '@/api/modules/container';
const extensions = [javascript(), oneDark];
const extensions = [yaml(), oneDark];
interface ParamProps {
id: Number;
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/container/compose/create/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ import DrawerHeader from '@/components/drawer-header/index.vue';
import { listComposeTemplate, testCompose, upCompose } from '@/api/modules/container';
import { loadBaseDir } from '@/api/modules/setting';
import { MsgError } from '@/utils/message';
import { javascript } from '@codemirror/lang-javascript';
import { yaml } from '@codemirror/lang-yaml';
import { oneDark } from '@codemirror/theme-one-dark';
const extensions = [javascript(), oneDark];
const extensions = [yaml(), oneDark];
const showLog = ref(false);
const loading = ref();
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/container/compose/edit/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</template>
<script lang="ts" setup>
import { Codemirror } from 'vue-codemirror';
import { javascript } from '@codemirror/lang-javascript';
import { yaml } from '@codemirror/lang-yaml';
import { oneDark } from '@codemirror/theme-one-dark';
import { ref } from 'vue';
import { composeUpdate } from '@/api/modules/container';
Expand All @@ -87,7 +87,7 @@ import { ElForm } from 'element-plus';
const emit = defineEmits<{ (e: 'search'): void }>();
const loading = ref(false);
const composeVisible = ref(false);
const extensions = [javascript(), oneDark];
const extensions = [yaml(), oneDark];
const path = ref();
const content = ref();
const name = ref();
Expand Down

0 comments on commit 9c86071

Please sign in to comment.