update
This commit is contained in:
@@ -62,8 +62,7 @@ export function listCollectionFeatures(
|
|||||||
project: string,
|
project: string,
|
||||||
collection: string,
|
collection: string,
|
||||||
): TFile[] {
|
): TFile[] {
|
||||||
const ownMd = `${collection}.md`;
|
return listMarkdownFiles(app, collectionPath(project, collection), []);
|
||||||
return listMarkdownFiles(app, collectionPath(project, collection), [ownMd]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function readFile(app: App, path: string): Promise<string> {
|
export async function readFile(app: App, path: string): Promise<string> {
|
||||||
|
|||||||
@@ -93,7 +93,9 @@ export class GridView {
|
|||||||
|
|
||||||
card.addEventListener("click", (ev) => {
|
card.addEventListener("click", (ev) => {
|
||||||
if ((ev.target as HTMLElement).closest(".pk-badge")) return;
|
if ((ev.target as HTMLElement).closest(".pk-badge")) return;
|
||||||
void openMarkdown(this.app, collectionMdPath(this.project, collectionName), this.leaf);
|
const mdPath = collectionMdPath(this.project, collectionName);
|
||||||
|
if (!this.app.vault.getAbstractFileByPath(mdPath)) return;
|
||||||
|
void openMarkdown(this.app, mdPath, this.leaf);
|
||||||
});
|
});
|
||||||
card.addEventListener("contextmenu", (ev) => {
|
card.addEventListener("contextmenu", (ev) => {
|
||||||
if ((ev.target as HTMLElement).closest(".pk-badge")) return;
|
if ((ev.target as HTMLElement).closest(".pk-badge")) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user