mirror of
https://github.com/zadam/trilium.git
synced 2025-10-21 15:49:00 +02:00
chore(react/collections): move files around for ease of development
This commit is contained in:
parent
bb55544f25
commit
ffb90c2b4b
@ -5,7 +5,6 @@ import NoteTreeWidget from "../widgets/note_tree.js";
|
|||||||
import NoteTitleWidget from "../widgets/note_title.jsx";
|
import NoteTitleWidget from "../widgets/note_title.jsx";
|
||||||
import NoteDetailWidget from "../widgets/note_detail.js";
|
import NoteDetailWidget from "../widgets/note_detail.js";
|
||||||
import PromotedAttributesWidget from "../widgets/promoted_attributes.js";
|
import PromotedAttributesWidget from "../widgets/promoted_attributes.js";
|
||||||
import NoteListWidget from "../widgets/note_list.js";
|
|
||||||
import NoteIconWidget from "../widgets/note_icon.jsx";
|
import NoteIconWidget from "../widgets/note_icon.jsx";
|
||||||
import ScrollingContainer from "../widgets/containers/scrolling_container.js";
|
import ScrollingContainer from "../widgets/containers/scrolling_container.js";
|
||||||
import RootContainer from "../widgets/containers/root_container.js";
|
import RootContainer from "../widgets/containers/root_container.js";
|
||||||
@ -42,6 +41,7 @@ import LeftPaneToggle from "../widgets/buttons/left_pane_toggle.js";
|
|||||||
import ApiLog from "../widgets/api_log.jsx";
|
import ApiLog from "../widgets/api_log.jsx";
|
||||||
import CloseZenModeButton from "../widgets/close_zen_button.jsx";
|
import CloseZenModeButton from "../widgets/close_zen_button.jsx";
|
||||||
import SharedInfo from "../widgets/shared_info.jsx";
|
import SharedInfo from "../widgets/shared_info.jsx";
|
||||||
|
import NoteList from "../widgets/collections/NoteList.jsx";
|
||||||
|
|
||||||
export default class DesktopLayout {
|
export default class DesktopLayout {
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ export default class DesktopLayout {
|
|||||||
.child(new PromotedAttributesWidget())
|
.child(new PromotedAttributesWidget())
|
||||||
.child(<SqlTableSchemas />)
|
.child(<SqlTableSchemas />)
|
||||||
.child(new NoteDetailWidget())
|
.child(new NoteDetailWidget())
|
||||||
.child(new NoteListWidget(false))
|
.child(<NoteList />)
|
||||||
.child(<SearchResult />)
|
.child(<SearchResult />)
|
||||||
.child(<SqlResults />)
|
.child(<SqlResults />)
|
||||||
.child(<ScrollPadding />)
|
.child(<ScrollPadding />)
|
||||||
|
@ -27,10 +27,10 @@ import FlexContainer from "../widgets/containers/flex_container.js";
|
|||||||
import NoteIconWidget from "../widgets/note_icon";
|
import NoteIconWidget from "../widgets/note_icon";
|
||||||
import PromotedAttributesWidget from "../widgets/promoted_attributes.js";
|
import PromotedAttributesWidget from "../widgets/promoted_attributes.js";
|
||||||
import NoteDetailWidget from "../widgets/note_detail.js";
|
import NoteDetailWidget from "../widgets/note_detail.js";
|
||||||
import NoteListWidget from "../widgets/note_list.js";
|
|
||||||
import CallToActionDialog from "../widgets/dialogs/call_to_action.jsx";
|
import CallToActionDialog from "../widgets/dialogs/call_to_action.jsx";
|
||||||
import NoteTitleWidget from "../widgets/note_title.jsx";
|
import NoteTitleWidget from "../widgets/note_title.jsx";
|
||||||
import { PopupEditorFormattingToolbar } from "../widgets/ribbon/FormattingToolbar.js";
|
import { PopupEditorFormattingToolbar } from "../widgets/ribbon/FormattingToolbar.js";
|
||||||
|
import NoteList from "../widgets/collections/NoteList.jsx";
|
||||||
|
|
||||||
export function applyModals(rootContainer: RootContainer) {
|
export function applyModals(rootContainer: RootContainer) {
|
||||||
rootContainer
|
rootContainer
|
||||||
@ -66,6 +66,6 @@ export function applyModals(rootContainer: RootContainer) {
|
|||||||
.child(<PopupEditorFormattingToolbar />)
|
.child(<PopupEditorFormattingToolbar />)
|
||||||
.child(new PromotedAttributesWidget())
|
.child(new PromotedAttributesWidget())
|
||||||
.child(new NoteDetailWidget())
|
.child(new NoteDetailWidget())
|
||||||
.child(new NoteListWidget(true)))
|
.child(<NoteList displayOnlyCollections />))
|
||||||
.child(<CallToActionDialog />);
|
.child(<CallToActionDialog />);
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,6 @@ import QuickSearchWidget from "../widgets/quick_search.js";
|
|||||||
import NoteTreeWidget from "../widgets/note_tree.js";
|
import NoteTreeWidget from "../widgets/note_tree.js";
|
||||||
import ScreenContainer from "../widgets/mobile_widgets/screen_container.js";
|
import ScreenContainer from "../widgets/mobile_widgets/screen_container.js";
|
||||||
import ScrollingContainer from "../widgets/containers/scrolling_container.js";
|
import ScrollingContainer from "../widgets/containers/scrolling_container.js";
|
||||||
import NoteListWidget from "../widgets/note_list.js";
|
|
||||||
import GlobalMenuWidget from "../widgets/buttons/global_menu.js";
|
import GlobalMenuWidget from "../widgets/buttons/global_menu.js";
|
||||||
import LauncherContainer from "../widgets/containers/launcher_container.js";
|
import LauncherContainer from "../widgets/containers/launcher_container.js";
|
||||||
import RootContainer from "../widgets/containers/root_container.js";
|
import RootContainer from "../widgets/containers/root_container.js";
|
||||||
@ -23,6 +22,7 @@ import { MOBILE_FLOATING_BUTTONS } from "../widgets/FloatingButtonsDefinitions.j
|
|||||||
import ToggleSidebarButton from "../widgets/mobile_widgets/toggle_sidebar_button.jsx";
|
import ToggleSidebarButton from "../widgets/mobile_widgets/toggle_sidebar_button.jsx";
|
||||||
import CloseZenModeButton from "../widgets/close_zen_button.js";
|
import CloseZenModeButton from "../widgets/close_zen_button.js";
|
||||||
import MobileDetailMenu from "../widgets/mobile_widgets/mobile_detail_menu.js";
|
import MobileDetailMenu from "../widgets/mobile_widgets/mobile_detail_menu.js";
|
||||||
|
import NoteList from "../widgets/collections/NoteList.jsx";
|
||||||
|
|
||||||
const MOBILE_CSS = `
|
const MOBILE_CSS = `
|
||||||
<style>
|
<style>
|
||||||
@ -151,7 +151,7 @@ export default class MobileLayout {
|
|||||||
.filling()
|
.filling()
|
||||||
.contentSized()
|
.contentSized()
|
||||||
.child(new NoteDetailWidget())
|
.child(new NoteDetailWidget())
|
||||||
.child(new NoteListWidget(false))
|
.child(<NoteList />)
|
||||||
.child(<FilePropertiesWrapper />)
|
.child(<FilePropertiesWrapper />)
|
||||||
)
|
)
|
||||||
.child(<MobileEditorToolbar />)
|
.child(<MobileEditorToolbar />)
|
||||||
|
7
apps/client/src/widgets/collections/NoteList.tsx
Normal file
7
apps/client/src/widgets/collections/NoteList.tsx
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
interface NoteListProps {
|
||||||
|
displayOnlyCollections?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function NoteList({ }: NoteListProps) {
|
||||||
|
return <p>Hi</p>
|
||||||
|
}
|
@ -1,8 +1,8 @@
|
|||||||
import NoteContextAwareWidget from "./note_context_aware_widget.js";
|
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
||||||
import NoteListRenderer from "../services/note_list_renderer.js";
|
import NoteListRenderer from "./note_list_renderer.ts.bak/index.js";
|
||||||
import type FNote from "../entities/fnote.js";
|
import type FNote from "../../entities/fnote.js";
|
||||||
import type { CommandListener, CommandListenerData, CommandMappings, CommandNames, EventData, EventNames } from "../components/app_context.js";
|
import type { CommandListener, CommandListenerData, CommandMappings, CommandNames, EventData, EventNames } from "../../components/app_context.js";
|
||||||
import type ViewMode from "./view_widgets/view_mode.js";
|
import type ViewMode from "../view_widgets/view_mode.js";
|
||||||
|
|
||||||
const TPL = /*html*/`
|
const TPL = /*html*/`
|
||||||
<div class="note-list-widget">
|
<div class="note-list-widget">
|
@ -1,11 +1,11 @@
|
|||||||
import type FNote from "../entities/fnote.js";
|
import type FNote from "../../entities/fnote.js";
|
||||||
import BoardView from "../widgets/view_widgets/board_view/index.js";
|
import BoardView from "../view_widgets/board_view/index.js";
|
||||||
import CalendarView from "../widgets/view_widgets/calendar_view.js";
|
import CalendarView from "../view_widgets/calendar_view.js";
|
||||||
import GeoView from "../widgets/view_widgets/geo_view/index.js";
|
import GeoView from "../view_widgets/geo_view/index.js";
|
||||||
import ListOrGridView from "../widgets/view_widgets/list_or_grid_view.js";
|
import ListOrGridView from "../view_widgets/list_or_grid_view.js";
|
||||||
import TableView from "../widgets/view_widgets/table_view/index.js";
|
import TableView from "../view_widgets/table_view/index.js";
|
||||||
import type { ViewModeArgs } from "../widgets/view_widgets/view_mode.js";
|
import type { ViewModeArgs } from "../view_widgets/view_mode.js";
|
||||||
import type ViewMode from "../widgets/view_widgets/view_mode.js";
|
import type ViewMode from "../view_widgets/view_mode.js";
|
||||||
|
|
||||||
const allViewTypes = ["list", "grid", "calendar", "table", "geoMap", "board"] as const;
|
const allViewTypes = ["list", "grid", "calendar", "table", "geoMap", "board"] as const;
|
||||||
export type ArgsWithoutNoteId = Omit<ViewModeArgs, "noteIds">;
|
export type ArgsWithoutNoteId = Omit<ViewModeArgs, "noteIds">;
|
@ -3,7 +3,7 @@ import { t } from "../services/i18n";
|
|||||||
import Alert from "./react/Alert";
|
import Alert from "./react/Alert";
|
||||||
import { useNoteContext, useNoteProperty, useTriliumEvent } from "./react/hooks";
|
import { useNoteContext, useNoteProperty, useTriliumEvent } from "./react/hooks";
|
||||||
import "./search_result.css";
|
import "./search_result.css";
|
||||||
import NoteListRenderer from "../services/note_list_renderer";
|
// import NoteListRenderer from "../services/note_list_renderer";
|
||||||
|
|
||||||
enum SearchResultState {
|
enum SearchResultState {
|
||||||
NO_RESULTS,
|
NO_RESULTS,
|
||||||
@ -28,12 +28,13 @@ export default function SearchResult() {
|
|||||||
} else if (searchContainerRef.current) {
|
} else if (searchContainerRef.current) {
|
||||||
setState(SearchResultState.GOT_RESULTS);
|
setState(SearchResultState.GOT_RESULTS);
|
||||||
|
|
||||||
const noteListRenderer = new NoteListRenderer({
|
// TODO: Fix me.
|
||||||
$parent: $(searchContainerRef.current),
|
// const noteListRenderer = new NoteListRenderer({
|
||||||
parentNote: note,
|
// $parent: $(searchContainerRef.current),
|
||||||
showNotePath: true
|
// parentNote: note,
|
||||||
});
|
// showNotePath: true
|
||||||
noteListRenderer.renderList();
|
// });
|
||||||
|
// noteListRenderer.renderList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user