Skip to content

Releases: swiftDialog/swiftDialog

swiftDialog 2.5.0

11 Jun 13:48
384b6c5
Compare
Choose a tag to compare

New Features

-- Presentation Mode --

--presentation

Presentation mode is a display only mode that can be used as a richer display of content during background processes. The window is divided into roughly one third info area and two thirds content area with a progress bar underneath. Presentation mode is intended to be used in conjunction with a command file for receiving updates.

The info area can display one of:

  • An --infobox text view, coloured background and icon didplay.
  • One or more images that can be commanded to transition through available images using --autoplay
  • A web view

The content area can display either:

  • Any --message <text> in any of the supported forms.
  • One or more --listitem <item> in any of the supported forms.

The footer of the window is always visible and dedicated to a full width progress bar and buttons.

image image

-- Custom View Ordering --

--vieworder <csv>

With the exception of Images and message content, window elements can be re-ordered.

The default order is textfile, webcontent, listitem, checkbox, textfield, radiobutton, dropdown. This can now be re-arranged to suit display needs, e.g. --vieworder "dropdown, textfield, checkbox"

-- "Stack" style for buttons --

--buttonstyle stack

Displays button 1 and button 2 in a full width stack.

image

Thanks to @jonesiscoding

-- Built in variables --

swiftDialog now contains built in variables that will populate with host specific info. Include into your text strings as {variablename}

The included variables are:

{computername}  - hostname of the computer
{computermodel} - computer model, e.g. "Mac mini (2023)"
{serialnumber}  - serial number
{username}      - current username, e.g. `johndoe`
{userfullname}  - full name, e.g. `John Doe`
{osversion}     - macOS version, e.g. `14.4.1`
{osname}        - macOS name, e.g. `Sonoma`

Any environment variables are also accessable in this way

-- Set alternate name for user input fields --

User input fields like textfield, checkbox and selectitem have an additional modifier name=<text>. This allows for expressive labels with easy to parse names in the output.

e.g.

--textfield "What is your favourite colour?",name=colour

will return the output

colour : <value>

-- Textfield Confirmation --

Additional textfield modifier confirm.

Adds a secondary textfield whose contents need to match the primary one for validation to succeed

e.g. --textfield "Email Address", confirm

-- Login Window --

swiftDialog can now run in the login window. This is enabled with --loginwindow as a command line argument and requires the use of a LaunchAgent.

Thanks @fraserhess

-- Verbose and Debug --

Added --verbose which increases the level of detail sent to sdtout

Added --alwaysreturninput which will force user input to always be sent to output even if the cancel or info buttons are used.

--debug can now accept a colour argument which will be used to display highlights around content areas. Previously this was the default behaviour

Additionally, in debug mode, extra window detail is displayed in the title bar area. When used in conjunction with --resizable will update as the window is resized.

-- Other fixes --

  • The image carousel has been replaced with an updated image processing view. Images fade into view and the "time until next image" progress indicator has been removed.
  • Sending multiple notifications now causes notifications to stack in notification centre instead of only displaying the last notification #356
  • Added support for prompt= to secure fields
  • Window title value is now set. This wasnt used previously but if using --windowbuttons and the dialog window is minimised, the correct window title is displayed on hover in the Dock
  • Fixed an issue when using --timer and --button1text would not cause the button to be disabled for the first three seconds in contrast to the documented behaviour #363
  • Any data entered into user entry fields is output to stdout regardless what button is pressed, not just on a successful exit

A Special Thanks

To Charles Edge @krypted - For your inspiration, encouragement and support over the years, in this project and others 🍻

swiftDialog 2.5.0 RC 2

02 Jun 06:53
Compare
Choose a tag to compare
Pre-release

2.5.0 Release Candidate 2

What's Changed

  • Support for showing dialog windows at the loginwindow - From @fraserhess in #389
    • This is enabled with --loginwindow as a command line argument and requires the use of a LaunchAgent. Detailed information on how this works is in the wiki.
  • Fixed issue where markdown was not being rendered correctly in the info box #384
  • Notarized and stapled Dialog.app now available in a .dmg in addition to the .pkg installer.
    • The .dmg only contains the app bundle for those that want to re-package or have other custom deployment requirements. For standard installs, the .pkg remains the preferred method.

swiftDialog 2.5.0 RC 1

29 May 14:14
Compare
Choose a tag to compare
Pre-release

2.5.0 Release Candidate 1

All features from B1 through B3 with the following additional changes:

  • Added --verbose which increases the level of detail sent to sdtout
  • --debug can now accept a colour argument which will be used to display highlights around content areas. Previously this was the default behaviour
    • Additionally, in debug mode, extra window detail is displayed in the title bar area. When used in conjunction with --resizable will update as the window is resized. Useful for determining

