From c786ab192598d95150454a75a02b75c8b98f79ea Mon Sep 17 00:00:00 2001 From: Adam Driscoll Date: Tue, 2 Jun 2020 11:12:10 -0600 Subject: [PATCH] Lot's of fixes --- src/UniversalDashboard.Community.psm1 | 2 +- src/v2/Components/ud-button.jsx | 20 +- src/v2/Components/ud-footer.jsx | 13 +- src/v2/Components/ud-input.jsx | 2 +- src/v2/Components/ud-monitor.jsx | 12 +- src/v2/Scripts/error.ps1 | 17 ++ src/v2/Scripts/footer.ps1 | 23 ++ src/v2/Scripts/input.ps1 | 276 ++++++++++++++++++++ src/v2/Scripts/interactive/Show-Toast.ps1 | 2 +- src/v2/Scripts/monitor.ps1 | 68 +++++ src/v2/Scripts/page.ps1 | 27 +- src/v2/Scripts/row.ps1 | 4 +- src/v2/Scripts/sidenav.ps1 | 24 +- src/v2/Tests/button.tests.ps1 | 2 +- src/v2/Tests/dashboard.ps1 | 145 ++++++++++- src/v2/Tests/footer.tests.ps1 | 7 + src/v2/Tests/input.tests.ps1 | 280 +++++++++++++++++++++ src/v2/Tests/monitor.tests.ps1 | 6 + src/v2/Tests/page.tests.ps1 | 9 + src/v2/Tests/row.tests.ps1 | 4 + src/v2/Tests/sidenav.tests.ps1 | 10 + src/v2/Tests/toast.tests.ps1 | 8 + src/v2/UniversalDashboard.Materialize.psm1 | 9 +- src/v2/app/basics/lazy-element.jsx | 5 +- src/v2/app/ud-dashboard.jsx | 29 ++- src/v2/package-lock.json | 21 ++ src/v2/package.json | 23 +- src/v2/tests.build.ps1 | 4 - src/v3/Components/button.jsx | 2 +- src/v3/Components/expansion-panel.jsx | 12 +- src/v3/Components/paper.jsx | 2 +- src/v3/Scripts/container.ps1 | 9 +- src/v3/Scripts/drawer.ps1 | 8 +- src/v3/Scripts/dynamic.ps1 | 4 +- src/v3/Scripts/error.ps1 | 17 ++ src/v3/Scripts/expansion-panel.ps1 | 9 +- src/v3/Scripts/form.ps1 | 9 +- src/v3/Scripts/grid.ps1 | 9 +- src/v3/Scripts/list.ps1 | 17 +- src/v3/Scripts/page.ps1 | 2 +- src/v3/Scripts/paper.ps1 | 8 +- src/v3/Scripts/splitpane.ps1 | 7 +- src/v3/Scripts/stepper.ps1 | 8 +- src/v3/Scripts/tabs.ps1 | 18 +- src/v3/Tests/expansion-panel.tests.ps1 | 5 + src/v3/app/ud-dashboard.jsx | 29 ++- src/v3/build.ps1 | 1 + src/v3/dashboard.ps1 | 6 + src/v3/example.ps1 | 7 + src/v3/example/dashboard.ps1 | 143 ++++------- src/v3/example/start.ps1 | 4 +- src/v3/package-lock.json | 9 + src/v3/package.json | 33 +-- src/v3/tests.build.ps1 | 20 +- 54 files changed, 1239 insertions(+), 211 deletions(-) create mode 100644 src/v2/Scripts/error.ps1 create mode 100644 src/v2/Scripts/footer.ps1 create mode 100644 src/v2/Scripts/input.ps1 create mode 100644 src/v2/Scripts/monitor.ps1 create mode 100644 src/v2/Tests/footer.tests.ps1 create mode 100644 src/v2/Tests/input.tests.ps1 create mode 100644 src/v2/Tests/monitor.tests.ps1 create mode 100644 src/v2/Tests/page.tests.ps1 create mode 100644 src/v2/Tests/sidenav.tests.ps1 create mode 100644 src/v2/Tests/toast.tests.ps1 create mode 100644 src/v3/Scripts/error.ps1 create mode 100644 src/v3/example.ps1 diff --git a/src/UniversalDashboard.Community.psm1 b/src/UniversalDashboard.Community.psm1 index aa1a1c37..95dba48c 100644 --- a/src/UniversalDashboard.Community.psm1 +++ b/src/UniversalDashboard.Community.psm1 @@ -1,4 +1,4 @@ -Write-Warning -Message "This module is no longer supported. Universal Dashboard functionality has been moved into PowerShell Universal. To learn more, visit: https://www.ironmansoftware.com/powershell-universal" +Write-Warning -Message "This module is no longer supported. Universal Dashboard functionality has been moved into PowerShell Universal. You can still host your UD Community dashboards for free within PowerShell Universal. To learn more, visit: https://www.ironmansoftware.com/powershell-universal" # SIG # Begin signature block # MIIXvwYJKoZIhvcNAQcCoIIXsDCCF6wCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR diff --git a/src/v2/Components/ud-button.jsx b/src/v2/Components/ud-button.jsx index 46fb5d1f..18425335 100644 --- a/src/v2/Components/ud-button.jsx +++ b/src/v2/Components/ud-button.jsx @@ -64,8 +64,23 @@ export default class UDButton extends React.Component { } var icon = null; + var content = this.state.text; if (this.state.icon) { - icon = + + var style = {} + const margin = this.state.floating || !this.state.text ? 'unset' : '5px'; + if (margin === '5px' && this.props.iconAlignment === "left") + { + style["marginRight"] = margin; + } + + if (margin === '5px' && this.props.iconAlignment === "right") + { + style["marginLeft"] = margin; + } + + icon = + content = this.props.iconAlignment === "left" ? [icon, content] : [content, icon]; } return } } diff --git a/src/v2/Components/ud-footer.jsx b/src/v2/Components/ud-footer.jsx index 8b996348..2529adcc 100644 --- a/src/v2/Components/ud-footer.jsx +++ b/src/v2/Components/ud-footer.jsx @@ -1,10 +1,16 @@ import React from 'react'; import UdLink from './ud-link.jsx' +const style = { + position: 'absolute', + width: '100%', + bottom: '0' +} + export default class UdFooter extends React.Component { render() { if (this.props.footer == null) { - return