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:
@@ -3,7 +3,7 @@ import { LitElement } from 'lit';
|
||||
import { orderBy } from 'lodash-es';
|
||||
import { dispatchActionExecutionRequest } from '../card-controller/actions/utils/execution-request.js';
|
||||
import {
|
||||
FRIGATE_MENU_PRIORITY_MAX,
|
||||
MENU_PRIORITY_MAX,
|
||||
type ActionType,
|
||||
type ActionsConfig,
|
||||
type MenuConfig,
|
||||
@@ -28,7 +28,7 @@ export class MenuController {
|
||||
public setMenuConfig(config: MenuConfig): void {
|
||||
this._config = config;
|
||||
this._host.style.setProperty(
|
||||
'--frigate-card-menu-button-size',
|
||||
'--advanced-camera-card-menu-button-size',
|
||||
`${config.button_size}px`,
|
||||
);
|
||||
|
||||
@@ -164,8 +164,7 @@ export class MenuController {
|
||||
// If the menu is hidden, the buttons that toggle the menu must come
|
||||
// first.
|
||||
return (
|
||||
priority +
|
||||
(this._isHidingMenu() && button.permanent ? FRIGATE_MENU_PRIORITY_MAX : 0)
|
||||
priority + (this._isHidingMenu() && button.permanent ? MENU_PRIORITY_MAX : 0)
|
||||
);
|
||||
},
|
||||
['desc'],
|
||||
@@ -178,6 +177,6 @@ export class MenuController {
|
||||
|
||||
protected _isUnknownActionMenuToggleAction(action: ActionType): boolean {
|
||||
const parsedAction = convertActionToCardCustomAction(action);
|
||||
return !!parsedAction && parsedAction.frigate_card_action == 'menu_toggle';
|
||||
return !!parsedAction && parsedAction.advanced_camera_card_action == 'menu_toggle';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user