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

Remove unused assets and update welcome message #144

Merged
merged 1 commit into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
Binary file removed client/demo/dist/assets/buymeacoffee.png
Binary file not shown.
Binary file removed client/demo/dist/assets/icons/flect.png
Binary file not shown.
1 change: 0 additions & 1 deletion client/demo/dist/assets/icons/linkedin.svg

This file was deleted.

1 change: 0 additions & 1 deletion client/demo/dist/assets/icons/twitter.svg

This file was deleted.

2 changes: 1 addition & 1 deletion client/demo/dist/index.js

Large diffs are not rendered by default.

9 changes: 1 addition & 8 deletions client/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,7 @@
"build:mod": "cd ../lib && npm run build:dev && cd - && cp -r ../lib/dist/* node_modules/@dannadori/voice-changer-client-js/dist/",
"build:mod_dos": "cd ../lib && npm run build:dev && cd ../demo && npm-run-all build:mod_copy",
"build:mod_copy": "XCOPY ..\\lib\\dist\\* .\\node_modules\\@dannadori\\voice-changer-client-js\\dist\\* /s /e /h /y",
"test": "echo \"Error: no test specified\" && exit 1",
"____ comment ____": "ウェブバージョンのスクリプト",
"clean:web": "rimraf dist_web/",
"webpack:web:prod": "npx webpack --config webpack_web.prod.js && copy .\\public\\info_web .\\dist_web\\info && copy .\\public\\assets\\gui_settings\\edition_web.txt .\\dist_web\\assets\\gui_settings\\edition.txt",
"webpack:web:dev": "npx webpack --config webpack_web.dev.js && copy .\\public\\info_web .\\dist_web\\info && copy .\\public\\assets\\gui_settings\\edition_web.txt .\\dist_web\\assets\\gui_settings\\edition.txt",
"build:web:prod": "npm-run-all clean:web webpack:web:prod",
"build:web:dev": "npm-run-all clean:web webpack:web:dev",
"start:web": "webpack-dev-server --config webpack_web.dev.js"
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"voice conversion"
Expand Down
Binary file removed client/demo/public/assets/buymeacoffee.png
Binary file not shown.
Binary file removed client/demo/public/assets/icons/flect.png
Binary file not shown.
1 change: 0 additions & 1 deletion client/demo/public/assets/icons/linkedin.svg

This file was deleted.

1 change: 0 additions & 1 deletion client/demo/public/assets/icons/twitter.svg

This file was deleted.

1 change: 0 additions & 1 deletion client/demo/public/info_web

This file was deleted.

37 changes: 0 additions & 37 deletions client/demo/src/001_globalHooks/010_useMessageBuilder.ts

This file was deleted.

