mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-26 23:34:45 +00:00
feat: sdoc diff (#5465)
* feat: sdoc diff * feat: add changes * feat: optimize code
This commit is contained in:
@@ -76,54 +76,6 @@
|
||||
background-color: #ffe7d5;
|
||||
}
|
||||
|
||||
.item-active {
|
||||
color: #fff;
|
||||
background-color: #fdc297 !important;
|
||||
}
|
||||
|
||||
.item-active i {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.history-list-item .history-info {
|
||||
flex: 1;
|
||||
padding: 0 0.5rem;
|
||||
}
|
||||
|
||||
.history-list-item .history-operation {
|
||||
width: 1.5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.history-info .time {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.history-info .owner {
|
||||
margin-top: 0.25rem;
|
||||
color: #888;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.owner .squire-icon {
|
||||
width: 0.5rem;
|
||||
height: 0.5rem;
|
||||
background-color: #549b5a;
|
||||
margin-right: 0.25rem;
|
||||
}
|
||||
|
||||
.history-body .dropdown-menu {
|
||||
min-width: 8rem;
|
||||
}
|
||||
|
||||
.history-body .dropdown-menu a {
|
||||
text-decoration: none;
|
||||
color: #6e7687;
|
||||
}
|
||||
|
||||
.history-content .main-panel {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
47
frontend/src/css/history-record-item.css
Normal file
47
frontend/src/css/history-record-item.css
Normal file
@@ -0,0 +1,47 @@
|
||||
.item-active {
|
||||
color: #fff;
|
||||
background-color: #fdc297 !important;
|
||||
}
|
||||
|
||||
.item-active i {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.history-list-item .history-info {
|
||||
flex: 1;
|
||||
padding: 0 0.5rem;
|
||||
}
|
||||
|
||||
.history-list-item .history-operation {
|
||||
width: 1.5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.history-info .time {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.history-info .owner {
|
||||
margin-top: 0.25rem;
|
||||
color: #888;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.owner .squire-icon {
|
||||
width: 0.5rem;
|
||||
height: 0.5rem;
|
||||
background-color: #549b5a;
|
||||
margin-right: 0.25rem;
|
||||
}
|
||||
|
||||
.history-body .dropdown-menu {
|
||||
min-width: 8rem;
|
||||
}
|
||||
|
||||
.history-body .dropdown-menu a {
|
||||
text-decoration: none;
|
||||
color: #6e7687;
|
||||
}
|
206
frontend/src/css/sdoc-file-history.css
Normal file
206
frontend/src/css/sdoc-file-history.css
Normal file
@@ -0,0 +1,206 @@
|
||||
.sdoc-file-history .sdoc-file-history-container {
|
||||
flex: 1;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.sdoc-file-history .sdoc-file-history-header {
|
||||
height: 50px;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
background-color: #f4f4f7;
|
||||
}
|
||||
|
||||
.sdoc-file-history .sdoc-file-history-header .sdoc-file-history-header-left {
|
||||
font-size: 1.25rem;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.sdoc-file-history .sdoc-file-history-header .file-name {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.sdoc-file-history .sdoc-file-history-header .sdoc-file-history-header-right {
|
||||
height: 100%;
|
||||
min-width: 100px;
|
||||
}
|
||||
|
||||
.sdoc-file-history .sdoc-file-history-header .sdoc-file-changes-container {
|
||||
height: 32px;
|
||||
border: 1px solid #e5e5e5;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.sdoc-file-history .sdoc-file-history-header .sdoc-file-changes-divider {
|
||||
border-right: 1px solid #e5e5e5;
|
||||
height: 100%;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
.sdoc-file-history .sdoc-file-history-header .sdoc-file-changes-last,
|
||||
.sdoc-file-history .sdoc-file-history-header .sdoc-file-changes-next {
|
||||
padding: 0 8px;
|
||||
color: #000;
|
||||
opacity: .5;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.sdoc-file-history .sdoc-file-history-header .sdoc-file-changes-last:hover,
|
||||
.sdoc-file-history .sdoc-file-history-header .sdoc-file-changes-next:hover {
|
||||
cursor: pointer;
|
||||
opacity: .75;
|
||||
}
|
||||
|
||||
.sdoc-file-history .sdoc-file-history-content {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
padding: 20px 40px;
|
||||
background-color: #fafaf9;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.sdoc-file-history .sdoc-file-history-content .sdoc-file-history-viewer {
|
||||
width: 100%;
|
||||
min-height: 120px;
|
||||
flex: 1;
|
||||
background-color: #fff;
|
||||
word-break: break-word;
|
||||
border: 1px solid #e6e6dd;
|
||||
}
|
||||
|
||||
.sdoc-file-history .sdoc-file-history-content .sdoc-editor-content {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.sdoc-file-history .sdoc-file-history-content .article {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* panel */
|
||||
.sdoc-file-history .sdoc-file-history-panel {
|
||||
width: 260px;
|
||||
border-left: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.sdoc-file-history .sdoc-file-history-panel .sdoc-file-history-select-range {
|
||||
padding: 10px 18px;
|
||||
height: 50px;;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
background-color: rgb(250, 250, 249);
|
||||
}
|
||||
|
||||
.sdoc-file-history .sdoc-file-history-panel .sdoc-file-history-select-range-title {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
font-size: 1rem;
|
||||
font-weight: bolder;
|
||||
line-height: 29px;
|
||||
}
|
||||
|
||||
.sdoc-file-history .sdoc-file-history-panel .sdoc-file-history-diff-switch {
|
||||
padding: 0 18px;
|
||||
height: 50px;;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.sdoc-file-history .sdoc-file-history-diff-switch .custom-switch {
|
||||
width: 100%;
|
||||
padding-left: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.sdoc-file-history .sdoc-file-history-diff-switch .custom-switch-description {
|
||||
margin-left: 0;
|
||||
flex: 1;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
/* history versions */
|
||||
.sdoc-file-history-versions {
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.sdoc-file-history-versions .history-list-item {
|
||||
padding: 5px 10px;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.sdoc-file-history-versions .history-list-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.sdoc-file-history-versions .history-list-item:hover {
|
||||
background-color: #ffe7d5;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.history-info .owner {
|
||||
min-height: 22.5px;
|
||||
}
|
||||
|
||||
.sdoc-file-history-versions .dropdown-menu {
|
||||
min-width: 8rem;
|
||||
}
|
||||
|
||||
.sdoc-file-history-versions .dropdown-menu a {
|
||||
text-decoration: none;
|
||||
color: #6e7687;
|
||||
}
|
||||
|
||||
.history-content .main-panel {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.history-content .history-side-panel {
|
||||
flex: 0 0 auto;
|
||||
user-select: none;
|
||||
border-left: 1px solid #e5e5e5;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.history-content .history-side-panel .history-side-panel-title {
|
||||
height: 50px;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
line-height: 50px;
|
||||
font-size: 1rem;
|
||||
padding: 0 10px;
|
||||
background-color: rgb(250,250,249);
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
@media (min-width:992px) {
|
||||
|
||||
.history-side-panel {
|
||||
width: 260px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media (max-width:768px) {
|
||||
|
||||
.sdoc-file-history .sdoc-file-history-content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.sdoc-file-history .sdoc-file-history-content .sdoc-file-history-viewer {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.markdown-viewer-render-content {
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
.markdown-viewer-render-content .diff-view {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
}
|
14
frontend/src/css/switch.css
Normal file
14
frontend/src/css/switch.css
Normal file
@@ -0,0 +1,14 @@
|
||||
.seahub-switch.small .custom-switch-indicator {
|
||||
width: 22px;
|
||||
height: 12px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.seahub-switch.small .custom-switch-indicator:before {
|
||||
height: 8px;
|
||||
width: 8px;
|
||||
}
|
||||
|
||||
.seahub-switch.small .custom-switch-input:checked~.custom-switch-indicator:before {
|
||||
left: 12px;
|
||||
}
|
Reference in New Issue
Block a user