Skip to content

Commit

Permalink
fix: [release-0.22]「キャンセル」と「破棄する」がややこしそうだったので修正 (#2416)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba authored Dec 20, 2024
1 parent 84bd237 commit e18e48f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
20 changes: 12 additions & 8 deletions src/components/Dialog/DictionaryManageDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -253,21 +253,21 @@
<div class="row q-px-md save-delete-reset-buttons">
<QSpace />
<QBtn
v-show="!!selectedId"
outline
textColor="display"
class="text-no-wrap text-bold q-mr-sm"
:disable="uiLocked || !isWordChanged"
@click="resetWord(selectedId)"
>リセット</QBtn
:disable="uiLocked"
@click="discardOrNotDialog(cancel)"
>キャンセル</QBtn
>
<QBtn
v-show="!!selectedId"
outline
textColor="display"
class="text-no-wrap text-bold q-mr-sm"
:disable="uiLocked"
@click="discardOrNotDialog(cancel)"
>キャンセル</QBtn
:disable="uiLocked || !isWordChanged"
@click="resetWord(selectedId)"
>リセット</QBtn
>
<QBtn
outline
Expand Down Expand Up @@ -603,6 +603,7 @@ const deleteWord = async () => {
message: "削除された単語は元に戻せません。",
actionName: "削除する",
isWarningColorButton: true,
cancel: "削除しない",
});
if (result === "OK") {
try {
Expand All @@ -627,6 +628,8 @@ const resetWord = async (id: string) => {
title: "単語の変更をリセットしますか?",
message: "単語の変更は破棄されてリセットされます。",
actionName: "リセットする",
isWarningColorButton: true,
cancel: "リセットしない",
});
if (result === "OK") {
selectedId.value = id;
Expand All @@ -640,8 +643,9 @@ const discardOrNotDialog = async (okCallback: () => void) => {
if (isWordChanged.value) {
const result = await store.actions.SHOW_WARNING_DIALOG({
title: "単語の追加・変更を破棄しますか?",
message: "破棄すると、単語の追加・変更はリセットされます。",
message: "変更を破棄すると、単語の追加・変更はリセットされます。",
actionName: "破棄する",
cancel: "破棄しない",
isWarningColorButton: true,
});
if (result === "OK") {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/browser/辞書ダイアログ.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ test("「設定」→「読み方&アクセント辞書」で「読み方&
await page.waitForTimeout(100);
await getNewestQuasarDialog(page)
.getByRole("button")
.filter({ hasText: "削除" })
.filter({ hasText: "削除する" })
.click();
await page.waitForTimeout(100);

Expand Down

0 comments on commit e18e48f

Please sign in to comment.