56 changes: 23 additions & 33 deletions client/demo/src/components/demo/903_StartingNoticeDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,29 @@ export const StartingNoticeDialog = () => {

const messageBuilderState = useMessageBuilder();
useMemo(() => {
messageBuilderState.setMessage(__filename, "support", { ja: "支援", en: "Donation" });
messageBuilderState.setMessage(__filename, "support_message_1", { ja: "このソフトウェアを気に入ったら開発者にコーヒーをご馳走してあげよう。黄色いアイコンから。", en: "This software is supported by donations. Thank you for your support!" });
messageBuilderState.setMessage(__filename, "support_message_2", { ja: "コーヒーをご馳走する。", en: "I will support a developer by buying coffee." });

messageBuilderState.setMessage(__filename, "directml_1", { ja: "directML版は実験的バージョンです。以下の既知の問題があります。", en: "DirectML version is an experimental version. There are the known issues as follows." });
messageBuilderState.setMessage(__filename, "directml_2", {
ja: "(1) 一部の設定変更を行うとgpuを使用していても変換処理が遅くなることが発生します。もしこの現象が発生したらGPUの値を-1にしてから再度0に戻してください。",
en: "(1) When some settings are changed, conversion process becomes slow even when using GPU. If this occurs, reset the GPU value to -1 and then back to 0.",
});
messageBuilderState.setMessage(__filename, "github", { ja: "github", en: "github" });

messageBuilderState.setMessage(__filename, "click_to_start", { ja: "スタートボタンを押してください。", en: "Click to start" });
messageBuilderState.setMessage(__filename, "start", { ja: "スタート", en: "start" });
}, []);

const coffeeLink = useMemo(() => {
return isDesktopApp() ? (
// @ts-ignore
<span
className="link"
onClick={() => {
// @ts-ignore
window.electronAPI.openBrowser("https://www.buymeacoffee.com/wokad");
}}
>
<img className="donate-img" src="./assets/buymeacoffee.png" /> {messageBuilderState.getMessage(__filename, "support_message_2")}
</span>
) : (
<a className="link" href="https://www.buymeacoffee.com/wokad" target="_blank" rel="noopener noreferrer">
<img className="donate-img" src="./assets/buymeacoffee.png" /> {messageBuilderState.getMessage(__filename, "support_message_2")}
</a>
);
}, []);
const githubLink = isDesktopApp() ? (
// @ts-ignore
<span
className="link"
onClick={() => {
// @ts-ignore
window.electronAPI.openBrowser("https://github.com/deiteris/voice-changer");
}}
>
Click here
</span>
) : (
<a className="link" href="https://github.com/deiteris/voice-changer" target="_blank" rel="noopener noreferrer">
Click here
</a>
)

const dialog = useMemo(() => {
const closeButtonRow = (
Expand All @@ -55,17 +45,17 @@ export const StartingNoticeDialog = () => {
guiState.stateControls.showStartingNoticeCheckbox.updateState(false);
}}
>
{messageBuilderState.getMessage(__filename, "start")}
Start
</div>
</div>
<div className="body-item-text"></div>
</div>
);

const donationMessage = (
const welcomeMessage = (
<div className="dialog-content-part">
<div>{messageBuilderState.getMessage(__filename, "support_message_1")}</div>
<div>{coffeeLink}</div>
<div>Thank you for using the application! If you like the application or encounter any issues, please leave a star or file an issue in the Github repository.</div>
<div>{githubLink} to visit the Github repository.</div>
</div>
);

Expand All @@ -78,22 +68,22 @@ export const StartingNoticeDialog = () => {

const clickToStartMessage = (
<div className="dialog-content-part">
<div>{messageBuilderState.getMessage(__filename, "click_to_start")}</div>
<div>Click "Start" to start using the application.</div>
</div>
);

const edition = appGuiSettingState.edition;
const content = (
<div className="body-row">
{donationMessage}
{welcomeMessage}
{edition.indexOf("DirectML") >= 0 ? directMLMessage : <></>}
{clickToStartMessage}
</div>
);

return (
<div className="dialog-frame">
<div className="dialog-title">Message</div>
<div className="dialog-title">Welcome to Realtime Voice Changer!</div>
<div className="dialog-content">
{content}
{closeButtonRow}
Expand Down
131 changes: 37 additions & 94 deletions client/demo/src/components/demo/components2/001_HeaderArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,102 +18,47 @@ export const HeaderArea = (props: HeaderAreaProps) => {
const { removeItem, removeDB } = useIndexedDB({ clientType: null });

useMemo(() => {
messageBuilderState.setMessage(__filename, "github", { ja: "github", en: "github" });
messageBuilderState.setMessage(__filename, "manual", { ja: "マニュアル", en: "manual" });
messageBuilderState.setMessage(__filename, "screenCapture", { ja: "録画ツール", en: "Record Screen" });
messageBuilderState.setMessage(__filename, "support", { ja: "支援", en: "Donation" });
}, []);

const githubLink = useMemo(() => {
return isDesktopApp() ? (
<span
className="link tooltip"
onClick={() => {
// @ts-ignore
window.electronAPI.openBrowser("https://github.com/w-okada/voice-changer");
}}
>
<img src="./assets/icons/github.svg" />
<div className="tooltip-text">{messageBuilderState.getMessage(__filename, "github")}</div>
</span>
) : (
<a className="link tooltip" href="https://github.com/w-okada/voice-changer" target="_blank" rel="noopener noreferrer">
<img src="./assets/icons/github.svg" />
<div className="tooltip-text">{messageBuilderState.getMessage(__filename, "github")}</div>
</a>
);
}, []);

const manualLink = useMemo(() => {
return isDesktopApp() ? (
<span
className="link tooltip"
onClick={() => {
// @ts-ignore
window.electronAPI.openBrowser("https://github.com/w-okada/voice-changer/blob/master/tutorials/tutorial_rvc_ja_latest.md");
}}
>
<img src="./assets/icons/help-circle.svg" />
<div className="tooltip-text tooltip-text-100px">{messageBuilderState.getMessage(__filename, "manual")}</div>
</span>
) : (
<a className="link tooltip" href="https://github.com/w-okada/voice-changer/blob/master/tutorials/tutorial_rvc_ja_latest.md" target="_blank" rel="noopener noreferrer">
<img src="./assets/icons/help-circle.svg" />
<div className="tooltip-text tooltip-text-100px">{messageBuilderState.getMessage(__filename, "manual")}</div>
</a>
);
}, []);

const toolLink = useMemo(() => {
return isDesktopApp() ? (
<div className="link tooltip">
<img src="./assets/icons/tool.svg" />
<div className="tooltip-text tooltip-text-100px">
<p
onClick={() => {
// @ts-ignore
window.electronAPI.openBrowser("https://w-okada.github.io/screen-recorder-ts/");
}}
>
{messageBuilderState.getMessage(__filename, "screenCapture")}
</p>
</div>
</div>
) : (
<div className="link tooltip">
<img src="./assets/icons/tool.svg" />
<div className="tooltip-text tooltip-text-100px">
<p
onClick={() => {
window.open("https://w-okada.github.io/screen-recorder-ts/", "_blank", "noreferrer");
}}
>
{messageBuilderState.getMessage(__filename, "screenCapture")}
</p>
</div>
</div>
);
}, []);
const githubLink = isDesktopApp() ? (
<span
className="link tooltip"
onClick={() => {
// @ts-ignore
window.electronAPI.openBrowser("https://github.com/deiteris/voice-changer");
}}
>
<img src="./assets/icons/github.svg" />
<div className="tooltip-text">Github</div>
</span>
) : (
<a className="link tooltip" href="https://github.com/deiteris/voice-changer" target="_blank" rel="noopener noreferrer">
<img src="./assets/icons/github.svg" />
<div className="tooltip-text">Github</div>
</a>
);

const coffeeLink = useMemo(() => {
return isDesktopApp() ? (
<span
className="link tooltip"
onClick={() => {
// @ts-ignore
window.electronAPI.openBrowser("https://www.buymeacoffee.com/wokad");
}}
>
<img className="donate-img" src="./assets/buymeacoffee.png" />
<div className="tooltip-text tooltip-text-100px">{messageBuilderState.getMessage(__filename, "support")}</div>
</span>
) : (
<a className="link tooltip" href="https://www.buymeacoffee.com/wokad" target="_blank" rel="noopener noreferrer">
<img className="donate-img" src="./assets/buymeacoffee.png" />
<div className="tooltip-text tooltip-text-100px">{messageBuilderState.getMessage(__filename, "support")}</div>
</a>
);
}, []);
// const manualLink = useMemo(() => {
// return isDesktopApp() ? (
// <span
// className="link tooltip"
// onClick={() => {
// // @ts-ignore
// window.electronAPI.openBrowser("https://github.com/deiteris/voice-changer/blob/master/tutorials/tutorial_rvc_ja_latest.md");
// }}
// >
// <img src="./assets/icons/help-circle.svg" />
// <div className="tooltip-text tooltip-text-100px">{messageBuilderState.getMessage(__filename, "manual")}</div>
// </span>
// ) : (
// <a className="link tooltip" href="https://github.com/deiteris/voice-changer/blob/master/tutorials/tutorial_rvc_ja_latest.md" target="_blank" rel="noopener noreferrer">
// <img src="./assets/icons/help-circle.svg" />
// <div className="tooltip-text tooltip-text-100px">{messageBuilderState.getMessage(__filename, "manual")}</div>
// </a>
// );
// }, []);

const headerArea = useMemo(() => {
const onClearSettingClicked = async () => {
Expand All @@ -134,9 +79,7 @@ export const HeaderArea = (props: HeaderAreaProps) => {
<div className="icons">
<span className="belongings">
{githubLink}
{manualLink}
{toolLink}
{coffeeLink}
{/* manualLink */}
{/* {licenseButton} */}
</span>
<span className="belongings">
Expand Down