Clean up public folder

This commit is contained in:
1ilit
2024-03-13 00:24:12 +02:00
parent 54c043204a
commit 8a265831ed
7 changed files with 30 additions and 64 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -82,7 +82,7 @@ function positionEditorElement(editor, rect) {
}
}
function FloatingLinkEditor({ editor, theme }) {
function FloatingLinkEditor({ editor }) {
const editorRef = useRef(null);
const inputRef = useRef(null);
const mouseDownRef = useRef(false);
@@ -206,15 +206,6 @@ function FloatingLinkEditor({ editor, theme }) {
<a href={linkUrl} target="_blank" rel="noopener noreferrer">
{linkUrl}
</a>
<div
className={`link-edit${theme === "dark" ? "-dark" : ""}`}
role="button"
tabIndex={0}
onMouseDown={(event) => event.preventDefault()}
onClick={() => {
setEditMode(true);
}}
/>
</div>
</>
)}
@@ -386,8 +377,7 @@ function BlockOptionsDropdownList({ editor, blockType }) {
);
}
export default function ToolbarPlugin(props) {
const { theme } = props;
export default function ToolbarPlugin() {
const [editor] = useLexicalComposerContext();
const toolbarRef = useRef(null);
const [canUndo, setCanUndo] = useState(false);
@@ -527,10 +517,7 @@ export default function ToolbarPlugin(props) {
<i className={`bi bi-arrow-clockwise ${canRedo ? "" : "opacity-30"}`} />
</button>
<Divider />
<BlockOptionsDropdownList
editor={editor}
blockType={blockType}
/>
<BlockOptionsDropdownList editor={editor} blockType={blockType} />
<Divider />
{blockType === "code" ? (
<div className="flex items-center">
@@ -596,7 +583,7 @@ export default function ToolbarPlugin(props) {
</button>
{isLink &&
createPortal(
<FloatingLinkEditor editor={editor} theme={theme} />,
<FloatingLinkEditor editor={editor} />,
document.body
)}
<Divider />

View File

@@ -350,34 +350,6 @@ pre::-webkit-scrollbar-thumb {
font-family: inherit;
}
.link-edit {
background-image: url(/images/icons/pencil-fill.svg);
background-size: 16px;
background-position: center;
background-repeat: no-repeat;
width: 35px;
vertical-align: -0.25em;
position: absolute;
right: 0;
top: 0;
bottom: 0;
cursor: pointer;
}
.link-edit-dark {
background-image: url(/images/icons/pencil-fill-dark.svg);
background-size: 16px;
background-position: center;
background-repeat: no-repeat;
width: 35px;
vertical-align: -0.25em;
position: absolute;
right: 0;
top: 0;
bottom: 0;
cursor: pointer;
}
.link-editor .link-input a {
color: rgb(33, 111, 219);
text-decoration: none;