Skip to content

Commit

Permalink
Merge branch 'master' into ui-snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
srimanachanta authored Oct 12, 2023
2 parents 53d68df + 8b9a198 commit 649c512
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 18 deletions.
3 changes: 2 additions & 1 deletion photon-client/src/assets/images/loading.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion photon-client/src/assets/images/logoLarge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion photon-client/src/assets/images/logoSmall.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions photon-client/src/components/app/photon-3d-visualizer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ import { onBeforeUnmount, onMounted, watchEffect } from "vue";
import {
ArrowHelper,
BoxGeometry,
Color,
ConeGeometry,
Mesh,
MeshNormalMaterial,
type Object3D,
PerspectiveCamera,
Quaternion,
Scene,
Vector3,
Color,
WebGLRenderer
} from "three";
import { TrackballControls } from "three/examples/jsm/controls/TrackballControls";
import { type Object3D } from "three";
const props = defineProps<{
targets: PhotonTarget[];
Expand Down
2 changes: 1 addition & 1 deletion photon-client/src/components/app/photon-log-view.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { computed, ref, inject } from "vue";
import { computed, inject, ref } from "vue";
import { LogLevel, type LogMessage } from "@/types/SettingTypes";
import { useStateStore } from "@/stores/StateStore";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { computed, ref } from "vue";
import { useCameraSettingsStore } from "@/stores/settings/CameraSettingsStore";
import { CalibrationBoardTypes, type VideoFormat, type Resolution } from "@/types/SettingTypes";
import { CalibrationBoardTypes, type Resolution, type VideoFormat } from "@/types/SettingTypes";
import JsPDF from "jspdf";
import { font as PromptRegular } from "@/assets/fonts/PromptRegular";
import MonoLogo from "@/assets/images/logoMono.png";
Expand Down Expand Up @@ -150,7 +150,10 @@ const importCalibrationFromCalibDB = ref();
const openCalibUploadPrompt = () => {
importCalibrationFromCalibDB.value.click();
};
const readImportedCalibration = ({ files }: { files: FileList }) => {
const readImportedCalibration = (payload: Event) => {
if (payload.target == null || !payload.target?.files) return;
const files: FileList = payload.target.files as FileList;
files[0].text().then((text) => {
useCameraSettingsStore()
.importCalibDB({ payload: text, filename: files[0].name })
Expand Down
5 changes: 4 additions & 1 deletion photon-client/src/components/settings/DeviceControlCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,17 @@ const offlineUpdate = ref();
const openOfflineUpdatePrompt = () => {
offlineUpdate.value.click();
};
const handleOfflineUpdate = ({ files }: { files: FileList }) => {
const handleOfflineUpdate = (payload: Event) => {
useStateStore().showSnackbarMessage({
message: "New Software Upload in Progress...",
color: "secondary",
timeout: -1
});
const formData = new FormData();
if (payload.target == null || !payload.target?.files) return;
const files: FileList = payload.target.files as FileList;
formData.append("jarData", files[0]);
axios
Expand Down
7 changes: 2 additions & 5 deletions photon-client/src/stores/settings/CameraSettingsStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import { PlaceholderCameraSettings } from "@/types/SettingTypes";
import { useStateStore } from "@/stores/StateStore";
import type { WebsocketCameraSettingsUpdate } from "@/types/WebsocketDataTypes";
import { WebsocketPipelineType } from "@/types/WebsocketDataTypes";
import type { ActiveConfigurablePipelineSettings, ActivePipelineSettings } from "@/types/PipelineTypes";
import type { PipelineType } from "@/types/PipelineTypes";
import type { ActiveConfigurablePipelineSettings, ActivePipelineSettings, PipelineType } from "@/types/PipelineTypes";
import axios from "axios";

interface CameraSettingsStore {
Expand Down Expand Up @@ -174,9 +173,7 @@ export const useCameraSettingsStore = defineStore("cameraSettings", {
settings: Partial<ActivePipelineSettings>,
cameraIndex: number = useStateStore().currentCameraIndex
) {
Object.entries(settings).forEach(([k, v]) => {
this.cameras[cameraIndex].pipelineSettings[k] = v;
});
Object.assign(this.cameras[cameraIndex].pipelineSettings, settings);
},
/**
* Change the nickname of the currently selected pipeline of the provided camera.
Expand Down
4 changes: 2 additions & 2 deletions photon-client/src/stores/settings/GeneralSettingsStore.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { defineStore } from "pinia";
import type {
ConfigurableNetworkSettings,
GeneralSettings,
LightingSettings,
MetricData,
NetworkSettings,
ConfigurableNetworkSettings
NetworkSettings
} from "@/types/SettingTypes";
import { NetworkConnectionType } from "@/types/SettingTypes";
import { useStateStore } from "@/stores/StateStore";
Expand Down
3 changes: 1 addition & 2 deletions photon-client/src/types/WebsocketDataTypes.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { GeneralSettings, LightingSettings, MetricData, NetworkSettings } from "@/types/SettingTypes";
import type { GeneralSettings, LightingSettings, LogLevel, MetricData, NetworkSettings } from "@/types/SettingTypes";
import type { ActivePipelineSettings } from "@/types/PipelineTypes";
import type { LogLevel } from "@/types/SettingTypes";

export interface WebsocketLogMessage {
logMessage: {
Expand Down

0 comments on commit 649c512

Please sign in to comment.