Skip to content

Commit

Permalink
2.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Ellpeck committed Aug 21, 2022
1 parent f2c73ef commit 8db94a8
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 24 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-custom-frames",
"name": "Custom Frames",
"version": "2.4.2",
"version": "2.4.3",
"minAppVersion": "0.14.5",
"description": "A plugin that turns web apps into panes using iframes with custom styling. Also comes with presets for Google Keep, Todoist and more.",
"author": "Ellpeck",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-custom-frames",
"version": "2.4.2",
"version": "2.4.3",
"description": "An Obsidian plugin that turns web apps into panes using iframes with custom styling. Also comes with presets for Google Keep, Todoist and more.",
"main": "main.js",
"scripts": {
Expand Down
20 changes: 11 additions & 9 deletions src/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,16 @@ export class CustomFrameView extends ItemView {
this.contentEl.appendChild(this.frame.create());
}

onHeaderMenu(menu: Menu): void {
super.onHeaderMenu(menu);
for (let action of CustomFrameView.actions) {
menu.addItem(i => {
i.setTitle(action.name);
i.setIcon(action.icon);
i.onClick(() => action.action(this));
});
onPaneMenu(menu: Menu, source: string): void {
super.onPaneMenu(menu, source);
if (source == "tab-header") {
for (let action of CustomFrameView.actions) {
menu.addItem(i => {
i.setTitle(action.name);
i.setIcon(action.icon);
i.onClick(() => action.action(this));
});
}
}
}

Expand All @@ -84,4 +86,4 @@ interface Action {
name: string;
icon: string;
action: (view: CustomFrameView) => any;
}
}
19 changes: 10 additions & 9 deletions test-vault/.obsidian/plugins/obsidian-custom-frames/main.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-custom-frames",
"name": "Custom Frames",
"version": "2.4.2",
"version": "2.4.3",
"minAppVersion": "0.14.5",
"description": "A plugin that turns web apps into panes using iframes with custom styling. Also comes with presets for Google Keep, Todoist and more.",
"author": "Ellpeck",
Expand Down
3 changes: 2 additions & 1 deletion versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
"2.3.0": "0.14.5",
"2.4.0": "0.14.5",
"2.4.1": "0.14.5",
"2.4.2": "0.14.5"
"2.4.2": "0.14.5",
"2.4.3": "0.15.5"
}

0 comments on commit 8db94a8

Please sign in to comment.