diff --git a/permissionmanager/src/main/ets/pages/securityDialog.ets b/permissionmanager/src/main/ets/pages/securityDialog.ets index e4d7839..165f15f 100644 --- a/permissionmanager/src/main/ets/pages/securityDialog.ets +++ b/permissionmanager/src/main/ets/pages/securityDialog.ets @@ -35,7 +35,14 @@ struct SecurityDialog { securityDialogController: CustomDialogController = new CustomDialogController({ builder: CustomSecurityDialog(), alignment: DialogAlignment.Bottom, - customStyle: true + customStyle: true, + cancel: () => { + win.destroy(); + globalThis.windowNum --; + if (globalThis.windowNum == 0) { + globalThis.extensionContext.terminateSelf(); + } + } }) build() {} @@ -135,17 +142,25 @@ struct CustomSecurityDialog { bottom: Constants.SECURITY_ICON_MARGIN_BOTTOM }) Column() { // content - Text($r('app.string.Temporarily_authorize') + this.appName + $r('app.string.To_access') - + this.securityParams[this.index].label) + Text() { + Span($r('app.string.Temporarily_authorize')) + Span(this.appName) + Span($r('app.string.To_access')) + Span(this.securityParams[this.index].label) + } .textAlign(TextAlign.Center) - .lineHeight($r('sys.float.ohos_id_text_line_space_l')) .fontColor($r('sys.color.ohos_id_color_text_primary')) .fontSize($r('sys.float.ohos_id_text_size_body1')) .fontWeight(FontWeight.Medium) - Text($r('app.string.only_can_desc') + '' + this.securityParams[this.index].label - + $r('app.string.only_after_desc') + '' + $r('app.string.prevent_desc')) + + Text() { + Span($r('app.string.location_button_desc')) + Span($r('app.string.only_can_desc')) + Span(this.securityParams[this.index].label) + Span($r('app.string.only_after_desc')) + Span($r('app.string.prevent_desc')) + } .textAlign(TextAlign.Center) - .lineHeight($r('sys.float.ohos_id_text_line_space_l')) .fontColor($r('sys.color.ohos_id_color_text_secondary')) .fontSize($r('sys.float.ohos_id_text_size_body2')) .margin({ @@ -172,7 +187,8 @@ struct CustomSecurityDialog { .margin({ bottom: Constants.DIALOG_MARGIN_BOTTOM }) .backgroundColor($r('sys.color.ohos_id_color_dialog_bg')) .borderRadius(Constants.DIALOG_PRIVACY_BORDER_RADIUS) - } + }.width(Constants.FULL_WIDTH) + .height(Constants.FULL_HEIGHT) } }.margin({ left: globalThis.isBottomPopover ? Constants.DIALOG_MARGIN_VERTICAL : Constants.DIALOG_MARGIN, right: globalThis.isBottomPopover ? Constants.DIALOG_MARGIN_VERTICAL : Constants.DIALOG_MARGIN, diff --git a/permissionmanager/src/main/resources/base/element/string.json b/permissionmanager/src/main/resources/base/element/string.json index b0beeee..7afc39d 100644 --- a/permissionmanager/src/main/resources/base/element/string.json +++ b/permissionmanager/src/main/resources/base/element/string.json @@ -378,11 +378,11 @@ }, { "name": "Temporarily_authorize", - "value": "Temporarily authorize " + "value": "Temporarily authorize \"" }, { "name": "To_access", - "value": " to access " + "value": "\" to access " }, { "name": "location_desc", diff --git a/permissionmanager/src/main/resources/zh_CN/element/string.json b/permissionmanager/src/main/resources/zh_CN/element/string.json index f48898a..5c18818 100644 --- a/permissionmanager/src/main/resources/zh_CN/element/string.json +++ b/permissionmanager/src/main/resources/zh_CN/element/string.json @@ -378,11 +378,11 @@ }, { "name": "Temporarily_authorize", - "value": "临时授权" + "value": "临时授权“" }, { "name": "To_access", - "value": "访问" + "value": "”访问" }, { "name": "location_desc",