diff --git a/i18n/en.json b/i18n/en.json index ff9ff4d3..122969d7 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -51,7 +51,9 @@ "flatIconsDescription": "Show flat button style", "flatIconsHint": "Flat icons", "folderDescription": "Folders with each", - "folderExclusionDescription": "Folders without", + "folderHint": "Folder search", + "folderMoreInfo": "Filter for folders containing each of the search words", + "folderExclusionDescription": "Folder names without", "folderExclusionHint": "Folder exclude filter", "folderExclusionMoreInfo": "Filter to exclude any folders that contain the filter word", "folderHint": "Folder search", @@ -332,7 +334,7 @@ "file": "video name has", "fileUnion": "video has any", "folder": "folder name has", - "folderExclusion": "folder does not have", + "folderExclusion": "folders do not have", "folderUnion": "folder has any", "found": "found", "fuzzy": "fuzzy search", diff --git a/src/app/common/filters.ts b/src/app/common/filters.ts index 22e73193..26be5627 100644 --- a/src/app/common/filters.ts +++ b/src/app/common/filters.ts @@ -48,7 +48,7 @@ export const Filters: FilterObject[] = [ placeholder: 'SIDEBAR.folderExclusion', conjunction: 'SIDEBAR.or', color: Colors.folderExclusion - },{ + }, { uniqueKey: 'fileUnion', string: '', array: [], diff --git a/src/app/common/settings-buttons.ts b/src/app/common/settings-buttons.ts index 72c072e4..21d16792 100644 --- a/src/app/common/settings-buttons.ts +++ b/src/app/common/settings-buttons.ts @@ -388,7 +388,7 @@ export const SettingsButtons: SettingsButtonsType = { toggled: false }, 'folderExclusion': { - description:'BUTTONS.folderExclusionDescription', + description: 'BUTTONS.folderExclusionDescription', hidden: true, iconName: 'icon-folder-x', moreInfo: 'BUTTONS.folderExclusionMoreInfo', diff --git a/src/app/components/home.component.ts b/src/app/components/home.component.ts index d46fc589..e06ceb28 100644 --- a/src/app/components/home.component.ts +++ b/src/app/components/home.component.ts @@ -1238,12 +1238,12 @@ export class HomeComponent implements OnInit, AfterViewInit { if (!this.settingsButtons['tagExclusion'].toggled) { this.settingsButtons['tagExclusion'].toggled = true; } - this.onEnterKey(filter, 7); // 7th item is the `tagExclusion` filter in `FilterKeyNames` + this.onEnterKey(filter, 8); // 8th item is the `tagExclusion` filter in `FilterKeyNames` } else { if (!this.settingsButtons['tagIntersection'].toggled) { this.settingsButtons['tagIntersection'].toggled = true; } - this.onEnterKey(filter, 6); // 6th item is the `tagIntersection` filter in `FilterKeyNames` + this.onEnterKey(filter, 7); // 7th item is the `tagIntersection` filter in `FilterKeyNames` } } @@ -1257,12 +1257,12 @@ export class HomeComponent implements OnInit, AfterViewInit { if (!this.settingsButtons['exclude'].toggled) { this.settingsButtons['exclude'].toggled = true; } - this.onEnterKey(filter, 4); // 4th item is the `exclude` filter in `FilterKeyNames` + this.onEnterKey(filter, 5); // 5th item is the `exclude` filter in `FilterKeyNames` } else { if (!this.settingsButtons['fileIntersection'].toggled) { this.settingsButtons['fileIntersection'].toggled = true; } - this.onEnterKey(filter, 3); // 3rd item is the `fileIntersection` filter in `FilterKeyNames` + this.onEnterKey(filter, 4); // 4th item is the `fileIntersection` filter in `FilterKeyNames` } } @@ -1270,14 +1270,20 @@ export class HomeComponent implements OnInit, AfterViewInit { * Add filter to FOLDER search when word in folder is clicked * @param filter */ - handleFolderWordClicked(filter: string): void { + handleFolderWordClicked(filter: string, event?): void { this.showSidebar(); - if (!this.settingsButtons['folderIntersection'].toggled) { - this.settingsButtons['folderIntersection'].toggled = true; + if (event && event.shiftKey) { // Shift click to exclude tag! + if (!this.settingsButtons['folderExclusion'].toggled) { + this.settingsButtons['folderExclusion'].toggled = true; + } + this.onEnterKey(filter, 2); // 2nd item is the `folderExclusion` filter in `FilterKeyNames` + } else { + if (!this.settingsButtons['folderIntersection'].toggled) { + this.settingsButtons['folderIntersection'].toggled = true; + } + this.onEnterKey(filter, 1); // 1st item is the `folder` filter } - this.onEnterKey(filter, 1); // 1st item is the `folder` filter } - /** * Handle clicking on FOLDER in gallery, or the folder icon in breadcrumbs, or the `UP` folder * @param filter