Skip to content

Commit

Permalink
fix: workspace documentation and add notice on workspace save
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinzent03 committed Nov 17, 2021
1 parent 917d122 commit a8d0c16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ The `heading` parameter is for `mode=append` and `mode=prepend` supported too.
| / | parameters | explanation |
| ---------------------- | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| workspace | workspace | Opens the workspace called `workspace` |
| save current workspace | saveworkspace | Saves the current workspace. (Can be combined with `workspace` to open a new workspace afterwards) |
| save current workspace | saveworkspace=true | Saves the current workspace. (Can be combined with `workspace` to open a new workspace afterwards) |
| heading | <identification\>, heading | Opens the `heading` in `filepath` |
| block reference | <identification\>, block | Opens the `block` in `filepath` |
| settings tab | settingid | Opens a settings tab by id, all plugins are supported (e.g. `editor`, `community-plugins`, `plugin-browser`, `theme-browser`...) |
Expand Down
7 changes: 3 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ interface Parameters {
settingid?: string;
"x-success"?: string;
"x-error"?: string;
saveworkspace?: string;
updateplugins?: string;
saveworkspace?: "true";
updateplugins?: "true";
}

export default class AdvancedURI extends Plugin {
Expand Down Expand Up @@ -214,9 +214,8 @@ export default class AdvancedURI extends Plugin {
} else if (workspaces.enabled) {
if (parameters.saveworkspace == "true") {
const active = workspaces.instance.activeWorkspace;
console.log(active);

workspaces.instance.saveWorkspace(active);
new Notice(`Saved current workspace to ${active}`);
}
if (parameters.workspace != undefined) {
workspaces.instance.loadWorkspace(parameters.workspace);
Expand Down

0 comments on commit a8d0c16

Please sign in to comment.