feat: Rename the card to advanced-camera-card (#1873)
Whilst the Frigate support in this card is the best among camera engines, the name incorrectly suggests that Frigate is a requirement. Instead, to broaden the appeal, change to more camera agnostic name. This does not suggest any change in priority, role or support for Frigate. This change is likely to be bug prone, due to the size of the rename -- the code contains 1500+ references to "Frigate" most of which make sense to rename, some which do not, all of which needed human assessment. - Closes #1298 BREAKING CHANGE: References to `frigate-card` in all kinds of configuration need to be updated to `advanced-camera-card`. An automated config upgrade should take care of the majority of usecases (click `Edit -> Upgrade -> Save`), though may not be perfect.
This commit is contained in:
@@ -9,7 +9,7 @@ import {
|
||||
import { property } from 'lit/decorators.js';
|
||||
import { createRef, ref, Ref } from 'lit/directives/ref.js';
|
||||
import selectStyle from '../scss/select.scss';
|
||||
import { contentsChanged, dispatchFrigateCardEvent } from '../utils/basic';
|
||||
import { contentsChanged, dispatchAdvancedCameraCardEvent } from '../utils/basic';
|
||||
import { ScopedRegistryHost } from '@lit-labs/scoped-registry-mixin';
|
||||
import { grSelectElements } from '../scoped-elements/gr-select';
|
||||
import isEqual from 'lodash-es/isEqual';
|
||||
@@ -26,7 +26,7 @@ type SelectElement = HTMLElement & {
|
||||
value: SelectValues;
|
||||
};
|
||||
|
||||
export class FrigateCardSelect extends ScopedRegistryHost(LitElement) {
|
||||
export class AdvancedCameraCardSelect extends ScopedRegistryHost(LitElement) {
|
||||
@property({ attribute: false, hasChanged: contentsChanged })
|
||||
public options?: SelectOption[];
|
||||
|
||||
@@ -73,7 +73,7 @@ export class FrigateCardSelect extends ScopedRegistryHost(LitElement) {
|
||||
// (even when the user has not interacted with the control). Do not
|
||||
// dispatch events for this.
|
||||
if (!initialValueSet) {
|
||||
dispatchFrigateCardEvent(this, 'select:change', value);
|
||||
dispatchAdvancedCameraCardEvent(this, 'select:change', value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -111,6 +111,6 @@ export class FrigateCardSelect extends ScopedRegistryHost(LitElement) {
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'frigate-card-select': FrigateCardSelect;
|
||||
'advanced-camera-card-select': AdvancedCameraCardSelect;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user