2023-08-21 01:51:35 -04:00
|
|
|
<script setup lang="ts">
|
2025-06-29 00:18:54 -04:00
|
|
|
import { computed, ref } from "vue";
|
2023-08-21 01:51:35 -04:00
|
|
|
import CamerasCard from "@/components/dashboard/CamerasCard.vue";
|
|
|
|
|
import CameraAndPipelineSelectCard from "@/components/dashboard/CameraAndPipelineSelectCard.vue";
|
|
|
|
|
import StreamConfigCard from "@/components/dashboard/StreamConfigCard.vue";
|
|
|
|
|
import PipelineConfigCard from "@/components/dashboard/ConfigOptions.vue";
|
|
|
|
|
import { useCameraSettingsStore } from "@/stores/settings/CameraSettingsStore";
|
|
|
|
|
import { useStateStore } from "@/stores/StateStore";
|
2025-07-04 16:43:17 -05:00
|
|
|
import { useSettingsStore } from "@/stores/settings/GeneralSettingsStore";
|
2025-08-04 01:15:33 -04:00
|
|
|
import { useTheme } from "vuetify";
|
|
|
|
|
|
|
|
|
|
const theme = useTheme();
|
2025-10-21 17:53:22 -07:00
|
|
|
import { PlaceholderCameraSettings } from "@/types/SettingTypes";
|
2023-08-21 01:51:35 -04:00
|
|
|
|
|
|
|
|
const cameraViewType = computed<number[]>({
|
|
|
|
|
get: (): number[] => {
|
|
|
|
|
// Only show the input stream in Color Picking Mode
|
2023-08-31 16:56:58 -04:00
|
|
|
if (useStateStore().colorPickingMode) return [0];
|
2023-08-21 01:51:35 -04:00
|
|
|
|
2025-11-16 18:15:42 -06:00
|
|
|
// Only show the output stream in Driver Mode or Calibration Mode or Focus Mode
|
|
|
|
|
if (
|
|
|
|
|
useCameraSettingsStore().isDriverMode ||
|
|
|
|
|
useCameraSettingsStore().isCalibrationMode ||
|
|
|
|
|
useCameraSettingsStore().isFocusMode
|
|
|
|
|
)
|
|
|
|
|
return [1];
|
2023-08-21 01:51:35 -04:00
|
|
|
|
|
|
|
|
const ret: number[] = [];
|
2023-08-31 16:56:58 -04:00
|
|
|
if (useCameraSettingsStore().currentPipelineSettings.inputShouldShow) {
|
2023-08-21 01:51:35 -04:00
|
|
|
ret.push(0);
|
|
|
|
|
}
|
2023-08-31 16:56:58 -04:00
|
|
|
if (useCameraSettingsStore().currentPipelineSettings.outputShouldShow) {
|
2023-08-21 01:51:35 -04:00
|
|
|
ret.push(1);
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-31 16:56:58 -04:00
|
|
|
if (ret.length === 0) return [0];
|
2023-08-21 01:51:35 -04:00
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
|
},
|
2023-08-31 16:56:58 -04:00
|
|
|
set: (v) => {
|
|
|
|
|
useCameraSettingsStore().changeCurrentPipelineSetting(
|
|
|
|
|
{
|
|
|
|
|
inputShouldShow: v.includes(0),
|
|
|
|
|
outputShouldShow: v.includes(1)
|
|
|
|
|
},
|
|
|
|
|
true
|
|
|
|
|
);
|
2023-08-21 01:51:35 -04:00
|
|
|
}
|
|
|
|
|
});
|
2025-01-01 03:04:20 -05:00
|
|
|
|
2025-01-01 14:18:44 -05:00
|
|
|
const arducamWarningShown = computed<boolean>(() => {
|
2025-01-03 18:50:25 -05:00
|
|
|
return Object.values(useCameraSettingsStore().cameras).some(
|
2025-01-01 14:18:44 -05:00
|
|
|
(c) =>
|
|
|
|
|
c.cameraQuirks?.quirks?.ArduCamCamera === true &&
|
|
|
|
|
!(
|
|
|
|
|
c.cameraQuirks?.quirks?.ArduOV2311Controls === true ||
|
|
|
|
|
c.cameraQuirks?.quirks?.ArduOV9281Controls === true ||
|
|
|
|
|
c.cameraQuirks?.quirks?.ArduOV9782Controls === true
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
});
|
2025-06-29 00:18:54 -04:00
|
|
|
|
2025-10-21 17:53:22 -07:00
|
|
|
const cameraMismatchWarningShown = computed<boolean>(() => {
|
|
|
|
|
return (
|
|
|
|
|
Object.values(useCameraSettingsStore().cameras)
|
|
|
|
|
// Ignore placeholder camera
|
2025-12-07 01:35:49 -05:00
|
|
|
.filter((camera) => camera !== PlaceholderCameraSettings)
|
|
|
|
|
.some((camera) => camera.mismatch)
|
2025-10-21 17:53:22 -07:00
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|
2025-07-04 16:43:17 -05:00
|
|
|
const conflictingHostnameShown = computed<boolean>(() => {
|
|
|
|
|
return useSettingsStore().general.conflictingHostname;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const conflictingCameraShown = computed<boolean>(() => {
|
|
|
|
|
return useSettingsStore().general.conflictingCameras.length > 0;
|
|
|
|
|
});
|
|
|
|
|
|
2026-05-16 07:41:59 -07:00
|
|
|
const fpsLimitedCameras = computed<string>(() => {
|
|
|
|
|
return Object.values(useCameraSettingsStore().cameras)
|
|
|
|
|
.filter((c) => c.fpsLimit > 0)
|
|
|
|
|
.map((c) => c.nickname)
|
|
|
|
|
.join(", ");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const disabledCameras = computed<string>(() => {
|
|
|
|
|
return Object.values(useCameraSettingsStore().cameras)
|
|
|
|
|
.filter((c) => !c.isEnabled)
|
|
|
|
|
.map((c) => c.nickname)
|
|
|
|
|
.join(", ");
|
2025-12-29 23:01:10 -06:00
|
|
|
});
|
|
|
|
|
|
2025-06-29 00:18:54 -04:00
|
|
|
const showCameraSetupDialog = ref(useCameraSettingsStore().needsCameraConfiguration);
|
2023-08-21 01:51:35 -04:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2023-08-31 16:56:58 -04:00
|
|
|
<v-container class="pa-3" fluid>
|
2025-08-04 01:15:33 -04:00
|
|
|
<v-alert
|
Clean up spacing and other things in various parts of the UI (#1972)
## Description
After the Vue 3 upgrade, the spacing for various UI elements was left
inconsistent in many places. Dialogs were hit especially hard and had
some very inconsistent spacing. Additionally, the 24 pixels of padding
around all cards was noted as a waste of space and unnecessary, so it
has been shrunk down to 20 pixels to make the UI a tiny bit more compact
and to make it visually closer to some parts of the UI that have 16
pixels of padding (the camera views are the most notable example).
Padding between input elements has also been reduced to 20 pixels (this
required some hackery to get consistent sizes on input elements, since
switches and sliders have different heights.)
Some other minor UI tweaks were made, such as removing the divider
between dialog contents and dialog buttons because it visually looks
better, shrinking the banner padding so it doesn't displace as much
content, making the banner background one uniform color instead of a
highlight around the icon, fixing the targets tab so that the columns
stop shifting around when the values change, preserving newlines in the
log view, cleaning up the object detection UI, and making the import
dialogs have consistently inset input elements.
Old dashboard:

New dashboard:

Old Camera tab:

New Camera tab:

Old Calibration Info:

New Calibration Info:

Old Log Viewer:

New Log Viewer:

Old Pipeline Creation Dialog:

New Pipeline Creation Dialog:

Old Factory Reset:

New Factory Reset:

Old Pipeline Change:

New Pipeline Change:

Old Import Dialog:

New Import Dialog:

## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
2025-07-12 00:02:23 -04:00
|
|
|
v-if="arducamWarningShown"
|
|
|
|
|
class="mb-3"
|
2025-08-04 01:15:33 -04:00
|
|
|
color="error"
|
|
|
|
|
density="compact"
|
Clean up spacing and other things in various parts of the UI (#1972)
## Description
After the Vue 3 upgrade, the spacing for various UI elements was left
inconsistent in many places. Dialogs were hit especially hard and had
some very inconsistent spacing. Additionally, the 24 pixels of padding
around all cards was noted as a waste of space and unnecessary, so it
has been shrunk down to 20 pixels to make the UI a tiny bit more compact
and to make it visually closer to some parts of the UI that have 16
pixels of padding (the camera views are the most notable example).
Padding between input elements has also been reduced to 20 pixels (this
required some hackery to get consistent sizes on input elements, since
switches and sliders have different heights.)
Some other minor UI tweaks were made, such as removing the divider
between dialog contents and dialog buttons because it visually looks
better, shrinking the banner padding so it doesn't displace as much
content, making the banner background one uniform color instead of a
highlight around the icon, fixing the targets tab so that the columns
stop shifting around when the values change, preserving newlines in the
log view, cleaning up the object detection UI, and making the import
dialogs have consistently inset input elements.
Old dashboard:

New dashboard:

Old Camera tab:

New Camera tab:

Old Calibration Info:

New Calibration Info:

Old Log Viewer:

New Log Viewer:

Old Pipeline Creation Dialog:

New Pipeline Creation Dialog:

Old Factory Reset:

New Factory Reset:

Old Pipeline Change:

New Pipeline Change:

Old Import Dialog:

New Import Dialog:

## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
2025-07-12 00:02:23 -04:00
|
|
|
icon="mdi-alert-circle-outline"
|
2026-03-24 17:49:56 -05:00
|
|
|
:variant="theme.global.current.value.dark ? 'tonal' : 'elevated'"
|
Clean up spacing and other things in various parts of the UI (#1972)
## Description
After the Vue 3 upgrade, the spacing for various UI elements was left
inconsistent in many places. Dialogs were hit especially hard and had
some very inconsistent spacing. Additionally, the 24 pixels of padding
around all cards was noted as a waste of space and unnecessary, so it
has been shrunk down to 20 pixels to make the UI a tiny bit more compact
and to make it visually closer to some parts of the UI that have 16
pixels of padding (the camera views are the most notable example).
Padding between input elements has also been reduced to 20 pixels (this
required some hackery to get consistent sizes on input elements, since
switches and sliders have different heights.)
Some other minor UI tweaks were made, such as removing the divider
between dialog contents and dialog buttons because it visually looks
better, shrinking the banner padding so it doesn't displace as much
content, making the banner background one uniform color instead of a
highlight around the icon, fixing the targets tab so that the columns
stop shifting around when the values change, preserving newlines in the
log view, cleaning up the object detection UI, and making the import
dialogs have consistently inset input elements.
Old dashboard:

New dashboard:

Old Camera tab:

New Camera tab:

Old Calibration Info:

New Calibration Info:

Old Log Viewer:

New Log Viewer:

Old Pipeline Creation Dialog:

New Pipeline Creation Dialog:

Old Factory Reset:

New Factory Reset:

Old Pipeline Change:

New Pipeline Change:

Old Import Dialog:

New Import Dialog:

## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
2025-07-12 00:02:23 -04:00
|
|
|
>
|
2025-08-04 01:15:33 -04:00
|
|
|
<span>
|
|
|
|
|
Arducam camera detected! Please configure the camera model in the <a href="#/cameras">Camera tab</a>!
|
2025-07-04 16:43:17 -05:00
|
|
|
</span>
|
2025-08-04 01:15:33 -04:00
|
|
|
</v-alert>
|
|
|
|
|
<v-alert
|
2025-07-04 16:43:17 -05:00
|
|
|
v-if="conflictingHostnameShown"
|
2025-01-01 14:18:44 -05:00
|
|
|
class="mb-3"
|
2025-08-04 01:15:33 -04:00
|
|
|
color="error"
|
|
|
|
|
density="compact"
|
2025-01-01 14:18:44 -05:00
|
|
|
icon="mdi-alert-circle-outline"
|
2026-03-24 17:49:56 -05:00
|
|
|
:variant="theme.global.current.value.dark ? 'tonal' : 'elevated'"
|
2025-01-01 14:18:44 -05:00
|
|
|
>
|
2025-08-04 01:15:33 -04:00
|
|
|
<span>
|
|
|
|
|
Conflicting hostname detected! Please change the hostname in the <a href="#/settings">Settings tab</a>!
|
2025-07-04 16:43:17 -05:00
|
|
|
</span>
|
2025-08-04 01:15:33 -04:00
|
|
|
</v-alert>
|
2025-12-29 23:01:10 -06:00
|
|
|
<v-alert
|
2026-05-16 07:41:59 -07:00
|
|
|
v-if="fpsLimitedCameras"
|
2025-12-29 23:01:10 -06:00
|
|
|
class="mb-3"
|
|
|
|
|
color="error"
|
|
|
|
|
density="compact"
|
|
|
|
|
icon="mdi-alert-circle-outline"
|
2026-03-24 17:49:56 -05:00
|
|
|
:variant="theme.global.current.value.dark ? 'tonal' : 'elevated'"
|
2025-12-29 23:01:10 -06:00
|
|
|
>
|
|
|
|
|
<span
|
2026-05-16 07:41:59 -07:00
|
|
|
>{{ fpsLimitedCameras }} have an FPS limit set! This may cause performance issues. Check your logs for more
|
2025-12-29 23:01:10 -06:00
|
|
|
information.
|
|
|
|
|
</span>
|
|
|
|
|
</v-alert>
|
2026-05-16 07:41:59 -07:00
|
|
|
<v-alert
|
|
|
|
|
v-if="disabledCameras"
|
|
|
|
|
class="mb-3"
|
|
|
|
|
color="error"
|
|
|
|
|
density="compact"
|
|
|
|
|
icon="mdi-alert-circle-outline"
|
|
|
|
|
:variant="theme.global.current.value.dark ? 'tonal' : 'elevated'"
|
|
|
|
|
>
|
|
|
|
|
<span
|
|
|
|
|
>{{ disabledCameras }} are disabled! This may cause performance issues. Check your logs for more information.
|
|
|
|
|
</span>
|
|
|
|
|
</v-alert>
|
2025-08-04 01:15:33 -04:00
|
|
|
<v-alert
|
2025-07-04 16:43:17 -05:00
|
|
|
v-if="conflictingCameraShown"
|
|
|
|
|
class="mb-3"
|
2025-08-04 01:15:33 -04:00
|
|
|
color="error"
|
|
|
|
|
density="compact"
|
2025-07-04 16:43:17 -05:00
|
|
|
icon="mdi-alert-circle-outline"
|
2026-03-24 17:49:56 -05:00
|
|
|
:variant="theme.global.current.value.dark ? 'tonal' : 'elevated'"
|
2025-07-04 16:43:17 -05:00
|
|
|
>
|
|
|
|
|
<span
|
2025-08-04 01:15:33 -04:00
|
|
|
>Conflicting camera name(s) detected! Please change the name(s) of
|
2025-07-04 16:43:17 -05:00
|
|
|
{{ useSettingsStore().general.conflictingCameras }}!
|
2025-01-01 14:18:44 -05:00
|
|
|
</span>
|
2025-08-04 01:15:33 -04:00
|
|
|
</v-alert>
|
2025-10-21 17:53:22 -07:00
|
|
|
<v-banner
|
|
|
|
|
v-if="cameraMismatchWarningShown"
|
|
|
|
|
v-model="cameraMismatchWarningShown"
|
|
|
|
|
rounded
|
|
|
|
|
color="error"
|
|
|
|
|
dark
|
|
|
|
|
class="mb-3"
|
|
|
|
|
icon="mdi-alert-circle-outline"
|
|
|
|
|
>
|
|
|
|
|
<span
|
|
|
|
|
>Camera Mismatch Detected! Visit the <a href="#/cameraConfigs">Camera Matching</a> page for more information.
|
|
|
|
|
Note: Camera matching is done by USB port. Ensure cameras are plugged into the same USB ports as when they were
|
|
|
|
|
activated.
|
|
|
|
|
</span>
|
|
|
|
|
</v-banner>
|
2025-05-06 18:21:41 -04:00
|
|
|
<v-row no-gutters>
|
2023-08-31 16:56:58 -04:00
|
|
|
<v-col cols="12" class="pb-3 pr-lg-3" lg="8" align-self="stretch">
|
2023-08-21 01:51:35 -04:00
|
|
|
<CamerasCard v-model="cameraViewType" />
|
|
|
|
|
</v-col>
|
2023-08-31 16:56:58 -04:00
|
|
|
<v-col cols="12" class="pb-3" lg="4" style="display: flex; flex-direction: column" align-self="stretch">
|
2023-08-21 01:51:35 -04:00
|
|
|
<CameraAndPipelineSelectCard />
|
|
|
|
|
<StreamConfigCard v-model="cameraViewType" />
|
|
|
|
|
</v-col>
|
|
|
|
|
</v-row>
|
|
|
|
|
<PipelineConfigCard />
|
2025-01-01 03:04:20 -05:00
|
|
|
|
|
|
|
|
<!-- TODO - not sure this belongs here -->
|
2025-12-07 16:59:07 -05:00
|
|
|
<!-- Need v-model to allow the dialog to be dismissed and v-if to only display when cameras need configuration -->
|
|
|
|
|
<v-dialog
|
|
|
|
|
v-if="useCameraSettingsStore().needsCameraConfiguration"
|
|
|
|
|
v-model="showCameraSetupDialog"
|
|
|
|
|
max-width="800"
|
|
|
|
|
dark
|
|
|
|
|
>
|
2025-08-04 01:15:33 -04:00
|
|
|
<v-card flat color="surface">
|
|
|
|
|
<v-card-title>Set up some cameras to get started!</v-card-title>
|
Clean up spacing and other things in various parts of the UI (#1972)
## Description
After the Vue 3 upgrade, the spacing for various UI elements was left
inconsistent in many places. Dialogs were hit especially hard and had
some very inconsistent spacing. Additionally, the 24 pixels of padding
around all cards was noted as a waste of space and unnecessary, so it
has been shrunk down to 20 pixels to make the UI a tiny bit more compact
and to make it visually closer to some parts of the UI that have 16
pixels of padding (the camera views are the most notable example).
Padding between input elements has also been reduced to 20 pixels (this
required some hackery to get consistent sizes on input elements, since
switches and sliders have different heights.)
Some other minor UI tweaks were made, such as removing the divider
between dialog contents and dialog buttons because it visually looks
better, shrinking the banner padding so it doesn't displace as much
content, making the banner background one uniform color instead of a
highlight around the icon, fixing the targets tab so that the columns
stop shifting around when the values change, preserving newlines in the
log view, cleaning up the object detection UI, and making the import
dialogs have consistently inset input elements.
Old dashboard:

New dashboard:

Old Camera tab:

New Camera tab:

Old Calibration Info:

New Calibration Info:

Old Log Viewer:

New Log Viewer:

Old Pipeline Creation Dialog:

New Pipeline Creation Dialog:

Old Factory Reset:

New Factory Reset:

Old Pipeline Change:

New Pipeline Change:

Old Import Dialog:

New Import Dialog:

## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
2025-07-12 00:02:23 -04:00
|
|
|
<v-card-text class="pt-0">
|
2025-08-04 01:15:33 -04:00
|
|
|
No cameras activated - head to the
|
2025-08-08 16:06:26 -04:00
|
|
|
<router-link to="/cameraConfigs">camera matching tab</router-link> to set some up!
|
2025-01-01 03:04:20 -05:00
|
|
|
</v-card-text>
|
|
|
|
|
</v-card>
|
|
|
|
|
</v-dialog>
|
2023-08-21 01:51:35 -04:00
|
|
|
</v-container>
|
|
|
|
|
</template>
|
2025-01-01 03:04:20 -05:00
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
a:link {
|
2025-08-08 16:06:26 -04:00
|
|
|
color: rgb(var(--v-theme-buttonActive));
|
2025-01-01 03:04:20 -05:00
|
|
|
background-color: transparent;
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
}
|
|
|
|
|
a:visited {
|
2025-08-04 01:15:33 -04:00
|
|
|
color: rgb(var(--v-theme-buttonActive));
|
2025-01-01 03:04:20 -05:00
|
|
|
background-color: transparent;
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
}
|
|
|
|
|
a:hover {
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
text-decoration: underline;
|
|
|
|
|
}
|
|
|
|
|
a:active {
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
}
|
|
|
|
|
</style>
|