Add folder icon and update component structure
This commit is contained in:
@@ -10,6 +10,8 @@ import { listen } from "@tauri-apps/api/event";
|
|||||||
import { invoke } from "@tauri-apps/api/core";
|
import { invoke } from "@tauri-apps/api/core";
|
||||||
import historyIcon from "./assets/history.png";
|
import historyIcon from "./assets/history.png";
|
||||||
import historyIconBright from "./assets/history_b.png";
|
import historyIconBright from "./assets/history_b.png";
|
||||||
|
import folderIcon from "../src-tauri/icons/folder.png";
|
||||||
|
import folderIconBright from "../src-tauri/icons/folder_b.png";
|
||||||
import { markdownToHTML } from "./markdown/markdown";
|
import { markdownToHTML } from "./markdown/markdown";
|
||||||
import "./markdown/markdown-render.css";
|
import "./markdown/markdown-render.css";
|
||||||
import {
|
import {
|
||||||
@@ -299,6 +301,7 @@ export default function App() {
|
|||||||
}, [statusKey]);
|
}, [statusKey]);
|
||||||
|
|
||||||
const historyIconSrc = theme === "light" ? historyIconBright : historyIcon;
|
const historyIconSrc = theme === "light" ? historyIconBright : historyIcon;
|
||||||
|
const folderIconSrc = theme === "light" ? folderIconBright : folderIcon;
|
||||||
|
|
||||||
const lines = useMemo(() => body.split("\n"), [body]);
|
const lines = useMemo(() => body.split("\n"), [body]);
|
||||||
const lineNumbers = useMemo(() => lines.map((_, index) => index + 1), [lines]);
|
const lineNumbers = useMemo(() => lines.map((_, index) => index + 1), [lines]);
|
||||||
@@ -1237,7 +1240,6 @@ export default function App() {
|
|||||||
) : (
|
) : (
|
||||||
<div className="prompt-item__title">{text.title}</div>
|
<div className="prompt-item__title">{text.title}</div>
|
||||||
)}
|
)}
|
||||||
<div className="prompt-item__meta">Updated {formatDate(text.updated_at)}</div>
|
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
className="prompt-item__delete"
|
className="prompt-item__delete"
|
||||||
@@ -1284,6 +1286,7 @@ export default function App() {
|
|||||||
>
|
>
|
||||||
{expanded ? "▾" : "▸"}
|
{expanded ? "▾" : "▸"}
|
||||||
</button>
|
</button>
|
||||||
|
<img src={folderIconSrc} alt="" className="folder-item__icon" />
|
||||||
{editingFolderId === folder.id ? (
|
{editingFolderId === folder.id ? (
|
||||||
<input
|
<input
|
||||||
className="folder-item__input"
|
className="folder-item__input"
|
||||||
|
|||||||
Reference in New Issue
Block a user