[Update] Add Font Family.

This commit is contained in:
Sakamoto Shiina
2024-10-02 17:52:19 +09:00
parent 3570fffbf6
commit faa6656e00
7 changed files with 124 additions and 6 deletions

View File

@@ -25,6 +25,7 @@ export const Appearance = () => {
<UiLanguageContainer />
<UiScalingContainer />
<MessageLogUiScalingContainer />
<FontFamilyContainer />
@@ -184,4 +185,28 @@ const MessageLogUiScalingContainer = () => {
track={false}
/>
);
};
import { useStore_SelectableFontFamilyList } from "@store";
import { DropdownMenuContainer } from "../components/useSettingBox";
import { useSelectedFontFamily } from "@logics_configs/useSelectedFontFamily";
const FontFamilyContainer = () => {
const { t } = useTranslation();
const { currentSelectedFontFamily, setSelectedFontFamily } = useSelectedFontFamily();
const selectFunction = (selected_data) => {
setSelectedFontFamily(selected_data.selected_id);
};
const { currentSelectableFontFamilyList } = useStore_SelectableFontFamilyList();
return (
<DropdownMenuContainer
dropdown_id="font_family"
label={t("config_page.font_family.label")}
desc={t("config_page.font_family.label")}
selected_id={currentSelectedFontFamily.data}
list={currentSelectableFontFamilyList.data}
selectFunction={selectFunction}
state={currentSelectedFontFamily.state}
/>
);
};