-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Update viscosity extension #25249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update viscosity extension #25249
Conversation
- chore: update viscosity screenshot - chore: add and update viscosity screenshots - refactor: extract and reuse actions for connection management - refactor: replace Quick Connect icon, and add action icons - refactor: simplify utility function names for connections handling - refactor: extract error toast logic into a dedicated module - refactor: centralize error toast handling - refactor: handle permission-related errors in all commands - chore: update dependencies to latest versions - chore: add screenshots for the extension store - chore: add "Communication" to categories in package.json - chore: add "macOS" to supported platforms in package.json - refactor: migrate package to ESM syntax - docs: update command descriptions in package.json - docs: update extension description and README with improved details and usage instructions - refactor: rename extension from "Viscosity Connect" to "Viscosity" and update related metadata - refactor: move `useConnections` to dedicated hooks folder - refactor: remove ellipsis from connection state messages - refactor: rename files to kebab-case - refactor: add getActiveConnections and improve connection state handling logic - refactor: add "No connections found" to error constants - refactor: centralize polling logic into viscosity API and clean up utils - refactor: transition to functional architecture and modular utilities - refactor: centralize connection logic into ConnectionService - refactor: simplify connection list rendering by extracting reusable function - extract ConnectionListItem component and refactor list rendering for connections - add error handling for failed connection state updates in quick-connect - refactor: centralize error handling and decouple UI from service layer - split utils into modular files and add path alias for imports - extract Viscosity client logic into a reusable class - rename toggleQuickConnect to makeQuickConnect and cleanup constants - add error handling for failed connection state updates - escape special characters in connection names to prevent syntax errors in AppleScript - change extension icon - change quick-connect icon - add new status icons and make quick connect an accessory - add polling to ensure all connections are disconnected - refactor error handling and extract disconnectAll utility function - implement Quick Connect command - change Favorite to Quick Connect - add "Make Favorite" action and visual indicators to list - add useConnections hook - update eslint config - change command descriptions - add polling for connection state indicators - add Refresh action to list-connections - split list into Active and Disconnected - add connection state-based sorting, make active connections appear on top - fix bug when "reset network after disconnect" option is on icon state not changing, and some more improvement on state indicators - make all messages a constant and change Connection type to the enum - add constants for messages - turn prettier singleQuote rule off - add disconnect script - some refactoring - add Connected and Disconnected icons in list view - change list connections to AppleScript - Initial commit
- docs: add Raycast link in README - fix: properly escape backslashes and double quotes in strings - refactor: apply Raycast prettier rules
- chore: add .vscode to gitignore and apply minor code formatting - feat: add "Connect and Close" action to list-connections - feat: use HUD notifications and close window for disconnect-all - feat: Introduce HUD-specific error and message constants with emojis and update quick connect and error handling to use them. - refactor: Update quick-connect to use `showHUD` for all notifications and errors, and close the main window.
- style: Reformat mock API file - docs: Update Viscosity extension screenshots. - feat: add mock API for connections
|
Congratulations on your new Raycast extension! 🚀 We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days. Once the PR is approved and merged, the extension will be available on our Store. |
Greptile OverviewGreptile SummaryThis PR adds a new Viscosity VPN extension that enables users to manage VPN connections through Raycast using AppleScript integration. Key Implementation Highlights:
Architecture:
The extension is well-structured, follows all repository guidelines, and implements security best practices for AppleScript execution. Confidence Score: 5/5
Important Files Changed
|
0xdhrv
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, approved 🔥
|
Published to the Raycast Store: |
|
🎉 🎉 🎉 Such a great contribution deserves a reward, but unfortunately we couldn't find your Raycast account based on your GitHub username (@yigitefe). Please link your GitHub account to your Raycast account to receive your credits and soon be able to exchange them for some swag. |
Description
This PR introduces the Viscosity extension, which allows users to manage their Viscosity VPN connections directly from Raycast. It leverages AppleScript to interface with the Viscosity macOS application.
🚀 Features
List Connections
View all configured VPN connections and their real-time status (Connected / Disconnected / Connecting).
Toggle Connections
Quickly connect or disconnect a specific VPN by pressing Enter.
Quick Connect
A dedicated command to instantly connect to a preferred VPN (or the first one in the list).
Disconnect All
A utility command to drop all active VPN sessions at once.
Preference Management
Users can set a Quick Connect default connection via the List Connections view (
Cmd + Shift + Q).🛠️ Implementation Details
AppleScript Integration
Uses
@raycast/utilsrunAppleScriptto communicate with Viscosity.Polling
Implements a polling mechanism to provide real-time status updates while connections are being established or dropped.
State Management
Uses Raycast’s
LocalStorageto persist user preferences for the Quick Connect feature.Screencast
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder