diff --git a/cmd/root.go b/cmd/root.go index 7913104..36a1dbd 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -52,6 +52,7 @@ func init() { rootCmd.AddCommand(enhanceCmd) rootCmd.AddCommand(serveCmd) + rootCmd.AddCommand(restoreCmd) } func initConfig() { diff --git a/justfile b/justfile index aad35a7..747f831 100644 --- a/justfile +++ b/justfile @@ -135,7 +135,7 @@ health port="8080": @echo "๐ Checking API server health..." @curl -s http://localhost:{{port}}/health | jq . || echo "โ Server not responding at localhost:{{port}}" -# Clean all build artifacts +# Clean all build artifacts and backups clean: rm -rf lib/dist rm -rf insertr @@ -145,6 +145,12 @@ clean: rm -rf lib/node_modules rm -f dev.db rm -f insertr.db + @echo "๐งน Cleaned all build artifacts and backups" + +# Restore demo site to clean original state +restore-clean: + @echo "๐งน Restoring demo site to clean state..." + ./insertr restore demo --clean # Lint code (placeholder for now) lint: @@ -180,7 +186,8 @@ status: @echo " just enhance - Build-time content injection" @echo "" @echo "๐ Check server: just health" + @echo "๐งน Restore clean: just restore-clean" # Generate sqlc code (for database schema changes) sqlc: - sqlc generate \ No newline at end of file + sqlc generate diff --git a/lib/src/core/auth.js b/lib/src/core/auth.js index 037800c..da776e5 100644 --- a/lib/src/core/auth.js +++ b/lib/src/core/auth.js @@ -235,6 +235,8 @@ export class InsertrAuth { if (editToggle) { editToggle.addEventListener('click', () => this.toggleEditMode()); } + + } /** @@ -313,6 +315,9 @@ export class InsertrAuth { editBtn.textContent = `Edit Mode: ${this.state.editMode ? 'On' : 'Off'}`; editBtn.className = `insertr-auth-btn ${this.state.editMode ? 'insertr-edit-active' : ''}`; } + + // Update enhance button visibility + this.updateEnhanceButtonVisibility(); } /** @@ -325,14 +330,14 @@ export class InsertrAuth { } const statusHtml = ` -