diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 6da5390..206af2f 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -26,7 +26,14 @@ "Bash(dir:*)", "Bash(git merge:*)", "Bash(timeout:*)", - "Bash(findstr:*)" + "Bash(findstr:*)", + "Bash(git stash:*)", + "Bash(npm start:*)", + "Bash(gh release delete-asset:*)", + "Bash(git rm:*)", + "Bash(gh release view:*)", + "Bash(npm run build:linux:*)", + "Bash(git reset:*)" ], "deny": [] } diff --git a/.vs/ProjectSettings.json b/.vs/ProjectSettings.json new file mode 100644 index 0000000..f8b4888 --- /dev/null +++ b/.vs/ProjectSettings.json @@ -0,0 +1,3 @@ +{ + "CurrentProjectSetting": null +} \ No newline at end of file diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json new file mode 100644 index 0000000..29dd5a0 --- /dev/null +++ b/.vs/VSWorkspaceState.json @@ -0,0 +1,7 @@ +{ + "ExpandedNodes": [ + "" + ], + "SelectedNode": "\\package.json", + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/.vs/pan-converter/CopilotIndices/17.14.1231.31060/CodeChunks.db b/.vs/pan-converter/CopilotIndices/17.14.1231.31060/CodeChunks.db new file mode 100644 index 0000000..d1d0169 Binary files /dev/null and b/.vs/pan-converter/CopilotIndices/17.14.1231.31060/CodeChunks.db differ diff --git a/.vs/pan-converter/CopilotIndices/17.14.1231.31060/SemanticSymbols.db b/.vs/pan-converter/CopilotIndices/17.14.1231.31060/SemanticSymbols.db new file mode 100644 index 0000000..49d1aa7 Binary files /dev/null and b/.vs/pan-converter/CopilotIndices/17.14.1231.31060/SemanticSymbols.db differ diff --git a/.vs/pan-converter/FileContentIndex/d9d4ea94-202b-4596-807e-2d9decdef28a.vsidx b/.vs/pan-converter/FileContentIndex/d9d4ea94-202b-4596-807e-2d9decdef28a.vsidx new file mode 100644 index 0000000..8bd7ce3 Binary files /dev/null and b/.vs/pan-converter/FileContentIndex/d9d4ea94-202b-4596-807e-2d9decdef28a.vsidx differ diff --git a/.vs/pan-converter/config/applicationhost.config b/.vs/pan-converter/config/applicationhost.config new file mode 100644 index 0000000..cdd2df8 --- /dev/null +++ b/.vs/pan-converter/config/applicationhost.config @@ -0,0 +1,1026 @@ + + + + + + + +
+
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.vs/pan-converter/v17/.wsuo b/.vs/pan-converter/v17/.wsuo new file mode 100644 index 0000000..e7a5095 Binary files /dev/null and b/.vs/pan-converter/v17/.wsuo differ diff --git a/.vs/pan-converter/v17/DocumentLayout.backup.json b/.vs/pan-converter/v17/DocumentLayout.backup.json new file mode 100644 index 0000000..6aedff5 --- /dev/null +++ b/.vs/pan-converter/v17/DocumentLayout.backup.json @@ -0,0 +1,41 @@ +{ + "Version": 1, + "WorkspaceRootPath": "H:\\Development\\pan-converter\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|H:\\Development\\pan-converter\\package.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:package.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "package.json", + "DocumentMoniker": "H:\\Development\\pan-converter\\package.json", + "RelativeDocumentMoniker": "package.json", + "ToolTip": "H:\\Development\\pan-converter\\package.json", + "RelativeToolTip": "package.json", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAsAAAAqAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-10-11T13:44:30.357Z", + "EditorCaption": "" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{cce594b6-0c39-4442-ba28-10c64ac7e89f}" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/.vs/pan-converter/v17/DocumentLayout.json b/.vs/pan-converter/v17/DocumentLayout.json new file mode 100644 index 0000000..6aedff5 --- /dev/null +++ b/.vs/pan-converter/v17/DocumentLayout.json @@ -0,0 +1,41 @@ +{ + "Version": 1, + "WorkspaceRootPath": "H:\\Development\\pan-converter\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|H:\\Development\\pan-converter\\package.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:package.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "package.json", + "DocumentMoniker": "H:\\Development\\pan-converter\\package.json", + "RelativeDocumentMoniker": "package.json", + "ToolTip": "H:\\Development\\pan-converter\\package.json", + "RelativeToolTip": "package.json", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAsAAAAqAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-10-11T13:44:30.357Z", + "EditorCaption": "" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{cce594b6-0c39-4442-ba28-10c64ac7e89f}" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite new file mode 100644 index 0000000..025fb96 Binary files /dev/null and b/.vs/slnx.sqlite differ diff --git a/PUSH_INSTRUCTIONS.md b/PUSH_INSTRUCTIONS.md index 88ef9f0..94a0220 100644 --- a/PUSH_INSTRUCTIONS.md +++ b/PUSH_INSTRUCTIONS.md @@ -1,95 +1,12 @@ -# Push Instructions for Pan Converter +# Test Double-Click File Opening -## Prerequisites -1. Create a new repository on GitHub: https://github.com/new - - Repository name: `pan-converter` - - Keep it empty (no README, .gitignore, or license) - - Make it public or private as desired +This is a test file to verify double-click functionality. -2. Set up authentication: - - **Option A - SSH Key** (Recommended): - ```bash - # Check if you have SSH key - ls -la ~/.ssh/id_rsa.pub - - # If not, generate one: - ssh-keygen -t rsa -b 4096 -C "your_email@example.com" - - # Add to GitHub: Settings > SSH and GPG keys > New SSH key - cat ~/.ssh/id_rsa.pub - ``` - - - **Option B - Personal Access Token**: - - Go to GitHub Settings > Developer settings > Personal access tokens - - Generate new token with 'repo' scope - - Save the token securely +## Features to Test +- File should load automatically +- Content should display in editor +- Tab should show filename +- Preview should render markdown -## Push Commands - -### Using SSH (Recommended) -```bash -# Set SSH remote -git remote set-url origin git@github.com:amitwh/pan-converter.git - -# Push all branches -git push -u origin master -git push origin linux -git push origin macos -git push origin windows -``` - -### Using HTTPS with Token -```bash -# Set HTTPS remote -git remote set-url origin https://github.com/amitwh/pan-converter.git - -# Push all branches (you'll be prompted for username and token) -git push -u origin master -git push origin linux -git push origin macos -git push origin windows - -# When prompted: -# Username: amitwh -# Password: [paste your Personal Access Token] -``` - -### Using GitHub CLI (if installed) -```bash -# Login to GitHub CLI -gh auth login - -# Create repo and push -gh repo create pan-converter --public --source=. --remote=origin --push -``` - -## Automated Script -```bash -# Run the provided script -./push-to-github.sh -``` - -## Verify Success -After pushing, verify at: https://github.com/amitwh/pan-converter - -You should see: -- 4 branches (master, linux, macos, windows) -- All project files -- Complete commit history - -## Troubleshooting - -### Authentication Failed -- For SSH: Ensure your SSH key is added to GitHub -- For HTTPS: Use Personal Access Token, not password -- Check token has 'repo' scope - -### Repository Not Found -- Ensure repository exists on GitHub -- Check spelling: `pan-converter` -- Verify you're logged into the correct GitHub account - -### Permission Denied -- Check repository ownership -- Ensure you have write access -- Verify authentication method is correct \ No newline at end of file +**This text should be bold** +*This text should be italic* diff --git a/UIdoubleclick.png b/UIdoubleclick.png new file mode 100644 index 0000000..7b2afdf Binary files /dev/null and b/UIdoubleclick.png differ diff --git a/UIdoubleclick2.png b/UIdoubleclick2.png new file mode 100644 index 0000000..8dee122 Binary files /dev/null and b/UIdoubleclick2.png differ diff --git a/UIdoubleclick3.png b/UIdoubleclick3.png new file mode 100644 index 0000000..32fecbc Binary files /dev/null and b/UIdoubleclick3.png differ diff --git a/_nul b/_nul new file mode 100644 index 0000000..e69de29 diff --git a/logo.png b/logo.png new file mode 100644 index 0000000..b1871d2 Binary files /dev/null and b/logo.png differ diff --git a/logopallete.png b/logopallete.png new file mode 100644 index 0000000..0bdb263 Binary files /dev/null and b/logopallete.png differ diff --git a/pdfexporterror.png b/pdfexporterror.png new file mode 100644 index 0000000..5cea7a7 Binary files /dev/null and b/pdfexporterror.png differ diff --git a/pdfexporterror2.png b/pdfexporterror2.png new file mode 100644 index 0000000..2b1dbd8 Binary files /dev/null and b/pdfexporterror2.png differ diff --git a/ren.pdf b/ren.pdf new file mode 100644 index 0000000..04cf525 Binary files /dev/null and b/ren.pdf differ diff --git a/src/main.js b/src/main.js index dc6b87b..e21557f 100644 --- a/src/main.js +++ b/src/main.js @@ -1183,10 +1183,19 @@ ipcMain.on('do-print', (event, { withStyles }) => { // Handle renderer ready for file association ipcMain.on('renderer-ready', (event) => { console.log('[MAIN] renderer-ready received, rendererReady was:', rendererReady); + if (mainWindow) { + mainWindow.webContents.executeJavaScript(`console.log('[MAIN->RENDERER] renderer-ready received, rendererReady was: ${rendererReady}')`); + } rendererReady = true; console.log('[MAIN] app.pendingFile:', app.pendingFile); + if (mainWindow) { + mainWindow.webContents.executeJavaScript(`console.log('[MAIN->RENDERER] app.pendingFile: ${app.pendingFile}')`); + } if (app.pendingFile) { console.log('[MAIN] Opening pending file:', app.pendingFile); + if (mainWindow) { + mainWindow.webContents.executeJavaScript(`console.log('[MAIN->RENDERER] Opening pending file: ${app.pendingFile}')`); + } openFileFromPath(app.pendingFile); app.pendingFile = null; } diff --git a/src/renderer.js b/src/renderer.js index f59c50b..b919a63 100644 --- a/src/renderer.js +++ b/src/renderer.js @@ -1185,9 +1185,13 @@ function handlePrintPreview(withStyles) { } // Hide UI elements - document.getElementById('toolbar').style.display = 'none'; - document.getElementById('tab-bar').style.display = 'none'; - document.getElementById('status-bar').style.display = 'none'; + const toolbar = document.getElementById('toolbar'); + const tabBar = document.getElementById('tab-bar'); + const statusBar = document.getElementById('status-bar'); + + if (toolbar) toolbar.style.display = 'none'; + if (tabBar) tabBar.style.display = 'none'; + if (statusBar) statusBar.style.display = 'none'; const editorPane = document.getElementById(`editor-pane-${activeTabId}`); if (editorPane) { @@ -1221,9 +1225,9 @@ function handlePrintPreview(withStyles) { // Restore UI after a delay (printer will have captured the output by then) setTimeout(() => { - document.getElementById('toolbar').style.display = ''; - document.getElementById('tab-bar').style.display = ''; - document.getElementById('status-bar').style.display = ''; + if (toolbar) toolbar.style.display = ''; + if (tabBar) tabBar.style.display = ''; + if (statusBar) statusBar.style.display = ''; if (editorPane) { editorPane.style.display = ''; diff --git a/test-double-click.md b/test-double-click.md new file mode 100644 index 0000000..94a0220 --- /dev/null +++ b/test-double-click.md @@ -0,0 +1,12 @@ +# Test Double-Click File Opening + +This is a test file to verify double-click functionality. + +## Features to Test +- File should load automatically +- Content should display in editor +- Tab should show filename +- Preview should render markdown + +**This text should be bold** +*This text should be italic* diff --git a/test-file-open.md b/test-file-open.md new file mode 100644 index 0000000..44b76f6 --- /dev/null +++ b/test-file-open.md @@ -0,0 +1,14 @@ +# Test File Opening + +This is a test file to verify that double-click file opening works correctly. + +## Features +- **Bold text** +- *Italic text* +- `Code` + +```javascript +console.log("Hello World"); +``` + +This should appear when you double-click to open the file!