Skip to content

Commit

Permalink
Format code with prettier and standardjs
Browse files Browse the repository at this point in the history
  • Loading branch information
deepsource-autofix[bot] authored Jan 28, 2023
1 parent 2c395eb commit fd448f5
Showing 1 changed file with 28 additions and 29 deletions.
57 changes: 28 additions & 29 deletions src/SettingsTab.ts
Original file line number Diff line number Diff line change
@@ -1,39 +1,38 @@

import ObsidianCamera from "main";
import { App, PluginSettingTab, Setting } from "obsidian";

export interface CameraPluginSettings {
chosenFolderPath: string;

chosenFolderPath: string;
}

export const DEFAULT_SETTINGS: CameraPluginSettings = {
chosenFolderPath: 'attachments/snaps'
}
chosenFolderPath: "attachments/snaps",
};

export default class CameraSettingsTab extends PluginSettingTab {
plugin: ObsidianCamera;

constructor(app: App, plugin: ObsidianCamera) {
super(app, plugin);
this.plugin = plugin;
}

display(): void {
const { containerEl } = this;
containerEl.empty();
containerEl.createEl('h2', { text: 'Obsidian-Camera settings' });

new Setting(containerEl)
.setName('Folder Path')
.setDesc('Folder where the videos and snaps should be saved')
.addText(text => text
.setPlaceholder('Enter your secret')
.setValue(this.plugin.settings.chosenFolderPath)
.onChange(async (value) => {

this.plugin.settings.chosenFolderPath = value;
await this.plugin.saveSettings();
}));
}
plugin: ObsidianCamera;

constructor(app: App, plugin: ObsidianCamera) {
super(app, plugin);
this.plugin = plugin;
}

display(): void {
const { containerEl } = this;
containerEl.empty();
containerEl.createEl("h2", { text: "Obsidian-Camera settings" });

new Setting(containerEl)
.setName("Folder Path")
.setDesc("Folder where the videos and snaps should be saved")
.addText((text) =>
text
.setPlaceholder("Enter your secret")
.setValue(this.plugin.settings.chosenFolderPath)
.onChange(async (value) => {
this.plugin.settings.chosenFolderPath = value;
await this.plugin.saveSettings();
})
);
}
}

0 comments on commit fd448f5

Please sign in to comment.