Fixes:

  • Fix issue where button 2 or button 3 would not exit without entering text into required fields #380
  • Fix issue where boolean options with JSON config were not respected #381
  • Fix layout for message area when displayed in the same dialog with other scrollviews (list and switch) #376
  • Fixed issue where selectitem requirements were being evaluated even when no selectitem was present (incorrect log output)
  • Fixed issue where --resizable caused incorrect layout for the --helpmessage sheet when displayed
  • Updated built in variable {computermodel} which should now collect correct marketing model name on Intel macs.

swiftDialog 2.5.0 Beta 3

19 May 07:39
Compare
Choose a tag to compare
Pre-release

Fixes:

  • If a dialog is running already, don't quit after processing a swiftdialog system notification #378
  • Presentation mode properly handles --quitkey #375

New:

  • Links in the Info box area now look like links #370
  • Added confirm as a modifier to textfields. This will add a secondary textfield whose contents need to match the primary one for validation to succeed #377

Misc:

  • updated MarkdownUI from 2.1.0 to 2.3.0

swiftDialog 2.5 Beta 2

29 Apr 07:19
Compare
Choose a tag to compare
Pre-release

Fixes:

  • Fixed issue where checkboxes were not being appended to the correct array if configured via json. thx @joncrain
  • Fixed issue where name= property was not being properly picked up for either selectitems or checkboxes when specified with json
  • Add updated carousel timer. can be disabled with --hidetimer #366
  • Fixed issue where using timer and hidetimerbar parameters disables the button entirely #368
  • Fixed issue where using small dialog window with hidden timer is cutting button text short #355

swiftDialog 2.5 Beta 1

24 Apr 13:52
Compare
Choose a tag to compare
Pre-release

New

Presentation Mode

--presentation

Presentation mode is a display only mode that can be used as a richer display of content during background processes. The window is divided into roughly one third info area and two thirds content area with a progress bar underneath. Presentation mode is intended to be used in conjunction with a command file for receiving updates.

The info area can display one of:

  • An --infobox text view, coloured background and icon didplay.
  • One or more images that can be commanded to transition through available images using --autoplay
  • A web view

The content area can display either:

  • Any --message <text> in any of the supported forms.
  • One or more --listitem <item> in any of the supported forms.

The footer of the window is always visible and dedicated to a full width progress bar and buttons.

image image

Custom View Ordering #143

--vieworder <csv>

With the exception of Images and message content, window elements can be re-ordered.

The default order is textfile, webcontent, listitem, checkbox, textfield, radiobutton, dropdown. This can now be re-arranged to suit display needs, e.g. --vieworder "dropdown, textfield, checkbox"

"Stack" style for buttons - @jonesiscoding

--buttonstyle stack

Displays button 1 and button 2 in a full width stack.

image

Built in variables #362

swiftDialog now contains built in variables that will populate with host specific info. Include into your text strings as {variablename}

The included variables are:

{computername}  - hostname of the computer
{computermodel} - computer model, e.g. "Mac mini (2023)"
{serialnumber}  - serial number
{username}      - current username, e.g. `johndoe`
{userfullname}  - full name, e.g. `John Doe`
{osversion}     - macOS version, e.g. `14.4.1`
{osname}        - macOS name, e.g. `Sonoma`

Any environment variables are also accessable in this way

Set alternate name for user input fields

User input fields like textfield, checkbox and selectitem have an additional modifier name=<text>. This allows for expressive labels with easy to parse names in the output.

e.g.

--textfield "What is your favourite colour?",name=colour

will return the output

colour : <value>

Other fixes

  • The image carousel has been replaced with an updated image processing view. Images fade into view and the "time until next image" progress indicator has been removed.
  • Sending multiple notifications now causes notifications to stack in notification centre instead of only displaying the last notification #356
  • Added support for prompt= to secure fields
  • Window title value is now set. This wasnt used previously but if using --windowbuttons and the dialog window is minimised, the correct window title is displayed on hover in the Dock
  • Fixed an issue when using --timer and --button1text would not cause the button to be disabled for the first three seconds in contrast to the documented behaviour #363
  • Any data entered into user entry fields is output to stdout regardless what button is pressed, not jsut on a successful exit

Known Issues

  • Sending message or image updates to a dialog in presentation mode may have undesirable effects. This will be fixed in a future release.

swiftDialog 2.4.2

28 Feb 11:43
940f2c6
Compare
Choose a tag to compare

Bug fixes:

  • Fixed an issue where sending height or width commands to the command file would cause the app to quit #351
  • Fixed the warning message that is sent to stderr when notifications are not available to only occur when --notification is specified.

swiftDialog 2.4.1

12 Feb 21:56
fe273a0
Compare
Choose a tag to compare

