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

Add mapping table and hide svg mapping from unknown joystick models #1216

Merged
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
8 changes: 4 additions & 4 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = {
'jsdoc/newline-after-description': 'off',
'jsdoc/no-undefined-types': 'off',
'jsdoc/require-returns': ['error', { forceReturnsWithAsync: false }],
'max-len': ['error', { code: 120, ignoreUrls: true, ignoreComments: true }],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To follow the repository pattern it would be nice to reword this commit to something like "lint: Increase max line length to 180".

'max-len': ['error', { code: 180, ignoreUrls: true, ignoreComments: true }],
'no-alert': 'off',
'no-console': 'off',
'no-continue': 'off',
Expand Down Expand Up @@ -92,10 +92,10 @@ module.exports = {
'vue/max-len': [
'error',
{
code: 120,
template: 120,
code: 180,
template: 180,
tabWidth: 4,
comments: 160,
comments: 180,
ignoreComments: true,
ignoreTrailingComments: true,
ignoreHTMLAttributeValues: true,
Expand Down
Binary file modified bun.lockb
Binary file not shown.
22 changes: 5 additions & 17 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,6 @@
: 'lg:gap-y-3 xl:gap-y-4 gap-y-5 py-5'
"
>
<div
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you change the message of this commit for something like "adjust main-menu icon alignments"?

v-if="interfaceStore.mainMenuStyleTrigger === 'center-left'"
id="menu-trigger"
class="absolute right-0 top-[50%] -translate-y-[50%] flex items-center justify-center w-[30px] px-0 py-2 cursor-pointer overflow-hidden rounded-r-lg rounded-br-lg -ml-[1px]"
@click="toggleMainMenu"
>
<v-icon
class="text-white opacity-70"
:class="simplifiedMainMenu ? 'text-[30px] -mr-[14px]' : 'text-[40px] -mr-[8px]'"
>mdi-menu-left</v-icon
>
</div>
<GlassButton
Comment on lines -35 to 34
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this removed by mistake?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it was removed based on a feedback by Rusty.

v-if="route.name === 'widgets-view'"
:label="simplifiedMainMenu ? '' : 'Edit Interface'"
Expand Down Expand Up @@ -89,7 +77,7 @@
:icon-class="
interfaceStore.isOnSmallScreen
? 'scale-[95%] -mr-[2px] -mb-[1px]'
: 'scale-[95%] lg:-mr-[2px] -mr-[3px]'
: 'scale-[95%] ml-[2px] lg:-mr-[2px]'
"
:icon-size="simplifiedMainMenu ? 25 : undefined"
:variant="simplifiedMainMenu ? 'uncontained' : 'round'"
Expand All @@ -111,13 +99,13 @@
:icon-class="
interfaceStore.isOnSmallScreen
? 'scale-[100%] -mb-[1px] md:ml-[2px]'
: 'scale-[95%] -mb-[2px] lg:-mr-[1px] -mr-[2px] xl:-mb-[2px]'
: 'scale-[97%] lg:ml-[1px] -mr-[2px] xl:-mb-[4px]'
"
:variant="simplifiedMainMenu ? 'uncontained' : 'round'"
:tooltip="simplifiedMainMenu ? 'Configuration' : undefined"
:button-class="!simplifiedMainMenu ? '-mt-[5px]' : undefined"
:width="buttonSize"
:selected="showConfigurationMenu"
class="mb-2"
@click="mainMenuStep = 2"
/>
<GlassButton
Expand All @@ -128,7 +116,7 @@
:icon-class="
interfaceStore.isOnSmallScreen
? '-mb-[1px] scale-90 -mr-[2px] md:ml-[1px] md:-mb-[2px]'
: '2xl:-mb-[2px] xl:-mb-[2px] -mb-[1px] scale-90 -mr-[2px]'
: '2xl:-mb-[2px] xl:-mb-[2px] -mb-[1px] scale-90 -mr-[3px]'
"
:variant="simplifiedMainMenu ? 'uncontained' : 'round'"
:tooltip="simplifiedMainMenu ? (isFullscreen ? 'Exit Fullscreen' : 'Enter Fullscreen') : undefined"
Expand Down Expand Up @@ -159,7 +147,7 @@
:selected="currentConfigMenuComponent === menuitem.component"
variant="uncontained"
:height="buttonSize * 0.45"
:icon-size="buttonSize * 0.6"
:icon-size="buttonSize * 0.5"
@click="toggleConfigComponent(menuitem.component)"
><template #content
><div v-if="currentConfigMenuComponent === menuitem.component" class="arrow-left"></div></template
Expand Down
1 change: 0 additions & 1 deletion src/components/InteractionDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ const startTimer = (): void => {
}
const stopTimer = (): void => {
console.log('🚀 ~ stopTimer:')
if (timerId.value !== null) {
clearInterval(timerId.value)
timerId.value = null
Expand Down
23 changes: 23 additions & 0 deletions src/types/joystick.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ export type JoystickButtonActionCorrespondency = {
* The protocol action that should be triggered
*/
action: ProtocolAction
/**
* User's custom label for the button
*/
label?: string
}
}

Expand Down Expand Up @@ -254,6 +258,25 @@ export interface JoystickInput {
id: JoystickAxis | JoystickButton
}

/**
* Joystick actions
*/
export interface JoystickAction {
/**
* Action identification
*/
name: string
/**
* Action's protocol
*/
protocol: string
/**
* Action's id
*/
id: string
[key: string]: string
}

/**
* Joystick button input
*/
Expand Down
Loading
Loading