mirror of
https://gitee.com/openharmony/security_privacy_center
synced 2024-12-04 05:51:33 +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,
|
keyUri: item.keyUri,
|
||||||
mShowAppCaPresenter: $mShowAppCaPresenter,
|
mShowAppCaPresenter: $mShowAppCaPresenter,
|
||||||
onItemClicked: this.isStartBySheet ? () => {
|
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
|
} : undefined
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -69,18 +69,19 @@ export struct CertificateComponent {
|
|||||||
List() {
|
List() {
|
||||||
ForEach(this.listItems, (item: CertListItem) => {
|
ForEach(this.listItems, (item: CertListItem) => {
|
||||||
ListItem() {
|
ListItem() {
|
||||||
SubEntryComponent({ targetPage: item.targetPage, title: item.title, onItemClicked: targetRouter => {
|
SubEntryComponent({ targetPage: item.targetPage, title: item.title,
|
||||||
if (this.isStartBySheet) {
|
onItemClicked: targetRouter => {
|
||||||
if (targetRouter === 'pages/trustedCa') {
|
if (this.isStartBySheet) {
|
||||||
this.selected?.(NavEntryKey.CA_CERTIFICATE_ENTRY);
|
if (targetRouter === 'pages/trustedCa') {
|
||||||
|
this.selected?.(NavEntryKey.CA_CERTIFICATE_ENTRY);
|
||||||
|
} else {
|
||||||
|
this.selected?.(NavEntryKey.CREDENTIAL_LIST_ENTRY);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.selected?.(NavEntryKey.CREDENTIAL_LIST_ENTRY);
|
router.pushUrl({
|
||||||
|
url: targetRouter
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
router.pushUrl({
|
|
||||||
url: targetRouter
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} })
|
} })
|
||||||
}
|
}
|
||||||
.stateStyles({
|
.stateStyles({
|
||||||
|
@ -28,7 +28,7 @@ import { BusinessError } from '@ohos.base';
|
|||||||
const TAG: string = 'CaUserDetailPage: ';
|
const TAG: string = 'CaUserDetailPage: ';
|
||||||
|
|
||||||
export class CaUserDetailParam {
|
export class CaUserDetailParam {
|
||||||
showUserCaPresenter: CmShowUserCaPresenter;
|
public showUserCaPresenter: CmShowUserCaPresenter;
|
||||||
|
|
||||||
constructor(presenter: CmShowUserCaPresenter) {
|
constructor(presenter: CmShowUserCaPresenter) {
|
||||||
this.showUserCaPresenter = presenter;
|
this.showUserCaPresenter = presenter;
|
||||||
@ -65,12 +65,13 @@ export struct CaUserDetailPage {
|
|||||||
value: $r('app.string.root_certificate_continue'),
|
value: $r('app.string.root_certificate_continue'),
|
||||||
buttonStyle: ButtonStyleMode.TEXTUAL,
|
buttonStyle: ButtonStyleMode.TEXTUAL,
|
||||||
action: () => {
|
action: () => {
|
||||||
this.showUserCaPresenter.setUserCertificateStatus(this.showUserCaPresenter.certInfo.uri, true).then(result => {
|
this.showUserCaPresenter.setUserCertificateStatus(this.showUserCaPresenter.certInfo.uri, true)
|
||||||
if (result) {
|
.then(result => {
|
||||||
this.showUserCaPresenter.updateUserTrustedCertificateList();
|
if (result) {
|
||||||
} else {
|
this.showUserCaPresenter.updateUserTrustedCertificateList();
|
||||||
this.toggleStatus = false;
|
} else {
|
||||||
}
|
this.toggleStatus = false;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ import CmShowSysCredPresenter from '../../presenter/CmShowSysCredPresenter';
|
|||||||
const TAG: string = 'CredSystemDetailPage: ';
|
const TAG: string = 'CredSystemDetailPage: ';
|
||||||
|
|
||||||
export class CredSystemDetailParam {
|
export class CredSystemDetailParam {
|
||||||
presenter: CmShowSysCredPresenter;
|
public presenter: CmShowSysCredPresenter;
|
||||||
|
|
||||||
constructor(presenter: CmShowSysCredPresenter) {
|
constructor(presenter: CmShowSysCredPresenter) {
|
||||||
this.presenter = presenter;
|
this.presenter = presenter;
|
||||||
|
@ -925,7 +925,8 @@ export struct TrustedEvidence {
|
|||||||
setStatus: $mShowUserCaPresenter,
|
setStatus: $mShowUserCaPresenter,
|
||||||
indexNum: index,
|
indexNum: index,
|
||||||
onItemClicked: this.isStartBySheet ? () => {
|
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
|
} : undefined
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "CertPickerUIExtAbility",
|
"name": "CertPickerUIExtAbility",
|
||||||
"srcEntry": "./ets/MainAbility/CertPickerUiExtAbility.ts",
|
"srcEntry": "./ets/MainAbility/CertPickerUiExtAbility.ets",
|
||||||
"exported": true,
|
"exported": true,
|
||||||
"permissions": ['ohos.permission.ACCESS_CERT_MANAGER'],
|
"permissions": ['ohos.permission.ACCESS_CERT_MANAGER'],
|
||||||
"type": "sys/commonUI"
|
"type": "sys/commonUI"
|
||||||
|
Loading…
Reference in New Issue
Block a user