From 677679b0939272e8c4b90dac905626b01dfd38e8 Mon Sep 17 00:00:00 2001 From: Silvano Cerza Date: Sun, 5 Jan 2025 19:06:32 +0100 Subject: [PATCH] Rename some settings for clarity --- src/settings/settings.ts | 8 ++++---- src/settings/tab.ts | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/settings/settings.ts b/src/settings/settings.ts index c5bfdb6..857e445 100644 --- a/src/settings/settings.ts +++ b/src/settings/settings.ts @@ -3,8 +3,8 @@ export interface GitHubSyncSettings { githubOwner: string; githubRepo: string; githubBranch: string; - repoContentPath: string; - localPath: string; + repoContentDir: string; + localContentDir: string; syncStrategy: "save" | "manual" | "interval"; syncInterval: number; } @@ -14,8 +14,8 @@ export const DEFAULT_SETTINGS: GitHubSyncSettings = { githubOwner: "", githubRepo: "", githubBranch: "main", - repoContentPath: "", - localPath: "", + repoContentDir: "", + localContentDir: "", syncStrategy: "save", syncInterval: 1, }; diff --git a/src/settings/tab.ts b/src/settings/tab.ts index 3b4eb09..bc52f95 100644 --- a/src/settings/tab.ts +++ b/src/settings/tab.ts @@ -88,35 +88,35 @@ export default class GitHubSyncSettingsTab extends PluginSettingTab { containerEl.createEl("h2", { text: "Sync settings" }); new Setting(containerEl) - .setName("Repository content path") + .setName("Repository content directory") .setDesc( - `The path to sync, relative to the repository root. + `The repository directory to sync, relative to the repository root. If not set the whole repository will be synced.`, ) .addText((text) => text .setPlaceholder("Exaple: blog/content") - .setValue(this.plugin.settings.repoContentPath) + .setValue(this.plugin.settings.repoContentDir) .onChange(async (value) => { // TODO: Change the local path if already fetched - this.plugin.settings.repoContentPath = value; + this.plugin.settings.repoContentDir = value; await this.plugin.saveSettings(); }), ); new Setting(containerEl) - .setName("Local path") + .setName("Local content directory") .setDesc( - `The local path to sync, relative to the vault root. + `The local directory to sync, relative to the vault root. Defaults to the repository name if not set.`, ) .addText((text) => text .setPlaceholder("Exaple: folder/blog-posts") - .setValue(this.plugin.settings.localPath) + .setValue(this.plugin.settings.localContentDir) .onChange(async (value) => { // TODO: Move the folder if already fetched - this.plugin.settings.localPath = value; + this.plugin.settings.localContentDir = value; await this.plugin.saveSettings(); }), );