mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-18 00:00:00 +00:00
update file comment (#3057)
* update file comment * [update] edit comment * Add markdown side panel
This commit is contained in:
45
frontend/src/css/markdown-viewer/comment-dialog.css
Normal file
45
frontend/src/css/markdown-viewer/comment-dialog.css
Normal file
@@ -0,0 +1,45 @@
|
||||
.comment-dialog {
|
||||
width: 500px;
|
||||
position: absolute;
|
||||
top: 30%;
|
||||
right: 0;
|
||||
padding: 15px;
|
||||
background-color: #fafafa;
|
||||
border: 1px solid rgba(0,0,0,.2);
|
||||
border-radius: .3rem;
|
||||
box-shadow: 0 0 3px #ccc;
|
||||
z-index: 1000;
|
||||
}
|
||||
.comment-dialog-triangle {
|
||||
position: absolute;
|
||||
left: -5px;
|
||||
top: 50%;
|
||||
transform: rotate(45deg);
|
||||
border: 1px solid rgba(0,0,0,.2);
|
||||
border-top: none;
|
||||
border-right: none;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
background-color: #fafafa;
|
||||
box-shadow: -1px 1px #ccc;
|
||||
}
|
||||
.comment-dialog textarea {
|
||||
width: 100%;
|
||||
min-height: 100px;
|
||||
max-height: 300px;
|
||||
padding: 5px;
|
||||
background-color: #fff;
|
||||
}
|
||||
.comment-dialog .button-group .btn {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.comment-dialog .comment-dialog-quote {
|
||||
margin-top: 10px;
|
||||
max-height: 6rem;
|
||||
overflow: auto;
|
||||
padding-left: 1rem;
|
||||
}
|
||||
.comment-dialog .comment-dialog-quote ul,
|
||||
.comment-dialog .comment-dialog-quote ol {
|
||||
padding-left: 1rem;
|
||||
}
|
132
frontend/src/css/markdown-viewer/comments-list.css
Normal file
132
frontend/src/css/markdown-viewer/comments-list.css
Normal file
@@ -0,0 +1,132 @@
|
||||
.seafile-comment {
|
||||
border-left: 1px solid #e6e6dd;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 0 0 auto;
|
||||
min-height: 18.5em;
|
||||
z-index: 3;
|
||||
width: 380px;
|
||||
}
|
||||
.seafile-comment-title {
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
min-height: 2em;
|
||||
line-height: 2em;
|
||||
padding: 0 1em;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
background-color: #fafaf9;
|
||||
}
|
||||
.seafile-comment-title .seafile-comment-title-close {
|
||||
color: #b9b9b9;
|
||||
}
|
||||
.seafile-comment-title .seafile-comment-title-close:hover {
|
||||
color: #888;
|
||||
}
|
||||
.seafile-comment-list {
|
||||
height: calc(100% - 40px);
|
||||
overflow-y: auto;
|
||||
margin-bottom: 120px;
|
||||
}
|
||||
.seafile-comment-list .comment-vacant {
|
||||
padding: 1em;
|
||||
text-align: center;
|
||||
}
|
||||
.seafile-comment-item {
|
||||
padding: 15px 10px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.seafile-comment-item .seafile-comment-info {
|
||||
padding-bottom: 0.5em;
|
||||
height: 3em;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.seafile-comment-item .seafile-comment-info .reviewer-info {
|
||||
padding-left: 10px;
|
||||
}
|
||||
.seafile-comment-item .seafile-comment-info .review-time {
|
||||
font-size: 10px;
|
||||
color: #777;
|
||||
}
|
||||
.seafile-comment-item .seafile-comment-info .seafile-comment-dropdown {
|
||||
margin-left: auto;
|
||||
}
|
||||
.seafile-comment-item .seafile-comment-info .seafile-comment-dropdown button {
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
background-color: #fff;
|
||||
}
|
||||
.seafile-comment-item .seafile-comment-info .seafile-comment-dropdown .seafile-comment-dropdown-btn {
|
||||
color: #999;
|
||||
background-color: transparent;
|
||||
}
|
||||
.seafile-comment-item .seafile-comment-info .seafile-comment-dropdown:hover .seafile-comment-dropdown-btn {
|
||||
color: #555;
|
||||
background-color: transparent;
|
||||
}
|
||||
.seafile-comment-item .seafile-comment-info .seafile-comment-dropdown button:hover,
|
||||
.seafile-comment-item .seafile-comment-info .seafile-comment-dropdown button:focus {
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
background-color: #eee;
|
||||
}
|
||||
.seafile-comment-item .seafile-comment-content {
|
||||
margin-left: 42px;
|
||||
}
|
||||
.seafile-comment-item .seafile-comment-content ol,
|
||||
.seafile-comment-item .seafile-comment-content ul,
|
||||
.seafile-comment-item .seafile-comment-content li {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.seafile-comment-item .seafile-comment-content table,
|
||||
.seafile-comment-item .seafile-comment-content th,
|
||||
.seafile-comment-item .seafile-comment-content td {
|
||||
border: 1px solid #333;
|
||||
}
|
||||
.seafile-comment-item blockquote {
|
||||
cursor: pointer;
|
||||
}
|
||||
.seafile-comment-footer {
|
||||
background-color: #fafaf9;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
min-height: 120px;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
padding: 0;
|
||||
width: inherit;
|
||||
}
|
||||
.seafile-comment-footer .seafile-add-comment {
|
||||
margin: 10px 20px 5px 15px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.seafile-add-comment .add-comment-input,
|
||||
.seafile-edit-comment .edit-comment-input {
|
||||
background-color: #fff;
|
||||
border: 1px solid #e6e6dd;
|
||||
padding: 5px;
|
||||
min-height: 70px;
|
||||
border-radius: 5px;
|
||||
width: 100%;
|
||||
}
|
||||
.seafile-add-comment .add-comment-input {
|
||||
height: calc(100% - 50px);
|
||||
width: calc(100% - 40px);
|
||||
}
|
||||
.seafile-comment-footer .seafile-add-comment .submit-comment {
|
||||
margin-top: 5px;
|
||||
width: 60px;
|
||||
height: 28px;
|
||||
}
|
||||
.seafile-comment-item-resolved {
|
||||
background-color: #e6ffed;
|
||||
}
|
||||
.seafile-comment-footer .seafile-add-comment .comment-btn,
|
||||
.seafile-edit-comment .comment-btn {
|
||||
height: 28px;
|
||||
}
|
||||
.seafile-edit-comment {
|
||||
margin-top: 10px;
|
||||
}
|
105
frontend/src/css/markdown-viewer/history-viewer.css
Normal file
105
frontend/src/css/markdown-viewer/history-viewer.css
Normal file
@@ -0,0 +1,105 @@
|
||||
.seafile-history-side-panel {
|
||||
user-select: none;
|
||||
border-left: 1px solid #e5e5e5;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.history-side-panel-title {
|
||||
height: 50px;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
line-height: 50px;
|
||||
font-size: 1rem;
|
||||
padding: 0 10px;
|
||||
box-sizing: border-box;
|
||||
background-color: rgb(250,250,249);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.history-side-panel-title .history-tile-text {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
|
||||
.history-side-panel-title .history-title-close {
|
||||
color: #b9b9b9;
|
||||
}
|
||||
|
||||
.history-side-panel-title .history-title-close:hover {
|
||||
color: #888;
|
||||
}
|
||||
|
||||
|
||||
.history-list-container {
|
||||
height: calc(100% - 36px);
|
||||
overflow-y: hidden;
|
||||
}
|
||||
.history-list-container:hover {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.item-active {
|
||||
background-color: #fdc297;
|
||||
}
|
||||
|
||||
.history-item-container {
|
||||
padding: 0.5rem .8rem;
|
||||
}
|
||||
|
||||
.history-item-container:not(.item-active):hover {
|
||||
background-color: #ffe7d5;
|
||||
}
|
||||
|
||||
.history-item-container div {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.history-item-container .owner {
|
||||
margin-top: 0.2rem;
|
||||
}
|
||||
|
||||
.history-item-container .owner i {
|
||||
color: #549b5a;
|
||||
font-size: 0.2rem;
|
||||
margin-right: 0.2rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.history-item-container .owner span {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.diff-container {
|
||||
flex: 1 1 auto;
|
||||
overflow: auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.diff-wrapper {
|
||||
width: 90%;
|
||||
border: 1px solid #e5e5e5;
|
||||
margin: 20px auto;
|
||||
background-color: #fff;
|
||||
min-height: calc(100% - 40px);
|
||||
padding: 70px 75px;
|
||||
}
|
||||
|
||||
@media (max-width:991.8px) {
|
||||
.diff-container {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.diff-wrapper {
|
||||
padding: 20px;
|
||||
}
|
||||
}
|
||||
@media (min-width:992px) {
|
||||
.seafile-history-side-panel {
|
||||
/* width: 260px; */
|
||||
width: 100%;
|
||||
}
|
||||
}
|
170
frontend/src/css/markdown-viewer/markdown-editor.css
Normal file
170
frontend/src/css/markdown-viewer/markdown-editor.css
Normal file
@@ -0,0 +1,170 @@
|
||||
.seafile-md-viewer {
|
||||
height: 100%;
|
||||
flex-direction: row;
|
||||
}
|
||||
.sf-md-viewer-topbar-first {
|
||||
padding: 4px 10px;
|
||||
background-color: #fff;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
box-shadow: 0 3px 2px -2px rgba(200,200,200,.15);
|
||||
flex-shrink:0;
|
||||
align-items: center;
|
||||
}
|
||||
.seafile-md-viewer-container {
|
||||
width: 70%;
|
||||
background-color: #fafaf9;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.seafile-md-viewer-main {
|
||||
flex:auto;
|
||||
overflow:auto;
|
||||
background:#fafaf9;
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.seafile-md-viewer-outline-heading2,
|
||||
.seafile-md-viewer-outline-heading3 {
|
||||
margin-left: .75rem;
|
||||
line-height: 2.5;
|
||||
color:#666;
|
||||
white-space: nowrap;
|
||||
overflow:hidden;
|
||||
text-overflow:ellipsis;
|
||||
cursor:pointer;
|
||||
}
|
||||
.seafile-md-viewer-outline-heading3 {
|
||||
margin-left: 2rem;
|
||||
}
|
||||
.seafile-md-viewer-outline-heading2:hover,
|
||||
.seafile-md-viewer-outline-heading3:hover {
|
||||
color: #eb8205;
|
||||
}
|
||||
.seafile-markdown-outline {
|
||||
position: fixed;
|
||||
padding-right: 1rem;
|
||||
top: 97px;
|
||||
right: 0;
|
||||
width: 200px;
|
||||
overflow: scroll;
|
||||
height: 80%;
|
||||
}
|
||||
.seafile-editor-outline {
|
||||
border-left: 1px solid #ddd;
|
||||
}
|
||||
.seafile-markdown-outline .active {
|
||||
color: #eb8205;
|
||||
border-left: 1px solid #eb8205;
|
||||
}
|
||||
.seafile-markdown-outline .outline-h2, .seafile-markdown-outline .outline-h3 {
|
||||
height: 30px;
|
||||
margin-left: 0;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-size: 14px;
|
||||
}
|
||||
.seafile-markdown-outline .outline-h2 {
|
||||
padding-left: 20px;
|
||||
}
|
||||
.seafile-markdown-outline .outline-h3 {
|
||||
padding-left: 40px;
|
||||
}
|
||||
|
||||
/* side-panel */
|
||||
.seafile-md-viewer-side-panel {
|
||||
height: 100%;
|
||||
overflow:hidden;
|
||||
user-select: none;
|
||||
}
|
||||
.seafile-md-viewer-side-panel .seafile-editor-outline {
|
||||
border-left: 0;
|
||||
}
|
||||
.seafile-md-viewer-side-panel:hover {
|
||||
overflow:auto;
|
||||
}
|
||||
.seafile-md-viewer-side-panel-heading {
|
||||
padding:7px 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
color: #a0a0a0;
|
||||
}
|
||||
.seafile-md-viewer-side-panel-content {
|
||||
padding:8px 0;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.seafile-md-viewer-side-panel {
|
||||
border-left: 1px solid #e6e6dd;
|
||||
background-color: #fff;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.seafile-md-viewer-side-panel .tab-content {
|
||||
height: calc(100% - 39px);
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.seafile-md-viewer-side-panel .md-side-panel-nav {
|
||||
margin: 0;
|
||||
}
|
||||
.md-side-panel-nav .nav-item {
|
||||
width: 33.3%;
|
||||
padding-top: 4px;
|
||||
}
|
||||
.md-side-panel-nav .nav-item .nav-link {
|
||||
margin: 0 auto;
|
||||
}
|
||||
.md-side-panel-nav .nav-item i {
|
||||
padding: 0 8px;
|
||||
font-size: 1rem;
|
||||
width: 1rem;
|
||||
}
|
||||
.comments-number {
|
||||
font-size: 12px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 8px;
|
||||
text-align: center;
|
||||
line-height: 16px;
|
||||
font-weight: 600;
|
||||
background-color: #fd9644;
|
||||
position: absolute;
|
||||
top: 10%;
|
||||
right: 30%;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.seafile-viewer-comment-btn {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 5000px;
|
||||
border: 1px solid rgba(0, 40, 100, 0.12);
|
||||
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
||||
border-radius: 3px;
|
||||
background-color: #fff;
|
||||
padding: 5px;
|
||||
}
|
||||
.seafile-viewer-comment-btn:hover {
|
||||
cursor: pointer;
|
||||
background-color: #eee;
|
||||
}
|
||||
.seafile-md-viewer-slate {
|
||||
flex: auto;
|
||||
position: relative;
|
||||
margin: 20px 40px;
|
||||
}
|
||||
@media (max-width:991.8px) {
|
||||
.seafile-md-viewer-side-panel {
|
||||
display:none;
|
||||
}
|
||||
.seafile-markdown-outline {
|
||||
display: none;
|
||||
}
|
||||
.seafile-md-viewer-slate {
|
||||
width: calc(100% - 80px);
|
||||
margin: 20px 40px;
|
||||
}
|
||||
}
|
||||
@media (min-width:992px) {
|
||||
.seafile-md-viewer-side-panel {
|
||||
width: 30%;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user