From b6d72896c58883f98cfee38b36b5bcffeb6581fd Mon Sep 17 00:00:00 2001 From: callumalpass Date: Wed, 29 Oct 2025 23:07:53 +1100 Subject: [PATCH] chore: temporarily disable quick OAuth setup for beta release - Comment out license card and mode toggle UI in integrations tab - Force advanced setup mode to always show credential inputs - Add prominent setup guide link to calendar integration section - Update calendar-setup.md to hide quick setup documentation The quick OAuth setup flow is being temporarily disabled for the beta release. Users will only see the advanced setup option requiring their own OAuth credentials. All changes are marked with "TEMPORARILY DISABLED FOR BETA RELEASE" comments for easy restoration. --- docs/calendar-setup.md | 26 ++++++------- src/settings/tabs/integrationsTab.ts | 56 +++++++++++++++++++++++----- 2 files changed, 59 insertions(+), 23 deletions(-) diff --git a/docs/calendar-setup.md b/docs/calendar-setup.md index f991ade8..201df54b 100644 --- a/docs/calendar-setup.md +++ b/docs/calendar-setup.md @@ -2,6 +2,7 @@ TaskNotes supports Google Calendar and Microsoft Calendar integration via OAuth 2.0. + -## Advanced Setup (Your Own Credentials) +## Setup (Your Own OAuth Credentials) -If you prefer to use your own OAuth application: +To connect your calendars, you'll need to create OAuth applications with Google and/or Microsoft. ### Google Calendar @@ -28,10 +30,9 @@ If you prefer to use your own OAuth application: 2. **Configure Credentials** - Copy Client ID and Client Secret - In TaskNotes Settings → Integrations → Calendar: - - Select "Advanced Setup" - - Paste your Client ID - - Paste your Client Secret - - Click "Connect to Google Calendar" + - Paste your Client ID in the Google Calendar card + - Paste your Client Secret in the Google Calendar card + - Click "Connect Google Calendar" ### Microsoft Calendar @@ -57,16 +58,15 @@ If you prefer to use your own OAuth application: 4. **Configure TaskNotes** - In TaskNotes Settings → Integrations → Calendar: - - Select "Advanced Setup" - - Paste your Client ID - - Paste your Client Secret - - Click "Connect to Microsoft Calendar" + - Paste your Client ID in the Microsoft Calendar card + - Paste your Client Secret in the Microsoft Calendar card + - Click "Connect Microsoft Calendar" ## Security Notes -- Google Quick Setup uses an OAuth 2.0 loopback redirect with PKCE; Microsoft Quick Setup uses the OAuth 2.0 device flow (no client secret required). -- Advanced Setup stores your credentials locally in Obsidian's data folder -- Tokens are stored securely and refreshed automatically +- Your OAuth credentials are stored locally in Obsidian's data folder +- Access tokens are stored securely and refreshed automatically +- Calendar data is synced directly between Obsidian and your calendar provider - Disconnect at any time to revoke access ## Troubleshooting diff --git a/src/settings/tabs/integrationsTab.ts b/src/settings/tabs/integrationsTab.ts index b8403bc6..17b826a3 100644 --- a/src/settings/tabs/integrationsTab.ts +++ b/src/settings/tabs/integrationsTab.ts @@ -91,9 +91,10 @@ export function renderIntegrationsTab( ); // TaskNotes License Card (appears before calendar cards) - const licenseContainer = container.createDiv("tasknotes-license-container"); + // TEMPORARILY DISABLED FOR BETA RELEASE + // const licenseContainer = container.createDiv("tasknotes-license-container"); - const renderLicenseCard = async () => { + /* const renderLicenseCard = async () => { licenseContainer.empty(); // Setup mode toggle @@ -334,10 +335,41 @@ export function renderIntegrationsTab( // Insert mode toggle before the card licenseContainer.insertBefore(modeToggleContainer, card); - }; + }; */ // Initial render - renderLicenseCard(); + // TEMPORARILY DISABLED FOR BETA RELEASE + // renderLicenseCard(); + + // Setup guide link (always visible) + const setupGuideContainer = container.createDiv("tasknotes-oauth-setup-guide"); + setupGuideContainer.style.cssText = ` + font-size: 0.9em; + color: var(--text-muted); + line-height: 1.5; + padding: 12px; + background: var(--background-secondary); + border-radius: 6px; + border-left: 3px solid var(--interactive-accent); + margin-bottom: 16px; + `; + + const setupText = setupGuideContainer.createDiv(); + const strong = setupText.createEl("strong"); + strong.textContent = "OAuth Setup Required:"; + setupText.appendText(" You'll need to create OAuth credentials with Google and/or Microsoft to connect your calendars. This takes approximately 15 minutes for initial setup."); + + const setupGuideLink = setupGuideContainer.createEl("a", { + text: "View Calendar Setup Guide", + href: "https://callumalpass.github.io/tasknotes/calendar-setup", + attr: { target: "_blank" } + }); + setupGuideLink.style.cssText = ` + font-size: 0.9em; + color: var(--interactive-accent); + margin-top: 8px; + display: inline-block; + `; // Google Calendar container for card-based UI const googleCalendarContainer = container.createDiv("google-calendar-integration-container"); @@ -461,7 +493,8 @@ export function renderIntegrationsTab( ]; // Only show credential inputs in Advanced mode - if (plugin.settings.oauthSetupMode === "advanced") { + // TEMPORARILY FORCING ADVANCED MODE FOR BETA RELEASE + if (true) { // if (plugin.settings.oauthSetupMode === "advanced") { // Create credential input fields const clientIdInput = createCardInput("text", "your-client-id.apps.googleusercontent.com", plugin.settings.googleOAuthClientId); clientIdInput.addEventListener("blur", async () => { @@ -498,7 +531,8 @@ export function renderIntegrationsTab( }); } else { // Quick mode - show reminder about license - const quickModeNote = document.createElement("div"); + // TEMPORARILY DISABLED FOR BETA RELEASE + /* const quickModeNote = document.createElement("div"); quickModeNote.style.fontSize = "0.85em"; quickModeNote.style.color = "var(--text-accent)"; quickModeNote.style.fontStyle = "italic"; @@ -511,7 +545,7 @@ export function renderIntegrationsTab( rows: [ { label: "", input: quickModeNote, fullWidth: true } ] - }); + }); */ } createCard(googleCalendarContainer, { @@ -659,7 +693,8 @@ export function renderIntegrationsTab( ]; // Only show credential inputs in Advanced mode - if (plugin.settings.oauthSetupMode === "advanced") { + // TEMPORARILY FORCING ADVANCED MODE FOR BETA RELEASE + if (true) { // if (plugin.settings.oauthSetupMode === "advanced") { // Create credential input fields const clientIdInput = createCardInput("text", "your-microsoft-client-id", plugin.settings.microsoftOAuthClientId); clientIdInput.addEventListener("blur", async () => { @@ -696,7 +731,8 @@ export function renderIntegrationsTab( }); } else { // Quick mode - show reminder about license - const quickModeNote = document.createElement("div"); + // TEMPORARILY DISABLED FOR BETA RELEASE + /* const quickModeNote = document.createElement("div"); quickModeNote.style.fontSize = "0.85em"; quickModeNote.style.color = "var(--text-accent)"; quickModeNote.style.fontStyle = "italic"; @@ -709,7 +745,7 @@ export function renderIntegrationsTab( rows: [ { label: "", input: quickModeNote, fullWidth: true } ] - }); + }); */ } createCard(microsoftCalendarContainer, {