[Update] Config Page: Auto Export Message Logs. Add open folder button.
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
import styles from "./ActionButton.module.scss";
|
import styles from "./ActionButton.module.scss";
|
||||||
|
|
||||||
export const ActionButton = ({IconComponent, OnclickFunction}) => {
|
export const ActionButton = ({IconComponent, onclickFunction}) => {
|
||||||
return (
|
return (
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
<button className={styles.button_wrapper} onClick={OnclickFunction}>
|
<button className={styles.button_wrapper} onClick={onclickFunction}>
|
||||||
<IconComponent className={styles.button_svg}/>
|
<IconComponent className={styles.button_svg}/>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,4 +11,5 @@
|
|||||||
|
|
||||||
.button_svg {
|
.button_svg {
|
||||||
width: 2.4rem;
|
width: 2.4rem;
|
||||||
|
color: var(--dark_400_color);
|
||||||
}
|
}
|
||||||
@@ -4,8 +4,6 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
gap: 2rem;
|
gap: 2rem;
|
||||||
&.flex_column {
|
&.flex_column {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import styles from "./Others.module.scss";
|
||||||
|
|
||||||
|
import { useOpenFolder } from "@logics_common";
|
||||||
import {
|
import {
|
||||||
useEnableAutoClearMessageInputBox,
|
useEnableAutoClearMessageInputBox,
|
||||||
useEnableSendOnlyTranslatedMessages,
|
useEnableSendOnlyTranslatedMessages,
|
||||||
@@ -12,6 +14,13 @@ import {
|
|||||||
CheckboxContainer,
|
CheckboxContainer,
|
||||||
} from "../_templates/Templates";
|
} from "../_templates/Templates";
|
||||||
|
|
||||||
|
import {
|
||||||
|
LabelComponent,
|
||||||
|
Checkbox,
|
||||||
|
ActionButton,
|
||||||
|
} from "../_components/";
|
||||||
|
|
||||||
|
import OpenFolderSvg from "@images/open_folder.svg?react";
|
||||||
|
|
||||||
export const Others = () => {
|
export const Others = () => {
|
||||||
return (
|
return (
|
||||||
@@ -52,14 +61,25 @@ const SendOnlyTranslatedMessagesContainer = () => {
|
|||||||
const AutoExportMessageLogsContainer = () => {
|
const AutoExportMessageLogsContainer = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { currentEnableAutoExportMessageLogs, toggleEnableAutoExportMessageLogs } = useEnableAutoExportMessageLogs();
|
const { currentEnableAutoExportMessageLogs, toggleEnableAutoExportMessageLogs } = useEnableAutoExportMessageLogs();
|
||||||
|
const { openFolder_MessageLogs } = useOpenFolder();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CheckboxContainer
|
<div className={styles.container}>
|
||||||
label={t("config_page.auto_export_message_logs.label")}
|
<LabelComponent
|
||||||
desc={t("config_page.auto_export_message_logs.desc")}
|
label={t("config_page.auto_export_message_logs.label")}
|
||||||
variable={currentEnableAutoExportMessageLogs}
|
desc={t("config_page.auto_export_message_logs.desc")}
|
||||||
toggleFunction={toggleEnableAutoExportMessageLogs}
|
/>
|
||||||
/>
|
<div className={styles.switch_section_container}>
|
||||||
|
<ActionButton
|
||||||
|
IconComponent={OpenFolderSvg}
|
||||||
|
onclickFunction={openFolder_MessageLogs}
|
||||||
|
/>
|
||||||
|
<Checkbox
|
||||||
|
variable={currentEnableAutoExportMessageLogs}
|
||||||
|
toggleFunction={toggleEnableAutoExportMessageLogs}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
const VrcMicMuteSyncContainer = () => {
|
const VrcMicMuteSyncContainer = () => {
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
.container {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 2rem;
|
||||||
|
align-items: center;
|
||||||
|
gap: 2rem;
|
||||||
|
&.flex_column {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
border-bottom: solid 0.1rem var(--dark_800_color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.switch_section_container {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
align-items: center;
|
||||||
|
gap: 2rem;
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 242 B After Width: | Height: | Size: 242 B |
@@ -1,4 +1,5 @@
|
|||||||
export { useWindow } from "./useWindow";
|
export { useWindow } from "./useWindow";
|
||||||
export { useIsOpenedConfigPage } from "./useIsOpenedConfigPage";
|
export { useIsOpenedConfigPage } from "./useIsOpenedConfigPage";
|
||||||
|
export { useOpenFolder } from "./useOpenFolder";
|
||||||
export { useMessage } from "./useMessage";
|
export { useMessage } from "./useMessage";
|
||||||
export { useVolume } from "./useVolume";
|
export { useVolume } from "./useVolume";
|
||||||
12
src-ui/logics/common/useOpenFolder.js
Normal file
12
src-ui/logics/common/useOpenFolder.js
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import { useStdoutToPython } from "@logics/useStdoutToPython";
|
||||||
|
|
||||||
|
export const useOpenFolder = () => {
|
||||||
|
const { asyncStdoutToPython } = useStdoutToPython();
|
||||||
|
const openFolder_MessageLogs = () => {
|
||||||
|
asyncStdoutToPython("/run/open_filepath_logs");
|
||||||
|
};
|
||||||
|
|
||||||
|
return {
|
||||||
|
openFolder_MessageLogs,
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -116,6 +116,8 @@ export const useReceiveRoutes = () => {
|
|||||||
"/run/feed_watchdog": () => {},
|
"/run/feed_watchdog": () => {},
|
||||||
"/get/data/main_window_geometry": restoreWindowGeometry,
|
"/get/data/main_window_geometry": restoreWindowGeometry,
|
||||||
"/set/data/main_window_geometry": () => {},
|
"/set/data/main_window_geometry": () => {},
|
||||||
|
"/run/open_filepath_logs": () => {console.log("Opened Directory, Message Logs");
|
||||||
|
},
|
||||||
|
|
||||||
// Main Page
|
// Main Page
|
||||||
// Page Controls
|
// Page Controls
|
||||||
|
|||||||
Reference in New Issue
Block a user