mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 00:43:53 +00:00
12.0 change some icons (#6278)
* 01 history back icon * 02 change download icons * 03 fix code format * 04 change copy icons * 05 tree icon more color * change icon
This commit is contained in:
@@ -634,7 +634,7 @@ class DirentListItem extends React.Component {
|
||||
{this.state.isOperationShow && !dirent.isSelected &&
|
||||
<div className="operations">
|
||||
{(dirent.permission === 'rw' || dirent.permission === 'r' || (isCustomPermission && canDownload)) && (
|
||||
<a href="#" className="op-icon sf2-icon-download" title={gettext('Download')} role="button" aria-label={gettext('Download')} onClick={this.onItemDownload}></a>
|
||||
<a href="#" className="op-icon sf3-font sf3-font-download1" title={gettext('Download')} role="button" aria-label={gettext('Download')} onClick={this.onItemDownload}></a>
|
||||
)}
|
||||
{showShareBtn && (
|
||||
<a href="#" className="op-icon sf3-font-share sf3-font" title={gettext('Share')} role="button" aria-label={gettext('Share')} onClick={this.onItemShare}></a>
|
||||
@@ -657,7 +657,7 @@ class DirentListItem extends React.Component {
|
||||
{this.state.isOperationShow &&
|
||||
<div className="operations">
|
||||
{(dirent.permission === 'rw' || dirent.permission === 'r' || (isCustomPermission && canDownload)) && (
|
||||
<a href="#" className="op-icon sf2-icon-download" title={gettext('Download')} role="button" aria-label={gettext('Download')} onClick={this.onItemDownload}></a>
|
||||
<a href="#" className="op-icon sf3-font sf3-font-download1" title={gettext('Download')} role="button" aria-label={gettext('Download')} onClick={this.onItemDownload}></a>
|
||||
)}
|
||||
{showShareBtn && (
|
||||
<a href="#" className="op-icon sf3-font-share sf3-font" title={gettext('Share')} role="button" aria-label={gettext('Share')} onClick={this.onItemShare}></a>
|
||||
|
@@ -38,7 +38,7 @@ class LinkItem extends React.Component {
|
||||
|
||||
cutLink = (link) => {
|
||||
let length = link.length;
|
||||
return link.slice(0, 9) + '...' + link.slice(length-5);
|
||||
return link.slice(0, 9) + '...' + link.slice(length - 5);
|
||||
};
|
||||
|
||||
onDeleteIconClicked = (e) => {
|
||||
@@ -109,8 +109,8 @@ class LinkItem extends React.Component {
|
||||
{expire_date ? moment(expire_date).format('YYYY-MM-DD HH:mm') : '--'}
|
||||
</td>
|
||||
<td>
|
||||
<a href="#" role="button" onClick={this.onCopyIconClicked} className={`sf2-icon-copy action-icon ${isItemOpVisible ? '' : 'invisible'}`} title={gettext('Copy')} aria-label={gettext('Copy')}></a>
|
||||
<a href="#" role="button" onClick={this.onDeleteIconClicked} className={`sf3-font-delete1 sf3-font action-icon ${isItemOpVisible ? '' : 'invisible'}`} title={gettext('Delete')} aria-label={gettext('Delete')}></a>
|
||||
<a href="#" role="button" onClick={this.onCopyIconClicked} className={`sf3-font sf3-font-copy1 action-icon op-icon ${isItemOpVisible ? '' : 'invisible'}`} title={gettext('Copy')} aria-label={gettext('Copy')}></a>
|
||||
<a href="#" role="button" onClick={this.onDeleteIconClicked} className={`sf3-font-delete1 sf3-font action-icon op-icon ${isItemOpVisible ? '' : 'invisible'}`} title={gettext('Delete')} aria-label={gettext('Delete')}></a>
|
||||
</td>
|
||||
</tr>
|
||||
{this.state.isDeleteShareLinkDialogOpen && (
|
||||
|
@@ -108,8 +108,3 @@
|
||||
.tree-section .tree-section-body .right-icon i {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.tree-section .tree-section-body .sf-dropdown-toggle:focus,
|
||||
.tree-section .tree-section-body .sf-dropdown-toggle:hover {
|
||||
color: #999;
|
||||
}
|
||||
|
@@ -28,6 +28,10 @@
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.history-header .title .go-back .sf3-font-down {
|
||||
font-size: 1.25rem !important;
|
||||
}
|
||||
|
||||
.content-viewer {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
|
@@ -64,9 +64,9 @@ class FileHistory extends React.Component {
|
||||
initNewRecords(result) {
|
||||
if (result.total_count < 5) {
|
||||
if (result.data.length) {
|
||||
let commitID = result.data[result.data.length-1].commit_id;
|
||||
let path = result.data[result.data.length-1].path;
|
||||
let oldPath = result.data[result.data.length-1].old_path;
|
||||
let commitID = result.data[result.data.length - 1].commit_id;
|
||||
let path = result.data[result.data.length - 1].path;
|
||||
let oldPath = result.data[result.data.length - 1].old_path;
|
||||
path = oldPath ? oldPath : path;
|
||||
seafileAPI.listOldFileHistoryRecords(historyRepoID, path, commitID).then((res) => {
|
||||
if (!res.data) {
|
||||
@@ -105,8 +105,8 @@ class FileHistory extends React.Component {
|
||||
this.setState({
|
||||
historyList: result.data,
|
||||
nextCommit: result.next_start_commit,
|
||||
filePath: result.data[result.data.length-1].path,
|
||||
oldFilePath: result.data[result.data.length-1].rev_renamed_old_path,
|
||||
filePath: result.data[result.data.length - 1].path,
|
||||
oldFilePath: result.data[result.data.length - 1].rev_renamed_old_path,
|
||||
isLoading: false,
|
||||
});
|
||||
} else {
|
||||
@@ -175,8 +175,8 @@ class FileHistory extends React.Component {
|
||||
this.setState({
|
||||
historyList: [...this.state.historyList, ...result.data],
|
||||
nextCommit: result.next_start_commit,
|
||||
filePath: result.data[result.data.length-1].path,
|
||||
oldFilePath: result.data[result.data.length-1].rev_renamed_old_path,
|
||||
filePath: result.data[result.data.length - 1].path,
|
||||
oldFilePath: result.data[result.data.length - 1].rev_renamed_old_path,
|
||||
isReloadingData: false,
|
||||
});
|
||||
} else {
|
||||
|
@@ -18,8 +18,8 @@ class MetadataManagerAPI {
|
||||
}
|
||||
|
||||
initForSeahubUsage({ siteRoot, xcsrfHeaders }) {
|
||||
if (siteRoot && siteRoot.charAt(siteRoot.length-1) === '/') {
|
||||
var server = siteRoot.substring(0, siteRoot.length-1);
|
||||
if (siteRoot && siteRoot.charAt(siteRoot.length - 1) === '/') {
|
||||
var server = siteRoot.substring(0, siteRoot.length - 1);
|
||||
this.server = server;
|
||||
} else {
|
||||
this.server = siteRoot;
|
||||
|
@@ -19,8 +19,8 @@ class InstAdminAPI {
|
||||
}
|
||||
|
||||
initForSeahubUsage({ siteRoot, xcsrfHeaders }) {
|
||||
if (siteRoot && siteRoot.charAt(siteRoot.length-1) === '/') {
|
||||
var server = siteRoot.substring(0, siteRoot.length-1);
|
||||
if (siteRoot && siteRoot.charAt(siteRoot.length - 1) === '/') {
|
||||
var server = siteRoot.substring(0, siteRoot.length - 1);
|
||||
this.server = server;
|
||||
} else {
|
||||
this.server = siteRoot;
|
||||
|
@@ -293,8 +293,8 @@ class Item extends Component {
|
||||
<td>{item.view_cnt}</td>
|
||||
<td>{this.renderExpiration()}</td>
|
||||
<td>
|
||||
{!item.is_expired && <a href="#" className={`sf2-icon-link action-icon ${isOpIconShown ? '': 'invisible'}`} title={gettext('View')} aria-label={gettext('View')} role="button" onClick={this.viewLink}></a>}
|
||||
<a href="#" className={`sf3-font-delete1 sf3-font action-icon ${isOpIconShown ? '': 'invisible'}`} title={gettext('Remove')} aria-label={gettext('Remove')} role="button" onClick={this.removeLink}></a>
|
||||
{!item.is_expired && <a href="#" className={`sf2-icon-link action-icon op-icon ${isOpIconShown ? '': 'invisible'}`} title={gettext('View')} aria-label={gettext('View')} role="button" onClick={this.viewLink}></a>}
|
||||
<a href="#" className={`sf3-font-delete1 sf3-font action-icon op-icon ${isOpIconShown ? '': 'invisible'}`} title={gettext('Remove')} aria-label={gettext('Remove')} role="button" onClick={this.removeLink}></a>
|
||||
</td>
|
||||
</tr>
|
||||
);
|
||||
|
@@ -149,8 +149,8 @@ class Item extends Component {
|
||||
<td>{item.view_cnt}</td>
|
||||
<td>{this.renderExpiration()}</td>
|
||||
<td>
|
||||
{!item.is_expired && <a href="#" className={`sf2-icon-link action-icon ${isOpIconShown ? '' : 'invisible'}`} title={gettext('View')} aria-label={gettext('View')} role="button" onClick={this.viewLink}></a>}
|
||||
<a href="#" className={`sf3-font-delete1 sf3-font action-icon ${isOpIconShown ? '' : 'invisible'}`} title={gettext('Remove')} aria-label={gettext('Remove')} role="button" onClick={this.removeLink}></a>
|
||||
{!item.is_expired && <a href="#" className={`sf2-icon-link action-icon op-icon ${isOpIconShown ? '' : 'invisible'}`} title={gettext('View')} aria-label={gettext('View')} role="button" onClick={this.viewLink}></a>}
|
||||
<a href="#" className={`sf3-font-delete1 sf3-font action-icon op-icon ${isOpIconShown ? '' : 'invisible'}`} title={gettext('Remove')} aria-label={gettext('Remove')} role="button" onClick={this.removeLink}></a>
|
||||
</td>
|
||||
</tr>
|
||||
);
|
||||
|
@@ -53,7 +53,7 @@ class DirentItem extends React.Component {
|
||||
</td>
|
||||
<td>
|
||||
{isOpIconShown && dirent.is_file &&
|
||||
<a href="#" className="op-icon sf2-icon-download" title={gettext('Download')} onClick={this.downloadDirent}></a>
|
||||
<a href="#" className="op-icon sf3-font sf3-font-download1" title={gettext('Download')} onClick={this.downloadDirent}></a>
|
||||
}
|
||||
</td>
|
||||
<td>{Utils.bytesToSize(dirent.size)}</td>
|
||||
|
@@ -61,7 +61,7 @@ class DirentItem extends React.Component {
|
||||
<a href="#" className="op-icon sf3-font-delete1 sf3-font" title={gettext('Delete')} onClick={this.deleteDirent}></a>
|
||||
}
|
||||
{isOpIconShown && dirent.is_file &&
|
||||
<a href="#" className="op-icon sf2-icon-download" title={gettext('Download')} onClick={this.downloadDirent}></a>
|
||||
<a href="#" className="op-icon sf3-font sf3-font-download1" title={gettext('Download')} onClick={this.downloadDirent}></a>
|
||||
}
|
||||
</td>
|
||||
<td>{dirent.size}</td>
|
||||
|
@@ -19,8 +19,8 @@ class SearchAPI {
|
||||
}
|
||||
|
||||
initForSeahubUsage({ siteRoot, xcsrfHeaders }) {
|
||||
if (siteRoot && siteRoot.charAt(siteRoot.length-1) === '/') {
|
||||
var server = siteRoot.substring(0, siteRoot.length-1);
|
||||
if (siteRoot && siteRoot.charAt(siteRoot.length - 1) === '/') {
|
||||
var server = siteRoot.substring(0, siteRoot.length - 1);
|
||||
this.server = server;
|
||||
} else {
|
||||
this.server = siteRoot;
|
||||
|
@@ -19,8 +19,8 @@ class SystemAdminAPI {
|
||||
}
|
||||
|
||||
initForSeahubUsage({ siteRoot, xcsrfHeaders }) {
|
||||
if (siteRoot && siteRoot.charAt(siteRoot.length-1) === '/') {
|
||||
var server = siteRoot.substring(0, siteRoot.length-1);
|
||||
if (siteRoot && siteRoot.charAt(siteRoot.length - 1) === '/') {
|
||||
var server = siteRoot.substring(0, siteRoot.length - 1);
|
||||
this.server = server;
|
||||
} else {
|
||||
this.server = siteRoot;
|
||||
|
@@ -326,7 +326,7 @@ export const Utils = {
|
||||
},
|
||||
|
||||
joinPath: function(pathA, pathB) {
|
||||
if (pathA[pathA.length-1] === '/') {
|
||||
if (pathA[pathA.length - 1] === '/') {
|
||||
return pathA + pathB;
|
||||
} else {
|
||||
return pathA + '/' + pathB;
|
||||
@@ -1389,7 +1389,7 @@ export const Utils = {
|
||||
// 91~96:[~`
|
||||
// 97~122:a~z
|
||||
// 123~127:{~
|
||||
for (var i = 0; i < length-4; i++) {
|
||||
for (var i = 0; i < length - 4; i++) {
|
||||
var num = Math.floor((Math.random() * (127-33)) + 33);
|
||||
password += String.fromCharCode(num);
|
||||
}
|
||||
|
@@ -20,8 +20,8 @@ class WikiAPI {
|
||||
}
|
||||
|
||||
initForSeahubUsage({ siteRoot, xcsrfHeaders }) {
|
||||
if (siteRoot && siteRoot.charAt(siteRoot.length-1) === '/') {
|
||||
var server = siteRoot.substring(0, siteRoot.length-1);
|
||||
if (siteRoot && siteRoot.charAt(siteRoot.length - 1) === '/') {
|
||||
var server = siteRoot.substring(0, siteRoot.length - 1);
|
||||
this.server = server;
|
||||
} else {
|
||||
this.server = siteRoot;
|
||||
|
Reference in New Issue
Block a user