Skip to content

Commit

Permalink
fix: 型の修正
Browse files Browse the repository at this point in the history
ビルド失敗の修正
  • Loading branch information
tsym77yoshi committed Apr 28, 2024
1 parent 8036a09 commit 30b2e94
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/components/Talk/TalkEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ import {
PresetKey,
SplitterPositionType,
Voice,
HotkeyActionNameType,
} from "@/type/preload";
import { useHotkeyManager } from "@/plugins/hotkeyPlugin";
import onetimeWatch from "@/helpers/onetimeWatch";
Expand Down Expand Up @@ -250,7 +251,7 @@ for (let i = 0; i < 10; i++) {
registerHotkeyWithCleanup({
editor: "talk",
enableInTextbox: true,
name: `${i + 1}番目のキャラクターを選択`,
name: `${i + 1}番目のキャラクターを選択` as HotkeyActionNameType,
callback: () => {
if (!uiLocked.value) {
onCharacterSelectHotkey(i);
Expand Down
16 changes: 11 additions & 5 deletions src/type/preload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export const defaultHotkeySettings: HotkeySettingType[] = [
...Array.from({ length: 10 }, (_, index) => {
const roleKey = index == 9 ? 0 : index + 1;
return {
action: `${index + 1}番目のキャラクターを選択`,
action: `${index + 1}番目のキャラクターを選択` as HotkeyActionNameType,
combination: HotkeyCombination(
!isMac ? "Ctrl " + roleKey : "Meta " + roleKey,
),
Expand Down Expand Up @@ -467,10 +467,16 @@ export const hotkeyActionNameSchema = z.enum([
"貼り付け",
"すべて選択",
"選択解除",
...Array.from(
{ length: 10 },
(_, index) => `${index + 1}番目のキャラクターを選択`,
),
"1番目のキャラクターを選択",
"2番目のキャラクターを選択",
"3番目のキャラクターを選択",
"4番目のキャラクターを選択",
"5番目のキャラクターを選択",
"6番目のキャラクターを選択",
"7番目のキャラクターを選択",
"8番目のキャラクターを選択",
"9番目のキャラクターを選択",
"10番目のキャラクターを選択",
]);

export type HotkeyActionNameType = z.infer<typeof hotkeyActionNameSchema>;
Expand Down

0 comments on commit 30b2e94

Please sign in to comment.