Skip to content

Commit

Permalink
Merge pull request #6 from yajamon/give-uniqueness
Browse files Browse the repository at this point in the history
Give uniqueness
  • Loading branch information
yajamon authored Aug 26, 2021
2 parents 207429f + 0334434 commit c207499
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { App, Command, Plugin, PluginSettingTab, Setting } from 'obsidian';

interface MyPluginSettings {
interface CommandAliasPluginSettings {
aliases: AliasMap;
}

Expand All @@ -12,7 +12,7 @@ interface Alias {
commandId: string;
}

const DEFAULT_SETTINGS: MyPluginSettings = {
const DEFAULT_SETTINGS: CommandAliasPluginSettings = {
aliases: {}
}

Expand All @@ -26,8 +26,8 @@ type CommandMap = {
[key: string]: Command;
}

export default class MyPlugin extends Plugin {
settings: MyPluginSettings;
export default class CommandAliasPlugin extends Plugin {
settings: CommandAliasPluginSettings;

async onload() {
console.log('loading plugin');
Expand All @@ -43,7 +43,7 @@ export default class MyPlugin extends Plugin {
this.addAliasCommand(aliasId);
}

this.addSettingTab(new SampleSettingTab(this.app, this));
this.addSettingTab(new CommandAliasPluginSettingTab(this.app, this));
}

private addAliasCommand(aliasId: string) {
Expand Down Expand Up @@ -90,10 +90,10 @@ export default class MyPlugin extends Plugin {
}
}

class SampleSettingTab extends PluginSettingTab {
plugin: MyPlugin;
class CommandAliasPluginSettingTab extends PluginSettingTab {
plugin: CommandAliasPlugin;

constructor(app: App, plugin: MyPlugin) {
constructor(app: App, plugin: CommandAliasPlugin) {
super(app, plugin);
this.plugin = plugin;
}
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-command-alias-plugin",
"name": "Command Alias",
"version": "1.0.1",
"version": "1.0.2",
"minAppVersion": "0.9.12",
"description": "This plugin gives aliases to Obsidian commands.",
"author": "yajamon<[email protected]>",
Expand Down

0 comments on commit c207499

Please sign in to comment.