Added badges to readme. Removed console.log

This commit is contained in:
Jalad 2026-05-03 18:38:47 -05:00
parent 89ba508996
commit 342e448693
2 changed files with 13 additions and 3 deletions

View file

@ -2,7 +2,11 @@
<img src="assets/PluginBanner.png" alt="Contact Note" align="center" width=800>
</p>
<!--FOR THE FUTURE ![Obsidian plugin](https://img.shields.io/endpoint?url=https%3A%2F%2Fscambier.xyz%2Fobsidian-endpoints%2Fcontact-note.json) -->
![GitHub release](https://img.shields.io/github/v/release/Jalad25/contact-note) ![Assests downloaded](https://img.shields.io/github/downloads/Jalad25/contact-note/total)
# Contact Note
An [Obsidian](https://obsidian.md/) plugin that renders visual contact cards from frontmatter in designated contact notes, with a searchable and filterable contact list view.
![preview](assets/screenshots/Preview.gif)

View file

@ -11,7 +11,7 @@ import { ContactNoteSettingTab } from "./ContactNoteSettingTab";
import { Contact } from "./Contact";
import { buildContactCard } from "./ContactCard";
export const VIEW_TYPE_CONTACT_LIST = "contact-note-list";
//#region Types
export interface FrontmatterFilter {
property: string;
@ -29,6 +29,12 @@ export interface ContactNoteSettings {
defaultFilters: FrontmatterFilter[];
}
//#endregion
//#region Constants/Defaults
export const VIEW_TYPE_CONTACT_LIST = "contact-note-list";
export const DEFAULT_SETTINGS: ContactNoteSettings = {
useFolder: true,
folderPath: "Contacts",
@ -39,6 +45,8 @@ export const DEFAULT_SETTINGS: ContactNoteSettings = {
defaultFilters: [],
};
//#endregion
export default class ContactNotePlugin extends Plugin {
settings!: ContactNoteSettings;
private renamingFiles = new Set<string>();
@ -208,7 +216,6 @@ export default class ContactNotePlugin extends Plugin {
if (this.settings.useFolder) {
const folder = normalizePath(this.settings.folderPath);
if (!folder) return false;
console.log(file.path === folder || file.path.startsWith(folder + "/"));
return file.path === folder || file.path.startsWith(folder + "/");
}
@ -232,7 +239,6 @@ export default class ContactNotePlugin extends Plugin {
tags.push(...cache.tags.map((t) => t.tag.replace(/^#/, "").toLowerCase()));
}
console.log(tags.includes(tag));
return tags.includes(tag);
}