From 247ad0a47099b772fb89ff36532da46829b837e0 Mon Sep 17 00:00:00 2001 From: Infinite Date: Wed, 29 Jan 2020 10:52:10 +0100 Subject: [PATCH] Style fixes --- ui/v2.5/src/components/MainNavbar.tsx | 2 +- .../Settings/SettingsConfigurationPanel.tsx | 102 ++++++++++-------- .../Settings/SettingsInterfacePanel.tsx | 31 +++--- .../components/Settings/SettingsLogsPanel.tsx | 40 ++++--- .../SettingsTasksPanel/GenerateButton.tsx | 68 ++++++------ .../SettingsTasksPanel/SettingsTasksPanel.tsx | 31 ++++-- ui/v2.5/src/components/Settings/styles.scss | 33 ++++++ .../src/components/Shared/DurationInput.tsx | 3 +- .../Shared/FolderSelect/FolderSelect.tsx | 30 +++--- ui/v2.5/src/components/Shared/Select.tsx | 8 +- ui/v2.5/src/components/Shared/styles.scss | 12 +++ ui/v2.5/src/components/Studios/StudioCard.tsx | 7 +- ui/v2.5/src/components/list/ListFilter.tsx | 2 +- .../scenes/SceneDetails/SceneMarkerForm.tsx | 40 +++---- .../scenes/ScenePlayer/ScenePlayer.tsx | 2 +- ui/v2.5/src/components/styles.scss | 15 +++ ui/v2.5/src/index.scss | 43 ++------ ui/v2.5/src/styles/_theme.scss | 4 +- 18 files changed, 272 insertions(+), 201 deletions(-) create mode 100644 ui/v2.5/src/components/Settings/styles.scss create mode 100644 ui/v2.5/src/components/styles.scss diff --git a/ui/v2.5/src/components/MainNavbar.tsx b/ui/v2.5/src/components/MainNavbar.tsx index d29319ec4..df68779ab 100644 --- a/ui/v2.5/src/components/MainNavbar.tsx +++ b/ui/v2.5/src/components/MainNavbar.tsx @@ -80,7 +80,7 @@ export const MainNavbar: React.FC = () => { > ))} diff --git a/ui/v2.5/src/components/Settings/SettingsConfigurationPanel.tsx b/ui/v2.5/src/components/Settings/SettingsConfigurationPanel.tsx index 3ab11fa12..7d6775467 100644 --- a/ui/v2.5/src/components/Settings/SettingsConfigurationPanel.tsx +++ b/ui/v2.5/src/components/Settings/SettingsConfigurationPanel.tsx @@ -161,7 +161,7 @@ export const SettingsConfigurationPanel: React.FC = () => {

Library

- Stashes +
Stashes
{
- Database Path +
Database Path
setDatabasePath(e.target.value)} /> @@ -183,8 +184,9 @@ export const SettingsConfigurationPanel: React.FC = () => {
- Generated Path +
Generated Path
setGeneratedPath(e.target.value)} /> @@ -195,45 +197,45 @@ export const SettingsConfigurationPanel: React.FC = () => {
- Excluded Patterns - {excludes - ? excludes.map((regexp, i) => ( - - - excludeRegexChanged(i, e.target.value) - } - /> - - - - - )) - : ""} - - + + + )) + } + + -
-

- - - Regexps of files/paths to exclude from Scan and add to Clean - - - -

