mirror of
https://github.com/Ellpeck/ObsidianCustomFrames.git
synced 2024-11-14 14:59:08 +01:00
initial rename
This commit is contained in:
parent
8758299d99
commit
672288135e
5 changed files with 22 additions and 26 deletions
10
README.md
10
README.md
|
@ -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
26
main.ts
|
@ -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")
|
||||
|
|
|
@ -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
2
package-lock.json
generated
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "obsidian-keep",
|
||||
"name": "obsidian-custom-frames",
|
||||
"version": "1.1.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue