diff --git a/app/__init__.py b/app/__init__.py index f888bb2..0661c38 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -14,7 +14,7 @@ # 0.5.x -> beta # 1.0.0 -> first stable release # Bump this on every customer-visible release. -__version__ = '0.2.0' +__version__ = '0.2.1' def create_app(test_config=None): diff --git a/app/static/css/dashboard.css b/app/static/css/dashboard.css index e0555a3..64f1b6a 100644 --- a/app/static/css/dashboard.css +++ b/app/static/css/dashboard.css @@ -283,6 +283,12 @@ summary { gap: var(--space-2); } +.form-grid .form-submit { + margin-top: var(--space-4); + justify-self: center; + min-width: 10rem; +} + label { display: grid; gap: var(--space-1); @@ -609,6 +615,12 @@ button:active { cursor: pointer; } +.modal-backdrop:hover, +.modal-backdrop:active { + background: rgba(15, 23, 42, 0.55); + transform: none; +} + .modal-panel { position: relative; z-index: 1; @@ -653,6 +665,11 @@ button:active { background: rgba(0, 0, 0, 0.65); } +:root[data-theme="dark"] .modal-backdrop:hover, +:root[data-theme="dark"] .modal-backdrop:active { + background: rgba(0, 0, 0, 0.65); +} + :root[data-theme="dark"] .modal-close { border-color: rgba(255, 255, 255, 0.25); color: hsl(220, 18%, 82%); diff --git a/app/static/js/dashboard-app.js b/app/static/js/dashboard-app.js index 5b24123..19517bd 100644 --- a/app/static/js/dashboard-app.js +++ b/app/static/js/dashboard-app.js @@ -1,6 +1,9 @@ import './components/device-card.js'; import { formatRelativeTime } from './lib/strings.js'; +const ADD_DEVICE_TOGGLE_LABEL = 'Add a device'; +const ADD_DEVICE_MODAL_LABEL = 'Add a TinyPilot device'; +const ADD_DEVICE_SUBMIT_LABEL = 'Add device'; const DEVICES_PER_PAGE = 4; const CONNECTED_STATUS_REFRESH_INTERVAL_MS = 30_000; @@ -26,7 +29,7 @@ class DashboardApp extends HTMLElement { ${dashboardVersion ? `v${dashboardVersion}` : ''}
- +
@@ -38,7 +41,7 @@ class DashboardApp extends HTMLElement { @@ -81,7 +84,7 @@ class DashboardApp extends HTMLElement { _bind() { const e = this._elements; - e.addDeviceToggle.textContent = 'Add a device'; + e.addDeviceToggle.textContent = ADD_DEVICE_TOGGLE_LABEL; e.addDeviceToggle.addEventListener('click', () => { if (e.addDeviceModal.hasAttribute('hidden')) { this._openAddDeviceModal(); @@ -133,7 +136,7 @@ class DashboardApp extends HTMLElement { } _addDeviceModalHeadingText() { - return this._allDevices.length === 0 ? 'Add your first device' : 'Add a device'; + return ADD_DEVICE_MODAL_LABEL; } _syncAddDeviceModalState() {