-
+ + + + Regexps of files/paths to exclude from Scan and add to Clean + + + +
@@ -242,8 +244,9 @@ export const SettingsConfigurationPanel: React.FC = () => {

Video

- Maximum transcode size +
Maximum transcode size
) => setMaxTranscodeSize(translateQuality(event.currentTarget.value)) @@ -261,8 +264,9 @@ export const SettingsConfigurationPanel: React.FC = () => {
- Maximum streaming transcode size +
Maximum streaming transcode size
) => setMaxStreamingTranscodeSize( @@ -288,8 +292,9 @@ export const SettingsConfigurationPanel: React.FC = () => {

Authentication

- Username +
Username
) => setUsername(e.currentTarget.value) @@ -300,8 +305,9 @@ export const SettingsConfigurationPanel: React.FC = () => {
- Password +
Password
) => @@ -318,8 +324,9 @@ export const SettingsConfigurationPanel: React.FC = () => {

Logging

- Log file +
Log file
) => setLogFile(e.currentTarget.value) @@ -333,6 +340,7 @@ export const SettingsConfigurationPanel: React.FC = () => { setLogOut(!logOut)} @@ -344,8 +352,9 @@ export const SettingsConfigurationPanel: React.FC = () => { - Log Level +
Log Level
) => setLogLevel(event.currentTarget.value) @@ -362,6 +371,7 @@ export const SettingsConfigurationPanel: React.FC = () => { setLogAccess(!logAccess)} diff --git a/ui/v2.5/src/components/Settings/SettingsInterfacePanel.tsx b/ui/v2.5/src/components/Settings/SettingsInterfacePanel.tsx index f3e699942..5146afc16 100644 --- a/ui/v2.5/src/components/Settings/SettingsInterfacePanel.tsx +++ b/ui/v2.5/src/components/Settings/SettingsInterfacePanel.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState } from "react"; import { Button, Form } from "react-bootstrap"; -import { LoadingIndicator } from 'src/components/Shared'; +import { DurationInput, LoadingIndicator } from 'src/components/Shared'; import { StashService } from "src/core/StashService"; import { useToast } from "src/hooks"; @@ -61,11 +61,13 @@ export const SettingsInterfacePanel: React.FC = () => { Scene / Marker Wall setWallShowTitle(!wallShowTitle)} /> setSoundOnPreview(!soundOnPreview)} @@ -76,8 +78,9 @@ export const SettingsInterfacePanel: React.FC = () => { - Scene List +
Scene List
{ @@ -87,8 +90,9 @@ export const SettingsInterfacePanel: React.FC = () => {
- Scene Player +
Scene Player
{ @@ -98,27 +102,21 @@ export const SettingsInterfacePanel: React.FC = () => { Maximum loop duration - ) => - setMaximumLoopDuration( - Number.parseInt(event.currentTarget.value, 10) ?? 0 - ) - } - min={0} - step={1} + setMaximumLoopDuration(duration)} /> - Maximum scene duration - in seconds - where scene player will loop - the video - 0 to disable + Maximum scene duration where scene player will loop the video - 0 to disable
- Custom CSS +
Custom CSS
{ @@ -131,6 +129,7 @@ export const SettingsInterfacePanel: React.FC = () => { value={css} onChange={(e: any) => setCSS(e.target.value)} rows={16} + className="col-6" >
Page must be reloaded for changes to take effect. diff --git a/ui/v2.5/src/components/Settings/SettingsLogsPanel.tsx b/ui/v2.5/src/components/Settings/SettingsLogsPanel.tsx index 4a4d7d8bc..1ab59465e 100644 --- a/ui/v2.5/src/components/Settings/SettingsLogsPanel.tsx +++ b/ui/v2.5/src/components/Settings/SettingsLogsPanel.tsx @@ -1,5 +1,5 @@ import React, { useState } from "react"; -import { Form, Col } from "react-bootstrap"; +import { Form } from "react-bootstrap"; import * as GQL from "src/core/generated-graphql"; import { StashService } from "src/core/StashService"; @@ -37,12 +37,11 @@ const LogElement: React.FC = ({ logEntry }) => { const level = logEntry.level.padEnd(GQL.LogLevel.Progress.length); return ( - <> - {logEntry.time}  - {level}  - {logEntry.message} -
- +
+ {logEntry.time} + {level} + {logEntry.message} +
); }; @@ -100,22 +99,19 @@ export const SettingsLogsPanel: React.FC = () => { <>

Logs

- - Log Level - - - setLogLevel(event.currentTarget.value)} - > - {logLevels.map(level => ( - - ))} + Log Level + setLogLevel(event.currentTarget.value)} + > + {logLevels.map(level => ( + + ))} -
{maybeRenderError} diff --git a/ui/v2.5/src/components/Settings/SettingsTasksPanel/GenerateButton.tsx b/ui/v2.5/src/components/Settings/SettingsTasksPanel/GenerateButton.tsx index af280ce33..331cc6263 100644 --- a/ui/v2.5/src/components/Settings/SettingsTasksPanel/GenerateButton.tsx +++ b/ui/v2.5/src/components/Settings/SettingsTasksPanel/GenerateButton.tsx @@ -25,37 +25,41 @@ export const GenerateButton: React.FC = () => { } return ( - - setSprites(!sprites)} - /> - setPreviews(!previews)} - /> - setMarkers(!markers)} - /> - setTranscodes(!transcodes)} - /> - - - Generate supporting image, sprite, video, vtt and other files. - - + <> + + setSprites(!sprites)} + /> + setPreviews(!previews)} + /> + setMarkers(!markers)} + /> + setTranscodes(!transcodes)} + /> + + + + + Generate supporting image, sprite, video, vtt and other files. + + + ); }; diff --git a/ui/v2.5/src/components/Settings/SettingsTasksPanel/SettingsTasksPanel.tsx b/ui/v2.5/src/components/Settings/SettingsTasksPanel/SettingsTasksPanel.tsx index c5e1494a3..cf2f0bb72 100644 --- a/ui/v2.5/src/components/Settings/SettingsTasksPanel/SettingsTasksPanel.tsx +++ b/ui/v2.5/src/components/Settings/SettingsTasksPanel/SettingsTasksPanel.tsx @@ -183,20 +183,23 @@ export const SettingsTasksPanel: React.FC = () => { {renderImportAlert()} {renderCleanAlert()} -

Running Jobs

+
Running Jobs
{renderJobStatus()}
-

Library

+
Library
setUseFileMetadata(!useFileMetadata)} /> - @@ -206,25 +209,30 @@ export const SettingsTasksPanel: React.FC = () => {
-

Auto Tagging

+
Auto Tagging
setAutoTagPerformers(!autoTagPerformers)} /> setAutoTagStudios(!autoTagStudios)} /> setAutoTagTags(!autoTagTags)} /> - @@ -233,14 +241,16 @@ export const SettingsTasksPanel: React.FC = () => { - + + +
-

Generated Content

+
Generated Content
- ); - })} +
    + {selectableDirectories.map(path => { + return ( +
  • + +
  • + ); + })} +
