1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 23:48:47 +00:00

For mobile (#6523)

* ['notice' popover, 'all notice' dialog] fixup for mobile

* ['Files' page] fixed library icon size for mobile

* ['settings' page] fixup for 'Email notification'

* ['my libs'] fixed 'star/unstar', 'share', 'delete'

* ['deleted repos' dialog] modified column width of the table for mobile

* ['share' dialog] modified 'link details' panel for mobile

* [side panel resizer] removed it for mobile

* [group/department, shared with all] fixed the operation menu for mobile

* ['dir view'] don't offer 'repo history' page for mobile

* ['help'] fixup for page with large images, for mobile

- fixup for http://127.0.0.1:8000/help/drive_client_2.0_for_windows_10/
  (in mobile, the content of it overflowed to the right, and was cut off)

* ['file view'] removed 'history' page for mobile

* ['markdown file view'] removed 'history' page for small screen, mobile

* ['dir view'] added a gray layer to close the 'file/folder tree' panel in mobile

* ['dir view'] fixup for the 'path' bar in mobile

* ['dir view', 'shared dir view'] don't display the 'tag list' in root for mobile
This commit is contained in:
llj
2024-08-12 12:14:03 +08:00
committed by GitHub
parent 980d0922eb
commit 172ab0d2ad
24 changed files with 106 additions and 81 deletions

View File

@@ -249,18 +249,15 @@ class SharedRepoListItem extends React.Component {
this.setState({ isHistorySettingDialogShow: !this.state.isHistorySettingDialogShow });
};
onItemShare = (e) => {
e.preventDefault();
onItemShare = () => {
this.setState({ isShowSharedDialog: true });
};
onItemUnshare = (e) => {
e.preventDefault();
onItemUnshare = () => {
this.props.onItemUnshare(this.props.repo);
};
onItemDeleteToggle = (e) => {
e.preventDefault();
onItemDeleteToggle = () => {
this.setState({ isDeleteDialogShow: !this.state.isDeleteDialogShow });
};
@@ -454,7 +451,7 @@ class SharedRepoListItem extends React.Component {
operations.push('Unshare');
}
} else {
operations = this.generatorOperations();
operations = this.generatorOperations().filter(item => item != 'Divider');
if (this.isDeparementOnwerGroupMember) {
operations.unshift('Unshare');
operations.unshift('Share');
@@ -499,9 +496,9 @@ class SharedRepoListItem extends React.Component {
} else {
operations = this.generatorOperations();
}
const shareOperation = <a href="#" className="op-icon sf3-font-share sf3-font" title={gettext('Share')} role="button" aria-label={gettext('Share')} onClick={this.onItemShare}></a>;
const unshareOperation = <a href="#" className="op-icon sf2-icon-x3" title={gettext('Unshare')} role="button" aria-label={gettext('Unshare')} onClick={this.onItemUnshare}></a>;
const deleteOperation = <a href="#" className="op-icon sf3-font-delete1 sf3-font" title={gettext('Delete')} role="button" aria-label={gettext('Delete')} onClick={this.onItemDeleteToggle}></a>;
const shareOperation = <i className="op-icon sf3-font-share sf3-font" title={gettext('Share')} role="button" aria-label={gettext('Share')} onClick={this.onItemShare}></i>;
const unshareOperation = <i className="op-icon sf2-icon-x3" title={gettext('Unshare')} role="button" aria-label={gettext('Unshare')} onClick={this.onItemUnshare}></i>;
const deleteOperation = <i className="op-icon sf3-font-delete1 sf3-font" title={gettext('Delete')} role="button" aria-label={gettext('Delete')} onClick={this.onItemDeleteToggle}></i>;
if (this.isDeparementOnwerGroupMember) {
const advancedOperations = this.getAdvancedOperations();

View File

@@ -22,6 +22,7 @@ const propTypes = {
hasNextPage: PropTypes.bool,
onMonitorRepo: PropTypes.func,
theadHidden: PropTypes.bool,
inAllLibs: PropTypes.bool,
};
class SharedRepoListView extends React.Component {
@@ -139,9 +140,10 @@ class SharedRepoListView extends React.Component {
};
renderMobileUI = () => {
const { inAllLibs = false } = this.props;
return (
<table className="table-thead-hidden">
<LibsMobileThead />
<LibsMobileThead inAllLibs={inAllLibs} />
<tbody>
{this.renderRepoListView()}
</tbody>