From 192130da4bb409f9d3062766a2d81e377e1cca98 Mon Sep 17 00:00:00 2001 From: DCloud_LXH <283700113@qq.com> Date: Tue, 12 Dec 2023 11:58:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8D=87=E7=BA=A7=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=20uts-progressNotification=20=E6=8F=92?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../utssdk/interface.uts | 145 ------------------ .../uni-upgrade-center-app/changelog.md | 3 + .../uni-upgrade-center-app.uvue | 14 +- .../uni-upgrade-center-app/package.json | 5 +- .../pages/upgrade-popup.vue | 18 ++- .../utils/call-check-version.ts | 2 +- .../changelog.md | 7 + .../package.json | 40 +---- .../readme.md | 12 +- .../utssdk/app-android/AndroidManifest.xml | 6 +- .../app-android/TransparentActivity.uts | 0 .../utssdk/app-android/config.json | 0 .../utssdk/app-android/constant.uts | 0 .../utssdk/app-android/index.uts | 2 +- .../values/notification_progress_styles.xml | 0 .../utssdk/app-ios/config.json | 0 .../utssdk/app-ios/index.uts | 0 .../utssdk/interface.uts | 46 ++++++ .../utssdk/unierror.uts | 0 19 files changed, 96 insertions(+), 204 deletions(-) delete mode 100644 uni_modules/uni-progress-notification/utssdk/interface.uts rename uni_modules/{uni-progress-notification => uts-progressNotification}/changelog.md (66%) rename uni_modules/{uni-progress-notification => uts-progressNotification}/package.json (68%) rename uni_modules/{uni-progress-notification => uts-progressNotification}/readme.md (79%) rename uni_modules/{uni-progress-notification => uts-progressNotification}/utssdk/app-android/AndroidManifest.xml (78%) rename uni_modules/{uni-progress-notification => uts-progressNotification}/utssdk/app-android/TransparentActivity.uts (100%) rename uni_modules/{uni-progress-notification => uts-progressNotification}/utssdk/app-android/config.json (100%) rename uni_modules/{uni-progress-notification => uts-progressNotification}/utssdk/app-android/constant.uts (100%) rename uni_modules/{uni-progress-notification => uts-progressNotification}/utssdk/app-android/index.uts (98%) rename uni_modules/{uni-progress-notification => uts-progressNotification}/utssdk/app-android/res/values/notification_progress_styles.xml (100%) rename uni_modules/{uni-progress-notification => uts-progressNotification}/utssdk/app-ios/config.json (100%) rename uni_modules/{uni-progress-notification => uts-progressNotification}/utssdk/app-ios/index.uts (100%) create mode 100644 uni_modules/uts-progressNotification/utssdk/interface.uts rename uni_modules/{uni-progress-notification => uts-progressNotification}/utssdk/unierror.uts (100%) diff --git a/uni_modules/uni-progress-notification/utssdk/interface.uts b/uni_modules/uni-progress-notification/utssdk/interface.uts deleted file mode 100644 index e0e4799e..00000000 --- a/uni_modules/uni-progress-notification/utssdk/interface.uts +++ /dev/null @@ -1,145 +0,0 @@ -export type uni = { - /** - * createNotificationProgress() - * @description - * 创建通知栏下载进度消息 - * @param {CreateNotificationProgressOptions} - * @return {void} - * @uniPlatform { - * "app": { - * "android": { - * "osVer": "4.4", - * "uniVer": "3.9+", - * "unixVer": "3.9+" - * }, - * "ios": { - * "osVer": "x", - * "uniVer": "x", - * "unixVer": "x" - * } - * } - * } - * @example - ```typescript - uni.createNotificationProgress({ - title: "正在下载升级包", - content: "进度 50%", - progress: 50, - onClick:()=>{ - console.log("正在下载"); - } - } - ``` - */ - createNotificationProgress : (options : CreateNotificationProgressOptions) => void, - /** - * finishNotificationProgress() - * @description - * 通知栏显示下载完成,并且传入点击通知栏消息的回调。 - * @param {FinishNotificationProgressOptions} - * @return {void} - * @uniPlatform { - * "app": { - * "android": { - * "osVer": "4.4", - * "uniVer": "3.9+", - * "unixVer": "3.9+" - * }, - * "ios": { - * "osVer": "x", - * "uniVer": "x", - * "unixVer": "x" - * } - * } - * } - * @example - ```typescript - uni.finishNotificationProgress({ - title: "安装升级包", - content: "下载完成。", - onClick: () => { - uni.installApk({ - filePath: e.tempFilePath, - complete(res) { - console.log(res); - } - }) - } - } - ``` - */ - finishNotificationProgress : (options: FinishNotificationProgressOptions) => void, - /** - * cancelNotificationProgress() - * @description - * 取消通知消息显示 - * @param {void} - * @return {void} - * @uniPlatform { - * "app": { - * "android": { - * "osVer": "4.4", - * "uniVer": "3.9+", - * "unixVer": "3.9+" - * }, - * "ios": { - * "osVer": "x", - * "uniVer": "x", - * "unixVer": "x" - * } - * } - * } - * @example - ```typescript - uni.cancelNotificationProgress() - ``` - */ - cancelNotificationProgress : () => void -} - -export type CreateNotificationProgressOptions = { - /** - * 通知标题 - * @defaultValue 应用名称 - */ - title ?: string | null - /** - * 通知内容 - */ - content : string, - /** - * 进度 - */ - progress : number, - /** - * 点击通知消息回调 - * @defaultValue null - */ - onClick? : (() => void) | null -} - - -export type FinishNotificationProgressOptions = { - /** - * 通知标题 - * @defaultValue 应用名称 - */ - title ?: string | null - /** - * 通知内容 - */ - content : string, - /** - * 点击通知消息回调 - */ - onClick : () => void -} - - -export type CreateNotificationProgress = (options : CreateNotificationProgressOptions) => void; - - -export type CancelNotificationProgress = () => void; - - -export type FinishNotificationProgress = (options: FinishNotificationProgressOptions) => void \ No newline at end of file diff --git a/uni_modules/uni-upgrade-center-app/changelog.md b/uni_modules/uni-upgrade-center-app/changelog.md index e2b235c3..ae79e92c 100644 --- a/uni_modules/uni-upgrade-center-app/changelog.md +++ b/uni_modules/uni-upgrade-center-app/changelog.md @@ -1,3 +1,6 @@ +## 0.7.5(2023-12-12) +- 新增 通知栏进度条使用 uts-progressNotification 插件 +- 新增 依赖 uni-installApk、uts-progressNotification。使用前要安装插件三方依赖 ## 0.7.4(2023-11-29) - 修复 uni-app-x 项目中由上版引发的无法升级的Bug ## 0.7.3(2023-11-27) diff --git a/uni_modules/uni-upgrade-center-app/components/uni-upgrade-center-app/uni-upgrade-center-app.uvue b/uni_modules/uni-upgrade-center-app/components/uni-upgrade-center-app/uni-upgrade-center-app.uvue index e16b5e79..ed0d1aa9 100644 --- a/uni_modules/uni-upgrade-center-app/components/uni-upgrade-center-app/uni-upgrade-center-app.uvue +++ b/uni_modules/uni-upgrade-center-app/components/uni-upgrade-center-app/uni-upgrade-center-app.uvue @@ -62,6 +62,8 @@