mirror of
https://gitee.com/openharmony/security_privacy_center
synced 2024-12-03 13:31:03 +00:00
证书管理页面半模态需求
Signed-off-by: 杨海龙2023 <yanghailong26@huawei.com>
This commit is contained in:
parent
52308eae6e
commit
97a14fc55b
@ -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
|
||||
})
|
||||
}
|
||||
|
@ -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({
|
||||
|
@ -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;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
})
|
||||
}
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user