2025-07-27 09:33:21 +00:00
|
|
|
import type FolderNotesPlugin from '../main';
|
2024-03-19 21:33:29 +00:00
|
|
|
export class ExcludePattern {
|
|
|
|
|
type: string;
|
2024-05-21 15:31:33 +00:00
|
|
|
id: string;
|
2024-03-19 21:33:29 +00:00
|
|
|
string: string;
|
|
|
|
|
path: string;
|
|
|
|
|
position: number;
|
|
|
|
|
subFolders: boolean;
|
|
|
|
|
disableSync: boolean;
|
|
|
|
|
disableAutoCreate: boolean;
|
|
|
|
|
disableFolderNote: boolean;
|
|
|
|
|
enableCollapsing: boolean;
|
|
|
|
|
excludeFromFolderOverview: boolean;
|
2025-02-25 17:57:23 +00:00
|
|
|
hideInSettings: boolean;
|
2024-06-15 15:55:47 +00:00
|
|
|
detached: boolean;
|
|
|
|
|
detachedFilePath?: string;
|
2025-06-21 07:58:15 +00:00
|
|
|
showFolderNote: boolean;
|
2025-08-10 10:21:16 +00:00
|
|
|
constructor(
|
|
|
|
|
pattern: string,
|
|
|
|
|
position: number,
|
|
|
|
|
id: string | undefined,
|
|
|
|
|
plugin: FolderNotesPlugin,
|
|
|
|
|
) {
|
2024-03-19 21:33:29 +00:00
|
|
|
this.type = 'pattern';
|
2024-05-21 15:31:33 +00:00
|
|
|
this.id = id || crypto.randomUUID();
|
2024-03-19 21:33:29 +00:00
|
|
|
this.string = pattern;
|
|
|
|
|
this.position = position;
|
|
|
|
|
this.subFolders = plugin.settings.excludePatternDefaultSettings.subFolders;
|
|
|
|
|
this.disableSync = plugin.settings.excludePatternDefaultSettings.disableSync;
|
|
|
|
|
this.disableAutoCreate = plugin.settings.excludePatternDefaultSettings.disableAutoCreate;
|
|
|
|
|
this.disableFolderNote = plugin.settings.excludePatternDefaultSettings.disableFolderNote;
|
|
|
|
|
this.enableCollapsing = plugin.settings.excludePatternDefaultSettings.enableCollapsing;
|
2025-08-10 10:21:16 +00:00
|
|
|
// eslint-disable-next-line max-len
|
2024-03-19 21:33:29 +00:00
|
|
|
this.excludeFromFolderOverview = plugin.settings.excludePatternDefaultSettings.excludeFromFolderOverview;
|
|
|
|
|
this.path = '';
|
2025-02-25 17:57:23 +00:00
|
|
|
this.hideInSettings = false;
|
2025-05-30 18:47:50 +00:00
|
|
|
this.showFolderNote = plugin.settings.excludePatternDefaultSettings.showFolderNote;
|
2024-03-19 21:33:29 +00:00
|
|
|
}
|
2025-02-25 17:57:23 +00:00
|
|
|
}
|