Skip to content

Commit 0cf93dd

Browse files
committed
Remove dusk attrs
1 parent 0843132 commit 0cf93dd

26 files changed

Lines changed: 153 additions & 120 deletions

components/ButtonResize.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<button
3-
dusk="button-resize"
3+
44
:style="{ transform: `scale(${zoomScale})` }"
55
class="z-20 bg-white border border-gray-700 rounded-full shadow exclude-from-panzoom active:bg-ui-gray-700 hover:scale-200"
66
></button>

components/Canvas.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<div
1414
v-bind="backgroundAttributes"
1515
class="absolute inset-0"
16-
:dusk="`background-${background}`"
16+
1717
:data-hide="background === 'transparent'"
1818
></div>
1919

@@ -74,7 +74,7 @@
7474
<Divider
7575
v-if="!preview"
7676
data-hide
77-
dusk="canvas-height"
77+
7878
:number="height"
7979
:zoom-scale="zoomScale"
8080
:style="{ marginRight: `-${3.5 * Math.pow(zoomScale, 0.5)}rem` }"
@@ -83,7 +83,7 @@
8383

8484
<Separator
8585
v-if="!preview"
86-
dusk="canvas-width"
86+
8787
:number="width"
8888
:zoom-scale="zoomScale"
8989
:style="{ marginBottom: `-${3.5 * Math.pow(zoomScale, 0.5)}rem` }"

components/ControlFitToWindow.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Button
44
size="xs"
55
class="rounded-l-lg"
6-
dusk="button-fit-to-window"
6+
77
:rounded="false"
88
@click="$emit('apply')"
99
>
@@ -13,7 +13,7 @@
1313

1414
<ButtonLock
1515
size="xs"
16-
dusk="button-lock-fit-to-window"
16+
1717
:rounded="false"
1818
:locked="lockWindowSize"
1919
:class="{ 'rounded-r-lg': !lockWindowSize }"
@@ -27,14 +27,14 @@
2727
v-if="lockWindowSize"
2828
size="xs"
2929
class="rounded-r-lg"
30-
dusk="button-lock-fit-to-window-settings"
30+
3131
:rounded="false"
3232
>
3333
<SettingsIcon class="w-4 h-4" />
3434
</Button>
3535
</template>
3636

37-
<div dusk="popover-fit-to-window" class="flex flex-col divide-y divide-ui-gray-800">
37+
<div class="flex flex-col divide-y divide-ui-gray-800">
3838
<div class="grid grid-cols-2 gap-2 divide-x divide-ui-gray-800">
3939
<div class="flex items-center justify-between w-full gap-2 px-3 py-2">
4040
<Label class="w-full text-center"> Padding X </Label>
@@ -44,7 +44,7 @@
4444
type="number"
4545
class="w-16 text-center"
4646
:value="lockWindowPaddingX"
47-
dusk="input-fit-to-window-padding-x"
47+
4848
@input="$emit('update:lock-window-padding-x', $event)"
4949
/>
5050
</div>
@@ -57,7 +57,7 @@
5757
type="number"
5858
class="w-16 text-center"
5959
:value="lockWindowPaddingY"
60-
dusk="input-fit-to-window-padding-y"
60+
6161
@input="$emit('update:lock-window-padding-y', $event)"
6262
/>
6363
</div>

