Skip to content

Commit 6f36b2f

Browse files
authored
fix: fix ci (#683)
1 parent 224ea18 commit 6f36b2f

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

website/src/components/Playground.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { shallowRef } from 'vue'
33
import { Monaco, Diff, EditorWithPanel } from './editors'
44
import QueryEditor from './QueryEditor.vue'
5+
import ResetConfig from './ResetConfig.vue'
56
import PatternEditor from './PatternEditor.vue'
67
import SelectLang from './SelectLang.vue'
78
import Tabs from './utils/Tabs.vue'
@@ -92,7 +93,10 @@ let codeMode = shallowRef('code')
9293
</EditorWithPanel>
9394
</template>
9495
<template #addon>
95-
<SelectLang v-model="lang"/>
96+
<div class="action-bar">
97+
<SelectLang v-model="lang"/>
98+
<ResetConfig v-model="state" />
99+
</div>
96100
</template>
97101
</Tabs>
98102
</div>
@@ -120,6 +124,10 @@ let codeMode = shallowRef('code')
120124
/* keep here since monaco suggestion details are not expanded by default */
121125
filter: drop-shadow(0 0 16px #00000020);
122126
}
127+
.action-bar {
128+
display: flex;
129+
align-items: center;
130+
}
123131
124132
@media only screen and (max-width: 780px) {
125133
.half.inactive {
@@ -133,4 +141,4 @@ let codeMode = shallowRef('code')
133141
pointer-events: none;
134142
}
135143
}
136-
</style>
144+
</style>

website/src/components/ResetConfig.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
<script lang="ts" setup>
22
import IconReset from '../icons/Reset.vue'
33
4-
const state = defineModel()
4+
import type { State } from './astGrep/state'
5+
6+
const state = defineModel<State>({
7+
required: true,
8+
})
9+
510
const config = `
611
# YAML Rule is more powerful!
712
# https://ast-grep.github.io/guide/rule-config.html#rule

website/src/components/astGrep/state.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,4 @@ export function useSgState() {
120120
state,
121121
...refs,
122122
}
123-
}
123+
}

0 commit comments

Comments
 (0)