mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 04:17:23 +00:00
Update resource link display to Markdown format and add copy button
This commit is contained in:
@@ -247,7 +247,7 @@ export default function EditResourcePage() {
|
||||
<thead>
|
||||
<tr>
|
||||
<td>{t("Preview")}</td>
|
||||
<td>{t("Link")}</td>
|
||||
<td>{"Markdown"}</td>
|
||||
<td>{t("Action")}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -262,7 +262,7 @@ export default function EditResourcePage() {
|
||||
alt={"image"}
|
||||
/>
|
||||
</td>
|
||||
<td>{network.getImageUrl(image)}</td>
|
||||
<td>{`})`}</td>
|
||||
<td>
|
||||
<button
|
||||
className={"btn btn-square"}
|
||||
|
@@ -1,5 +1,11 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { MdAdd, MdClose, MdDelete, MdOutlineInfo } from "react-icons/md";
|
||||
import {
|
||||
MdAdd,
|
||||
MdClose,
|
||||
MdContentCopy,
|
||||
MdDelete,
|
||||
MdOutlineInfo,
|
||||
} from "react-icons/md";
|
||||
import { Tag } from "../network/models.ts";
|
||||
import { network } from "../network/network.ts";
|
||||
import { useNavigate } from "react-router";
|
||||
@@ -227,7 +233,7 @@ export default function PublishPage() {
|
||||
<thead>
|
||||
<tr>
|
||||
<td>{t("Preview")}</td>
|
||||
<td>{t("Link")}</td>
|
||||
<td>{"Markdown"}</td>
|
||||
<td>{t("Action")}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -242,7 +248,19 @@ export default function PublishPage() {
|
||||
alt={"image"}
|
||||
/>
|
||||
</td>
|
||||
<td>{network.getImageUrl(image)}</td>
|
||||
<td>
|
||||
<span>{`})`}</span>
|
||||
<button
|
||||
className={"btn btn-sm btn-circle btn-ghost ml-1"}
|
||||
onClick={() => {
|
||||
navigator.clipboard.writeText(
|
||||
`})`,
|
||||
);
|
||||
}}
|
||||
>
|
||||
<MdContentCopy />
|
||||
</button>
|
||||
</td>
|
||||
<td>
|
||||
<button
|
||||
className={"btn btn-square"}
|
||||
|
Reference in New Issue
Block a user