Skip to content

Commit

Permalink
v3.36.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lekakid committed Apr 29, 2024
2 parents b2476d0 + bdb94cf commit 390bd47
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 24 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "arcarefresher",
"version": "3.36.0",
"version": "3.36.1",
"description": "",
"author": "LeKAKiD",
"license": "MIT",
Expand Down
11 changes: 6 additions & 5 deletions src/feature/Site/Mute/ContextMenu/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ function ContextMenu({ target, closeMenu }) {

const userTmp = new ArcaUser(userElement);
const uid = userTmp.toUID();
return { type: 'user', uid };
const regex = makeRegex(uid);

return { type: 'user', uid, regex };
}

if (target.matches(emotSelector)) {
Expand Down Expand Up @@ -252,9 +254,8 @@ function ContextMenu({ target, closeMenu }) {
}, [closeMenu, data, dispatch, setSnack]);

const handleUser = useCallback(() => {
const { uid } = data;
const regex = makeRegex(uid);
const exist = user.includes(uid);
const { regex } = data;
const exist = user.includes(regex);

dispatch(exist ? $removeUser(regex) : $addUser(regex));
closeMenu();
Expand Down Expand Up @@ -318,7 +319,7 @@ function ContextMenu({ target, closeMenu }) {
}

if (data?.type === 'user') {
const exist = user.includes(makeRegex(data.uid));
const exist = user.includes(data.regex);
return (
<List>
<MenuItem onClick={handleUser}>
Expand Down
38 changes: 24 additions & 14 deletions src/feature/Site/SiteCustom/ConfigMenu/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
$toggleSideContents,
$toggleSideBests,
$toggleSideNews,
$toggleFontSizeEnabled,
$setFontSize,
// 동작
$setSpoofTitle,
Expand All @@ -50,6 +51,7 @@ const View = forwardRef((_props, ref) => {
sideBests,
sideNews,
sideMenu,
fontSizeEnabled,
fontSize,
// 동작
spoofTitle,
Expand Down Expand Up @@ -138,21 +140,29 @@ const View = forwardRef((_props, ref) => {
</Collapse>
</>
)}
<SliderRow
divider
primary="사이트 전체 폰트 크기"
secondary="표시 설정에서 글자 크기 브라우저 기본 설정 필요"
sliderProps={{
min: 8,
max: 30,
step: 1,
valueLabelFormat: labelFormat,
valueLabelDisplay: 'auto',
}}
value={fontSize}
action={$setFontSize}
opacityOnChange={0.6}
<SwitchRow
divider={fontSizeEnabled}
primary="사이트 전체 폰트 크기 설정"
secondary="⚠ 사이트의 표시 설정을 무시합니다."
value={fontSizeEnabled}
action={$toggleFontSizeEnabled}
/>
<Collapse in={fontSizeEnabled}>
<SliderRow
divider
primary="폰트 크기"
sliderProps={{
min: 8,
max: 30,
step: 1,
valueLabelFormat: labelFormat,
valueLabelDisplay: 'auto',
}}
value={fontSize}
action={$setFontSize}
opacityOnChange={0.6}
/>
</Collapse>
</List>
</Paper>
<Typography variant="subtitle2">동작 설정</Typography>
Expand Down
7 changes: 5 additions & 2 deletions src/feature/Site/SiteCustom/Feature.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,9 @@ function FontSizeStyles({ value }) {
return (
<GlobalStyles
styles={{
fontSize: value,
html: {
fontSize: `${value}px !important`,
},
}}
/>
);
Expand Down Expand Up @@ -237,6 +239,7 @@ export default function SiteCustom() {
sideBests,
sideNews,
sideMenu,
fontSizeEnabled,
fontSize,
fixDarkModeWriteForm,
// 동작
Expand Down Expand Up @@ -298,7 +301,7 @@ export default function SiteCustom() {
<SideContentsStyles value={sideContents} />
<SideBestsStyles value={sideBests} />
<SideNewsStyles value={sideNews} />
<FontSizeStyles value={fontSize} />
{fontSizeEnabled && <FontSizeStyles value={fontSize} />}
<FixDarkModeWriteFormStyles value={fixDarkModeWriteForm} />
</>
);
Expand Down
5 changes: 5 additions & 0 deletions src/feature/Site/SiteCustom/slice.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const defaultStorage = {
sideContents: true,
sideBests: true,
sideNews: true,
fontSizeEnabled: false,
fontSize: 15,
// 동작
spoofTitle: '',
Expand Down Expand Up @@ -95,6 +96,9 @@ export const slice = createSlice({
$toggleSideNews(state) {
state.storage.sideNews = !state.storage.sideNews;
},
$toggleFontSizeEnabled(state) {
state.storage.fontSizeEnabled = !state.storage.fontSizeEnabled;
},
$setFontSize(state, action) {
state.storage.fontSize = action.payload;
},
Expand Down Expand Up @@ -122,6 +126,7 @@ export const {
$toggleSideContents,
$toggleSideBests,
$toggleSideNews,
$toggleFontSizeEnabled,
$setFontSize,
// 동작
$setSpoofTitle,
Expand Down

0 comments on commit 390bd47

Please sign in to comment.