2023-01-07 14:07:39 +03:00
|
|
|
import * as React from "react";
|
|
|
|
import { createRoot } from "react-dom/client";
|
|
|
|
import "./css/App.css"
|
2023-01-08 10:18:20 +03:00
|
|
|
import { useMemo, } from "react";
|
2023-01-07 14:07:39 +03:00
|
|
|
import { useMicrophoneOptions } from "./100_options_microphone";
|
|
|
|
|
|
|
|
const container = document.getElementById("app")!;
|
|
|
|
const root = createRoot(container);
|
|
|
|
|
|
|
|
const App = () => {
|
|
|
|
|
2023-01-29 03:42:45 +03:00
|
|
|
const { voiceChangerSetting, clearSetting } = useMicrophoneOptions()
|
2023-01-07 14:07:39 +03:00
|
|
|
|
|
|
|
const onClearSettingClicked = async () => {
|
2023-01-29 03:42:45 +03:00
|
|
|
clearSetting()
|
2023-01-07 14:07:39 +03:00
|
|
|
location.reload()
|
|
|
|
}
|
|
|
|
|
|
|
|
const clearRow = useMemo(() => {
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<div className="body-row split-3-3-4 left-padding-1">
|
|
|
|
<div className="body-button-container">
|
|
|
|
<div className="body-button" onClick={onClearSettingClicked}>clear setting</div>
|
|
|
|
</div>
|
|
|
|
<div className="body-item-text"></div>
|
|
|
|
<div className="body-item-text"></div>
|
|
|
|
</div>
|
|
|
|
</>
|
|
|
|
)
|
|
|
|
}, [])
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
2023-01-28 09:07:32 +03:00
|
|
|
<div className="main-body">
|
2023-01-14 11:58:57 +03:00
|
|
|
<div className="body-row split-6-4">
|
2023-01-07 14:07:39 +03:00
|
|
|
<div className="body-top-title">
|
|
|
|
Voice Changer Setting
|
2023-02-10 19:20:32 +03:00
|
|
|
<span className="body-top-title-version">for v.1.5.x</span>
|
2023-01-07 14:07:39 +03:00
|
|
|
</div>
|
2023-01-14 11:58:57 +03:00
|
|
|
<div className="body-top-title-belongings">
|
|
|
|
<div className="belonging-item">
|
|
|
|
<a className="link" href="https://github.com/w-okada/voice-changer" target="_blank" rel="noopener noreferrer">
|
|
|
|
<img src="./assets/icons/github.svg" />
|
|
|
|
<span>github</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div className="belonging-item">
|
|
|
|
<a className="link" href="https://zenn.dev/wok/articles/s01_vc001_top" target="_blank" rel="noopener noreferrer">
|
|
|
|
<img src="./assets/icons/help-circle.svg" />
|
|
|
|
<span>manual</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
2023-01-07 14:07:39 +03:00
|
|
|
</div>
|
|
|
|
{clearRow}
|
|
|
|
{voiceChangerSetting}
|
|
|
|
<div>
|
|
|
|
<audio id="audio-output"></audio>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
root.render(
|
|
|
|
<App></App>
|
|
|
|
);
|