From 97a14fc55b10f8636143f490dcea56e69d9de63a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=B5=B7=E9=BE=992023?= Date: Mon, 29 Jul 2024 18:13:50 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=81=E4=B9=A6=E7=AE=A1=E7=90=86=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=8D=8A=E6=A8=A1=E6=80=81=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 杨海龙2023 --- ...tAbility.ts => CertPickerUiExtAbility.ets} | 0 .../src/main/ets/pages/cerEvidenceFa.ets | 3 ++- .../src/main/ets/pages/certManagerFa.ets | 21 ++++++++++--------- .../ets/pages/picker/CaUserDetailPage.ets | 15 ++++++------- .../ets/pages/picker/CredSystemDetailPage.ets | 2 +- CertManager/src/main/ets/pages/trustedCa.ets | 3 ++- CertManager/src/main/module.json5 | 2 +- 7 files changed, 25 insertions(+), 21 deletions(-) rename CertManager/src/main/ets/MainAbility/{CertPickerUiExtAbility.ts => CertPickerUiExtAbility.ets} (100%) diff --git a/CertManager/src/main/ets/MainAbility/CertPickerUiExtAbility.ts b/CertManager/src/main/ets/MainAbility/CertPickerUiExtAbility.ets similarity index 100% rename from CertManager/src/main/ets/MainAbility/CertPickerUiExtAbility.ts rename to CertManager/src/main/ets/MainAbility/CertPickerUiExtAbility.ets diff --git a/CertManager/src/main/ets/pages/cerEvidenceFa.ets b/CertManager/src/main/ets/pages/cerEvidenceFa.ets index 10fed94..47621da 100644 --- a/CertManager/src/main/ets/pages/cerEvidenceFa.ets +++ b/CertManager/src/main/ets/pages/cerEvidenceFa.ets @@ -774,7 +774,8 @@ export struct evidenceList { keyUri: item.keyUri, mShowAppCaPresenter: $mShowAppCaPresenter, onItemClicked: this.isStartBySheet ? () => { - this.selected?.(NavEntryKey.CRED_USER_DETAIL_ENTRY, new CredUserDetailParam(this.mShowAppCaPresenter)); + this.selected?.(NavEntryKey.CRED_USER_DETAIL_ENTRY, + new CredUserDetailParam(this.mShowAppCaPresenter)); } : undefined }) } diff --git a/CertManager/src/main/ets/pages/certManagerFa.ets b/CertManager/src/main/ets/pages/certManagerFa.ets index 2928936..10faa36 100644 --- a/CertManager/src/main/ets/pages/certManagerFa.ets +++ b/CertManager/src/main/ets/pages/certManagerFa.ets @@ -69,18 +69,19 @@ export struct CertificateComponent { List() { ForEach(this.listItems, (item: CertListItem) => { ListItem() { - SubEntryComponent({ targetPage: item.targetPage, title: item.title, onItemClicked: targetRouter => { - if (this.isStartBySheet) { - if (targetRouter === 'pages/trustedCa') { - this.selected?.(NavEntryKey.CA_CERTIFICATE_ENTRY); + SubEntryComponent({ targetPage: item.targetPage, title: item.title, + onItemClicked: targetRouter => { + if (this.isStartBySheet) { + if (targetRouter === 'pages/trustedCa') { + this.selected?.(NavEntryKey.CA_CERTIFICATE_ENTRY); + } else { + this.selected?.(NavEntryKey.CREDENTIAL_LIST_ENTRY); + } } else { - this.selected?.(NavEntryKey.CREDENTIAL_LIST_ENTRY); + router.pushUrl({ + url: targetRouter + }); } - } else { - router.pushUrl({ - url: targetRouter - }); - } } }) } .stateStyles({ diff --git a/CertManager/src/main/ets/pages/picker/CaUserDetailPage.ets b/CertManager/src/main/ets/pages/picker/CaUserDetailPage.ets index 2bb7ec5..83f5e5b 100644 --- a/CertManager/src/main/ets/pages/picker/CaUserDetailPage.ets +++ b/CertManager/src/main/ets/pages/picker/CaUserDetailPage.ets @@ -28,7 +28,7 @@ import { BusinessError } from '@ohos.base'; const TAG: string = 'CaUserDetailPage: '; export class CaUserDetailParam { - showUserCaPresenter: CmShowUserCaPresenter; + public showUserCaPresenter: CmShowUserCaPresenter; constructor(presenter: CmShowUserCaPresenter) { this.showUserCaPresenter = presenter; @@ -65,12 +65,13 @@ export struct CaUserDetailPage { value: $r('app.string.root_certificate_continue'), buttonStyle: ButtonStyleMode.TEXTUAL, action: () => { - this.showUserCaPresenter.setUserCertificateStatus(this.showUserCaPresenter.certInfo.uri, true).then(result => { - if (result) { - this.showUserCaPresenter.updateUserTrustedCertificateList(); - } else { - this.toggleStatus = false; - } + this.showUserCaPresenter.setUserCertificateStatus(this.showUserCaPresenter.certInfo.uri, true) + .then(result => { + if (result) { + this.showUserCaPresenter.updateUserTrustedCertificateList(); + } else { + this.toggleStatus = false; + } }); } } diff --git a/CertManager/src/main/ets/pages/picker/CredSystemDetailPage.ets b/CertManager/src/main/ets/pages/picker/CredSystemDetailPage.ets index 564baaa..1525cf6 100644 --- a/CertManager/src/main/ets/pages/picker/CredSystemDetailPage.ets +++ b/CertManager/src/main/ets/pages/picker/CredSystemDetailPage.ets @@ -22,7 +22,7 @@ import CmShowSysCredPresenter from '../../presenter/CmShowSysCredPresenter'; const TAG: string = 'CredSystemDetailPage: '; export class CredSystemDetailParam { - presenter: CmShowSysCredPresenter; + public presenter: CmShowSysCredPresenter; constructor(presenter: CmShowSysCredPresenter) { this.presenter = presenter; diff --git a/CertManager/src/main/ets/pages/trustedCa.ets b/CertManager/src/main/ets/pages/trustedCa.ets index be10bc0..d9431a4 100644 --- a/CertManager/src/main/ets/pages/trustedCa.ets +++ b/CertManager/src/main/ets/pages/trustedCa.ets @@ -925,7 +925,8 @@ export struct TrustedEvidence { setStatus: $mShowUserCaPresenter, indexNum: index, onItemClicked: this.isStartBySheet ? () => { - this.selected?.(NavEntryKey.CA_USER_DETAIL_ENTRY, new CaUserDetailParam(this.mShowUserCaPresenter)); + this.selected?.(NavEntryKey.CA_USER_DETAIL_ENTRY, + new CaUserDetailParam(this.mShowUserCaPresenter)); } : undefined }) } diff --git a/CertManager/src/main/module.json5 b/CertManager/src/main/module.json5 index deb379f..eed087b 100644 --- a/CertManager/src/main/module.json5 +++ b/CertManager/src/main/module.json5 @@ -89,7 +89,7 @@ }, { "name": "CertPickerUIExtAbility", - "srcEntry": "./ets/MainAbility/CertPickerUiExtAbility.ts", + "srcEntry": "./ets/MainAbility/CertPickerUiExtAbility.ets", "exported": true, "permissions": ['ohos.permission.ACCESS_CERT_MANAGER'], "type": "sys/commonUI"