This commit is contained in:
ThatOneCalculator 2023-07-11 19:20:58 -07:00
parent bd5bf012d4
commit d9113cc62c
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
5 changed files with 27 additions and 28 deletions

View File

@ -3,14 +3,14 @@
<VueDraggable <VueDraggable
v-model="_files" v-model="_files"
class="files" class="files"
item-key="id"
animation="150" animation="150"
delay="100" delay="100"
delay-on-touch-only="true" delay-on-touch-only="true"
> >
<template #item="{ element }">
<div <div
class="file" class="file"
v-for="element in _files"
:key="element.id"
@click="showFileMenu(element, $event)" @click="showFileMenu(element, $event)"
@contextmenu.prevent="showFileMenu(element, $event)" @contextmenu.prevent="showFileMenu(element, $event)"
> >
@ -24,7 +24,6 @@
<i class="ph-warning ph-bold ph-lg icon"></i> <i class="ph-warning ph-bold ph-lg icon"></i>
</div> </div>
</div> </div>
</template>
</VueDraggable> </VueDraggable>
<p class="remain">{{ 16 - files.length }}/16</p> <p class="remain">{{ 16 - files.length }}/16</p>
</div> </div>

View File

@ -30,11 +30,13 @@
</header> </header>
<VueDraggable <VueDraggable
v-model="widgets_" v-model="widgets_"
item-key="id"
handle=".handle" handle=".handle"
animation="150" animation="150"
> >
<template #item="{ element }"> <div
v-for="element in widgets_"
:key="element.id"
>
<div class="customize-container"> <div class="customize-container">
<button <button
class="config _button" class="config _button"
@ -58,7 +60,7 @@
/> />
</div> </div>
</div> </div>
</template> </div>
</VueDraggable> </VueDraggable>
</template> </template>
<component <component

View File

@ -2,21 +2,20 @@
<VueDraggable <VueDraggable
v-model="blocks" v-model="blocks"
tag="div" tag="div"
item-key="id"
handle=".drag-handle" handle=".drag-handle"
:group="{ name: 'blocks' }" :group="{ name: 'blocks' }"
animation="150" animation="150"
swap-threshold="0.5" swap-threshold="0.5"
> >
<template #item="{ element }">
<component <component
v-for="element in blocks"
:key="element"
:is="'x-' + element.type" :is="'x-' + element.type"
:value="element" :value="element"
:hpml="hpml" :hpml="hpml"
@update:value="updateItem" @update:value="updateItem"
@remove="() => removeItem(element)" @remove="() => removeItem(element)"
/> />
</template>
</VueDraggable> </VueDraggable>
</template> </template>

View File

@ -123,14 +123,14 @@
v-model="variables" v-model="variables"
tag="div" tag="div"
class="variables" class="variables"
item-key="name"
handle=".drag-handle" handle=".drag-handle"
:group="{ name: 'variables' }" :group="{ name: 'variables' }"
animation="150" animation="150"
swap-threshold="0.5" swap-threshold="0.5"
> >
<template #item="{ element }">
<XVariable <XVariable
v-for="element in variables"
:key="element.name"
:model-value="element" :model-value="element"
:removable="true" :removable="true"
:hpml="hpml" :hpml="hpml"
@ -139,7 +139,6 @@
:draggable="true" :draggable="true"
@remove="() => removeVariable(element)" @remove="() => removeVariable(element)"
/> />
</template>
</VueDraggable> </VueDraggable>
<MkButton <MkButton

View File

@ -18,7 +18,7 @@
@end="save" @end="save"
delay-on-touch-only="true" delay-on-touch-only="true"
> >
<button <div
v-for="item in reactions" v-for="item in reactions"
:key="item" :key="item"
class="_button item" class="_button item"
@ -29,7 +29,7 @@
style="height: 1.7em" style="height: 1.7em"
class="emoji" class="emoji"
/> />
</button> </div>
<template #footer> <template #footer>
<button class="_button add" @click="chooseEmoji"> <button class="_button add" @click="chooseEmoji">
<i class="ph-plus ph-bold ph-lg"></i> <i class="ph-plus ph-bold ph-lg"></i>