mirror of
https://github.com/haiwen/seahub.git
synced 2025-10-20 10:20:42 +00:00
remove custom style of rc-calendar
This commit is contained in:
8
frontend/package-lock.json
generated
8
frontend/package-lock.json
generated
@@ -18,7 +18,7 @@
|
||||
"@seafile/comment-editor": "0.0.13",
|
||||
"@seafile/react-image-lightbox": "4.0.2",
|
||||
"@seafile/resumablejs": "1.1.16",
|
||||
"@seafile/seafile-calendar": "1.0.0-alpha.1",
|
||||
"@seafile/seafile-calendar": "1.0.0-alpha.2",
|
||||
"@seafile/seafile-editor": "2.0.33",
|
||||
"@seafile/seafile-sdoc-editor": "2.0.107",
|
||||
"@seafile/stldraw-editor": "1.0.1",
|
||||
@@ -5809,9 +5809,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@seafile/seafile-calendar": {
|
||||
"version": "1.0.0-alpha.1",
|
||||
"resolved": "https://registry.npmjs.org/@seafile/seafile-calendar/-/seafile-calendar-1.0.0-alpha.1.tgz",
|
||||
"integrity": "sha512-WjCfzCPe7O9pNpDmWAhVdStF1rmhpueBYeBfLeUUKctbT6rHFRqA+PL2BGelRvzMkeaaQzPLg/K0teb5S8QRgQ==",
|
||||
"version": "1.0.0-alpha.2",
|
||||
"resolved": "https://registry.npmjs.org/@seafile/seafile-calendar/-/seafile-calendar-1.0.0-alpha.2.tgz",
|
||||
"integrity": "sha512-ZfeqDB2fqaW1yph/fkaBrAQF378jWb5MZksGKdrGTHbtotpIytkTNmRkcKg7jzV4rKFJu3fVRkpTSn/I7mD1DQ==",
|
||||
"dependencies": {
|
||||
"babel-runtime": "6.x",
|
||||
"classnames": "2.x",
|
||||
|
@@ -13,7 +13,7 @@
|
||||
"@seafile/comment-editor": "0.0.13",
|
||||
"@seafile/react-image-lightbox": "4.0.2",
|
||||
"@seafile/resumablejs": "1.1.16",
|
||||
"@seafile/seafile-calendar": "1.0.0-alpha.1",
|
||||
"@seafile/seafile-calendar": "1.0.0-alpha.2",
|
||||
"@seafile/seafile-editor": "2.0.33",
|
||||
"@seafile/seafile-sdoc-editor": "2.0.107",
|
||||
"@seafile/stldraw-editor": "1.0.1",
|
||||
|
@@ -1,113 +0,0 @@
|
||||
/* .sf-metadata-rc-calendar .rc-calendar-date {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 50%;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.sf-metadata-rc-calendar table thead tr,
|
||||
.sf-metadata-rc-calendar .rc-calendar-tbody tr {
|
||||
height: inherit;
|
||||
}
|
||||
|
||||
.sf-metadata-rc-calendar .rc-calendar-cell {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.sf-metadata-rc-calendar .rc-calendar-date-panel {
|
||||
width: 253px;
|
||||
}
|
||||
|
||||
.sf-metadata-rc-calendar .rc-calendar-selected-day .rc-calendar-date {
|
||||
background-color: #fcecd9;
|
||||
}
|
||||
|
||||
.sf-metadata-rc-calendar .rc-calendar-date:hover,
|
||||
.sf-metadata-rc-calendar .rc-calendar-year-panel-year:hover,
|
||||
.sf-metadata-rc-calendar .rc-calendar-month-panel-cell .rc-calendar-month-panel-month:hover {
|
||||
background-color: #fcecd9;
|
||||
}
|
||||
|
||||
.sf-metadata-rc-calendar .rc-calendar-selected-date .rc-calendar-date,
|
||||
.sf-metadata-rc-calendar .rc-calendar-selected-date .rc-calendar-date:hover,
|
||||
.sf-metadata-rc-calendar .rc-calendar-year-panel-selected-cell .rc-calendar-year-panel-year,
|
||||
.sf-metadata-rc-calendar .rc-calendar-month-panel-selected-cell .rc-calendar-month-panel-month {
|
||||
background-color: #f09f3f;
|
||||
}
|
||||
|
||||
.sf-metadata-rc-calendar .rc-calendar-next-year-btn:not([href]):not([tabindex]),
|
||||
.sf-metadata-rc-calendar .rc-calendar-prev-year-btn:not([href]):not([tabindex]),
|
||||
.sf-metadata-rc-calendar .rc-calendar-next-month-btn:not([href]):not([tabindex]),
|
||||
.sf-metadata-rc-calendar .rc-calendar-prev-month-btn:not([href]):not([tabindex]) {
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.sf-metadata-rc-calendar .rc-calendar-next-year-btn:not([href]):not([tabindex]):hover,
|
||||
.sf-metadata-rc-calendar .rc-calendar-prev-year-btn:not([href]):not([tabindex]):hover,
|
||||
.sf-metadata-rc-calendar .rc-calendar-next-month-btn:not([href]):not([tabindex]):hover,
|
||||
.sf-metadata-rc-calendar .rc-calendar-prev-month-btn:not([href]):not([tabindex]):hover {
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.sf-metadata-rc-calendar .rc-calendar-today .rc-calendar-date {
|
||||
border: none;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.sf-metadata-rc-calendar .rc-calendar-today .rc-calendar-date::after {
|
||||
content: '';
|
||||
background: #f09f3f;
|
||||
position: absolute;
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
border-radius: 50%;
|
||||
left: 45%;
|
||||
bottom: 0%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.sf-metadata-rc-calendar .rdg-editor-container input.editor-main[readonly] {
|
||||
background: var(--bs-body-bg);
|
||||
}
|
||||
|
||||
.sf-metadata-rc-calendar .rc-calendar-time-picker {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.sf-metadata-rc-calendar .date-picker-container {
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
display: block;
|
||||
line-height: 1.5;
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
|
||||
.sf-metadata-rc-calendar .date-picker-container-row-expand {
|
||||
margin-bottom: 0;
|
||||
width: 320px;
|
||||
}
|
||||
|
||||
.sf-metadata-rc-calendar .sf-metadata-rc-calendar-clear {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
left: 225px;
|
||||
fill: gray;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
[data-bs-theme=dark] .rc-calendar {
|
||||
background-color: var(--bs-popover-bg);
|
||||
border: 1px solid var(--bs-border-secondary-color);
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
[data-bs-theme=dark] .rc-calendar .rc-calendar-input-wrap,
|
||||
[data-bs-theme=dark] .rc-calendar .rc-calendar-header,
|
||||
[data-bs-theme=dark] .rc-calendar .rc-calendar-body,
|
||||
[data-bs-theme=dark] .rc-calendar .rc-calendar-footer {
|
||||
border-color: var(--bs-border-secondary-color);
|
||||
}
|
||||
|
||||
[data-bs-theme=dark] .rc-calendar-disabled-cell .rc-calendar-date {
|
||||
background: rgba(255, 255, 255, .02);
|
||||
} */
|
@@ -15,7 +15,6 @@ import 'dayjs/locale/zh-cn';
|
||||
import 'dayjs/locale/en-gb';
|
||||
|
||||
import '@seafile/seafile-calendar/assets/index.css';
|
||||
import '../../../css/metadata-rc-calendar.css';
|
||||
|
||||
dayjs.extend(utc);
|
||||
dayjs.extend(localeData);
|
||||
@@ -51,8 +50,6 @@ class DateEditor extends Component {
|
||||
const { lang = 'zh-cn', value } = this.props;
|
||||
const isZhcn = lang === 'zh-cn';
|
||||
if (value && dayjs(value).isValid()) {
|
||||
let validValue = dayjs(value).isValid() ? dayjs(value) : dayjs(this.defaultCalendarValue);
|
||||
this.setState({ value: isZhcn ? dayjs(validValue).locale('zh-cn') : dayjs(validValue).locale('en-gb') });
|
||||
if (typeof value === 'string' && value.length === 1 && !isNaN(Number(value, 10))) {
|
||||
this.timer = setTimeout(() => {
|
||||
let inputDom = document.getElementsByClassName('rc-calendar-input')[0];
|
||||
@@ -62,6 +59,8 @@ class DateEditor extends Component {
|
||||
}, 200);
|
||||
return;
|
||||
}
|
||||
let validValue = dayjs(value).isValid() ? dayjs(value) : dayjs(this.defaultCalendarValue);
|
||||
this.setState({ value: isZhcn ? dayjs(validValue).locale('zh-cn') : dayjs(validValue).locale('en-gb') });
|
||||
}
|
||||
document.addEventListener('keydown', this.onHotKey, true);
|
||||
}
|
||||
@@ -169,7 +168,12 @@ class DateEditor extends Component {
|
||||
if (this.timeFormat.indexOf('ss') > 0) return;
|
||||
|
||||
setTimeout(() => {
|
||||
this.closeEditor();
|
||||
// For DetailDateEditor: explicitly ask parent to close.
|
||||
if (Utils.isFunction(this.props.onClose)) {
|
||||
this.props.onClose(false);
|
||||
}
|
||||
// For PopupEditorContainer: keep commit path via onBlur.
|
||||
this.onBlur();
|
||||
}, 1);
|
||||
};
|
||||
|
||||
@@ -211,7 +215,6 @@ class DateEditor extends Component {
|
||||
onOpenChange={this.onOpenChange}
|
||||
open={true}
|
||||
style={{ zIndex: 1060 }}
|
||||
|
||||
>
|
||||
{
|
||||
({ value }) => {
|
||||
|
@@ -14,7 +14,6 @@ import 'dayjs/locale/zh-cn';
|
||||
import 'dayjs/locale/en-gb';
|
||||
|
||||
import '@seafile/seafile-calendar/assets/index.css';
|
||||
import '../../../../../css/metadata-rc-calendar.css';
|
||||
|
||||
dayjs.extend(utc);
|
||||
dayjs.extend(localeData);
|
||||
|
Reference in New Issue
Block a user