initial rename

This commit is contained in:
Ell 2022-03-22 12:03:48 +01:00
parent 8758299d99
commit 672288135e
5 changed files with 22 additions and 26 deletions

View file

@ -1,10 +1,6 @@
# Obsidian Keep
An Obsidian plugin that displays Google Keep in the app.
# Obsidian Custom Frames
An Obsidian plugin that allows adding iframes with custom styling as editor tabs
![A screenshot of the Obsidian Keep plugin in action](screenshot.png)
If you accidentally close the Google Keep view, or it doesn't open when you first install the plugin, you can open it again with the `Obsidian Keep: Open Keep` command.
By default, the plugin also ships with a set of custom CSS that is applied to Google Keep to make it work better as a narrow side view rather than a full page.
![A screenshot of the Obsidian Custom Frames plugin in action](screenshot.png)
Note that this plugin only works on Desktop right now.

26
main.ts
View file

@ -2,7 +2,7 @@ import { App, ItemView, Plugin, PluginSettingTab, Setting, WorkspaceLeaf } from
import { remote, webContents } from 'electron';
const viewName: string = "keep";
const defaultSettings: KeepSettings = {
const defaultSettings: CustomFramesSettings = {
minimumWidth: 370,
padding: 5,
css: `/* hide the menu bar and the "Keep" logo and text */
@ -11,20 +11,20 @@ const defaultSettings: KeepSettings = {
}`
};
interface KeepSettings {
interface CustomFramesSettings {
minimumWidth: number;
padding: number;
css: string;
}
export default class KeepPlugin extends Plugin {
export default class CustomFramesPlugin extends Plugin {
settings: KeepSettings;
settings: CustomFramesSettings;
async onload(): Promise<void> {
await this.loadSettings();
this.registerView(viewName, l => new KeepView(l, this.settings));
this.registerView(viewName, l => new CustomFrameView(l, this.settings));
this.addCommand({
id: "open-keep",
name: "Open Keep",
@ -34,7 +34,7 @@ export default class KeepPlugin extends Plugin {
this.openKeep();
},
});
this.addSettingTab(new KeepSettingTab(this.app, this));
this.addSettingTab(new CustomFramesSettingTab(this.app, this));
this.app.workspace.onLayoutReady(() => this.openKeep());
}
@ -53,11 +53,11 @@ export default class KeepPlugin extends Plugin {
}
}
class KeepView extends ItemView {
class CustomFrameView extends ItemView {
private settings: KeepSettings;
private settings: CustomFramesSettings;
constructor(leaf: WorkspaceLeaf, settings: KeepSettings) {
constructor(leaf: WorkspaceLeaf, settings: CustomFramesSettings) {
super(leaf);
this.settings = settings;
}
@ -105,18 +105,18 @@ class KeepView extends ItemView {
}
}
class KeepSettingTab extends PluginSettingTab {
class CustomFramesSettingTab extends PluginSettingTab {
plugin: KeepPlugin;
plugin: CustomFramesPlugin;
constructor(app: App, plugin: KeepPlugin) {
constructor(app: App, plugin: CustomFramesPlugin) {
super(app, plugin);
this.plugin = plugin;
}
display(): void {
this.containerEl.empty();
this.containerEl.createEl('h2', { text: 'Obsidian Keep Settings' });
this.containerEl.createEl('h2', { text: 'Obsidian Custom Frames Settings' });
new Setting(this.containerEl)
.setName("Minimum View Width")

View file

@ -1,9 +1,9 @@
{
"id": "obsidian-keep",
"name": "Obsidian Keep",
"id": "obsidian-custom-frames",
"name": "Obsidian Custom Frames",
"version": "1.1.1",
"minAppVersion": "0.13.33",
"description": "An Obsidian plugin that displays Google Keep in the app",
"description": "An Obsidian plugin that allows adding iframes with custom styling as editor tabs",
"author": "Ellpeck",
"authorUrl": "https://ellpeck.de",
"isDesktopOnly": true

2
package-lock.json generated
View file

@ -1,5 +1,5 @@
{
"name": "obsidian-keep",
"name": "obsidian-custom-frames",
"version": "1.1.1",
"lockfileVersion": 1,
"requires": true,

View file

@ -1,7 +1,7 @@
{
"name": "obsidian-keep",
"name": "obsidian-custom-frames",
"version": "1.1.1",
"description": "An Obsidian plugin that displays Google Keep in the app",
"description": "An Obsidian plugin that allows adding iframes with custom styling as editor tabs",
"main": "main.js",
"scripts": {
"dev": "node esbuild.config.mjs",