generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #365 from decaf-dev/dev
1.46.0
- Loading branch information
Showing
17 changed files
with
682 additions
and
313 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import MigrationInterface from "./migration_interface"; | ||
import { TExplorerView, VaultExplorerPluginSettings } from "src/types"; | ||
import { VaultExplorerPluginSettings_1_45_0 } from "src/types/types-1.45.0"; | ||
|
||
export default class Migrate_1_46_0 implements MigrationInterface { | ||
migrate(data: Record<string, unknown>) { | ||
const typedData = data as unknown as VaultExplorerPluginSettings_1_45_0; | ||
|
||
const newData: VaultExplorerPluginSettings = { | ||
...typedData, | ||
views: { | ||
...typedData.views, | ||
grid: { | ||
...typedData.views.grid, | ||
isEnabled: true, | ||
order: 0, | ||
}, | ||
list: { | ||
...typedData.views.list, | ||
isEnabled: true, | ||
order: 1, | ||
}, | ||
feed: { | ||
...typedData.views.feed, | ||
isEnabled: true, | ||
order: 2, | ||
}, | ||
table: { | ||
...typedData.views.table, | ||
isEnabled: true, | ||
order: 3, | ||
}, | ||
}, | ||
currentView: TExplorerView.GRID, | ||
}; | ||
delete (newData as any).views.recommended; | ||
delete (newData as any).views.related; | ||
delete (newData as any).views.dashboard; | ||
delete (newData as any).viewOrder; | ||
return newData as unknown as Record<string, unknown>; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.