Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

エンジン追加の際にセキュリティ上の驚異を紹介し、信頼できるエンジンかを問う #1045

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 35 additions & 19 deletions src/components/EngineManageDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -475,30 +475,46 @@ export default defineComponent({
return messageMap[result];
};

const addEngine = async () => {
if (engineLoaderType.value === "dir") {
await lockUi(
"addingEngine",
store.dispatch("ADD_ENGINE_DIR", {
engineDir: newEngineDir.value,
})
);
const addEngine = () => {
$q.dialog({
title: "エンジン追加の確認",
message:
"この操作はコンピュータに損害を与える可能性があります。エンジンの配布元が信頼できない場合は追加しないでください。",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"この操作はコンピュータに損害を与える可能性がありますエンジンの配布元が信頼できない場合は追加しないでください",
"この操作はコンピュータに損害を与える可能性がありますエンジンの配布元が信頼できない場合は追加しないでください",

ちょっと強気にしてみるのもありかも…?

Copy link
Member Author

@Hiroshiba Hiroshiba Dec 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

面白いですね!
語調に一貫性があったほうが信頼感が増すと思うので、ここだけ感嘆文にするということは避けた方が良いかなと思いました!(とりあえず今回は)

cancel: {
label: "キャンセル",
color: "display",
flat: true,
},
ok: {
label: "追加",
flat: true,
textColor: "warning",
},
}).onOk(async () => {
if (engineLoaderType.value === "dir") {
await lockUi(
"addingEngine",
store.dispatch("ADD_ENGINE_DIR", {
engineDir: newEngineDir.value,
})
);

requireRestart(
"エンジンを追加しました。反映には再起動が必要です。今すぐ再起動しますか?"
);
} else {
const success = await lockUi(
"addingEngine",
store.dispatch("INSTALL_VVPP_ENGINE", vvppFilePath.value)
);
uiLockedState.value = null;
if (success) {
requireRestart(
"エンジンを追加しました。反映には再起動が必要です。今すぐ再起動しますか?"
);
} else {
const success = await lockUi(
"addingEngine",
store.dispatch("INSTALL_VVPP_ENGINE", vvppFilePath.value)
);
uiLockedState.value = null;
if (success) {
requireRestart(
"エンジンを追加しました。反映には再起動が必要です。今すぐ再起動しますか?"
);
}
}
}
});
};
const deleteEngine = () => {
$q.dialog({
Expand Down