chore: merge develop
This commit is contained in:
@@ -560,7 +560,7 @@ export const NotesOptions = observer(
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Icon type="trash" className={iconClass} />
|
<Icon type="trash" className={iconClass} />
|
||||||
Move to Trash
|
Move to trash
|
||||||
</button>
|
</button>
|
||||||
))}
|
))}
|
||||||
{trashed && (
|
{trashed && (
|
||||||
|
|||||||
@@ -163,6 +163,12 @@ export const ChangeEditorMenu: FunctionComponent<ChangeEditorMenuProps> = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const selectEditor = async (itemToBeSelected: EditorMenuItem) => {
|
const selectEditor = async (itemToBeSelected: EditorMenuItem) => {
|
||||||
|
const areBothEditorsPlain = !currentEditor && !itemToBeSelected.component;
|
||||||
|
|
||||||
|
if (areBothEditorsPlain) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let shouldSelectEditor = true;
|
let shouldSelectEditor = true;
|
||||||
|
|
||||||
if (itemToBeSelected.component) {
|
if (itemToBeSelected.component) {
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export const SelectedRevisionContent: FunctionComponent<SelectedRevisionContentP
|
|||||||
{!componentViewer && (
|
{!componentViewer && (
|
||||||
<div className="relative flex-grow min-h-0 overflow-x-hidden overflow-y-auto">
|
<div className="relative flex-grow min-h-0 overflow-x-hidden overflow-y-auto">
|
||||||
{selectedRevision.payload.content.text.length ? (
|
{selectedRevision.payload.content.text.length ? (
|
||||||
<p className="p-4 pt-0">
|
<p className="p-4 pt-0 color-text text-editor font-editor">
|
||||||
{selectedRevision.payload.content.text}
|
{selectedRevision.payload.content.text}
|
||||||
</p>
|
</p>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -84,13 +84,17 @@ export const sortRevisionListIntoGroups = <EntryType extends RevisionEntry>(
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const addBeforeLastGroup = (group: ListGroup<EntryType>) => {
|
||||||
|
sortedGroups.splice(sortedGroups.length - 1, 0, group);
|
||||||
|
};
|
||||||
|
|
||||||
revisionList?.forEach((entry) => {
|
revisionList?.forEach((entry) => {
|
||||||
const groupIndex = getGroupIndexForEntry(entry, sortedGroups);
|
const groupIndex = getGroupIndexForEntry(entry, sortedGroups);
|
||||||
|
|
||||||
if (groupIndex > -1) {
|
if (groupIndex > -1) {
|
||||||
sortedGroups[groupIndex]?.entries?.push(entry);
|
sortedGroups[groupIndex]?.entries?.push(entry);
|
||||||
} else {
|
} else {
|
||||||
sortedGroups.push({
|
addBeforeLastGroup({
|
||||||
title: formatDateAsMonthYearString(
|
title: formatDateAsMonthYearString(
|
||||||
new Date(
|
new Date(
|
||||||
(entry as RevisionListEntry).created_at ??
|
(entry as RevisionListEntry).created_at ??
|
||||||
|
|||||||
@@ -946,3 +946,7 @@
|
|||||||
.sn-component .border-t-0 {
|
.sn-component .border-t-0 {
|
||||||
border-top-width: 0;
|
border-top-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.text-editor {
|
||||||
|
font-size: var(--sn-stylekit-font-size-editor);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user