Skip to content

Commit

Permalink
Formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
srimanachanta committed Jul 20, 2023
1 parent e3c25cb commit 8ec5aa1
Show file tree
Hide file tree
Showing 35 changed files with 1,124 additions and 1,050 deletions.
2 changes: 1 addition & 1 deletion photon-client/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"root": true,
"extends": [
"eslint:recommended",
"plugin:vue/essential",
"plugin:vue/recommended",
"@vue/eslint-config-typescript/recommended"
],
"rules": {
Expand Down
12 changes: 6 additions & 6 deletions photon-client/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,22 @@ useStateStore().$patch({ websocket: websocket });

<template>
<v-app>
<photon-sidebar/>
<photon-sidebar />
<v-main>
<v-container
fluid
fill-height
fluid
fill-height
>
<v-layout>
<v-flex>
<router-view/>
<router-view />
</v-flex>
</v-layout>
</v-container>
</v-main>

<photon-log-view/>
<photon-error-snackbar/>
<photon-log-view />
<photon-error-snackbar />
</v-app>
</template>

Expand Down
18 changes: 12 additions & 6 deletions photon-client/src/components/app/photon-3d-visualizer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,15 @@ const resetCamThirdPerson = () => {
</script>

<template>
<div style="width: 100%" id="container">
<div
id="container"
style="width: 100%"
>
<v-row>
<v-col align-self="stretch" style="display: flex; justify-content: center">
<v-col
align-self="stretch"
style="display: flex; justify-content: center"
>
<canvas
id="view"
/>
Expand All @@ -186,16 +192,16 @@ const resetCamThirdPerson = () => {
<v-row style="margin-bottom: 24px">
<v-col style="display: flex; justify-content: center">
<v-btn
color="secondary"
@click="resetCamFirstPerson"
color="secondary"
@click="resetCamFirstPerson"
>
First Person
</v-btn>
</v-col>
<v-col style="display: flex; justify-content: center">
<v-btn
color="secondary"
@click="resetCamThirdPerson"
color="secondary"
@click="resetCamThirdPerson"
>
Third Person
</v-btn>
Expand Down
14 changes: 7 additions & 7 deletions photon-client/src/components/app/photon-camera-stream.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ const handleClick = () => {

<template>
<img
:id="id"
crossorigin="anonymous"
:src="src"
:alt="alt"
:style="style"
@click="handleClick"
/>
:id="id"
crossorigin="anonymous"
:src="src"
:alt="alt"
:style="style"
@click="handleClick"
>
</template>
8 changes: 4 additions & 4 deletions photon-client/src/components/app/photon-error-snackbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { useStateStore } from "@/stores/StateStore";

<template>
<v-snackbar
v-model="useStateStore().snackbarData.show"
top
:color="useStateStore().snackbarData.color"
:timeout="useStateStore().snackbarData.timeout"
v-model="useStateStore().snackbarData.show"
top
:color="useStateStore().snackbarData.color"
:timeout="useStateStore().snackbarData.timeout"
>
<p style="padding: 0; margin: 0; text-align: center">
{{ useStateStore().snackbarData.message }}
Expand Down
63 changes: 33 additions & 30 deletions photon-client/src/components/app/photon-log-view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@ document.addEventListener("keydown", e => {
dark
>
<v-card
dark
class="pt-3"
color="primary"
flat
dark
class="pt-3"
color="primary"
flat
>
<v-card-title>
View Program Logs
<v-btn
color="secondary"
style="margin-left: auto;"
depressed
@click="handleLogExport"
color="secondary"
style="margin-left: auto;"
depressed
@click="handleLogExport"
>
<v-icon left>
mdi-download
Expand All @@ -68,41 +68,44 @@ document.addEventListener("keydown", e => {

<!-- Special hidden link that gets 'clicked' when the user exports journalctl logs -->
<a
ref="exportLogFile"
style="color: black; text-decoration: none; display: none"
:href="`http://${backendAddress}/api/utils/photonvision-journalctl.txt`"
download="photonvision-journalctl.txt"
target="_blank"
ref="exportLogFile"
style="color: black; text-decoration: none; display: none"
:href="`http://${backendAddress}/api/utils/photonvision-journalctl.txt`"
download="photonvision-journalctl.txt"
target="_blank"
/>
</v-btn>
</v-card-title>

<div class="pr-6 pl-6">
<v-btn-toggle
v-model="selectedLogLevels"
dark
multiple
class="fill mb-4"
v-model="selectedLogLevels"
dark
multiple
class="fill mb-4"
>
<v-btn
v-for="(level) in [0, 1, 2, 3]"
:key="level"
color="secondary"
class="fill"
v-for="(level) in [0, 1, 2, 3]"
:key="level"
color="secondary"
class="fill"
>
{{ getLogLevelFromIndex(level) }}
</v-btn>
</v-btn-toggle>
<v-card-text style="font-size: 18px; font-weight: 600" v-if="logs.length === 0">
<v-card-text
v-if="logs.length === 0"
style="font-size: 18px; font-weight: 600"
>
There are no Logs to show
</v-card-text>
<v-virtual-scroll
v-else
:items="logs"
item-height="50"
height="600"
v-else
:items="logs"
item-height="50"
height="600"
>
<template v-slot="{item}">
<template #default="{item}">
<div :class="[getLogColor(item.level) + '--text', 'log-item']">
{{ item.message }}
</div>
Expand All @@ -115,9 +118,9 @@ document.addEventListener("keydown", e => {
<v-card-actions>
<v-spacer />
<v-btn
color="white"
text
@click="() => useStateStore().showLogModal = false"
color="white"
text
@click="() => useStateStore().showLogModal = false"
>
Close
</v-btn>
Expand Down
84 changes: 42 additions & 42 deletions photon-client/src/components/app/photon-sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,37 @@ const mdAndUp = computed<boolean>(() => getCurrentInstance()?.proxy.$vuetify.bre

<template>
<v-navigation-drawer
dark
app
permanent
:mini-variant="compact"
color="primary"
dark
app
permanent
:mini-variant="compact"
color="primary"
>
<v-list>
<!-- List item for the heading; note that there are some tricks in setting padding and image width make things look right -->
<v-list-item
:class="compact ? 'pr-0 pl-0' : ''"
style="display: flex; justify-content: center"
:class="compact ? 'pr-0 pl-0' : ''"
style="display: flex; justify-content: center"
>
<v-list-item-icon class="mr-0">
<img
v-if="!compact"
class="logo"
src="@/assets/images/logoLarge.svg"
alt="large logo"
v-if="!compact"
class="logo"
src="@/assets/images/logoLarge.svg"
alt="large logo"
>
<img
v-else
class="logo"
src="@/assets/images/logoSmall.svg"
alt="small logo"
v-else
class="logo"
src="@/assets/images/logoSmall.svg"
alt="small logo"
>
</v-list-item-icon>
</v-list-item>

<v-list-item
link
to="/dashboard"
link
to="/dashboard"
>
<v-list-item-icon>
<v-icon>mdi-view-dashboard</v-icon>
Expand All @@ -54,9 +54,9 @@ const mdAndUp = computed<boolean>(() => getCurrentInstance()?.proxy.$vuetify.bre
</v-list-item-content>
</v-list-item>
<v-list-item
ref="camerasTabOpener"
link
to="/cameras"
ref="camerasTabOpener"
link
to="/cameras"
>
<v-list-item-icon>
<v-icon>mdi-camera</v-icon>
Expand All @@ -66,8 +66,8 @@ const mdAndUp = computed<boolean>(() => getCurrentInstance()?.proxy.$vuetify.bre
</v-list-item-content>
</v-list-item>
<v-list-item
link
to="/settings"
link
to="/settings"
>
<v-list-item-icon>
<v-icon>mdi-cog</v-icon>
Expand All @@ -77,8 +77,8 @@ const mdAndUp = computed<boolean>(() => getCurrentInstance()?.proxy.$vuetify.bre
</v-list-item-content>
</v-list-item>
<v-list-item
link
to="/docs"
link
to="/docs"
>
<v-list-item-icon>
<v-icon>mdi-bookshelf</v-icon>
Expand All @@ -88,9 +88,9 @@ const mdAndUp = computed<boolean>(() => getCurrentInstance()?.proxy.$vuetify.bre
</v-list-item-content>
</v-list-item>
<v-list-item
v-if="mdAndUp"
link
@click="() => compact = !compact"
v-if="mdAndUp"
link
@click="() => compact = !compact"
>
<v-list-item-icon>
<v-icon v-if="compact">
Expand All @@ -115,35 +115,35 @@ const mdAndUp = computed<boolean>(() => getCurrentInstance()?.proxy.$vuetify.bre
mdi-robot
</v-icon>
<v-icon
v-else
style="border-radius: 100%"
v-else
style="border-radius: 100%"
>
mdi-robot-off
</v-icon>
</v-list-item-icon>
<v-list-item-content>
<v-list-item-title
v-if="useSettingsStore().network.runNTServer"
class="text-wrap"
v-if="useSettingsStore().network.runNTServer"
class="text-wrap"
>
NetworkTables server running for <span class="accent--text">{{ useStateStore().ntConnectionStatus.clients }}</span> clients
</v-list-item-title>
<v-list-item-title
v-else-if="useStateStore().ntConnectionStatus.connected && useStateStore().backendConnected"
class="text-wrap"
style="flex-direction: column; display: flex"
v-else-if="useStateStore().ntConnectionStatus.connected && useStateStore().backendConnected"
class="text-wrap"
style="flex-direction: column; display: flex"
>
NetworkTables Server Connected!
<span
class="accent--text"
class="accent--text"
>
{{ useStateStore().ntConnectionStatus.address }}
</span>
{{ useStateStore().ntConnectionStatus.address }}
</span>
</v-list-item-title>
<v-list-item-title
v-else
class="text-wrap"
style="flex-direction: column; display: flex"
v-else
class="text-wrap"
style="flex-direction: column; display: flex"
>
Not connected to NetworkTables Server!
</v-list-item-title>
Expand All @@ -156,8 +156,8 @@ const mdAndUp = computed<boolean>(() => getCurrentInstance()?.proxy.$vuetify.bre
mdi-server-network
</v-icon>
<v-icon
v-else
style="border-radius: 100%;"
v-else
style="border-radius: 100%;"
>
mdi-server-network-off
</v-icon>
Expand Down
Loading

0 comments on commit 8ec5aa1

Please sign in to comment.