1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-11-27 22:38:34 +09:00

fix: Widget editing exit button in one

This commit is contained in:
NoriDev 2023-05-24 17:39:39 +09:00
parent f34987ce89
commit 7f9079cc88
3 changed files with 5 additions and 3 deletions

View File

@ -21,6 +21,7 @@
### Bugfixes
- 위젯 편집 시 헤더 이외의 영역을 눌렀을 때 위젯 설정이 뜨는 문제
- 위젯 편집 종료 버튼이 여러 개 있는 문제
---

View File

@ -7,7 +7,7 @@
<option v-for="widget in widgetDefs" :key="widget" :value="widget">{{ i18n.t(`_widgets.${widget}`) }}</option>
</MkSelect>
<MkButton primary data-cy-widget-add :class="$style.btn" @click="addWidget"><i class="ti ti-plus"></i> {{ i18n.ts.add }}</MkButton>
<MkButton :class="$style.btn" @click="$emit('exit')">{{ i18n.ts.close }}</MkButton>
<MkButton :class="$style.btn" @click="$emit('exit')"><i class="ti ti-check"></i> {{ i18n.ts.close }}</MkButton>
</header>
<Sortable
:modelValue="props.widgets"

View File

@ -2,8 +2,9 @@
<div :class="$style.root" :style="{ paddingTop: marginTop }">
<XWidgets :class="$style.widgets" :edit="editMode" :widgets="widgets" @addWidget="addWidget" @removeWidget="removeWidget" @updateWidget="updateWidget" @updateWidgets="updateWidgets" @exit="editMode = false"/>
<button v-if="editMode" class="_textButton" style="font-size: 0.9em;" @click="editMode = false"><i class="ti ti-check"></i> {{ i18n.ts.editWidgetsExit }}</button>
<button v-else class="_textButton" data-cy-widget-edit :class="$style.edit" style="font-size: 0.9em;" @click="editMode = true"><i class="ti ti-pencil"></i> {{ i18n.ts.editWidgets }}</button>
<!-- <button v-if="editMode" class="_textButton" style="font-size: 0.9em;" @click="editMode = false"><i class="ti ti-check"></i> {{ i18n.ts.editWidgetsExit }}</button>
<button v-else class="_textButton" data-cy-widget-edit :class="$style.edit" style="font-size: 0.9em;" @click="editMode = true"><i class="ti ti-pencil"></i> {{ i18n.ts.editWidgets }}</button> -->
<button v-if="!editMode" class="_textButton" data-cy-widget-edit :class="$style.edit" style="font-size: 0.9em;" @click="editMode = true"><i class="ti ti-pencil"></i> {{ i18n.ts.editWidgets }}</button>
</div>
</template>