Bump prettier to v3 and format all files

This commit is contained in:
Felipe Santos
2024-06-10 00:29:50 -03:00
parent 2a637d92b9
commit fccb4c9afd
138 changed files with 6445 additions and 1678 deletions
@@ -100,20 +100,20 @@ export class PTZDigitalAction extends FrigateCardAction<PTZDigitialActionConfig>
this._action.ptz_action === 'zoom_in'
? STEP_ZOOM
: this._action.ptz_action === 'zoom_out'
? -STEP_ZOOM
: 0;
? -STEP_ZOOM
: 0;
const xDelta =
this._action.ptz_action === 'left'
? -STEP_PAN
: this._action.ptz_action === 'right'
? STEP_PAN
: 0;
? STEP_PAN
: 0;
const yDelta =
this._action.ptz_action === 'up'
? -STEP_PAN
: this._action.ptz_action === 'down'
? STEP_PAN
: 0;
? STEP_PAN
: 0;
return {
zoom: clamp(zoom + zoomDelta, ZOOM_MIN, ZOOM_MAX),
+1 -4
View File
@@ -39,10 +39,7 @@ export class PTZAction extends FrigateCardAction<PTZActionConfig> {
?.targetID ??
null;
const ptzCapabilities = ptzCameraID
? api
.getCameraManager()
.getCameraCapabilities(ptzCameraID)
?.getPTZCapabilities()
? api.getCameraManager().getCameraCapabilities(ptzCameraID)?.getPTZCapabilities()
: null;
const ptzConfiguration = ptzCameraID
? api.getCameraManager().getStore().getCameraConfig(ptzCameraID)?.ptz
@@ -4,6 +4,6 @@ import { FrigateCardAction } from './base';
export class SubstreamOffAction extends FrigateCardAction<GeneralActionConfig> {
public async execute(api: CardActionsAPI): Promise<void> {
api.getViewManager().setViewWithoutSubstream();
api.getViewManager().setViewWithoutSubstream();
}
}
+2 -2
View File
@@ -1,5 +1,5 @@
import { ActionType } from "../../config/types";
import { CardActionsAPI } from "../types";
import { ActionType } from '../../config/types';
import { CardActionsAPI } from '../types';
export interface AuxillaryActionConfig {
camera_image?: string;
+1 -2
View File
@@ -15,8 +15,7 @@ export class AutoUpdateManager {
*/
public startDefaultViewTimer(): void {
this._timer.stop();
const updateSeconds = this._api.getConfigManager().getConfig()
?.view.update_seconds;
const updateSeconds = this._api.getConfigManager().getConfig()?.view.update_seconds;
if (updateSeconds) {
this._timer.start(updateSeconds, () => {
if (this._isAutomatedUpdateAllowed()) {
+5 -2
View File
@@ -9,7 +9,10 @@ import { ActionExecutionRequestEventTarget } from './actions/utils/execution-req
export type ScrollCallback = () => void;
export type MenuToggleCallback = () => void;
export type CardHTMLElement = LitElement & ReactiveControllerHost & ActionEventTarget & ActionExecutionRequestEventTarget;
export type CardHTMLElement = LitElement &
ReactiveControllerHost &
ActionEventTarget &
ActionExecutionRequestEventTarget;
export class CardElementManager {
protected _api: CardElementAPI;
@@ -70,7 +73,7 @@ export class CardElementManager {
setOrRemoveAttribute(this._element, true, 'tabindex', '0');
this._api.getFullscreenManager().connect();
this._element.addEventListener(
'mousemove',
this._api.getInteractionManager().reportInteraction,
+1 -1
View File
@@ -66,7 +66,7 @@ export class HASSManager {
}
if (this._api.getConditionsManager().hasHAStateConditions()) {
this._api.getConditionsManager().setState({
this._api.getConditionsManager().setState({
state: this._hass.states,
user: this._hass.user,
});
+6 -1
View File
@@ -1,4 +1,9 @@
import { FrigateCardError, MESSAGE_TYPE_PRIORITIES, Message, MessageType } from '../types';
import {
FrigateCardError,
MESSAGE_TYPE_PRIORITIES,
Message,
MessageType,
} from '../types';
import { errorToConsole } from '../utils/basic';
import { CardMessageAPI } from './types';
+2 -2
View File
@@ -37,7 +37,7 @@ export interface CardActionsAPI {
getCameraManager(): CameraManager;
getCameraURLManager(): CameraURLManager;
getCardElementManager(): CardElementManager;
getConditionsManager(): ConditionsManager;
getConditionsManager(): ConditionsManager;
getConfigManager(): ConfigManager;
getDownloadManager(): DownloadManager;
getExpandManager(): ExpandManager;
@@ -256,7 +256,7 @@ export interface KeysState {
shift: boolean;
alt: boolean;
meta: boolean;
}
};
}
interface TaggedAutomation extends Automation {
tag?: unknown;