1/* 2 * Copyright (c) 2023-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16import {CancelButton} from './component/BaseComponent'; 17 18const TAG = 'PrivacyStatementDialog'; 19 20@CustomDialog 21export struct PrivacyStatementDialog { 22 controller: CustomDialogController; 23 build() { 24 Column() { 25 Text($r('app.string.print_permissions_notice')) 26 .fontSize($r('sys.float.ohos_id_text_size_headline8')) 27 .fontColor($r('sys.color.ohos_id_color_text_primary')) 28 .fontWeight(FontWeight.Medium) 29 .margin({ 30 top: $r('app.float.privacy_statement_text_tertiary_height') 31 }) 32 Text($r('app.string.permissions_notice_content')) 33 .margin({ 34 top: $r('app.float.privacy_statement_text_relative_img_margin_top') 35 }) 36 .fontSize($r('sys.float.ohos_id_text_size_sub_title3')) 37 .fontWeight(FontWeight.Regular) 38 Column() { 39 Text($r('app.string.location_information')) 40 .fontSize($r('sys.float.ohos_id_text_size_sub_title2')) 41 .fontColor($r('sys.color.ohos_id_color_text_primary')) 42 .fontWeight(FontWeight.Medium) 43 Text($r('app.string.permission_location_content')) 44 .fontColor($r('sys.color.ohos_id_color_text_secondary')) 45 .fontSize($r('sys.float.ohos_id_text_size_sub_title3')) 46 .margin({top: $r('app.float.privacy_statement_text_relative_img_margin_top')}) 47 .fontWeight(FontWeight.Regular) 48 } 49 .margin({ 50 top: $r('app.float.privacy_statement_dialog_item_margin_top') 51 }) 52 .alignItems(HorizontalAlign.Start) 53 CancelButton({ 54 cancelLabel: $r('app.string.JobManagerPage_ok'), 55 cancelWidth: $r('app.float.dialog_button_width'), 56 cancelHeight: $r('app.float.dialog_button_height'), 57 cancelClick: () => { 58 this.controller.close(); 59 } 60 }) 61 .alignSelf(ItemAlign.Center) 62 .margin({ 63 top: $r('app.float.privacy_statement_button_to_text_margin_top'), 64 bottom: $r('app.float.privacy_statement_text_tertiary_height') 65 }) 66 } 67 .alignItems(HorizontalAlign.Start) 68 .width($r('app.float.dialog_width')) 69 .backgroundColor(Color.White) 70 .borderRadius($r('app.float.radius_l')) 71 .padding({ 72 left: $r('app.float.connect_dialog_text_margin_left'), 73 right: $r('app.float.connect_dialog_text_margin_right') 74 }) 75 } 76}