fix(fe/panel_sharing): refine sharing panel styles

This commit is contained in:
hexxa 2021-12-21 20:55:33 +08:00 committed by Hexxa
parent 5d5527bb51
commit 083e1648eb
2 changed files with 23 additions and 18 deletions

View file

@ -243,15 +243,24 @@
.theme-default #upload-list .progress-green { .theme-default #upload-list .progress-green {
background-color: #1abc9c; background-color: #1abc9c;
height: 100% height: 100%;
} }
.theme-default .upload-item { .theme-default .upload-item {
padding: 1rem 0 1rem 0; padding: 1rem 0 1rem 0;
} }
.theme-default .share-item { .theme-default #sharing-list .desc {
padding: 0 0 1rem 0; 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 { .theme-default #tabs {

View file

@ -66,8 +66,12 @@ export class SharingsPanel extends React.Component<Props, State, {}> {
const sharingList = this.props.sharingsInfo.sharings.map( const sharingList = this.props.sharingsInfo.sharings.map(
(dirPath: string) => { (dirPath: string) => {
const sharingURL = `${
document.location.href.split("?")[0]
}?dir=${encodeURIComponent(dirPath)}`;
return ( return (
<div id="share-list" key={dirPath}> <div className="sharing-item" key={dirPath}>
<Flexbox <Flexbox
children={List([ children={List([
<Flexbox <Flexbox
@ -80,24 +84,13 @@ export class SharingsPanel extends React.Component<Props, State, {}> {
])} ])}
/>, />,
<span <button
onClick={() => { onClick={() => {
this.deleteSharing(dirPath); this.deleteSharing(dirPath);
}} }}
className="margin-r-m"
> >
{getIcon("RiDeleteBin2Fill", "1.8rem", "red0")} {this.props.msg.pkg.get("browser.delete")}
</span>, </button>,
<span>
<input
type="text"
readOnly
value={`${
document.location.href.split("?")[0]
}?dir=${encodeURIComponent(dirPath)}`}
/>
</span>,
])} ])}
childrenStyles={List([ childrenStyles={List([
{ alignItems: "center" }, { alignItems: "center" },
@ -105,6 +98,9 @@ export class SharingsPanel extends React.Component<Props, State, {}> {
{ alignItems: "center", justifyContent: "flex-end" }, { alignItems: "center", justifyContent: "flex-end" },
])} ])}
/> />
<div className="desc">{sharingURL}</div>
<div className="hr grey0-bg"></div>
</div> </div>
); );
} }