[Refactor] Integrate DeepL authentication key URL and enhance OpenWebpage_DeeplAuthKey component to accept props.
This commit is contained in:
@@ -128,5 +128,9 @@ export const whisper_weight_type_status = [
|
||||
{ id: "large-v3-turbo", capacity: "1.58GB"},
|
||||
].map(item => ({ ...item, is_downloaded: false, progress: null }));
|
||||
|
||||
|
||||
export const deepl_auth_key_url = "https://www.deepl.com/ja/your-account/keys";
|
||||
|
||||
|
||||
export const supporters_data_url = "https://shiinasakamoto.github.io/vrct_supporters/assets/supporters/data.json";
|
||||
export const supporters_images_url = "https://ShiinaSakamoto.github.io/vrct_supporters/assets/supporters";
|
||||
@@ -59,12 +59,11 @@ export const DeeplAuthKey = (props) => {
|
||||
};
|
||||
|
||||
|
||||
export const OpenWebpage_DeeplAuthKey = () => {
|
||||
const { t } = useI18n();
|
||||
export const OpenWebpage_DeeplAuthKey = (props) => {
|
||||
return (
|
||||
<div className={styles.open_webpage_button_wrapper}>
|
||||
<a className={styles.open_webpage_button} href="https://www.deepl.com/ja/your-account/keys" target="_blank" rel="noreferrer" >
|
||||
<p className={styles.open_webpage_text}>{t("config_page.translation.deepl_auth_key.open_auth_key_webpage")}</p>
|
||||
<a className={styles.open_webpage_button} href={props.webpage_url} target="_blank" rel="noreferrer" >
|
||||
<p className={styles.open_webpage_text}>{props.open_webpage_label}</p>
|
||||
<ExternalLink className={styles.external_link_svg} />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -148,7 +148,7 @@ export const DeeplAuthKeyContainer = (props) => {
|
||||
<TemplatesContainerWrapper>
|
||||
<div className={styles.deepl_auth_key_label_section}>
|
||||
<LabelComponent label={props.label} desc={props.desc} />
|
||||
<OpenWebpage_DeeplAuthKey />
|
||||
<OpenWebpage_DeeplAuthKey {...props} />
|
||||
</div>
|
||||
<DeeplAuthKey {...props} />
|
||||
</TemplatesContainerWrapper>
|
||||
|
||||
@@ -22,6 +22,8 @@ import {
|
||||
LabelComponent,
|
||||
} from "../_components";
|
||||
|
||||
import { deepl_auth_key_url } from "@ui_configs";
|
||||
|
||||
export const Translation = () => {
|
||||
return (
|
||||
<>
|
||||
@@ -230,6 +232,8 @@ const DeeplAuthKey_Box = () => {
|
||||
"config_page.translation.deepl_auth_key.desc",
|
||||
{translator: t("main_page.translator")}
|
||||
)}
|
||||
webpage_url={deepl_auth_key_url}
|
||||
open_webpage_label={t("config_page.translation.deepl_auth_key.open_auth_key_webpage")}
|
||||
variable={input_value}
|
||||
state={currentDeepLAuthKey.state}
|
||||
onChangeFunction={onChangeFunction}
|
||||
|
||||
Reference in New Issue
Block a user