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

未対応エンジン追加時にリストが消える件(#1168) #1179

Merged
merged 6 commits into from
Feb 11, 2023
Merged
Show file tree
Hide file tree
Changes from 4 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
2 changes: 1 addition & 1 deletion src/background/engineManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ export class EngineManager {
}

if (
["name", "uuid", "port", "command", "icon"].some(
["name", "uuid", "port", "command", "icon", "supported_features"].some(
Hiroshiba marked this conversation as resolved.
Show resolved Hide resolved
(key) => !(key in manifestContent)
)
) {
Expand Down
7 changes: 6 additions & 1 deletion src/components/EngineManageDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,12 @@
</div>
<div class="no-wrap q-pl-md">
<div class="text-h6 q-ma-sm">機能</div>
<ul v-if="engineManifests[selectedId]">
<ul
v-if="
engineManifests[selectedId] &&
engineManifests[selectedId].supportedFeatures
"
>
<li
v-for="[feature, value] in Object.entries(
engineManifests[selectedId].supportedFeatures
Expand Down
2 changes: 2 additions & 0 deletions src/type/preload.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { IpcRenderer, IpcRendererEvent, nativeTheme } from "electron";
import { IpcSOData } from "./ipc";
import { z } from "zod";
import { EngineManifest } from "@/openapi";

export const isMac = process.platform === "darwin";
// ホットキーを追加したときは設定のマイグレーションが必要
Expand Down Expand Up @@ -285,6 +286,7 @@ export type MinimumEngineManifest = {
uuid: string;
command: string;
port: string;
supported_features: Record<string, EngineManifest>;
};

export type EngineInfo = {
Expand Down