Date indexer
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { FilterList, Option } from "./filter";
|
||||
import { faFileLines } from "@fortawesome/free-solid-svg-icons";
|
||||
import { PageMeta } from "../../common/types";
|
||||
|
||||
export function PageNavigator({
|
||||
@@ -18,7 +17,7 @@ export function PageNavigator({
|
||||
}
|
||||
// Order by last modified date in descending order
|
||||
let orderId = -pageMeta.lastModified;
|
||||
// Unless it was opened and is still in memory
|
||||
// Unless it was opened in this session
|
||||
if (pageMeta.lastOpened) {
|
||||
orderId = -pageMeta.lastOpened;
|
||||
}
|
||||
@@ -37,7 +36,7 @@ export function PageNavigator({
|
||||
placeholder="Page"
|
||||
label="Open"
|
||||
options={options}
|
||||
icon={faFileLines}
|
||||
// icon={faFileLines}
|
||||
allowNew={true}
|
||||
helpText="Start typing the page name to filter results, press <code>Return</code> to open."
|
||||
newHint="Create page"
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import { Notification } from "../types";
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import { faFileLines } from "@fortawesome/free-solid-svg-icons";
|
||||
|
||||
function prettyName(s: string | undefined): string {
|
||||
if (!s) {
|
||||
@@ -29,10 +27,15 @@ export function TopBar({
|
||||
{lhs}
|
||||
<div className="main">
|
||||
<div className="inner">
|
||||
<span className={`icon ${unsavedChanges ? "unsaved" : "saved"}`}>
|
||||
<FontAwesomeIcon icon={faFileLines} />
|
||||
{/*<span className={`icon ${unsavedChanges ? "unsaved" : "saved"}`}>*/}
|
||||
{/* <FontAwesomeIcon icon={faFileLines} />*/}
|
||||
{/*</span>*/}
|
||||
|
||||
<span
|
||||
className={`current-page ${unsavedChanges ? "unsaved" : "saved"}`}
|
||||
>
|
||||
{prettyName(pageName)}
|
||||
</span>
|
||||
<span className="current-page">{prettyName(pageName)}</span>
|
||||
{/*<button*/}
|
||||
{/* onClick={(e) => {*/}
|
||||
{/* // @ts-ignore*/}
|
||||
|
||||
Reference in New Issue
Block a user