Skip to content

Commit

Permalink
辞書のリセットボタンの挙動を修正する (#2233)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkfx authored Aug 19, 2024
1 parent 29d48be commit 00ba6fc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/Dialog/DictionaryManageDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
textColor="display"
class="text-no-wrap text-bold q-mr-sm"
:disable="uiLocked || !isWordChanged"
@click="resetWord"
@click="resetWord(selectedId)"
>リセット</QBtn
>
<QBtn
Expand Down Expand Up @@ -602,13 +602,17 @@ const deleteWord = async () => {
toInitialState();
}
};
const resetWord = async () => {
const resetWord = async (id: string) => {
const result = await store.dispatch("SHOW_WARNING_DIALOG", {
title: "単語の変更をリセットしますか?",
message: "単語の変更は破棄されてリセットされます。",
actionName: "リセット",
});
if (result === "OK") {
selectedId.value = id;
surface.value = userDict.value[id].surface;
void setYomi(userDict.value[id].yomi, true);
wordPriority.value = userDict.value[id].priority;
toWordEditingState();
}
};
Expand Down

0 comments on commit 00ba6fc

Please sign in to comment.