Update release

Fixes:

  • listitem spacing should be back to how it appeared pre 2.4.0 #345
  • dialog windows should display properly on all spaces, including fullscreen apps when using --ontop
  • when using a blank or null --message "", it should now be blank and not default to the boilerplate text
  • images used in notifications (when specified with --icon which gets attached as an image) should work again
  • notifications can now trigger the default notification sound with --enablenotificationsounds
  • notification with a single action will now show the button label on hover

swiftDialog 2.4.1 Beta 1

09 Feb 22:07
Compare
Choose a tag to compare
Pre-release

Fixes:

  • listitem spacing should be back to how it appeared pre 2.4.0 #345
  • dialog windows should display properly on all spaces, including fullscreen apps when using --ontop
  • when using a blank or null --message "", it should now be blank and not default to the boilerplate text
  • images used in notifications (when specified with --icon which gets attached as an image) should work again
  • notifications can now trigger the default notification sound with --enablenotificationsounds
  • notification with a single action will now show the button label on hover

SwiftDialog 2.4.0

06 Feb 01:28
a9280e5
Compare
Choose a tag to compare

New features

Notifications

  • --notification can now accept --button1action to set a default action to take when a user clicks a notification. can be a URL or command:

    image

    e.g.

    --notification --title "<text>" --message "<text>" --button1action "open -a Safari.app"

    --notification --title "<text>" --message "<text>" --button1action "https://swiftdialog.app/"

  • Additionally, You can specify an additional action and define button labels :

    --notification --title "<text>" --message "<text>" --button1text "Do Something" --button1action "/do/something" --button2text "Do Something Else" --button2action "/do/something/else/"

    • --button1action will remain the default action if either the notification or button1 is actioned. button2action will only trigger if button2 is actioned.

List Items

  • Added "subtitle" option to listitems.

    Listitems can now have a subtitle. This expands the space used by all listitems and allows for up to 2 lines of additional descriptive text.

    --listitem "Some Item Title",subtitle="Some Item subtitle with additional details"

    image

    Advanced example courtesy of @dan-snelson and Setup Your Mac

    image

Window Controls

  • New --windowbuttons argument - shows the close, minimize and maximise/fullscreen buttons on the window

    image
    • This enables all buttons by default (the maximise/zoom button is only enabled if the window is also resizable).
    • Individual buttons can be selectively enabled by passing in one or more of close min or max as an argument, e.g, --windowbuttons min will only enable the minimise button
  • New --resizable option which enables the window to be resizable by clicking and dragging the window corners.

    • Using this option implies --moveable
    • NOTE: macOS will initiate new rezizable windows with the same window dimentions as the last run swiftdialog window. i.e. if a dialog has dimentions 800x600 when it is closed and a new resizable dialog is launched, it will also have dimentions 800x600 regardless of what --width or --height options are specified. Take this behaviour into account when using this option.

Other New Features

  • computer is a valid option wherever icon can be used (e.g. --icon computer). shows the visual representation of the device

    image
  • New text= for image sources. useful for using emoji as icons for example --icon text=🙂

  • New color= for --background and --bannerimage so you can use solid colours instead of images for those commands --background color=red --bannerimage colour=#12a4b1

  • New --bannerheight to specify an exact height for the banner

  • Add Missing System Font Weights and Colors - pr #321

  • Added --hidedefaultkeyboardaction argument. Changes the default "Return" or "Escape" keys to require cmd+shift. This helps mitigate against non-intentional dismissal of dialogs. #125

  • Added a property to non switch style checkboxes that allows them to affect button1. This is useful for terms and conditions style checkboxes where you want to disable the button until the user has agreed to the terms.

    • Example: dialog --checkbox "I Agree",enableButton1 --button1disabled
      image image
  • Added basic support for a date picker #224

    • Example: --textfield "Choose a date",isdate=true
    image
    • NOTE: There is no date validation at this point in time. This capability simply puts the selected date into the textfield.
  • Added an option to have live validation of textfields that have a format requirement using regex.

    • Enabled with the --textfieldlivevalidation argument

    dialog --textfield "Enter in 4 numbers",regex="^\d{4}$" --textfieldlivevalidation

    image

Fixes

  • json processing properly accepts numbers now so {"width" : 450} is acceptable (as is the current method where everything needs to be treated as a string)

  • Icons used in listitems are now width limited in addition to height - this is important for sf symbol rendering so they are all the same size

  • fixed an issue where float to string to float conversion (if/when it happens) would fail if the number format for the users locale was 1.234.567,80 (this may be an issue in swift with how CGFloat is represented as a string as regardless of locale the float is converted to a string with a period instead of a locale specific decimal point - e.g. 123 becomes 123.0