[TicketNo:]AR000JP17R

[Description:]音乐XX项目开发-音频管理--Audio Picker界面
[Binary Source:]NA

Signed-off-by: nWX1290789 <niuyuanyuan6@h-partners.com>
This commit is contained in:
niuyuanyuan
2024-06-19 17:50:43 +08:00
committed by nWX1290789
parent 4f26e5c88f
commit e78542edb3
@@ -0,0 +1,93 @@
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved.
*/
import { DeviceInfo, DeviceTypes } from '../../common/global/globalmodel/GlobalModel';
import { createOrGet, globalKeys } from '../../common/global/GlobalThisHelper';
import { Logger } from '../../common/util/HiLogger'
const logger: Logger = new Logger("SafetyTipDialog")
/*
* 安全提示弹窗
* */
@CustomDialog
export struct SafetyTipDialog {
// 设备信息
private globalDeviceInfo: DeviceInfo = createOrGet(DeviceInfo, globalKeys.deviceInfo)
controller?: CustomDialogController
know?: () => void
build() {
Column() {
Stack() {
Image($r('app.media.ic_public_privacy_big'))
.height(28)
.fillColor($r('sys.color.ohos_id_color_component_activated'))
Image($r('app.media.img'))
.width(24)
.height(24)
.zIndex(99)
.borderRadius(5)
.position({
x: 24,
y: 24
})
}
.width(48)
.height(48)
.borderRadius(8)
.margin({ top: 24, bottom: 16 })
Text($r('app.string.secure_access_to_audio_library'))
.width(this.globalDeviceInfo.deviceType === DeviceTypes.PHONE ? 280 : 352)
.height(26)
.fontSize(20)
.fontWeight(FontWeight.Medium)
.fontFamily('HarmonyHeiTi')
.lineHeight(27)
.textAlign(TextAlign.Center)
Text($r('app.string.your_audio_will_be_displayed_here'))
.width(this.globalDeviceInfo.deviceType === DeviceTypes.PHONE ? 280 : 352)
.height(38)
.fontSize(14)
.fontWeight(FontWeight.Regular)
.fontFamily('HarmonyHeiTi')
.lineHeight(19)
.margin({
left: 24,
right: 24,
top: 8,
bottom: 16
})
.textAlign(TextAlign.Center)
Text($r('app.string.got_it'))
.width(this.globalDeviceInfo.deviceType === DeviceTypes.PHONE ? 280 : 352)
.height(40)
.margin({ left: 16, right: 16 })
.fontSize(16)
.fontWeight(FontWeight.Medium)
.fontFamily('HarmonyHeiTi')
.lineHeight(21)
.fontColor($r('sys.color.ohos_id_text_color_active'))
.textAlign(TextAlign.Center)
.onClick(() => {
if (this.know) {
this.know()
}
})
}
.width('100%')
.height(232)
.borderRadius(32)
.margin({ left: 16, right: 16 })
.alignItems(HorizontalAlign.Center)
.justifyContent(FlexAlign.Center)
}
}