mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-26 07:22:34 +00:00
change error page tip (#7915)
This commit is contained in:
@@ -25,10 +25,6 @@
|
|||||||
width: 120px;
|
width: 120px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.error-tip {
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
|
|
||||||
.statistic-traffic-tab {
|
.statistic-traffic-tab {
|
||||||
display: flex;
|
display: flex;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|||||||
import cookie from 'react-cookies';
|
import cookie from 'react-cookies';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import { navigate } from '@gatsbyjs/reach-router';
|
import { navigate } from '@gatsbyjs/reach-router';
|
||||||
import { gettext, siteRoot, username } from '../../utils/constants';
|
import { gettext, siteRoot, username, mediaUrl } from '../../utils/constants';
|
||||||
import { seafileAPI } from '../../utils/seafile-api';
|
import { seafileAPI } from '../../utils/seafile-api';
|
||||||
import { Utils } from '../../utils/utils';
|
import { Utils } from '../../utils/utils';
|
||||||
import Loading from '../../components/loading';
|
import Loading from '../../components/loading';
|
||||||
@@ -335,28 +335,28 @@ class GroupView extends React.Component {
|
|||||||
className={classnames('cur-view-content', 'd-block', 'repos-container', { 'pt-3': currentViewMode != LIST_MODE })}
|
className={classnames('cur-view-content', 'd-block', 'repos-container', { 'pt-3': currentViewMode != LIST_MODE })}
|
||||||
onScroll={this.handleScroll}
|
onScroll={this.handleScroll}
|
||||||
>
|
>
|
||||||
{isLoading
|
{isLoading ? <Loading /> : errMessage ?
|
||||||
? <Loading />
|
<div className="w-100 h-100 d-flex flex-column align-items-center justify-content-center text-center">
|
||||||
: errMessage
|
<img src={`${mediaUrl}img/error-tip.png`} alt="" width="100" />
|
||||||
? <p className="error text-center mt-2">{errMessage}</p>
|
<p className="mt-2">{errMessage}</p>
|
||||||
: repoList.length == 0
|
</div>
|
||||||
? emptyTip
|
: repoList.length == 0
|
||||||
: (
|
? emptyTip
|
||||||
<SharedRepoListView
|
:
|
||||||
repoList={this.state.repoList}
|
<SharedRepoListView
|
||||||
hasNextPage={this.state.hasNextPage}
|
repoList={this.state.repoList}
|
||||||
currentGroup={this.state.currentGroup}
|
hasNextPage={this.state.hasNextPage}
|
||||||
sortBy={this.state.sortBy}
|
currentGroup={this.state.currentGroup}
|
||||||
sortOrder={this.state.sortOrder}
|
sortBy={this.state.sortBy}
|
||||||
sortItems={this.sortItems}
|
sortOrder={this.state.sortOrder}
|
||||||
onItemUnshare={this.onItemUnshare}
|
sortItems={this.sortItems}
|
||||||
onItemDelete={this.onItemDelete}
|
onItemUnshare={this.onItemUnshare}
|
||||||
onItemRename={this.onItemRename}
|
onItemDelete={this.onItemDelete}
|
||||||
onMonitorRepo={this.onMonitorRepo}
|
onItemRename={this.onItemRename}
|
||||||
onTransferRepo={this.onItemTransfer}
|
onMonitorRepo={this.onMonitorRepo}
|
||||||
currentViewMode={currentViewMode}
|
onTransferRepo={this.onItemTransfer}
|
||||||
/>
|
currentViewMode={currentViewMode}
|
||||||
)
|
/>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -3,7 +3,7 @@ import { DropdownItem } from 'reactstrap';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import { gettext } from '../../utils/constants';
|
import { gettext, mediaUrl } from '../../utils/constants';
|
||||||
import { Utils } from '../../utils/utils';
|
import { Utils } from '../../utils/utils';
|
||||||
import { seafileAPI } from '../../utils/seafile-api';
|
import { seafileAPI } from '../../utils/seafile-api';
|
||||||
import SingleDropdownToolbar from '../../components/toolbar/single-dropdown-toolbar';
|
import SingleDropdownToolbar from '../../components/toolbar/single-dropdown-toolbar';
|
||||||
@@ -172,7 +172,12 @@ class Content extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (errorMsg) {
|
if (errorMsg) {
|
||||||
return <p className="error text-center mt-2">{errorMsg}</p>;
|
return (
|
||||||
|
<div className="w-100 h-100 d-flex flex-column align-items-center justify-content-center text-center">
|
||||||
|
<img src={`${mediaUrl}img/error-tip.png`} alt="" width="100" />
|
||||||
|
<p className="mt-2">{errorMsg}</p>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!invitationsList.length) {
|
if (!invitationsList.length) {
|
||||||
|
@@ -2,7 +2,7 @@ import React, { Component, Fragment } from 'react';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { Link } from '@gatsbyjs/reach-router';
|
import { Link } from '@gatsbyjs/reach-router';
|
||||||
import { orgAdminAPI } from '../../utils/org-admin-api';
|
import { orgAdminAPI } from '../../utils/org-admin-api';
|
||||||
import { gettext, siteRoot } from '../../utils/constants';
|
import { gettext, siteRoot, mediaUrl } from '../../utils/constants';
|
||||||
import { Utils } from '../../utils/utils';
|
import { Utils } from '../../utils/utils';
|
||||||
import Loading from '../../components/loading';
|
import Loading from '../../components/loading';
|
||||||
import OrgAdminGroupNav from '../../components/org-admin-group-nav';
|
import OrgAdminGroupNav from '../../components/org-admin-group-nav';
|
||||||
@@ -65,7 +65,12 @@ class Content extends Component {
|
|||||||
return <Loading />;
|
return <Loading />;
|
||||||
}
|
}
|
||||||
if (errorMsg) {
|
if (errorMsg) {
|
||||||
return <p className="error text-center mt-2">{errorMsg}</p>;
|
return (
|
||||||
|
<div className="w-100 h-100 d-flex flex-column align-items-center justify-content-center text-center">
|
||||||
|
<img src={`${mediaUrl}img/error-tip.png`} alt="" width="100" />
|
||||||
|
<p className="mt-2">{errorMsg}</p>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@@ -2,7 +2,7 @@ import React, { Component, Fragment } from 'react';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { Link } from '@gatsbyjs/reach-router';
|
import { Link } from '@gatsbyjs/reach-router';
|
||||||
import { orgAdminAPI } from '../../utils/org-admin-api';
|
import { orgAdminAPI } from '../../utils/org-admin-api';
|
||||||
import { gettext, siteRoot } from '../../utils/constants';
|
import { gettext, siteRoot, mediaUrl } from '../../utils/constants';
|
||||||
import { Utils } from '../../utils/utils';
|
import { Utils } from '../../utils/utils';
|
||||||
import Loading from '../../components/loading';
|
import Loading from '../../components/loading';
|
||||||
import OrgAdminGroupNav from '../../components/org-admin-group-nav';
|
import OrgAdminGroupNav from '../../components/org-admin-group-nav';
|
||||||
@@ -69,7 +69,12 @@ class Content extends Component {
|
|||||||
return <Loading />;
|
return <Loading />;
|
||||||
}
|
}
|
||||||
if (errorMsg) {
|
if (errorMsg) {
|
||||||
return <p className="error text-center mt-2">{errorMsg}</p>;
|
return (
|
||||||
|
<div className="w-100 h-100 d-flex flex-column align-items-center justify-content-center text-center">
|
||||||
|
<img src={`${mediaUrl}img/error-tip.png`} alt="" width="100" />
|
||||||
|
<p className="mt-2">{errorMsg}</p>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import { Link } from '@gatsbyjs/reach-router';
|
import { Link } from '@gatsbyjs/reach-router';
|
||||||
import { orgAdminAPI } from '../../utils/org-admin-api';
|
import { orgAdminAPI } from '../../utils/org-admin-api';
|
||||||
import { gettext, siteRoot } from '../../utils/constants';
|
import { gettext, siteRoot, mediaUrl } from '../../utils/constants';
|
||||||
import { Utils } from '../../utils/utils';
|
import { Utils } from '../../utils/utils';
|
||||||
import Loading from '../../components/loading';
|
import Loading from '../../components/loading';
|
||||||
import toaster from '../../components/toast';
|
import toaster from '../../components/toast';
|
||||||
@@ -72,7 +72,12 @@ class Content extends Component {
|
|||||||
return <Loading />;
|
return <Loading />;
|
||||||
}
|
}
|
||||||
if (errorMsg) {
|
if (errorMsg) {
|
||||||
return <p className="error text-center mt-2">{errorMsg}</p>;
|
return (
|
||||||
|
<div className="w-100 h-100 d-flex flex-column align-items-center justify-content-center text-center">
|
||||||
|
<img src={`${mediaUrl}img/error-tip.png`} alt="" width="100" />
|
||||||
|
<p className="mt-2">{errorMsg}</p>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@@ -336,7 +336,6 @@ img {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
body,
|
|
||||||
input,
|
input,
|
||||||
textarea,
|
textarea,
|
||||||
button,
|
button,
|
||||||
@@ -680,17 +679,7 @@ table img {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.error {
|
.error {
|
||||||
color: red;
|
color: #212529;
|
||||||
}
|
|
||||||
|
|
||||||
.errorlist {
|
|
||||||
color: red;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.error-tip {
|
|
||||||
text-align: center;
|
|
||||||
margin-top: 5em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ovhd {
|
.ovhd {
|
||||||
@@ -1416,7 +1405,7 @@ textarea:-moz-placeholder {
|
|||||||
padding: 5px;
|
padding: 5px;
|
||||||
background: #FDF;
|
background: #FDF;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: #000;
|
color: #212529;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**** narrow-panel ****/
|
/**** narrow-panel ****/
|
||||||
@@ -3004,8 +2993,3 @@ a.sf-popover-item {
|
|||||||
margin-right: 2px;
|
margin-right: 2px;
|
||||||
background-color: #DBDBDB;
|
background-color: #DBDBDB;
|
||||||
}
|
}
|
||||||
|
|
||||||
.unable-view-file-tip {
|
|
||||||
margin-top: 20px;
|
|
||||||
font-size: 1.125rem;
|
|
||||||
}
|
|
||||||
|
@@ -309,7 +309,7 @@ a, a:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.error {
|
.error {
|
||||||
color: red;
|
color: #212529;
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-deco,
|
.no-deco,
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 6.8 KiB |
@@ -1,8 +1,9 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block main_panel %}
|
{% block main_content %}
|
||||||
<div class="text-panel">
|
<div class="w-100 h-100 d-flex flex-column align-items-center justify-content-center text-center">
|
||||||
|
<img src="{{MEDIA_URL}}img/error-tip.png" alt="" width="100" />
|
||||||
<p>{% trans "Sorry, but the requested page could not be found." %}</p>
|
<p>{% trans "Sorry, but the requested page could not be found." %}</p>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@@ -1,15 +1,13 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
{% block main_content %}
|
{% block main_content %}
|
||||||
<div class="text-panel">
|
<div class="w-100 h-100 d-flex flex-column align-items-center justify-content-center text-center">
|
||||||
{% if unable_view_file %}
|
{% if organization_inactive %}
|
||||||
<img src="{{MEDIA_URL}}img/failed-to-view-file.png" alt="" width="100" />
|
|
||||||
<p class="unable-view-file-tip">{{ error_msg }}</p>
|
|
||||||
{% elif organization_inactive %}
|
|
||||||
<img src="{{MEDIA_URL}}img/organization-inactive.png" alt="" width="100" />
|
<img src="{{MEDIA_URL}}img/organization-inactive.png" alt="" width="100" />
|
||||||
<p>{{ error_msg }}</p>
|
<p>{{ error_msg }}</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p class="error">{{ error_msg }}</p>
|
<img src="{{MEDIA_URL}}img/error-tip.png" alt="" width="100" />
|
||||||
|
<p>{{ error_msg }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@@ -157,10 +157,8 @@ FILEEXT_TYPE_MAP = gen_fileext_type_map()
|
|||||||
def render_permission_error(request, msg=None, extra_ctx=None):
|
def render_permission_error(request, msg=None, extra_ctx=None):
|
||||||
"""
|
"""
|
||||||
Return permisson error page.
|
Return permisson error page.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
ctx = {}
|
ctx = {}
|
||||||
ctx['unable_view_file'] = msg == _('Unable to view file')
|
|
||||||
ctx['error_msg'] = msg or _('permission error')
|
ctx['error_msg'] = msg or _('permission error')
|
||||||
|
|
||||||
if extra_ctx:
|
if extra_ctx:
|
||||||
@@ -172,10 +170,8 @@ def render_permission_error(request, msg=None, extra_ctx=None):
|
|||||||
def render_error(request, msg=None, extra_ctx=None):
|
def render_error(request, msg=None, extra_ctx=None):
|
||||||
"""
|
"""
|
||||||
Return normal error page.
|
Return normal error page.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
ctx = {}
|
ctx = {}
|
||||||
ctx['unable_view_file'] = msg == _('Unable to view file')
|
|
||||||
ctx['error_msg'] = msg or _('Internal Server Error')
|
ctx['error_msg'] = msg or _('Internal Server Error')
|
||||||
|
|
||||||
if extra_ctx:
|
if extra_ctx:
|
||||||
@@ -187,7 +183,6 @@ def render_error(request, msg=None, extra_ctx=None):
|
|||||||
def list_to_string(l):
|
def list_to_string(l):
|
||||||
"""
|
"""
|
||||||
Return string of a list.
|
Return string of a list.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
return ','.join(l)
|
return ','.join(l)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user