Skip to content

Commit

Permalink
1.0.6 Fix: Ribbon Icon
Browse files Browse the repository at this point in the history
  • Loading branch information
TfT Hacker committed Nov 29, 2024
1 parent b8e2d48 commit 671a14f
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 31 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.0.6

- Fix: [#92](https://github.com/TfTHacker/obsidian42-brat/issues/92) - BRAT icon could not be disabled.

# 1.0.5

### Updates
Expand Down
5 changes: 3 additions & 2 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
},
"formatter": {
"enabled": true,
"indentStyle": "tab"
"indentStyle": "tab",
"lineWidth": 140
},
"organizeImports": {
"enabled": true
Expand All @@ -27,4 +28,4 @@
"quoteStyle": "double"
}
}
}
}
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian42-brat",
"name": "BRAT",
"version": "1.0.5",
"version": "1.0.6",
"minAppVersion": "1.7.2",
"description": "Easily install a beta version of a plugin for testing.",
"author": "TfTHacker",
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian42-brat",
"version": "1.0.5",
"version": "1.0.6",
"description": "Obsidian42 - Beta Reviewer's Autoupdate Tool.",
"main": "main.js",
"scripts": {
Expand All @@ -18,17 +18,17 @@
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@types/node": "^22.5.5",
"@types/node": "^22.10.1",
"builtin-modules": "4.0.0",
"esbuild": "0.23.1",
"jsdom": "^25.0.0",
"esbuild": "0.24.0",
"jsdom": "^25.0.1",
"obsidian": "1.7.2",
"ts-node": "^10.9.2",
"tslib": "^2.7.0",
"typedoc": "^0.26.7",
"typescript": "5.6.2"
"tslib": "^2.8.1",
"typedoc": "^0.27.1",
"typescript": "5.7.2"
},
"dependencies": {
"obsidian-daily-notes-interface": "^0.9.4"
}
}
}
27 changes: 8 additions & 19 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,21 @@ export default class BratPlugin extends Plugin {
onload() {
console.log(`loading ${this.APP_NAME}`);

addIcons();
this.addRibbonIcon("BratIcon", "BRAT", () => {
this.commands.ribbonDisplayCommands();
});

this.loadSettings()
.then(() => {
this.app.workspace.onLayoutReady(() => {
this.addSettingTab(new BratSettingsTab(this.app, this));

addIcons();
this.showRibbonButton();
this.registerObsidianProtocolHandler(
"brat",
this.obsidianProtocolHandler,
);
this.registerObsidianProtocolHandler("brat", this.obsidianProtocolHandler);

if (this.settings.updateAtStartup) {
setTimeout(() => {
void this.betaPlugins.checkForPluginUpdatesAndInstallUpdates(
false,
);
void this.betaPlugins.checkForPluginUpdatesAndInstallUpdates(false);
}, 60000);
}
if (this.settings.updateThemesAtStartup) {
Expand All @@ -58,12 +56,6 @@ export default class BratPlugin extends Plugin {
});
}

showRibbonButton(): void {
this.addRibbonIcon("BratIcon", "BRAT", () => {
this.commands.ribbonDisplayCommands();
});
}

async log(textToLog: string, verbose = false): Promise<void> {
await logger(this, textToLog, verbose);
}
Expand All @@ -88,10 +80,7 @@ export default class BratPlugin extends Plugin {

for (const which of ["plugin", "theme"]) {
if (params[which]) {
const modal =
which === "plugin"
? new AddNewPluginModal(this, this.betaPlugins)
: new AddNewTheme(this);
const modal = which === "plugin" ? new AddNewPluginModal(this, this.betaPlugins) : new AddNewTheme(this);
modal.address = params[which];
modal.open();
return;
Expand Down
3 changes: 2 additions & 1 deletion versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"1.0.2": "1.4.16",
"1.0.3": "1.4.16",
"1.0.4": "1.7.2",
"1.0.5": "1.7.2"
"1.0.5": "1.7.2",
"1.0.6": "1.7.2"
}

0 comments on commit 671a14f

Please sign in to comment.