diff --git a/public/static/css/default.css b/public/static/css/default.css index bad8d88..17a7269 100644 --- a/public/static/css/default.css +++ b/public/static/css/default.css @@ -441,7 +441,7 @@ .title-l { font-size: 1.8rem; font-weight: bold; - line-height: 2rem; + line-height: 2.5rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; diff --git a/public/static/css/white.css b/public/static/css/white.css index f223625..a2b13b8 100644 --- a/public/static/css/white.css +++ b/public/static/css/white.css @@ -1,11 +1,19 @@ #root-frame { + position: fixed; + left: 0; + right: 0; + top: 0; + bottom: 0; } .theme-default #bg { background: url("/static/img/textured_paper.png") repeat fixed center; - width: 100%; - height: 100%; - padding: 0 0 2rem 0; + position: fixed; + left: 0; + right: 0; + top: 0; + bottom: 0; + overflow: scroll; } .theme-default #top-bar { @@ -100,6 +108,10 @@ margin-bottom: 2rem; } +.container-padding { + padding: 1.5rem; +} + /* .theme-default #breadcrumb .item:last-child { margin-right: 0; } */ @@ -147,11 +159,11 @@ } .theme-default .upload-item { - padding: 1rem; + padding: 0 0 1rem 0; } -.theme-default #share-list { - padding: 1rem; +.theme-default .share-item { + padding: 0 0 1rem 0; } .theme-default #tabs { @@ -227,10 +239,8 @@ /* padding: 2rem; */ } -.theme-default #pane-settings #profile { +.theme-default #pane-settings #profile .desc-m { color: #95a5a6; - font-size: 1.2rem; - line-height: 1.8rem; } .theme-default .user-form { @@ -248,10 +258,18 @@ } .theme-default .hr { + height: 1px; margin: 1rem 0; background-color: #ecf0f1; } +.theme-default .card { + padding: 1rem; + /* background-color: #e8e8e8; */ + text-align: center; + border-radius: 0.8rem; +} + .theme-default .key-value { margin-top: 0.5rem; } @@ -290,7 +308,7 @@ color: #34495e; background-color: #ecf0f6; border: solid 1px #95a5a6; - margin: 1rem 0; + margin: 0.5rem 0 1rem 0; } .captcha { diff --git a/src/client/web/src/components/control/tabs.tsx b/src/client/web/src/components/control/tabs.tsx index e8005cf..1b276a1 100644 --- a/src/client/web/src/components/control/tabs.tsx +++ b/src/client/web/src/components/control/tabs.tsx @@ -51,7 +51,10 @@ export class Tabs extends React.Component { ? this.props.tabIcons.get(option) : defaultIconProps; - const icon = getIcon(iconProps.name, iconProps.size, iconProps.color); + const iconColor = displaying === option ? iconProps.color : "black0"; + const icon = getIcon(iconProps.name, iconProps.size, iconColor); + const fontColor = + displaying === option ? `${colorClass(iconColor)}-font` : ""; return ( , - ])} - childrenStyles={List([{}, { justifyContent: "flex-end" }])} - /> - - + + {this.props.msg.pkg.get("pane.settings")}, + , + ])} + childrenStyles={List([{}, { justifyContent: "flex-end" }])} + /> + { + return ( +
+
{props.value}
+
{props.name}
+
+ ); +}; diff --git a/src/client/web/src/components/layout/container.tsx b/src/client/web/src/components/layout/container.tsx new file mode 100644 index 0000000..094b8c7 --- /dev/null +++ b/src/client/web/src/components/layout/container.tsx @@ -0,0 +1,13 @@ +import * as React from "react"; + +export interface Props { + children: React.ReactNode | undefined; +} + +export const Container = (props: Props) => { + return ( +
+
{props.children}
+
+ ); +}; diff --git a/src/client/web/src/components/pane_admin.tsx b/src/client/web/src/components/pane_admin.tsx index 8df9d06..94c32cb 100644 --- a/src/client/web/src/components/pane_admin.tsx +++ b/src/client/web/src/components/pane_admin.tsx @@ -7,6 +7,7 @@ import { ICoreState, MsgProps, UIProps } from "./core_state"; import { User, Quota } from "../client"; import { updater } from "./state_updater"; import { Flexbox } from "./layout/flexbox"; +import { Container } from "./layout/container"; export interface AdminProps { users: Map; @@ -452,15 +453,15 @@ export class AdminPane extends React.Component { return (
-
+ -
+ -
+ {this.props.msg.pkg.get("user.add")}, @@ -514,9 +515,9 @@ export class AdminPane extends React.Component { placeholder={this.props.msg.pkg.get("settings.pwd.new2")} /> -
+ -
+ @@ -526,9 +527,9 @@ export class AdminPane extends React.Component { ])} /> {userList} -
+ -
+
{ ])} /> {roleList} -
+
); } @@ -697,9 +698,9 @@ export class BgCfg extends React.Component {
+
{this.props.msg.pkg.get("cfg.bg")} - , +
, , - ])} - childrenStyles={List([{}, { justifyContent: "flex-end" }])} - /> - - -
- {this.props.msg.pkg.get("settings.pwd.old")} +
+ + + + +
- - - - -
- {this.props.msg.pkg.get("settings.pwd.new1")} -
- -
- - -
- {this.props.msg.pkg.get("settings.pwd.new2")} -
- -
-
- -
- -
- - {this.props.msg.pkg.get("settings.chooseLan")} - , - - - - - , - ])} - childrenStyles={List([{}, { justifyContent: "flex-end" }])} - /> -
- -
- -
- - {this.props.msg.pkg.get("settings.customLan")} - , - - - - , - ])} - childrenStyles={List([{}, { justifyContent: "flex-end" }])} - /> - -
-
- {this.props.msg.pkg.get("settings.lanPackURL")} -
-
-
-
- -
- {this.props.msg.pkg.get("cfg.bg")}, - - , - ])} - childrenStyles={List([{}, { justifyContent: "flex-end" }])} - /> +
-
+ + {this.props.msg.pkg.get("settings.pwd.update")} + , + , + ])} + childrenStyles={List([{}, { justifyContent: "flex-end" }])} + /> + +
- {this.props.msg.pkg.get("cfg.bg.url")} + {this.props.msg.pkg.get("settings.pwd.old")}
-
+ + + +
+ {this.props.msg.pkg.get("settings.pwd.new1")} +
+ +
+ + +
+ {this.props.msg.pkg.get("settings.pwd.new2")} +
+ +
+
+ +
+ +
+ + {this.props.msg.pkg.get("settings.chooseLan")} + , + + + + + , + ])} + childrenStyles={List([{}, { justifyContent: "flex-end" }])} + /> +
+ +
+ +
+ + {this.props.msg.pkg.get("settings.customLan")} + , + + + + , + ])} + childrenStyles={List([{}, { justifyContent: "flex-end" }])} + />
- {this.props.msg.pkg.get("cfg.bg.repeat")} + {this.props.msg.pkg.get("settings.lanPackURL")}
-
- -
-
- {this.props.msg.pkg.get("cfg.bg.pos")} -
- -
- -
-
- {this.props.msg.pkg.get("cfg.bg.align")} -
-
-
- {/*
+
+ +
+ {this.props.msg.pkg.get("cfg.bg")}, + + , + ])} + childrenStyles={List([{}, { justifyContent: "flex-end" }])} + /> + +
+
+
+ {this.props.msg.pkg.get("cfg.bg.url")} +
+ +
+ +
+
+ {this.props.msg.pkg.get("cfg.bg.repeat")} +
+ +
+ +
+
+ {this.props.msg.pkg.get("cfg.bg.pos")} +
+ +
+ +
+
+ {this.props.msg.pkg.get("cfg.bg.align")} +
+ +
+
+
+ + {/*
{ ])} />
*/} +
); } diff --git a/src/client/web/src/components/panel_sharings.tsx b/src/client/web/src/components/panel_sharings.tsx index c3a674c..1ecdd29 100644 --- a/src/client/web/src/components/panel_sharings.tsx +++ b/src/client/web/src/components/panel_sharings.tsx @@ -10,6 +10,7 @@ import { updater } from "./state_updater"; import { ICoreState, MsgProps, UIProps } from "./core_state"; import { LoginProps } from "./pane_login"; import { Flexbox } from "./layout/flexbox"; +import { Container } from "./layout/container"; export interface SharingsProps { sharings: List; @@ -123,32 +124,31 @@ export class SharingsPanel extends React.Component { } ); - return this.props.sharingsInfo.sharings.size === 0 ? ( -
- , - -

- {this.props.msg.pkg.get("share.404.title")} -

- - {this.props.msg.pkg.get("share.404.desc")} - -
, - ])} - childrenStyles={List([ - { flex: "auto", justifyContent: "flex-end" }, - { flex: "auto" }, - ])} - className="padding-l" - /> -
- ) : ( -
- + const list = + this.props.sharingsInfo.sharings.size === 0 ? ( + + , + +

+ {this.props.msg.pkg.get("share.404.title")} +

+ + {this.props.msg.pkg.get("share.404.desc")} + +
, + ])} + childrenStyles={List([ + { flex: "auto", justifyContent: "flex-end" }, + { flex: "auto" }, + ])} + /> +
+ ) : ( + + { , ])} - /> - , + />, - , - ])} - /> + , + ])} + /> - {sharingList} -
- ); + {sharingList} + + ); + + return
{list}
; } } diff --git a/src/client/web/src/components/panel_uploadings.tsx b/src/client/web/src/components/panel_uploadings.tsx index 1ec79d4..d838c20 100644 --- a/src/client/web/src/components/panel_uploadings.tsx +++ b/src/client/web/src/components/panel_uploadings.tsx @@ -12,6 +12,7 @@ import { ICoreState, MsgProps, UIProps } from "./core_state"; import { LoginProps } from "./pane_login"; import { UploadEntry, UploadState } from "../worker/interface"; import { Flexbox } from "./layout/flexbox"; +import { Container } from "./layout/container"; export interface UploadingsProps { uploadings: List; @@ -85,25 +86,23 @@ export class UploadingsPanel extends React.Component {
- , + , -
- {fileName} -
- {FileSize(uploading.uploaded, { round: 0 })} -  / {FileSize(uploading.size, { round: 0 })} -
-
, - ])} - /> - , +
+ {fileName} +
+ {FileSize(uploading.uploaded, { round: 0 })} +  / {FileSize(uploading.size, { round: 0 })} +
+
, + ])} + />,