-
-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Console): Change from Helplist to Printer.Gcode (#2033)
- Loading branch information
Showing
13 changed files
with
129 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<template> | ||
<v-list-item class="px-0" :two-line="twoLine"> | ||
<v-list-item-content class="px-0"> | ||
<v-list-item-title class="primary--text font-weight-bold cursor-pointer" @click="onCommand"> | ||
{{ command }} | ||
</v-list-item-title> | ||
<v-list-item-subtitle v-if="description" class="text-wrap">{{ description }}</v-list-item-subtitle> | ||
</v-list-item-content> | ||
</v-list-item> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import BaseMixin from '@/components/mixins/base' | ||
import { Mixins, Prop } from 'vue-property-decorator' | ||
import Component from 'vue-class-component' | ||
@Component | ||
export default class CommandHelpModalEntry extends Mixins(BaseMixin) { | ||
@Prop({ required: true, type: String }) declare command: string | ||
get commands(): { [key: string]: { help?: string } } { | ||
return this.$store.state.printer.gcode?.commands ?? {} | ||
} | ||
get commandObject(): { help?: string } { | ||
return this.commands[this.command] ?? {} | ||
} | ||
get description(): string | null { | ||
return this.commandObject.help ?? null | ||
} | ||
get twoLine(): boolean { | ||
return this.description !== null | ||
} | ||
onCommand() { | ||
this.$emit('click-on-command', this.command) | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.