Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix responsive top bar layout & Fix typo #4

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 49 additions & 27 deletions components/SerialDevice.vue
Original file line number Diff line number Diff line change
@@ -1,27 +1,49 @@
<template>
<div class="min-w-[320px]">
<div class="p-4 grid grid-cols-1 gap-2">
<div class="flex flex-column gap-2">
<USelectMenu v-model="serialStore.selectedDevice" class="flex-grow" :disabled="serialStore.hasConnection" :options="serialStore.pairedDevicesOptions" placeholder="Select device" />
<div>
<div class="p-4 grid grid-cols-1 2xl:grid-cols-2 gap-2">
<div class="flex flex-col">
<USelectMenu
v-model="serialStore.selectedDevice"
class="flex-grow"
:disabled="serialStore.hasConnection"
:options="serialStore.pairedDevicesOptions"
placeholder="Select device"
/>
<UButton
size="2xs"
class="mt-2 mr-auto"
@click="requestSerialDevices"
>
Port select
</UButton>
</div>
<div class="flex flex-col">
<USelectMenu
v-model="baudrate"
class="flex-grow"
:disabled="serialStore.selectedDevice.id === '-1' || serialStore.hasConnection || isDirectConnectDevice"
:options="baudrateOptions"
/>
</div>
<div class="flex justify-between gap-2">
<UButton size="2xs" @click="requestSerialDevices">
Port select
</UButton>
<UButton v-if="!serialStore.hasConnection" :disabled="serialStore.selectedDevice.id === '-1'" size="2xs" @click="connectToDevice">
<UButton
v-if="!serialStore.hasConnection"
:disabled="serialStore.selectedDevice.id === '-1'"
size="2xs"
class="mt-2 mr-auto 2xl:ml-auto 2xl:mr-0"
@click="connectToDevice"
>
Connect
</UButton>
<UButton v-else size="2xs" color="red" @click="disconnectFromDevice">
<UButton
v-else
size="2xs"
class="mt-2 mr-auto 2xl:ml-auto 2xl:mr-0"
color="red"
@click="disconnectFromDevice"
>
Disconnect
</UButton>
</div>
<div class="flex gap-4 pt-2">
<div class="flex flex-col mb-auto ml:flex-row gap-4 pt-2">
<div class="flex gap-2 items-center">
<UIcon name="i-fluent-serial-port-16-filled" dynamic :class="[serialStore.hasConnection ? 'text-green-500' : 'text-red-500']" />
</div>
Expand All @@ -46,23 +68,23 @@
/>
</UChip>
</div>
<div class="flex gap-2">
<UButton v-if="!serialStore.isDirectConnect" icon="i-material-symbols-find-in-page-outline" size="2xs" :loading="escStore.isLoading" @click="connectToEsc">
Read
</UButton>
<UButton
icon="i-material-symbols-save"
color="blue"
size="2xs"
:disabled="!isAnySettingsDirty || escStore.isSaving"
:loading="escStore.isSaving"
@click="writeConfig"
>
Save
</UButton>
</div>
</div>
</div>
<div class="flex flex-col mr-auto ml:flex-row ml:mr-0 2xl:flex-col 2xl:ml-auto 3xl:flex-row 3xl:justify-end gap-2">
<UButton v-if="!serialStore.isDirectConnect" icon="i-material-symbols-find-in-page-outline" size="2xs" :loading="escStore.isLoading" @click="connectToEsc">
Read
</UButton>
<UButton
icon="i-material-symbols-save"
color="blue"
size="2xs"
:disabled="!isAnySettingsDirty || escStore.isSaving"
:loading="escStore.isSaving"
@click="writeConfig"
>
Save
</UButton>
</div>
<div v-if="false && serialStore.hasConnection && serialStore.mspData.type" class="flex gap-1">
<UKbd>
{{ serialStore.mspData.type }}
Expand Down
2 changes: 1 addition & 1 deletion content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: 'Landingpage'

# AM32-MultiRotor-ESC-firmware

Firmware for STM32F051 based speed controllers for use with mutirotors
Firmware for STM32F051 based speed controllers for use with multirotors
<p align="left">
<a href="/LICENSE"><img src="https://img.shields.io/badge/license-GPL--3.0-brightgreen" alt="GitHub license" /></a>
</p>
Expand Down
4 changes: 4 additions & 0 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ export default {
content: [],
theme: {
extend: {
screens: {
ml: '994px',
'3xl': '1855px'
}
},
fontFamily: {
sans: ["'Nunito Sans'"]
Expand Down