Skip to content

Commit

Permalink
Add dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan Ango authored and Stephan Ango committed May 15, 2022
1 parent 7df971f commit 490bbac
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
15 changes: 14 additions & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,16 @@ export default class MinimalTheme extends Plugin {
}
});

this.addCommand({
id: 'toggle-minimal-dev-block-width',
name: 'Dev — Show block widths',
callback: () => {
this.settings.devBlockWidth = !this.settings.devBlockWidth;
this.saveData(this.settings);
this.refresh();
}
});

this.refresh()

}
Expand Down Expand Up @@ -529,6 +539,7 @@ export default class MinimalTheme extends Plugin {
document.body.classList.toggle('system-shade', this.settings.useSystemTheme);
document.body.classList.toggle('full-width-media', this.settings.fullWidthMedia);
document.body.classList.toggle('img-grid', this.settings.imgGrid);
document.body.classList.toggle('minimal-dev-block-width', this.settings.devBlockWidth);
document.body.classList.toggle('minimal-status-off', !this.settings.minimalStatus);
document.body.classList.toggle('full-file-names', !this.settings.trimNames);
document.body.classList.toggle('labeled-nav', this.settings.labeledNav);
Expand Down Expand Up @@ -683,6 +694,7 @@ interface MinimalSettings {
trimCols: boolean;
maxColWidth: string;
imgGrid: boolean;
devBlockWidth: boolean;
tableWidth: string;
iframeWidth: string;
imgWidth: string;
Expand Down Expand Up @@ -739,7 +751,8 @@ const DEFAULT_SETTINGS: MinimalSettings = {
useSystemTheme: false,
folding: true,
lineNumbers: false,
readableLineLength: false
readableLineLength: false,
devBlockWidth: false,
}

class MinimalSettingTab extends PluginSettingTab {
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-minimal-settings",
"name": "Minimal Theme Settings",
"version": "5.2.6",
"version": "5.2.7",
"minAppVersion": "0.10.1",
"description": "Change the colors, fonts and features of Minimal Theme.",
"author": "@kepano",
Expand Down
1 change: 1 addition & 0 deletions versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"5.2.7": "0.10.1",
"5.2.6": "0.10.1",
"5.2.1": "0.10.1",
"5.2.0": "0.10.1",
Expand Down

0 comments on commit 490bbac

Please sign in to comment.