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