設定画面 (#34) #397
@@ -11,8 +11,7 @@ import type { ClientAnimationMode,
|
|||||||
ClientBehaviorSettings,
|
ClientBehaviorSettings,
|
||||||
ClientEmbedAutoLoadMode,
|
ClientEmbedAutoLoadMode,
|
||||||
ClientLinkPreloadMode,
|
ClientLinkPreloadMode,
|
||||||
ClientTagRelationDisplayMode,
|
ClientTagRelationDisplayMode } from '@/lib/settings'
|
||||||
ClientThumbnailMode } from '@/lib/settings'
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
sectionClassName: string
|
sectionClassName: string
|
||||||
@@ -31,9 +30,9 @@ type SegmentedControlProps<T extends string> = {
|
|||||||
onChange: (value: T) => void }
|
onChange: (value: T) => void }
|
||||||
|
|
||||||
type SettingBlockProps = {
|
type SettingBlockProps = {
|
||||||
title: string
|
title: string
|
||||||
description: string
|
description?: string
|
||||||
children: ReactNode }
|
children: ReactNode }
|
||||||
|
|
||||||
const animationOptions: SegmentedOption<ClientAnimationMode>[] = [
|
const animationOptions: SegmentedOption<ClientAnimationMode>[] = [
|
||||||
{ value: 'off', label: 'なし' },
|
{ value: 'off', label: 'なし' },
|
||||||
@@ -53,12 +52,6 @@ const tagRelationDisplayOptions: SegmentedOption<ClientTagRelationDisplayMode>[]
|
|||||||
{ value: 'flat', label: 'まとめない' },
|
{ value: 'flat', label: 'まとめない' },
|
||||||
{ value: 'grouped', label: 'まとめる' }]
|
{ value: 'grouped', label: 'まとめる' }]
|
||||||
|
|
||||||
const thumbnailModeOptions: SegmentedOption<ClientThumbnailMode>[] = [
|
|
||||||
{ value: 'off', label: '非表示' },
|
|
||||||
{ value: 'light', label: '軽量' },
|
|
||||||
{ value: 'normal', label: '通常' }]
|
|
||||||
|
|
||||||
|
|
||||||
const SegmentedControl = <T extends string,> (
|
const SegmentedControl = <T extends string,> (
|
||||||
{ value, options, onChange }: SegmentedControlProps<T>,
|
{ value, options, onChange }: SegmentedControlProps<T>,
|
||||||
) => {
|
) => {
|
||||||
|
|||||||
@@ -57,8 +57,6 @@ const INITIAL_THEATRE_INFO: TheatreInfo =
|
|||||||
const INITIAL_WEIGHTS: TheatrePostSelectionWeights =
|
const INITIAL_WEIGHTS: TheatrePostSelectionWeights =
|
||||||
{ tagPenalties: [], lightestPosts: [], heaviestPosts: [] }
|
{ tagPenalties: [], lightestPosts: [], heaviestPosts: [] }
|
||||||
|
|
||||||
const LAYOUT_STORAGE_KEY = 'theatre-layout-mode'
|
|
||||||
const TAG_FLOW_STORAGE_KEY = 'theatre-tag-flow'
|
|
||||||
const MIN_MAIN_WIDTH = 360
|
const MIN_MAIN_WIDTH = 360
|
||||||
const SIDEBAR_GAP_WIDTH = 16
|
const SIDEBAR_GAP_WIDTH = 16
|
||||||
|
|
||||||
|
|||||||
@@ -168,24 +168,7 @@ const themeTokenGroups: ThemeTokenGroupSpec[] = [
|
|||||||
fields: [
|
fields: [
|
||||||
{ key: 'background', label: '背景' },
|
{ key: 'background', label: '背景' },
|
||||||
{ key: 'foreground', label: '文字' },
|
{ key: 'foreground', label: '文字' },
|
||||||
{ key: 'primary', label: '主色' },
|
{ key: 'link', label: 'リンク' }] }]
|
||||||
{ key: 'accent', label: 'アクセント' },
|
|
||||||
{ key: 'link', label: 'リンク' },
|
|
||||||
] },
|
|
||||||
{ title: '面',
|
|
||||||
fields: [
|
|
||||||
{ key: 'card', label: 'カード' },
|
|
||||||
{ key: 'muted', label: '薄い背景' },
|
|
||||||
{ key: 'border', label: '境界線' },
|
|
||||||
] },
|
|
||||||
{ title: '上部ナビ',
|
|
||||||
fields: [
|
|
||||||
{ key: 'topNavRootBackgroundMobile', label: 'スマホ背景' },
|
|
||||||
{ key: 'topNavRootBackgroundDesktop', label: 'PC 背景' },
|
|
||||||
{ key: 'topNavActiveBackground', label: '選択中背景' },
|
|
||||||
{ key: 'topNavBrandLink', label: 'ロゴ色' },
|
|
||||||
] },
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
const ThemeSegmentedControl = <T extends string | number,> (
|
const ThemeSegmentedControl = <T extends string | number,> (
|
||||||
@@ -498,8 +481,6 @@ const ThemeSection: FC<ThemeSectionProps> = (
|
|||||||
draftActiveDarkThemeSlotNo,
|
draftActiveDarkThemeSlotNo,
|
||||||
currentDisplayedThemeSlot,
|
currentDisplayedThemeSlot,
|
||||||
selectedTheme,
|
selectedTheme,
|
||||||
displayedThemeLabel,
|
|
||||||
systemThemeLabel,
|
|
||||||
hasUnsavedChanges,
|
hasUnsavedChanges,
|
||||||
settingsBaseErrors,
|
settingsBaseErrors,
|
||||||
settingsFieldErrors,
|
settingsFieldErrors,
|
||||||
|
|||||||
新しい課題から参照
ユーザをブロックする