Skip to content

Commit

Permalink
PLSTimer renamed PLS
Browse files Browse the repository at this point in the history
- Added icon
  - Filled if data entered
  - Outline if no data entered
- Menu not working yet. (fix opening location of menu?)
  • Loading branch information
maxlk96 committed Oct 20, 2024
1 parent e4be76d commit 04b2bb9
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
<template>
<div v-if="settings.enablePLS">
<span v-if="loading">-</span>
<span v-else-if="matchedControllers.length > 0">
( PLS: {{ sessionLength }} {{ statusSuffix }} )
<span v-else-if="matchedControllers.length > 0" class="text-grey" style="cursor: pointer">
{{ sessionLength }} {{ statusSuffix }}
</span>
<span v-else>( PLS: NIL )</span>
<v-btn
icon
class="text-grey"
@click="showMenu = true"
>
<v-icon>{{ searchValue.length > 0 ? 'mdi-account' : 'mdi-account-outline' }}</v-icon>
<v-menu v-model="showMenu" :close-on-content-click="false">
<v-list class="text-grey">
<v-list-item @click="goOnPause">
<v-list-item-title>GO ON PAUSE</v-list-item-title>
</v-list-item>
<v-list-item @click="goOnPosition">
<v-list-item-title>GO ON POSITION</v-list-item-title>
</v-list-item>
</v-list>
</v-menu>
</v-btn>
</div>
</template>

Expand All @@ -30,6 +46,18 @@ const statusSuffix = ref("")
let intervalId: number | null = null
let refreshIntervalId: number | null = null
const showMenu = ref(false)
function goOnPause() {
// Implement the logic for "Go on Pause" here
showMenu.value = false
}
function goOnPosition() {
// Implement the logic for "Go on Position" here
showMenu.value = false
}
// Function to fetch and filter controllers
async function fetchSessionData() {
if (!settings.enablePLS) {
Expand Down Expand Up @@ -226,4 +254,5 @@ watch([() => settings.position1, () => settings.position2], () => {
updateSearchValue()
}
})
</script>
</script>

4 changes: 2 additions & 2 deletions frontend/src/components/menu/MainToolbar.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<v-btn class="text-grey" @click="showAboutDialog = true">About</v-btn>
<PLSTimer/>
<PLS/>
<v-btn
v-if="!fullscreen"
type="icon"
Expand Down Expand Up @@ -38,7 +38,7 @@
<script setup lang="ts">
import Clock from "@/components/Clock.vue"
import About from "@/components/About.vue"
import PLSTimer from "@/components/PLSTimer.vue"
import PLS from "@/components/PLS.vue"
import { ref, onMounted } from "vue"
const showAboutDialog = ref(false)
Expand Down

0 comments on commit 04b2bb9

Please sign in to comment.