From 17a12d127c99618324f6cccbaff3dac46676e58b Mon Sep 17 00:00:00 2001 From: xeltica Date: Tue, 7 Sep 2021 20:50:09 +0900 Subject: [PATCH] wip --- src/frontend/components/SessionDataPage.tsx | 6 +- src/frontend/components/SettingPage.tsx | 93 ++++++++++++--------- src/frontend/init.tsx | 2 + src/frontend/pages/index.session.tsx | 6 +- src/frontend/style.scss | 21 ++++- 5 files changed, 78 insertions(+), 50 deletions(-) diff --git a/src/frontend/components/SessionDataPage.tsx b/src/frontend/components/SessionDataPage.tsx index 3a3664b..458805b 100644 --- a/src/frontend/components/SessionDataPage.tsx +++ b/src/frontend/components/SessionDataPage.tsx @@ -14,7 +14,7 @@ export const SessionDataPage: React.VFC = () => { ) : ( - <> +
{session.data && (

@@ -39,7 +39,7 @@ export const SessionDataPage: React.VFC = () => { {score.data && (

みす廃データ

- +
@@ -67,6 +67,6 @@ export const SessionDataPage: React.VFC = () => {
内容
)} - +
); }; diff --git a/src/frontend/components/SettingPage.tsx b/src/frontend/components/SettingPage.tsx index 4a94927..b3104f3 100644 --- a/src/frontend/components/SettingPage.tsx +++ b/src/frontend/components/SettingPage.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useReducer } from 'react'; +import React, { useEffect, useMemo, useReducer } from 'react'; import { AlertMode } from '../../common/types/alert-mode'; import { IUser } from '../../common/types/user'; import { Visibility } from '../../common/types/visibility'; @@ -42,52 +42,63 @@ export const SettingPage: React.VFC = () => { } }, [session.data]); + const saveButton = useMemo(() => ( + + ), []); + return session.isLoading || !data ? (
) : ( -
-
- - - {draft.alertMode === 'notification' && ( -
- - 「Misskey に通知」オプションは古いMisskeyでは動作しません。 +
+
+
+

スコア通知方法

+
+ + {draft.alertMode === 'notification' && ( +
+ + 「Misskey に通知」オプションは古いMisskeyでは動作しません。 +
+ )}
- )} -
- { draft.alertMode === 'note' && ( -
- - - + { draft.alertMode === 'note' && ( +
+ + + +
+ )} + {saveButton} +
+
+
+
+

テンプレート

+