Skip to content

Commit

Permalink
about: Create about page
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaellehmkuhl committed Aug 8, 2024
1 parent 2b3532c commit 991ebf4
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,23 @@
}
"
/>
<GlassButton
:label="simplifiedMainMenu ? '' : 'About'"
:label-class="[menuLabelSize, '-mb-1']"
icon="mdi-information-outline"
:icon-size="simplifiedMainMenu ? 25 : undefined"
:icon-class="
interfaceStore.isOnSmallScreen
? 'scale-[100%] -mb-[1px] md:ml-[2px]'
: 'scale-[95%] -mb-[2px] lg:-mr-[1px] -mr-[2px] xl:-mb-[2px]'
"
:variant="simplifiedMainMenu ? 'uncontained' : 'round'"
:tooltip="simplifiedMainMenu ? 'About' : undefined"
:button-class="!simplifiedMainMenu ? '-mt-[5px]' : undefined"
:width="buttonSize"
:selected="showConfigurationMenu"
@click="openAboutDialog"
/>
</div>
</v-window-item>
<v-window-item :value="2" class="h-full w-full">
Expand Down Expand Up @@ -320,6 +337,7 @@
</div>
</v-main>
</v-app>
<About v-if="showAboutDialog" />
</template>

<script setup lang="ts">
Expand All @@ -338,6 +356,7 @@ import {
} from '@/libs/joystick/protocols/cockpit-actions'
import { useMissionStore } from '@/stores/mission'
import About from './components/About.vue'
import AltitudeSlider from './components/AltitudeSlider.vue'
import EditMenu from './components/EditMenu.vue'
import GlassButton from './components/GlassButton.vue'
Expand All @@ -363,6 +382,7 @@ const widgetStore = useWidgetManagerStore()
const vehicleStore = useMainVehicleStore()
const interfaceStore = useAppInterfaceStore()
const showAboutDialog = ref(false)
const showConfigurationMenu = ref(false)
type ConfigComponent = DefineComponent<Record<string, never>, Record<string, never>, unknown> | null
const currentConfigMenuComponent = ref<ConfigComponent>(null)
Expand Down Expand Up @@ -587,6 +607,11 @@ const glassMenuStyles = computed(() => ({
backdropFilter: `blur(${interfaceStore.UIGlassEffect.blur}px)`,
}))
const openAboutDialog = (): void => {
showAboutDialog.value = true
closeMainMenu()
}
const route = useRoute()
const routerSection = ref()
Expand Down
File renamed without changes
84 changes: 84 additions & 0 deletions src/components/About.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<template>
<teleport to="body">
<InteractionDialog :show-dialog="showDialog" max-width="700" variant="text-only">
<template #content>
<div class="flex flex-col justify-center align-center w-full h-full">
<img :src="CockpitLogo" alt="Cockpit Logo" class="w-64 my-4" />
<div class="w-[90%] flex justify-between my-8 py-3">
<div class="w-[45%] flex flex-col text-start">
<p>
Cockpit is an intuitive and customizable cross-platform ground control station for remote vehicles of
all types.
</p>
<p class="my-3">It was created by Blue Robotics and is entirely open-source.</p>
<p>
It currently supports Ardupilot-based vehicles, but has plans to support any generic vehicle, be it
communicating MAVLink or not.
</p>
</div>
<div class="w-[45%] flex flex-col text-end">
<p>Version:</p>
<p class="mb-3">1.0.0</p>
<p>Author:</p>
<p class="mb-3">Blue Robotics</p>
<p>Maintainers:</p>
<p v-for="(maintainer, i) in maintainers" :key="i" class="mb-0.5">{{ maintainer.name }}</p>
<p class="mt-3">Licensed under AGPL-3.0-only or LicenseRef-Cockpit-Custom</p>
</div>
</div>
<div class="mb-5 flex justify-center align-center">
<v-btn
class="mx-3"
variant="text"
icon="mdi-github"
size="xs"
target="_blank"
href="https://github.com/bluerobotics/cockpit"
/>
<v-btn
class="mx-3"
variant="text"
icon="mdi-web"
size="xs"
target="_blank"
href="https://bluerobotics.com"
/>
<v-btn
class="mx-3"
variant="text"
icon="mdi-file-document-outline"
size="xs"
target="_blank"
href="https://docs.bluerobotics.com/ardusub-zola/software/control-station/Cockpit-1.0/overview"
/>
</div>
</div>
</template>
<template #actions></template>
</InteractionDialog>
</teleport>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import CockpitLogo from '@/assets/cockpit-logo.png'
import InteractionDialog from '@/components/InteractionDialog.vue'
const showDialog = ref(true)
const maintainers = [
{
name: 'Rafael Araujo Lehmkuhl',
email: '[email protected]',
},
{
name: 'Patrick José Pereira',
email: '',
},
{
name: 'Arturo Manzoli',
email: '',
},
]
</script>

0 comments on commit 991ebf4

Please sign in to comment.