Hotfix for tests not running
Hotfix for tests not running
This commit is contained in:
commit
78f6275846
|
|
@ -8,7 +8,7 @@
|
||||||
import { AppElement, html, css } from './AppElement.js'
|
import { AppElement, html, css } from './AppElement.js'
|
||||||
import { customElement, property, state } from 'lit/decorators.js'
|
import { customElement, property, state } from 'lit/decorators.js'
|
||||||
import ChartDataLabels from 'chartjs-plugin-datalabels'
|
import ChartDataLabels from 'chartjs-plugin-datalabels'
|
||||||
import { Chart, Filler, Legend, LinearScale, LineController, LineElement, PointElement } from 'chart.js/auto'
|
import { Chart, Filler, Legend, LinearScale, LineController, LineElement, PointElement } from 'chart.js'
|
||||||
|
|
||||||
@customElement('dashboard-force-curve')
|
@customElement('dashboard-force-curve')
|
||||||
export class DashboardForceCurve extends AppElement {
|
export class DashboardForceCurve extends AppElement {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
import { AppElement, html, css } from './AppElement.js'
|
import { AppElement, html, css } from './AppElement.js'
|
||||||
import { customElement, property, state } from 'lit/decorators.js'
|
import { customElement, property, state } from 'lit/decorators.js'
|
||||||
import './SettingsDialog'
|
import './SettingsDialog.js'
|
||||||
import { icon_settings } from '../lib/icons.js'
|
import { icon_settings } from '../lib/icons.js'
|
||||||
import { DASHBOARD_METRICS } from '../store/dashboardMetrics.js'
|
import { DASHBOARD_METRICS } from '../store/dashboardMetrics.js'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
import { html } from 'lit'
|
|
||||||
import '../components/DashboardMetric.js'
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Open Rowing Monitor, https://github.com/laberning/openrowingmonitor
|
Open Rowing Monitor, https://github.com/laberning/openrowingmonitor
|
||||||
|
|
||||||
|
|
@ -61,14 +58,3 @@ export function formatNumber (value, decimalPlaces = 0) {
|
||||||
|
|
||||||
return Math.round(value * decimal) / decimal
|
return Math.round(value * decimal) / decimal
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Helper function to create a simple metric tile
|
|
||||||
*
|
|
||||||
* @param {string | number} value The metric to show
|
|
||||||
* @param {string} unit The unit of the metric.
|
|
||||||
* @param {string | import('lit').TemplateResult<2>} icon The number of decimal places to round to (default: 0).
|
|
||||||
*/
|
|
||||||
export function simpleMetricFactory (value = '--', unit = '', icon = '') {
|
|
||||||
return html`<dashboard-metric .icon=${icon} .unit=${unit} .value=${value}></dashboard-metric>`
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
import { html } from 'lit'
|
import { html } from 'lit'
|
||||||
import { simpleMetricFactory, formatDistance, formatNumber, secondsToPace } from '../lib/helper'
|
import { formatDistance, formatNumber, secondsToPace } from '../lib/helper'
|
||||||
import { icon_bolt, icon_clock, icon_fire, icon_heartbeat, icon_paddle, icon_route, icon_stopwatch, rower_icon } from '../lib/icons'
|
import { icon_bolt, icon_clock, icon_fire, icon_heartbeat, icon_paddle, icon_route, icon_stopwatch, rower_icon } from '../lib/icons'
|
||||||
import '../components/DashboardForceCurve.js'
|
import '../components/DashboardForceCurve.js'
|
||||||
import '../components/DashboardActions.js'
|
import '../components/DashboardActions.js'
|
||||||
|
import '../components/DashboardMetric.js'
|
||||||
import '../components/BatteryIcon.js'
|
import '../components/BatteryIcon.js'
|
||||||
|
|
||||||
export const DASHBOARD_METRICS = {
|
export const DASHBOARD_METRICS = {
|
||||||
|
|
@ -68,3 +69,14 @@ export const DASHBOARD_METRICS = {
|
||||||
|
|
||||||
actions: { displayName: 'Actions', size: 1, template: (_, config) => html`<dashboard-actions .config=${config}></dashboard-actions>` }
|
actions: { displayName: 'Actions', size: 1, template: (_, config) => html`<dashboard-actions .config=${config}></dashboard-actions>` }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper function to create a simple metric tile
|
||||||
|
*
|
||||||
|
* @param {string | number} value The metric to show
|
||||||
|
* @param {string} unit The unit of the metric.
|
||||||
|
* @param {string | import('lit').TemplateResult<2>} icon The number of decimal places to round to (default: 0).
|
||||||
|
*/
|
||||||
|
function simpleMetricFactory (value = '--', unit = '', icon = '') {
|
||||||
|
return html`<dashboard-metric .icon=${icon} .unit=${unit} .value=${value}></dashboard-metric>`
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue