From 083e1648ebd66b4792ab18cf13fff90b76d4e0c3 Mon Sep 17 00:00:00 2001 From: hexxa Date: Tue, 21 Dec 2021 20:55:33 +0800 Subject: [PATCH] fix(fe/panel_sharing): refine sharing panel styles --- public/static/css/white.css | 15 ++++++++--- .../web/src/components/panel_sharings.tsx | 26 ++++++++----------- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/public/static/css/white.css b/public/static/css/white.css index daeaa26..19bd901 100644 --- a/public/static/css/white.css +++ b/public/static/css/white.css @@ -243,15 +243,24 @@ .theme-default #upload-list .progress-green { background-color: #1abc9c; - height: 100% + height: 100%; } .theme-default .upload-item { padding: 1rem 0 1rem 0; } -.theme-default .share-item { - padding: 0 0 1rem 0; +.theme-default #sharing-list .desc { + background-color: #ecf0f1; + font-size: 1.2rem; + margin: 1rem 0; + color: #697384; + padding: 1rem; + border: dashed 1px #95a5a6; +} + +.theme-default .sharing-item { + margin: 2rem 0 2rem 0; } .theme-default #tabs { diff --git a/src/client/web/src/components/panel_sharings.tsx b/src/client/web/src/components/panel_sharings.tsx index d9db0da..5b90b74 100644 --- a/src/client/web/src/components/panel_sharings.tsx +++ b/src/client/web/src/components/panel_sharings.tsx @@ -66,8 +66,12 @@ export class SharingsPanel extends React.Component { const sharingList = this.props.sharingsInfo.sharings.map( (dirPath: string) => { + const sharingURL = `${ + document.location.href.split("?")[0] + }?dir=${encodeURIComponent(dirPath)}`; + return ( -
+
{ ])} />, - { this.deleteSharing(dirPath); }} - className="margin-r-m" > - {getIcon("RiDeleteBin2Fill", "1.8rem", "red0")} - , - - - - , + {this.props.msg.pkg.get("browser.delete")} + , ])} childrenStyles={List([ { alignItems: "center" }, @@ -105,6 +98,9 @@ export class SharingsPanel extends React.Component { { alignItems: "center", justifyContent: "flex-end" }, ])} /> + +
{sharingURL}
+
); }