feat(game-ui): 토너먼트와 베팅 메뉴를 합치고 화면 설정을 분리한다
토너먼트 기본 동작과 베팅 선택을 split 메뉴로 묶고 빈 국가 메뉴 칸에 화면 설정을 배치한다. 내 정보 화면에는 게임 상태 설정만 남기며 화면 폭, 모바일 패널 순서, 개인 CSS는 기기별 전용 화면에서 관리한다.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
export const CUSTOM_CSS_KEY = 'sam_customCSS';
|
||||
export const CUSTOM_CSS_STYLE_ID = 'sammo-custom-css';
|
||||
|
||||
export const applyCustomCss = (text: string): void => {
|
||||
if (typeof document === 'undefined') return;
|
||||
|
||||
let style = document.getElementById(CUSTOM_CSS_STYLE_ID) as HTMLStyleElement | null;
|
||||
if (!style) {
|
||||
style = document.createElement('style');
|
||||
style.id = CUSTOM_CSS_STYLE_ID;
|
||||
document.head.appendChild(style);
|
||||
}
|
||||
style.textContent = text;
|
||||
};
|
||||
|
||||
export const applyStoredCustomCss = (): void => {
|
||||
if (typeof window === 'undefined') return;
|
||||
applyCustomCss(window.localStorage.getItem(CUSTOM_CSS_KEY) ?? '');
|
||||
};
|
||||
Reference in New Issue
Block a user