Skip to content

Commit 716615c

Browse files
authored
Merge pull request #328 from decaf-dev/dev
* feat: remove image icon placeholder * feat: remove status bar when view is open * refactor: rename to image fit to just cover and contain * feat: remove favorites filter * feat: set pagination indicator as status bar * feat: remove timestamp filter * feat: move search filter up * feat: add toggle to search * feat: make groups front and center * feat: update custom filter button * chore: bump version * fix: remove extra padding on buttons * fix: don't replace existing tab when view opens (#323) * Clean up code (#324) * refactor: remove unused code * feat: clean up old properties * fix: display without leading zero (#325) * feat: add created date to sort (#326) * Update default values (#327) * feat: add default value to properties * feat: rename to File system * refactor: update value * chore: update guardgen * chore: update workflow name * refactor: rename to image cache * docs: update README.md * docs: remove unused images
2 parents a286ffd + 4b499a2 commit 716615c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+753
-834
lines changed

.github/workflows/check-console-log.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Check Console Log
1+
name: Check for console.log statements
22

33
on: pull_request
44

README.md

Lines changed: 64 additions & 77 deletions
Large diffs are not rendered by default.

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "vault-explorer",
33
"name": "Vault Explorer",
4-
"version": "1.41.1",
4+
"version": "1.42.0",
55
"minAppVersion": "1.4.13",
66
"description": "Explore your vault in visual format",
77
"author": "DecafDev",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "obsidian-vault-explorer",
3-
"version": "1.41.1",
3+
"version": "1.42.0",
44
"description": "Explore your vault in visual format",
55
"main": "main.js",
66
"scripts": {

readme/favorites-filter.png

-3.2 MB
Binary file not shown.

readme/timestamp-filter.png

-1.55 MB
Binary file not shown.

src/constants.ts

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ export const HOVER_LINK_SOURCE_ID = "vault-explorer-preview";
77

88
export const DEFAULT_SETTINGS: VaultExplorerPluginSettings = {
99
properties: {
10-
favorite: "",
11-
url: "",
12-
image: "",
13-
coverImageFit: "",
10+
url: "url",
11+
image: "image",
12+
coverImageFit: "image-fit",
1413
createdDate: "",
1514
modifiedDate: "",
1615
custom1: "",
@@ -22,14 +21,6 @@ export const DEFAULT_SETTINGS: VaultExplorerPluginSettings = {
2221
isEnabled: true,
2322
value: "",
2423
},
25-
favorites: {
26-
isEnabled: true,
27-
value: false,
28-
},
29-
timestamp: {
30-
isEnabled: true,
31-
value: "all",
32-
},
3324
sort: {
3425
isEnabled: true,
3526
value: "file-name-asc",
@@ -94,8 +85,6 @@ export const DEFAULT_SETTINGS: VaultExplorerPluginSettings = {
9485
enableClockUpdates: true,
9586
enableFileIcons: false,
9687
loadBodyTags: true,
97-
filterGroupsWidth: "300px",
98-
shouldWrapFilterGroups: false,
9988
shouldCollapseFilters: false,
10089
pageSize: 25,
10190
viewOrder: [

src/event/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export enum PluginEvent {
2121
VIEW_TOGGLE_SETTING_CHANGE = "view-toggle-setting-change",
2222
FILE_ICONS_SETTING_CHANGE = "file-icons-setting-change",
2323
LOAD_BODY_TAGS_SETTING_CHANGE = "load-body-tags-setting-change",
24-
WRAP_FILTER_GROUPS_SETTING_CHANGE = "wrap-filter-groups-setting-change",
2524
LOAD_SOCIAL_MEDIA_IMAGE_SETTING_CHANGE = "load-social-media-image-setting-change",
2625
SHOW_TAGS_SETTING_CHANGE = "show-tags-setting-change",
2726
}

src/main.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { isVersionLessThan } from "./utils";
2020
import License from "./svelte/shared/services/license";
2121
import { clearSocialMediaImageCache } from "./svelte/app/services/social-media-image-cache";
2222
import store from "./svelte/shared/services/store";
23+
import "./styles.css";
2324

2425
export default class VaultExplorerPlugin extends Plugin {
2526
settings: VaultExplorerPluginSettings = DEFAULT_SETTINGS;
@@ -63,6 +64,22 @@ export default class VaultExplorerPlugin extends Plugin {
6364
}
6465

6566
private registerEvents() {
67+
this.registerEvent(
68+
this.app.workspace.on("active-leaf-change", () => {
69+
const explorerLeaf =
70+
this.app.workspace.getActiveViewOfType(VaultExplorerView);
71+
const statusBar = document.querySelector(
72+
".status-bar"
73+
) as HTMLElement | null;
74+
if (!statusBar) return;
75+
if (explorerLeaf) {
76+
statusBar.classList.add("vault-explorer-status-bar");
77+
} else {
78+
statusBar.classList.remove("vault-explorer-status-bar");
79+
}
80+
})
81+
);
82+
6683
//Callback if the file is renamed or moved
6784
//This callback is already debounced by Obsidian
6885
this.registerEvent(
@@ -228,7 +245,7 @@ export default class VaultExplorerPlugin extends Plugin {
228245
const leaf = leaves[0];
229246
this.app.workspace.revealLeaf(leaf);
230247
} else {
231-
this.app.workspace.getLeaf().setViewState({
248+
this.app.workspace.getLeaf("tab").setViewState({
232249
type: VAULT_EXPLORER_VIEW,
233250
active: true,
234251
});

src/migrations/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import Migrate_1_38_0 from "./migrate_1_38_0";
3131
import Migrate_1_39_0 from "./migrate_1_39_0";
3232
import Migrate_1_40_0 from "./migrate_1_40_0";
3333
import Migrate_1_41_0 from "./migrate_1_41_0";
34+
import Migrate_1_42_0 from "./migrate_1_42_0";
3435

3536
const migrations: TMigration[] = [
3637
{
@@ -183,6 +184,11 @@ const migrations: TMigration[] = [
183184
to: "1.41.0",
184185
migrate: Migrate_1_41_0,
185186
},
187+
{
188+
from: "1.41.1",
189+
to: "1.42.0",
190+
migrate: Migrate_1_42_0,
191+
},
186192
];
187193

188194
export const preformMigrations = (

0 commit comments

Comments
 (0)