1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-24 21:07:17 +00:00

rewrote 'text file view' & tidied 'file view' code (#2996)

This commit is contained in:
llj
2019-02-25 18:09:17 +08:00
committed by Daniel Pan
parent 9e38f38fd8
commit 4438708040
12 changed files with 321 additions and 485 deletions

View File

@@ -0,0 +1,14 @@
.text-file-view {
overflow: auto;
}
.ReactCodeMirror {
box-shadow: 0 0 6px #ccc;
border: 1px solid #ccc;
width: calc(100% - 40px);
max-width: 950px;
margin: 0 auto;
}
.CodeMirror {
height: auto;
min-height: 300px;
}

View File

@@ -1,109 +0,0 @@
#root {
height: 100%;
}
.txt-file-view {
height: 100%;
overflow: hidden;
padding: 0;
width: 100%;
flex-direction: column;
}
.txt-file-view-header {
width: 100%;
padding: 4px 10px;
border-bottom: 1px solid #c9c9c9;
justify-content: space-between;
flex-shrink: 0;
}
.txt-view-button-group {
align-items: center;
}
.txt-file-view-body {
height: calc(100% - 60px);
width: 100%;
background: #f4f4f4;
border: 1px solid #ededed;
overflow: auto;
flex: auto;
flex-direction: column;
}
.txt-file-view-body .txt-view {
min-height: 400px;
margin: 0 auto;
width: 950px;
background: #fff;
}
.txt-file-view-body .txt-view .CodeMirror,
.txt-file-view-body .txt-view-comment .CodeMirror {
box-shadow: 0 0 6px #ccc;
border: 1px solid #ccc;
height: auto;
min-height: 400px;
margin: 0 auto;
line-height: 1.5em;
overflow: auto;
padding: 40px;
}
.txt-file-view-body .txt-view .CodeMirror-scroll {
min-height: 400px;
margin-right: 0;
}
.file-enc-cont {
width: 950px;
height: 24px;
margin: 10px auto;
text-align: right;
}
.file-title {
margin-bottom: 0px;
align-items: center;
font-size: 1.2rem;
font-weight: bold;
}
.file-state {
font-size: 13px;
margin-top: 5px;
}
.file-title .file-internal-link,
.file-title .file-star,
.file-title .file-lock {
font-size: .875rem;
cursor: pointer;
margin-left: .5rem;
vertical-align: text-bottom;
}
.file-title .file-star .star {
color: #f89a68;
}
.file-internal-link {
color: #585858;
}
.txt-file-view-body .txt-view-comment {
display: flex;
height: 100%;
}
.txt-file-view-body .txt-view-comment .ReactCodeMirror {
width: 70%;
margin: 5px 20px;
overflow-y: auto;
}
.txt-file-view-body .txt-view-comment .seafile-comment {
width: 30%;
background: #fff;
}