components/ControlTabs.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
v-for="{ name, title } in tabs"
66
:key="name"
77
class="w-full"
8-
:dusk="`button-tab-${name}`"
8+
99
:active="active === name && open"
1010
@click="
1111
() => {

components/Dropdown.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
v-if="open"
1717
class="highlight origin-top-right absolute right-0 z-30 w-56 shadow bg-ui-gray-700 rounded-lg overflow-hidden ring-1 ring-ui-gray-800"
1818
>
19-
<div class="py-1 shadow-lg" dusk="dropdown-menu">
19+
<div class="py-1 shadow-lg">
2020
<a
2121
href="#"
2222
v-for="item in items"
2323
:key="item.name"
24-
:dusk="`option-${item.name}`"
24+
2525
@click.prevent="() => { item.click(); open = false; }"
2626
class="block p-2 mx-2 my-1 text-xs font-medium transition duration-150 ease-in-out rounded-md text-ui-gray-100 hover:bg-ui-gray-900 focus:outline-none focus:ring-0 focus:bg-ui-gray-900"
2727
>

components/Editor.vue

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</label>
1313

1414
<Select
15-
dusk="select-language"
15+
1616
name="language"
1717
:value="language"
1818
:options="languages"
@@ -31,7 +31,7 @@
3131
</label>
3232

3333
<Select
34-
dusk="select-tab-size"
34+
3535
:value="tabSize"
3636
:options="[2, 4]"
3737
@input="$emit('update:tab-size', $event)"
@@ -89,7 +89,7 @@
8989

9090
<ToolbarButton
9191
v-if="canRemove && canMoveUp"
92-
dusk="button-move-up"
92+
9393
class="mr-0.5 rounded-l-lg"
9494
@click="$emit('up', id)"
9595
v-tooltip="{
@@ -105,7 +105,7 @@
105105

106106
<ToolbarButton
107107
v-if="canRemove"
108-
dusk="button-remove"
108+
109109
:class="{ 'rounded-l-lg': !canMoveUp }"
110110
class="mr-0.5"
111111
@click="$emit('remove', id)"
@@ -118,7 +118,7 @@
118118
</ToolbarButton>
119119

120120
<ToolbarButton
121-
dusk="button-add"
121+
122122
:class="{
123123
'mr-0.5': canMoveDown,
124124
'rounded-r-lg': !canMoveDown,
@@ -135,7 +135,7 @@
135135

136136
<ToolbarButton
137137
v-if="canRemove && canMoveDown"
138-
dusk="button-move-down"
138+
139139
class="rounded-r-lg"
140140
@click="$emit('down', id)"
141141
v-tooltip="{
@@ -154,7 +154,7 @@
154154
<ToolbarButton
155155
v-if="landscape"
156156
class="rounded-l-lg"
157-
dusk="button-toggle-portrait"
157+
158158
@click="$emit('update:layout')"
159159
v-tooltip="{
160160
content: 'Toggle Layout',
@@ -167,7 +167,7 @@
167167
<ToolbarButton
168168
v-else
169169
class="rounded-l-lg"
170-
dusk="button-toggle-landscape"
170+
171171
@click="$emit('update:layout')"
172172
v-tooltip="{
173173
content: 'Toggle Layout',
@@ -179,7 +179,7 @@
179179

180180
<ToolbarButton
181181
class="rounded-r-lg"
182-
dusk="button-toggle-reverse"
182+
183183
@click="$emit('update:reverse')"
184184
v-tooltip="{
185185
content: 'Move Editor Pane',

components/FileDropdown.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
v-if="open"
2020
class="highlight origin-top-left absolute left-0 top-full mt-1 z-30 w-56 shadow bg-ui-gray-700 overflow-hidden rounded-lg ring-1 ring-ui-gray-800"
2121
>
22-
<div dusk="dropdown-file" class="py-2 shadow-lg space-y-1">
22+
<div class="py-2 shadow-lg space-y-1">
2323
<template v-for="(option, index) in options" :key="option.name ?? index">
2424
<div v-if="option.separator" class="h-px bg-ui-gray-800 mx-2"></div>
2525

components/Modal.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<XIcon class="text-ui-gray-300 h-4 w-4" />
3535
</button>
3636

37-
<div class="px-6 pb-6">
37+
<div class="px-6 pb-6" v-bind="$attrs">
3838
<Scrollbar class="max-h-[50rem]">
3939
<slot />
4040
</Scrollbar>
@@ -48,6 +48,8 @@
4848
import { XIcon } from 'lucide-vue-next';
4949
5050
export default {
51+
inheritAttrs: false,
52+
5153
components: { XIcon },
5254
5355
props: {

components/ModalChangelog.vue

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
<template>
2-
<Modal v-bind="$attrs" size="sm" class="space-y-4" header="Changelog">
3-
<nuxt-content :document="content" />
2+
<Modal v-bind="$attrs" size="sm" header="Changelog">
3+
<div class="prose prose-invert prose-sm max-w-none p-4" v-html="content" />
44
</Modal>
55
</template>
66

77
<script>
8+
import { ref, onMounted } from 'vue';
9+
810
export default {
9-
data: () => ({ content: null }),
11+
setup() {
12+
const content = ref('');
13+
14+
onMounted(async () => {
15+
const md = await import('@/content/changelog.md?raw');
16+
const { marked } = await import('marked');
17+
content.value = marked(md.default);
18+
});
1019
11-
async fetch() {
12-
this.content = await this.$content('changelog').fetch();
20+
return { content };
1321
},
1422
};
1523
</script>

components/ModalHelp.vue

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
<template>
22
<Modal v-bind="$attrs" size="sm" class="space-y-4" header="Help Guide">
3-
<nuxt-content :document="content" />
3+
<div class="prose prose-invert prose-sm max-w-none p-4" v-html="content" />
44
</Modal>
55
</template>
66

77
<script>
8+
import { ref, onMounted } from 'vue';
9+
810
export default {
9-
data: () => ({ content: null }),
11+
setup() {
12+
const content = ref('');
13+
14+
onMounted(async () => {
15+
const md = await import('@/content/help.md?raw');
16+
const { marked } = await import('marked');
17+
content.value = marked(md.default);
18+
});
1019
11-
async fetch() {
12-
this.content = await this.$content('help').fetch();
20+
return { content };
1321
},
1422
};
1523
</script>

0 commit comments

Comments
 (0)