From b5960393af4942201cc2c15f52fdd3e3e7549abd Mon Sep 17 00:00:00 2001 From: xdongs Date: Sat, 14 Dec 2024 15:11:13 +0800 Subject: [PATCH 1/2] prebuilt-hap Signed-off-by: xdongs --- services/ans/BUILD.gn | 27 ++++++++++++++++++ services/ans/etc/downloadTemplate.abc | Bin 0 -> 9940 bytes services/ans/etc/downloadTemplate.js | 2 ++ services/ans/etc/external.json | 3 ++ .../enable_notification_dialog/BUILD.gn | 4 +-- 5 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 services/ans/etc/downloadTemplate.abc create mode 100644 services/ans/etc/downloadTemplate.js create mode 100644 services/ans/etc/external.json diff --git a/services/ans/BUILD.gn b/services/ans/BUILD.gn index 6f83c2825..4f46ad43b 100644 --- a/services/ans/BUILD.gn +++ b/services/ans/BUILD.gn @@ -112,6 +112,9 @@ ohos_source_set("ans_service_sources") { "${frameworks_module_reminder_path}:reminder_innerkits", "../ans:ans.para", "../ans:ans.para.dac", + "../ans:downloadTemplate.abc", + "../ans:downloadTemplate.js", + "../ans:external.json", ] if (is_double_framework) { @@ -256,6 +259,9 @@ ohos_shared_library("libans") { "${services_path}/ans:ans_service_sources", "../ans:ans.para", "../ans:ans.para.dac", + "../ans:downloadTemplate.abc", + "../ans:downloadTemplate.js", + "../ans:external.json", "//third_party/icu/icu4c:shared_icuuc", "//third_party/libxml2:libxml2", ] @@ -342,3 +348,24 @@ ohos_prebuilt_etc("ans.para.dac") { subsystem_name = "${subsystem_name}" part_name = "${component_name}" } + +ohos_prebuilt_etc("external.json") { + source = "etc/external.json" + relative_install_dir = "notification_template" + subsystem_name = "${subsystem_name}" + part_name = "${component_name}" +} + +ohos_prebuilt_etc("downloadTemplate.abc") { + source = "etc/downloadTemplate.abc" + relative_install_dir = "notification_template/assets/js" + subsystem_name = "${subsystem_name}" + part_name = "${component_name}" +} + +ohos_prebuilt_etc("downloadTemplate.js") { + source = "etc/downloadTemplate.js" + relative_install_dir = "notification_template/assets/js" + subsystem_name = "${subsystem_name}" + part_name = "${component_name}" +} \ No newline at end of file diff --git a/services/ans/etc/downloadTemplate.abc b/services/ans/etc/downloadTemplate.abc new file mode 100644 index 0000000000000000000000000000000000000000..4bee22f50ceb0cca9eb1b6c188d438bd5680640b GIT binary patch literal 9940 zcmcIpeQaFWRljd$-h7Y8W5@B>j$tNnwKp5J@-obx-M_uTuguMJ-v9cGMmefP$far1oV0Ao80#=7z1!*zxR zaeW)(QQRkSfy{mm*I_&~1Qh=@+}Fa4eH~YQgt0+flej*LYY|ro*T-J3G^)+1b2O5o&GSXkwLpn*96J+e0xZa^V-aA8#-NpSyyx+y;;Q1X~jNU!HDsOfI*X z5K8q9q*y#_&1Y6}Wfm)1`K(oBU8&ywlwF!$EL29Va>mYC+41~*fyVo`8c(HqdsEBB z!a~t1m7dMyRxH+>I+dD-;ML3$y$q(7Go{iETfUrFf9XgKq_P`Tbfk_yK9ETDr^5T5edY<*D0NaXwe5u$J=1x8TFif9eN+ z{^q}Z<=(@Of088%RW7slIIDZ;eCl2ISAX=@7asmTfAISKho5=l;V-|*5dIS>)-t`E znX@if<%(tH5v!Byf%89j%N7fa<+Ci*d+gYL)-(@Y&ne^Do<)A_ zxlB&#V%}cXaj8(WUm|PtSo_VDQrVurLl%a5t@#tj-<3u`RML{J7ADJUvFfm~sM1r|^z5#?AcYvn8yLZWIKYkMr@Y>!UJ1#47t zW?37-joL+|8QqN?Sy|3v=09hb7iH_YmMLbC;)rS*9kZFaTMNa)NVXl%?CZ#Y>dy$=$=#~w>(zfvALoJquAk@nJs$EmF=Rv5d%^8 z7O;dQmNKg}uS+aM$zbtR@5#R7{k<$Ty)s*xE84SG@k%C-=~-kQ)aX^S!(Zz()&{IX z2CYI^d)O&jRPd0ns~xdGhORv?B}tN2aPwj zq5IeaDgXDI=^Ee1ep}MTw)EE}y}NU3`+V$GNq=D*I%5x{eXnh%Yx{ldTT=cP_H2jm z_mh8rxDB1LH>Ldj)F$~_e7+;;|FA9nZCM}xyDj}kQvUG1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DbY= z6tRYdP-O@n^^LIT522sM(a-AP`O97Huq5JyB49zEA(n_(rJHPd)dQ{?M*I6?5DPHq zrZD_fJAzPBYYhFtnjHacN7xC5m8sM_!eW(fL70m0S1|%$s5OKBKn=sMF+xs&+=UwY zP78@ux&?rNELAc5U_fG31L*hHFiedRbo^v0)DR2$KHdDlKnkiDI2v4^^!;WH!>2I< zj!C9M4fTb9Sf!f@3@kZS3?CR!SG1~_qTg4;@M;Xd<0Dg1Ma1G)>yHl@IMRQj1=MEg zlPzF#x2RRq`?J<2^ZT>by2=x*N%Ie|9Qt-S-Zsb6>KH8!OQKerQL8&qt4+d(UHK<@ zBMx3;u9w%jjp79lmbkc6Z@Beh(O_h5IT7saB}UAtiz$rwMg!`T zRGs*207gu#QcSTMa_S8H$3U4Fb;41N5p`lwnRQsCd{R!R6Z(3>h>BH8A-bCrGw^>5 zg+WtOV?>;2MA;GBXlY%NsuPnQ7?^gHF!VVmYPeC2LDNcOgq=uu?GSBZq8lxZsnhs6 z!oaknj)!*WL<~2gF=$$8jF1x!tpk@yrBQPQSbI)qG7@GJEq~9j^A+o#B;B@!9!fxAf4aK-}+IydM7IVeCk%)hJF43 OHh^#ApDzcoANxO!>jKXJ literal 0 HcmV?d00001 diff --git a/services/ans/etc/downloadTemplate.js b/services/ans/etc/downloadTemplate.js new file mode 100644 index 000000000..fe795e0e6 --- /dev/null +++ b/services/ans/etc/downloadTemplate.js @@ -0,0 +1,2 @@ +(()=>{"use strict";var e={};(()=>{var t=e;Object.defineProperty(t,"__esModule",{value:!0});const o="Template-DownloadTemplate";class i extends View{constructor(e,t,o){super(e,t),this.icon=null,this.__title=new ObservedPropertySimple("",this,"title"),this.__detailedInfo=new ObservedPropertySimple("",this,"detailedInfo"),this.__passTime=new ObservedPropertySimple(0,this,"passTime"),this.__fileName=new ObservedPropertySimple("",this,"fileName"),this.__progressValue=new ObservedPropertySimple(40,this,"progressValue"),this.__isShowDetailedInfo=new ObservedPropertySimple(!1,this,"isShowDetailedInfo"),this.updateWithValueParams(o)}updateWithValueParams(e){void 0!==e.icon&&(this.icon=e.icon),void 0!==e.title&&(this.title=e.title),void 0!==e.detailedInfo&&(this.detailedInfo=e.detailedInfo),void 0!==e.passTime&&(this.passTime=e.passTime),void 0!==e.fileName&&(this.fileName=e.fileName),void 0!==e.progressValue&&(this.progressValue=e.progressValue),void 0!==e.isShowDetailedInfo&&(this.isShowDetailedInfo=e.isShowDetailedInfo)}aboutToBeDeleted(){this.__title.aboutToBeDeleted(),this.__detailedInfo.aboutToBeDeleted(),this.__passTime.aboutToBeDeleted(),this.__fileName.aboutToBeDeleted(),this.__progressValue.aboutToBeDeleted(),this.__isShowDetailedInfo.aboutToBeDeleted(),SubscriberManager.Get().delete(this.id())}get title(){return this.__title.get()}set title(e){this.__title.set(e)}get detailedInfo(){return this.__detailedInfo.get()}set detailedInfo(e){this.__detailedInfo.set(e)}get passTime(){return this.__passTime.get()}set passTime(e){this.__passTime.set(e)}get fileName(){return this.__fileName.get()}set fileName(e){this.__fileName.set(e)}get progressValue(){return this.__progressValue.get()}set progressValue(e){this.__progressValue.set(e)}get isShowDetailedInfo(){return this.__isShowDetailedInfo.get()}set isShowDetailedInfo(e){this.__isShowDetailedInfo.set(e)}aboutToAppear(){console.log(`${o} ------\x3e aboutToAppear, icon: ${JSON.stringify(this.icon)}`),console.log(`${o} ------\x3e aboutToAppear, title: ${this.title}`),console.log(`${o} ------\x3e aboutToAppear, detailedInfo: ${this.detailedInfo}`),console.log(`${o} ------\x3e aboutToAppear, passTime: ${this.passTime}`),console.log(`${o} ------\x3e aboutToAppear, fileName: ${this.fileName}`),console.log(`${o} ------\x3e aboutToAppear, progressValue: ${this.progressValue}`)}render(){Flex.create({direction:FlexDirection.Column,alignItems:ItemAlign.Center,justifyContent:FlexAlign.Start}),Flex.width("100%"),Flex.margin({top:12,bottom:12}),Flex.border({width:1,color:Color.White,radius:30}),Flex.backgroundColor(Color.White),Column.create({space:10}),Column.alignItems(HorizontalAlign.Center),Column.width("100%"),Row.create({space:10}),Row.alignItems(VerticalAlign.Center),Row.align(Alignment.Start),Row.margin({bottom:12}),Row.width("100%"),If.create(),this.icon&&(If.branchId(0),Image.create(this.icon),Image.objectFit(ImageFit.Contain),Image.width(16),Image.height(16)),If.pop(),Text.create(this.title),Text.fontColor("#182431"),Text.fontSize("12"),Text.fontWeight(FontWeight.Regular),Text.align(Alignment.Start),Text.pop(),Text.create("已完成:"),Text.fontColor("#182431"),Text.fontSize("12"),Text.fontWeight(FontWeight.Regular),Text.pop(),Text.create(`${this.progressValue}%`),Text.fontColor("#182431"),Text.fontSize("12"),Text.fontWeight(FontWeight.Regular),Text.pop(),Text.create(`${this.passTime}分钟前`),Text.fontColor("#182431"),Text.fontSize("12"),Text.fontWeight(FontWeight.Regular),Text.pop(),Row.pop(),Flex.create({justifyContent:FlexAlign.SpaceBetween}),Flex.width("100%"),Row.create({space:5}),Row.flexShrink(0),Row.alignItems(VerticalAlign.Center),Row.align(Alignment.Start),Text.create("标题:正在接收"),Text.fontColor("#182431"),Text.fontSize("14"),Text.pop(),Text.create(this.fileName),Text.fontColor("#182431"),Text.fontSize("14"),Text.pop(),Row.pop(),Row.create(),Row.alignItems(VerticalAlign.Center),Row.align(Alignment.End),Row.onClick((()=>this.isShowDetailedInfo=!this.isShowDetailedInfo)),Text.create("文件详情"),Text.fontColor("#182431"),Text.fontSize("14"),Text.fontWeight(FontWeight.Regular),Text.pop(),Row.pop(),Flex.pop(),If.create(),this.isShowDetailedInfo&&(If.branchId(0),Row.create(),Row.alignItems(VerticalAlign.Center),Row.align(Alignment.Start),Row.width("100%"),Text.create(this.detailedInfo),Text.maxLines(3),Text.textOverflow({overflow:TextOverflow.Ellipsis}),Text.fontColor("#182431"),Text.fontSize("14"),Text.pop(),Row.pop()),If.pop(),Column.create(),Column.alignItems(HorizontalAlign.Start),Column.width("100%"),Progress.create({value:this.progressValue,total:100,style:ProgressStyle.Linear}),Progress.color(Color.Blue),Progress.value(this.progressValue),Progress.width("100%"),Column.pop(),Column.pop(),Flex.pop()}}t.default=i,loadDocument(new i("1",void 0,{}))})()})(); +//# sourceMappingURL=../_releaseMap/pages/downloadTemplate.js.map \ No newline at end of file diff --git a/services/ans/etc/external.json b/services/ans/etc/external.json new file mode 100644 index 000000000..5ad954018 --- /dev/null +++ b/services/ans/etc/external.json @@ -0,0 +1,3 @@ +{ + "downloadTemplate": "/system/etc/notification_template/assets/js/downloadTemplate.js" +} \ No newline at end of file diff --git a/services/dialog_ui/enable_notification_dialog/BUILD.gn b/services/dialog_ui/enable_notification_dialog/BUILD.gn index a30682425..660fb8af6 100644 --- a/services/dialog_ui/enable_notification_dialog/BUILD.gn +++ b/services/dialog_ui/enable_notification_dialog/BUILD.gn @@ -25,8 +25,8 @@ ohos_hap("enable_notification_dialog_hap") { certificate_profile = "signature/openharmony_sx.p7b" hap_name = "enable_notification_dialog" - subsystem_name = "application" - part_name = "prebuilt_hap" + subsystem_name = "notification" + part_name = "distributed_notification_service" module_install_dir = "app/com.ohos.notificationdialog" if (defined(sign_hap_py_path)) { certificate_profile = "${certificate_profile_path}" -- Gitee From c9c3c4222941aa18ac085ff9553ffd1264db02c5 Mon Sep 17 00:00:00 2001 From: xdongs Date: Sat, 14 Dec 2024 18:29:55 +0800 Subject: [PATCH 2/2] codecheck Signed-off-by: xdongs --- services/ans/BUILD.gn | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/ans/BUILD.gn b/services/ans/BUILD.gn index 4f46ad43b..49647f55a 100644 --- a/services/ans/BUILD.gn +++ b/services/ans/BUILD.gn @@ -355,17 +355,17 @@ ohos_prebuilt_etc("external.json") { subsystem_name = "${subsystem_name}" part_name = "${component_name}" } - + ohos_prebuilt_etc("downloadTemplate.abc") { source = "etc/downloadTemplate.abc" relative_install_dir = "notification_template/assets/js" subsystem_name = "${subsystem_name}" part_name = "${component_name}" } - + ohos_prebuilt_etc("downloadTemplate.js") { source = "etc/downloadTemplate.js" relative_install_dir = "notification_template/assets/js" subsystem_name = "${subsystem_name}" part_name = "${component_name}" -} \ No newline at end of file +} -- Gitee