Skip to content

Commit

Permalink
fix: show the name instead of the code in print view (#1371)
Browse files Browse the repository at this point in the history
Issue [1363](#1363)

Change the PrintKey to show the `.name` instead of the `.code` attribute
because it's less human friendly. Remove some of the extraneous
formatting around the element.

This stems slightly from the different way we render Key components in
the printing vs editing.
  • Loading branch information
yanfali authored Nov 8, 2024
1 parent 76009c0 commit 6add44d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/PrintKey.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ export default {
return this.formatName(this.breakLines(this.meta.text));
}
if (this.meta.type === 'layer-container') {
return `${this.meta.name.toUpperCase()},\n${this.formatName(
this.meta.contents.code
return `${this.meta.name.toUpperCase()}\n${this.formatName(
this.meta.contents.name
)}`;
}
if (this.meta.type === 'container') {
return `${this.meta.name.toUpperCase()}\n(${this.formatName(
this.meta.contents.code
)})`;
return `${this.meta.name.toUpperCase()}\n${this.formatName(
this.meta.contents.name
)}`;
}
return this.formatName(this.breakLines(this.meta.name));
}
Expand Down

0 comments on commit 6add44d

Please sign in to comment.