Skip to content

Commit

Permalink
Update: 全体的にダイヤログ関連のデザインを調整
Browse files Browse the repository at this point in the history
  • Loading branch information
tsukumijima committed Jan 8, 2025
1 parent 0480953 commit 92b0949
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 17 deletions.
29 changes: 16 additions & 13 deletions src/components/Dialog/DictionaryManageDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@
clickable
:active="selectedId === key"
activeClass="active-word"
@click="
selectWord(key);
editWord();
"
@click="selectWord(key)"
>
<QItemSection>
<QItemLabel class="text-display">{{
Expand Down Expand Up @@ -637,7 +634,6 @@ const saveWord = async () => {
}
await loadingDictProcess();
selectWord(selectedId.value);
editWord();
} else {
try {
void store.actions.SHOW_LOADING_SCREEN({
Expand Down Expand Up @@ -705,7 +701,6 @@ const resetWord = async () => {
});
if (result === "OK") {
selectWord(selectedId.value);
editWord();
}
};
const discardOrNotDialog = async (okCallback: () => void) => {
Expand Down Expand Up @@ -737,12 +732,21 @@ const editWord = () => {
toWordEditingState();
};
const selectWord = (id: string) => {
selectedId.value = id;
surface.value = userDict.value[id].surface;
void setYomi(userDict.value[id].yomi, true);
wordType.value = getWordTypeFromPartOfSpeech(userDict.value[id]);
wordPriority.value = userDict.value[id].priority;
toWordSelectedState();
const selectWordImpl = () => {
selectedId.value = id;
surface.value = userDict.value[id].surface;
void setYomi(userDict.value[id].yomi, true);
wordType.value = getWordTypeFromPartOfSpeech(userDict.value[id]);
wordPriority.value = userDict.value[id].priority;
toWordSelectedState();
editWord();
};
if (wordEditing.value && isWordChanged.value) {
void discardOrNotDialog(selectWordImpl);
} else {
selectWordImpl();
}
};
const cancel = () => {
toInitialState();
Expand All @@ -766,7 +770,6 @@ const toInitialState = () => {
if (Object.keys(userDict.value).length > 0) {
const firstKey = Object.keys(userDict.value)[0];
selectWord(firstKey);
editWord();
}
};
// 単語が選択されているだけの状態
Expand Down
1 change: 1 addition & 0 deletions src/components/Dialog/EngineManageDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ const addEngine = async () => {
message:
"この操作はコンピュータに損害を与える可能性があります。音声合成エンジンの配布元が信頼できない場合は追加しないでください。",
actionName: "追加する",
isPrimaryColorButton: true,
});
if (result === "OK") {
if (engineLoaderType.value === "dir") {
Expand Down
1 change: 1 addition & 0 deletions src/components/Dialog/ModelManageDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ const unInstallAivmModel = async () => {
message: `音声合成モデル「${activeAivmInfo.value?.manifest.name}」をアンインストールします。\n` +
"アンインストールすると、この音声合成モデル内の話者/スタイルは再度インストールするまで使えなくなります。",
actionName: "アンインストールする",
isWarningColorButton: true,
});
if (result === "OK") {
void store.actions.SHOW_LOADING_SCREEN({
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dialog/SettingDialog/SettingDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ const acceptRetrieveTelemetryComputed = computed({
void store.actions.SHOW_MESSAGE_DIALOG({
type: "warning-light",
title: "ソフトウェア利用状況のデータ収集を無効化しました",
title: "データ収集を無効化しました",
message:
"ソフトウェア利用状況のデータ収集を完全に無効にするには、AivisSpeech を再起動する必要があります。",
ok: "OK",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dialog/TextDialog/QuestionDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
:outline="index === props.buttons.length - 1"
:label="buttonObject.text"
:color="buttonObject.color"
:textColor="index === props.buttons.length - 1 ? 'display' : undefined"
:textColor="buttonObject.color"
class="text-no-wrap text-bold"
:style="index === props.buttons.length - 1 ? { padding: '0px 16px !important' } : undefined"
@click="onClick(index)"
Expand Down
2 changes: 1 addition & 1 deletion src/components/Talk/AudioDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ const play = async () => {
title: "音声合成に失敗しました",
message:
msg ??
"現在のテキストや読み方では音声合成できない可能性があります。テキストや読み方を変更して再度お試しください",
"現在のテキストや読み方では音声合成できない可能性があります。\nテキストや読み方を変更して再度お試しください",
});
} else {
void store.actions.SHOW_ALERT_DIALOG({
Expand Down
2 changes: 1 addition & 1 deletion src/store/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export const projectStore = createPartialStore<ProjectStoreTypes>({
) {
await showMessageDialog({
type: "info",
title: "プロジェクトファイルの保存先が変更されました",
title: "プロジェクトファイルの保存先が変わりました",
message: `編集中のプロジェクトが ${filePath} に切り替わりました。`,
});
}
Expand Down

0 comments on commit 92b0949

Please sign in to comment.