mirror of
https://github.com/jalad25/contact-note.git
synced 2026-07-22 06:53:06 +00:00
Added badges to readme. Removed console.log
This commit is contained in:
parent
89ba508996
commit
342e448693
2 changed files with 13 additions and 3 deletions
|
|
@ -2,7 +2,11 @@
|
|||
<img src="assets/PluginBanner.png" alt="Contact Note" align="center" width=800>
|
||||
</p>
|
||||
|
||||
<!--FOR THE FUTURE  -->
|
||||
 
|
||||
|
||||
# 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.
|
||||
|
||||

|
||||
|
|
|
|||
12
src/main.ts
12
src/main.ts
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue