-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
show decoded by array as read only in form view
- Loading branch information
Showing
5 changed files
with
39 additions
and
14 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 |
---|---|---|
@@ -1,10 +1,23 @@ | ||
<svelte:options immutable={true} /> | ||
|
||
<script lang="ts"> | ||
import type { FswCommandArgument } from '@nasa-jpl/aerie-ampcs'; | ||
import type { SyntaxNode } from '@lezer/common'; | ||
import type { CommandInfoMapper } from '../../../utilities/codemirror/commandInfoMapper'; | ||
import { decodeInt32Array } from '../../../utilities/codemirror/vml/vmlTreeUtils'; | ||
export let argDef: FswCommandArgument; | ||
export let argNode: SyntaxNode; | ||
export let commandInfoMapper: CommandInfoMapper; | ||
export let value: string; | ||
let decodedValue: string; | ||
$: { | ||
const arrayNodes = commandInfoMapper.getByteArrayElements && commandInfoMapper.getByteArrayElements(argNode, value); | ||
if (arrayNodes) { | ||
decodedValue = decodeInt32Array(arrayNodes); | ||
} | ||
} | ||
</script> | ||
|
||
<input class="st-input w-100" spellcheck="false" bind:value title={argDef.description} disabled={true} /> | ||
<input class="st-input w-100" spellcheck="false" bind:value title="encoded string" disabled={true} /> | ||
<input class="st-input w-100" spellcheck="false" bind:value={decodedValue} title="decoded string" disabled={true} /> |
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