Skip to content

Commit

Permalink
to 0.20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba committed Aug 1, 2024
1 parent a51b279 commit a74a97b
Show file tree
Hide file tree
Showing 12 changed files with 138 additions and 78 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ npm run preview-build
## add resource

```bash
editor_tag="0.19.2"
editor_tag="0.20.0"
editor_url="https://raw.githubusercontent.com/VOICEVOX/voicevox/$editor_tag"

resource_tag="0.19.1"
resource_tag="0.20.0"
resource_url="https://raw.githubusercontent.com/VOICEVOX/voicevox_resource/$resource_tag"

# 規約
Expand Down
1 change: 1 addition & 0 deletions src/components/dormitoryTopIllustsContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default ({ id }: { id: string }) => {
"レイア",
"のんたお",
"菊の字",
"坂本アヒル",
]
if (topIllusts.length !== illustrators.length) {
throw new Error(
Expand Down
65 changes: 38 additions & 27 deletions src/components/downloadModal.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
import { Link, graphql, useStaticQuery } from "gatsby"
import React, { useEffect, useState } from "react"
import React, { useState } from "react"
import { APP_VERSION } from "../constants"
import DownloadModalSelecter from "./downloadModalSelecter"

type OsType = "Windows" | "Mac" | "Linux"
type ModeType = "GPU / CPU" | "CPU"
type ModeType = "GPU / CPU" | "CPU" | "CPU (Intel)" | "CPU (Apple)"
type PackageType = "インストーラー" | "Zip" | "tar.gz"

const modeAvailables: Record<OsType, ModeType[]> = {
Windows: ["GPU / CPU", "CPU"],
Mac: ["CPU"],
Mac: ["CPU (Intel)", "CPU (Apple)"],
Linux: ["GPU / CPU", "CPU"],
}

const packageAvailables: Record<OsType, Record<ModeType, PackageType[]>> = {
const packageAvailables: Record<
OsType,
Partial<Record<ModeType, PackageType[]>>
> = {
Windows: {
"GPU / CPU": ["インストーラー", "Zip"],
CPU: ["インストーラー", "Zip"],
},
Mac: {
"GPU / CPU": ["インストーラー", "Zip"],
CPU: ["インストーラー", "Zip"],
"CPU (Intel)": ["インストーラー", "Zip"],
"CPU (Apple)": ["インストーラー", "Zip"],
},
Linux: { "GPU / CPU": ["インストーラー"], CPU: ["インストーラー", "tar.gz"] },
}
Expand Down Expand Up @@ -73,14 +76,24 @@ export const DownloadModal: React.FC<{
},
},
Mac: {
CPU: {
"CPU (Intel)": {
インストーラー: {
url: `https://github.com/VOICEVOX/voicevox/releases/download/${APP_VERSION}/VOICEVOX.${APP_VERSION}-x64.dmg`,
name: `VOICEVOX-CPU-x64.${APP_VERSION}.Mac.dmg`,
},
Zip: {
url: `https://github.com/VOICEVOX/voicevox/releases/download/${APP_VERSION}/voicevox-macos-x64-cpu-${APP_VERSION}.zip`,
name: `VOICEVOX-CPU-x64.${APP_VERSION}.Mac.zip`,
},
},
"CPU (Apple)": {
インストーラー: {
url: `https://github.com/VOICEVOX/voicevox/releases/download/${APP_VERSION}/VOICEVOX.${APP_VERSION}.dmg`,
name: `VOICEVOX-CPU.${APP_VERSION}.Mac.dmg`,
url: `https://github.com/VOICEVOX/voicevox/releases/download/${APP_VERSION}/VOICEVOX.${APP_VERSION}-arm64.dmg`,
name: `VOICEVOX-CPU-arm64.${APP_VERSION}.Mac.dmg`,
},
Zip: {
url: `https://github.com/VOICEVOX/voicevox/releases/download/${APP_VERSION}/voicevox-macos-cpu-${APP_VERSION}.zip`,
name: `VOICEVOX-CPU.${APP_VERSION}.Mac.zip`,
url: `https://github.com/VOICEVOX/voicevox/releases/download/${APP_VERSION}/voicevox-macos-arm64-cpu-${APP_VERSION}.zip`,
name: `VOICEVOX-CPU-arm64.${APP_VERSION}.Mac.zip`,
},
},
},
Expand Down Expand Up @@ -111,19 +124,17 @@ export const DownloadModal: React.FC<{
const [selectedPackage, setSelectedPackage] =
useState<PackageType>("インストーラー")

// 存在しない組み合わせのときに選択中のものを変更する
useEffect(() => {
if (!modeAvailables[selectedOs].find(value => value == selectedMode)) {
setSelectedMode(modeAvailables[selectedOs][0])
}
if (
!packageAvailables[selectedOs][selectedMode].find(
value => value == selectedPackage
)
) {
setSelectedPackage(packageAvailables[selectedOs][selectedMode][0])
}
}, [selectedOs, selectedMode, selectedPackage])
const selectedOrDefaultMode = modeAvailables[selectedOs].includes(
selectedMode
)
? selectedMode
: modeAvailables[selectedOs][0]

const selectedOrDefaultPackage = packageAvailables[selectedOs][
selectedOrDefaultMode
]!.includes(selectedPackage)
? selectedPackage
: packageAvailables[selectedOs][selectedOrDefaultMode]![0]

return (
<div
Expand Down Expand Up @@ -157,7 +168,7 @@ export const DownloadModal: React.FC<{

<DownloadModalSelecter
label="対応モード"
selected={selectedMode}
selected={selectedOrDefaultMode}
setSelected={setSelectedMode}
candidates={modeAvailables[selectedOs]}
/>
Expand All @@ -171,9 +182,9 @@ export const DownloadModal: React.FC<{

<DownloadModalSelecter
label="パッケージ"
selected={selectedPackage}
selected={selectedOrDefaultPackage}
setSelected={setSelectedPackage}
candidates={packageAvailables[selectedOs][selectedMode]}
candidates={packageAvailables[selectedOs][selectedOrDefaultMode]!}
/>
<p className="has-text-centered is-size-7">
※ 推奨パッケージはインストーラー版です
Expand Down
8 changes: 1 addition & 7 deletions src/components/downloadModalSelecter.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect } from "react"
import React from "react"

export default <T extends string>({
label,
Expand All @@ -11,12 +11,6 @@ export default <T extends string>({
setSelected: (selected: T) => void
candidates: T[]
}) => {
useEffect(() => {
if (!candidates.find(value => value == selected)) {
setSelected(candidates[0])
}
}, [candidates])

return (
<div className="columns is-tablet is-centered is-vcentered py-0 my-2">
<div className="column is-3 py-0 my-1">
Expand Down
2 changes: 1 addition & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CharacterKey } from "./types/dormitoryCharacter"

export const APP_VERSION = "0.19.2"
export const APP_VERSION = "0.20.0"
export const NEMO_VERSION = "0.14.0"

export const characterKeys: CharacterKey[] = [
Expand Down
41 changes: 39 additions & 2 deletions src/data/updateInfos.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,46 @@
[
{
"version": "0.19.2",
"version": "0.20.0",
"descriptions": [
"キャラクター「後鬼」のスタイルを追加"
"起動を高速化",
"Apple Silicon macOSに対応",
"ヘルプダイアログのデザインを刷新",
"トーク:デフォルトプリセットが再登録できないバグの修正",
"トーク:全選択ショートカットキーを追加",
"トーク:キャラクター選択ショートカットキーを追加",
"ソング:歌声に呼吸音が被る問題を修正",
"ソング:様々な形式のプロジェクトファイルのインポートに対応",
"ソング:実験的機能としてマルチトラック機能を追加",
"ソング:ピッチ編集機能を通常機能に",
"開発環境の向上",
"バグ修正"
],
"contributors": [
"cm-ayf",
"Hiroshiba",
"honey32",
"jdkfx",
"madosuki",
"nix6839",
"nmori",
"RikitoNoto",
"romot-co",
"sabonerune",
"Segu-g",
"sevenc-nanashi",
"ShimagayaSatoka",
"sigprogramming",
"takusea",
"tarepan",
"tsym77yoshi",
"weweweok",
"White-Green",
"X-20A"
]
},
{
"version": "0.19.2",
"descriptions": ["キャラクター「後鬼」のスタイルを追加"],
"contributors": []
},
{
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a74a97b

Please sign in to comment.