- + ); @@ -99,7 +103,7 @@ export const FolderSelect: React.FC = (props: IProps) => { })}
- + ); }; diff --git a/ui/v2.5/src/components/Shared/Select.tsx b/ui/v2.5/src/components/Shared/Select.tsx index 61b318c41..92dfc7c0b 100644 --- a/ui/v2.5/src/components/Shared/Select.tsx +++ b/ui/v2.5/src/components/Shared/Select.tsx @@ -324,9 +324,13 @@ const SelectComponent: React.FC = ({ }] : items; const styles = { - option: (provided:CSSProperties) => ({ - ...provided, + option: (base:CSSProperties) => ({ + ...base, color: "#000" + }), + container: (base:CSSProperties, state:any) => ({ + ...base, + zIndex: state.isFocused ? 10 : base.zIndex }) }; diff --git a/ui/v2.5/src/components/Shared/styles.scss b/ui/v2.5/src/components/Shared/styles.scss index aa23b93f4..3a5b6cf9f 100644 --- a/ui/v2.5/src/components/Shared/styles.scss +++ b/ui/v2.5/src/components/Shared/styles.scss @@ -47,3 +47,15 @@ margin-left: 0 !important; padding: 1px 7px; } + +.folder-list { + margin-top: .5rem 0 0 0; + max-height: 30vw; + overflow-x: auto; +} + +.folder-item { + button { + padding: 0; + } +} diff --git a/ui/v2.5/src/components/Studios/StudioCard.tsx b/ui/v2.5/src/components/Studios/StudioCard.tsx index 8507263e8..e6f813270 100644 --- a/ui/v2.5/src/components/Studios/StudioCard.tsx +++ b/ui/v2.5/src/components/Studios/StudioCard.tsx @@ -12,9 +12,10 @@ export const StudioCard: React.FC = ({ studio }) => { + className="studio-image" + > + {studio.name} +
{studio.name}
{studio.scene_count} scenes. diff --git a/ui/v2.5/src/components/list/ListFilter.tsx b/ui/v2.5/src/components/list/ListFilter.tsx index 8cca59add..89395db35 100644 --- a/ui/v2.5/src/components/list/ListFilter.tsx +++ b/ui/v2.5/src/components/list/ListFilter.tsx @@ -256,7 +256,7 @@ export const ListFilter: React.FC = ( as="select" onChange={onChangePageSize} value={props.filter.itemsPerPage.toString()} - className="filter-item" + className="filter-item col-1" > {PAGE_SIZE_OPTIONS.map(s => ( diff --git a/ui/v2.5/src/components/scenes/SceneDetails/SceneMarkerForm.tsx b/ui/v2.5/src/components/scenes/SceneDetails/SceneMarkerForm.tsx index 89c9ccf68..c21c32128 100644 --- a/ui/v2.5/src/components/scenes/SceneDetails/SceneMarkerForm.tsx +++ b/ui/v2.5/src/components/scenes/SceneDetails/SceneMarkerForm.tsx @@ -64,7 +64,7 @@ export const SceneMarkerForm: React.FC = ({ sceneID, editingMa .catch(err => Toast.error(err)); } const renderTitleField = (fieldProps: FieldProps) => ( -
+
@@ -75,16 +75,18 @@ export const SceneMarkerForm: React.FC = ({ sceneID, editingMa ); const renderSecondsField = (fieldProps: FieldProps) => ( - fieldProps.form.setFieldValue("seconds", s)} - onReset={() => - fieldProps.form.setFieldValue( - "seconds", - Math.round(playerPosition ?? 0) - ) - } - numericValue={Number.parseInt(fieldProps.field.value ?? '0', 10)} - /> +
+ fieldProps.form.setFieldValue("seconds", s)} + onReset={() => + fieldProps.form.setFieldValue( + "seconds", + Math.round(playerPosition ?? 0) + ) + } + numericValue={Number.parseInt(fieldProps.field.value ?? '0', 10)} + /> +
); const renderPrimaryTagField = (fieldProps: FieldProps) => ( @@ -129,25 +131,27 @@ export const SceneMarkerForm: React.FC = ({ sceneID, editingMa Scene Marker Title - + {renderTitleField} - Time - - {renderSecondsField} - Primary Tag -
+
{renderPrimaryTagField}
+ Time + + {renderSecondsField} + + + Tags -
+
{renderTagsField} diff --git a/ui/v2.5/src/components/scenes/ScenePlayer/ScenePlayer.tsx b/ui/v2.5/src/components/scenes/ScenePlayer/ScenePlayer.tsx index e795727a8..c7b86b012 100644 --- a/ui/v2.5/src/components/scenes/ScenePlayer/ScenePlayer.tsx +++ b/ui/v2.5/src/components/scenes/ScenePlayer/ScenePlayer.tsx @@ -194,7 +194,7 @@ export class ScenePlayerImpl extends React.Component< return (