Skip to content

Commit

Permalink
Add: チェックを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenc-nanashi committed Oct 31, 2023
1 parent f5a74e4 commit fc50e9f
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const config: PlaywrightTestConfig = {

webServer: [
{
command: "vite --mode test --port 7357",
command: "vite build --mode test && vite preview --mode test --port 7357",
port: 7357,
reuseExistingServer: !process.env.CI,
},
Expand Down
2 changes: 1 addition & 1 deletion src/browser/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { EngineInfo, EngineId } from "@/type/preload";

export const defaultEngine: EngineInfo = {
uuid: EngineId("074fc39e-678b-4c13-8916-ffca8d505d1d"),
host: "http://127.0.0.1:50021",
host: "http://192.168.1.2:50021",
name: "VOICEVOX Engine",
path: undefined,
executionEnabled: false,
Expand Down
1 change: 1 addition & 0 deletions src/components/MenuBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export type MenuItemButton = MenuItemBase<"button"> & {
disabled?: boolean;
disableWhenUiLocked: boolean;
disablreloadingLocked?: boolean;
label: HotkeyAction;
};
export type MenuItemData = MenuItemSeparator | MenuItemRoot | MenuItemButton;
Expand Down
11 changes: 3 additions & 8 deletions src/components/MenuItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@
</q-item-section>

<q-item-section>{{ menudata.label }}</q-item-section>
<q-item-section
v-if="menudata.label != undefined && getMenuBarHotkey(menudata.label)"
side
>
{{ getMenuBarHotkey(menudata.label) }}
</q-item-section>

<q-item-section side>
<q-icon name="keyboard_arrow_right" />
Expand Down Expand Up @@ -49,6 +43,7 @@
clickable
class="bg-background"
:disable="menudata.disabled"
tabindex="0"
@click="menudata.onClick"
>
<q-item-section
Expand Down Expand Up @@ -96,9 +91,9 @@ const hotkeySettingsMap = computed(
)
);
// FIXME: string型は受け付けないべき
const getMenuBarHotkey = (label: HotkeyAction | string) => {
const getMenuBarHotkey = (label: HotkeyAction) => {
const hotkey = hotkeySettingsMap.value.get(label);
if (hotkey === undefined) {
if (hotkey == undefined) {
return "";
} else {
// Mac の Meta キーは Cmd キーであるため、Meta の表示名を Cmd に置換する
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/navigators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export async function toggleSetting(page: Page, settingName: string) {
await page.waitForTimeout(100);
// FIXME: なぜかariaで取得できない
// await page.getByRole("listitem", { name: "オプション" }).click();
await expect(page.getByText("オプション")).toBeVisible();
await page.getByText("オプション").click();
await page.waitForTimeout(100);
await page
Expand Down
10 changes: 4 additions & 6 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/// <reference types="vitest" />
import path from "path";
import { rmSync } from "fs";
import treeKill from "tree-kill";

import electron from "vite-plugin-electron";
Expand All @@ -11,17 +10,15 @@ import { nodePolyfills } from "vite-plugin-node-polyfills";
import { BuildOptions, defineConfig, loadEnv, Plugin } from "vite";
import { quasar } from "@quasar/vite-plugin";

rmSync(path.resolve(__dirname, "dist"), { recursive: true, force: true });

const isElectron = process.env.VITE_TARGET === "electron";
const isBrowser = process.env.VITE_TARGET === "browser";

export default defineConfig((options) => {
const package_name = process.env.npm_package_name;
const packageName = process.env.npm_package_name;
const env = loadEnv(options.mode, __dirname);
if (!package_name.startsWith(env.VITE_APP_NAME)) {
if (!packageName?.startsWith(env.VITE_APP_NAME)) {
throw new Error(
`"package.json"の"name":"${package_name}"は"VITE_APP_NAME":"${env.VITE_APP_NAME}"から始まっている必要があります`
`"package.json"の"name":"${packageName}"は"VITE_APP_NAME":"${env.VITE_APP_NAME}"から始まっている必要があります`
);
}
const shouldEmitSourcemap = ["development", "test"].includes(options.mode);
Expand All @@ -40,6 +37,7 @@ export default defineConfig((options) => {
return {
root: path.resolve(__dirname, "src"),
build: {
emptyOutDir: true,
outDir: path.resolve(__dirname, "dist"),
chunkSizeWarningLimit: 10000,
sourcemap,
Expand Down

0 comments on commit fc50e9f

Please sign in to comment.