Clean up client dependencies (#1954)

Co-authored-by: samfreund <techguy763@gmail.com>
Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
This commit is contained in:
Graham
2025-05-07 12:06:07 -04:00
committed by GitHub
parent bec8092660
commit 74322affde
13 changed files with 3250 additions and 1537 deletions

View File

@@ -1,6 +1,19 @@
<script setup lang="ts">
import { PVCameraInfo } from "@/types/SettingTypes";
import _ from "lodash";
function isEqual<T>(a: T, b: T): boolean {
if (a === b) {
return true;
}
const bothAreObjects = a && b && typeof a === "object" && typeof b === "object";
return (
bothAreObjects &&
Object.keys(a).length === Object.keys(b).length &&
Object.entries(a).every(([k, v]) => isEqual(v, b[k as keyof T]))
);
}
const { saved, current } = defineProps({
saved: {
@@ -105,7 +118,7 @@ const cameraInfoFor = (camera: PVCameraInfo): any => {
</tr>
<tr
v-if="cameraInfoFor(saved).otherPaths !== undefined && cameraInfoFor(saved).otherPaths !== null"
:class="!_.isEqual(cameraInfoFor(saved).otherPaths, cameraInfoFor(current).otherPaths) ? 'mismatch' : ''"
:class="isEqual(cameraInfoFor(saved).otherPaths, cameraInfoFor(current).otherPaths) ? '' : 'mismatch'"
>
<td>Other Paths:</td>
<td>{{ cameraInfoFor(saved).otherPaths }}</td>