Skip to content
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

Adds Actions to allow Updating, Enabling, and Disabling Links #584

Merged
merged 1 commit into from
Jun 15, 2024

Conversation

Badgerati
Copy link
Owner

Description of the Change

Adds the following actions for Links:

  • Update-PodeWebLink
  • Enable-PodeWebLink
  • Disable-PodeWebLink

Adds a new -Disabled switch on New-PodeWebLink, and renames the -Source parameter to be -Url.

Examples

New-PodeWebCard -Name 'Link' -Content @(
    New-PodeWebLink -Value 'Google' -Url 'https://www.google.com' -Id 'link' -NewTab
)

New-PodeWebCard -Name 'Update Link' -Content @(
    New-PodeWebButtonGroup -Buttons @(
        New-PodeWebButton -Name 'Update to Goole' -ScriptBlock {
            Update-PodeWebLink -Id 'link' -Value 'Google' -Url 'https://www.google.com'
        }
        New-PodeWebButton -Name 'Update to DuckDuckGo' -ScriptBlock {
            Update-PodeWebLink -Id 'link' -Value 'DuckDuckGo' -Url 'https://www.duckduckgo.com'
        }
        New-PodeWebButton -Name 'Disable Link' -ScriptBlock {
            Disable-PodeWebLink -Id 'link'
        }
        New-PodeWebButton -Name 'Enable Link' -ScriptBlock {
            Enable-PodeWebLink -Id 'link'
        }
    )
)

@Badgerati Badgerati added the enhancement ⬆️ New feature or request label Jun 15, 2024
@Badgerati Badgerati added this to the 1.0.0 milestone Jun 15, 2024
@Badgerati Badgerati self-assigned this Jun 15, 2024
@Badgerati Badgerati merged commit 2f4ad3e into develop Jun 15, 2024
3 checks passed
@Badgerati Badgerati deleted the update_links branch June 15, 2024 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ⬆️ New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant