-
Notifications
You must be signed in to change notification settings - Fork 23
feat: Add TPM licensing availability to registration #1908
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
Changes from 2 commits
78c4b92
b7e2628
7abf943
c31be46
1f243d7
50a58e8
e6a3852
0161339
70c5101
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,6 +47,7 @@ const { | |
| bootDeviceType, | ||
| dateTimeFormat, | ||
| deviceCount, | ||
| flashGuid, | ||
| flashProduct, | ||
| flashVendor, | ||
| guid, | ||
|
|
@@ -63,6 +64,7 @@ const { | |
| state, | ||
| stateData, | ||
| stateDataError, | ||
| tpmGuid, | ||
| tooManyDevices, | ||
| } = storeToRefs(serverStore); | ||
|
|
||
|
|
@@ -132,6 +134,18 @@ const showPartnerActivationCode = computed(() => { | |
| (currentState === 'ENOKEYFILE' || currentState === 'TRIAL' || currentState === 'EEXPIRED') | ||
| ); | ||
| }); | ||
| const showTpmTransferInfo = computed((): boolean => | ||
| Boolean( | ||
| keyInstalled.value && | ||
| !showTrialExpiration.value && | ||
| bootDeviceType.value === 'flash' && | ||
| // On TPM systems, flashGuid may fall back to the TPM GUID, so only show | ||
| // this while we're still booted from flash and the GUIDs differ. | ||
| flashGuid.value && | ||
| tpmGuid.value && | ||
| flashGuid.value !== tpmGuid.value | ||
|
Comment on lines
+139
to
+146
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This condition allows the TPM transfer guidance to render for Useful? React with 👍 / 👎. |
||
| ) | ||
| ); | ||
|
|
||
| // Organize items into three sections | ||
| const bootDeviceItems = computed((): RegistrationItemProps[] => { | ||
|
|
@@ -384,6 +398,24 @@ const actionItems = computed((): RegistrationItemProps[] => { | |
| class="rounded-lg border border-gray-200 p-4 dark:border-gray-700" | ||
| > | ||
| <h4 class="mb-3 text-lg font-semibold">{{ t('registration.actions') }}</h4> | ||
| <blockquote | ||
| v-if="showTpmTransferInfo" | ||
| data-testid="tpm-transfer-available" | ||
| class="border-primary bg-primary/10 mb-4 border-l-4 p-4" | ||
| > | ||
| <p class="text-highlighted text-sm leading-relaxed font-medium"> | ||
| {{ t('registration.tpmTransferAvailable') }} | ||
| </p> | ||
| <p class="text-highlighted mt-2 text-sm leading-relaxed"> | ||
| {{ t('registration.tpmTransferAvailableDescription') }} | ||
| </p> | ||
| <ol class="text-highlighted mt-3 list-decimal space-y-1 pl-5 text-sm leading-relaxed"> | ||
| <li>{{ t('registration.tpmTransferAvailableSteps.stopArray') }}</li> | ||
| <li>{{ t('registration.tpmTransferAvailableSteps.removeFlash') }}</li> | ||
| <li>{{ t('registration.tpmTransferAvailableSteps.transferOnRegistrationPage') }}</li> | ||
| <li>{{ t('registration.tpmTransferAvailableSteps.startArray') }}</li> | ||
| </ol> | ||
| </blockquote> | ||
| <blockquote | ||
| v-if="showPartnerActivationCode" | ||
| class="border-primary bg-primary/10 mb-4 border-l-4 p-4" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a fallback for
flashGuidto avoid undefined-index notices.Line [93] directly reads
$var['flashGUID']without guarding. If the key is absent, PHP notices can leak into this test page output.Suggested fix
📝 Committable suggestion
🤖 Prompt for AI Agents