Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ An open source license scanning and display library for HarmonyOS.
## Features

- **End-to-end** — scans your dependencies at build time and displays the license list in your app. No manual JSON editing, no drift.
- **Prebuilt UI pages** — drop-in list and detail pages built on ArkUI & UI Design Kit components.
- **Prebuilt UI pages** — drop-in list/detail UI built on ArkUI & UI Design Kit, adaptive for both phone and large screens.
- **Custom UI, no problem** — use the core package alone to load and parse the license data and render it in any UI you build.
- **Always up to date** — the Hvigor plugin scans `oh_modules/` on every build. The license list always matches what you ship.
- **AI-assisted integration** — ships an Agent Skill so an AI can wire the library into your project for you.
Expand Down Expand Up @@ -77,24 +77,23 @@ export default {

On each build, the plugin scans `oh_modules/` and generates `entry/src/main/resources/rawfile/osslibraries.json`.

### Import the HAR pages (register named routes)
### Import the HAR page (register the named route)

At the top of a page file in the `entry` module (e.g. `Index.ets`), add:

```ets
import 'osslibraries_ui/src/main/ets/pages/OSSLibrariesLicenseListPage';
import 'osslibraries_ui/src/main/ets/pages/OSSLibrariesLicenseDetailPage';
import 'osslibraries_ui/src/main/ets/pages/OSSLibrariesLicensePage';
```

No changes are needed in `entry`'s `main_pages.json` — just keep its own pages.

### Navigate to the license list page
### Navigate to the license page

From any page in your app, navigate via `pushNamedRoute`:

```ets
this.getUIContext().getRouter().pushNamedRoute({
name: 'OSSLibrariesLicenseListPage'
name: 'OSSLibrariesLicensePage'
});
```

Expand Down
11 changes: 5 additions & 6 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
## 特性

- **端到端** — 从构建时扫描依赖到应用内展示 License 列表,一条链路走通,无需手动维护 JSON。
- **预定义 UI 页面** — 提供开箱即用的列表页与详情页,基于 ArkUI 和 UI Design Kit 组件。
- **预定义 UI 页面** — 提供开箱即用的列表¯¦æƒ… UI,基于 ArkUI å’Œ UI Design Kit 组件,且对手机与大屏自适应。
- **自定义 UI 亦可** — 可单独使用 Core 包加载并解析许可证数据,License 列表的渲染方式完全由你决定。
- **始终同步** — Hvigor 插件在每次构建时扫描 `oh_modules/`,License 列表永远跟随实际发布的依赖。
- **AI 辅助集成** — 提供 Agent Skill,可由 AI 代为完成项目接入。
Expand Down Expand Up @@ -82,19 +82,18 @@ export default {
在 `entry` 模块的页面文件顶部(如 `Index.ets`)添加:

```ets
import 'osslibraries_ui/src/main/ets/pages/OSSLibrariesLicenseListPage';
import 'osslibraries_ui/src/main/ets/pages/OSSLibrariesLicenseDetailPage';
import 'osslibraries_ui/src/main/ets/pages/OSSLibrariesLicensePage';
```

`entry` 模块的 `main_pages.json` 无需改动,只需保留自身页面即可。

### 跳转到许可列表页
### 跳转到许可页

在应用的任意页面中,通过 `pushNamedRoute` 跳转到列表页:
在应用的任意页面中,通过 `pushNamedRoute` 跳转到许可页:

```ets
this.getUIContext().getRouter().pushNamedRoute({
name: 'OSSLibrariesLicenseListPage'
name: 'OSSLibrariesLicensePage'
});
```

Expand Down
2 changes: 1 addition & 1 deletion entry/oh-package-lock.json5

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions entry/src/main/ets/pages/Index.ets
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'osslibraries_ui/src/main/ets/pages/OSSLibrariesLicenseListPage';
import 'osslibraries_ui/src/main/ets/pages/OSSLibrariesLicenseDetailPage';
import 'osslibraries_ui/src/main/ets/pages/OSSLibrariesLicensePage';
import { UI_LIST_PAGE_ROUTE } from 'osslibraries_ui/src/main/ets/constants/RouteNames';

@Entry
Expand Down
2 changes: 1 addition & 1 deletion entry/src/main/module.json5
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
type: "entry",
description: "$string:module_desc",
mainElement: "EntryAbility",
deviceTypes: ["phone"],
deviceTypes: ["phone", "tablet", "tv"],
deliveryWithInstall: true,
installationFree: false,
pages: "$profile:main_pages",
Expand Down
2 changes: 1 addition & 1 deletion entry/src/main/resources/rawfile/osslibraries.msgpack
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
‚©libraries–‹¨uniqueId¬@ohos/hamock¯artifactVersion¥1.0.0¤name¬@ohos/hamock«descriptionÙ-A mock framework for OpenHarmony application.§website ªdevelopers‘‚¤name¦huawei¯organisationUrl £scmÀ¬organizationÀ§funding£tag¨licenses‘Ù@9264a6b3c134511ccfcae48ed3808320688ae6933ec4fc547476a005095fc1ef‹¨uniqueId¬@ohos/hypium¯artifactVersion¦1.0.28¤name¬@ohos/hypium«descriptionÙ1A unit test framework for OpenHarmony application§websiteÙ.https://gitee.com/openharmony/testfwk_arkxtestªdevelopers‘‚¤name¦huawei¯organisationUrl £scmƒªconnection ³developerConnection £urlÙ.https://gitee.com/openharmony/testfwk_arkxtest¬organizationÀ§funding£tag“¬æµ‹è¯•框架¦except¤mock¨licenses‘Ù@0cec06e0e55fbc3dc5cee4fca9b607f66cb8f4e4dbcf3b3c013594dd156732e9‹¨uniqueId­@ohos/msgpack¯artifactVersion¥1.0.2¤name­@ohos/msgpack«descriptionÙŽThis library is an implementation of MessagePack for TypeScript and JavaScript, providing a compact and efficient binary serialization format.§website ªdevelopers‘‚¤name¨ohos_tpc¯organisationUrl £scmƒªconnection ³developerConnection £urlÙThttps://gitcode.com/openharmony-tpc/openharmony_tpc_samples/tree/master/ohos_msgpack¬organizationÀ§funding£tag“§msgpack©HarmonyOS«OpenHarmony¨licenses‘Ù@a0ecad9e3fd75dcac83c89ffe78180c784d47a37db94b87e18bd1a43e0f247ca‹¨uniqueId¬osslibraries¯artifactVersion¥0.0.4¤name¬osslibraries«descriptionÙo适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries çš„ Core 部分。§websiteÙ-https://github.com/composable-tu/osslibrariesªdevelopers‘‚¤name­composable-tu¯organisationUrlÙ https://github.com/composable-tu£scmƒªconnection ³developerConnection £urlÙ-https://github.com/composable-tu/osslibraries¬organizationÀ§funding£tag•¬osslibraries§license¨licenses«open-source£oss¨licenses‘Ù@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2‹¨uniqueId¯osslibraries_ui¯artifactVersion¥0.0.7¤name¯osslibraries_ui«descriptionÙv适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries 的预定义 UI 部分。§websiteÙ-https://github.com/composable-tu/osslibrariesªdevelopers‘‚¤name­composable-tu¯organisationUrlÙ https://github.com/composable-tu£scmƒªconnection ³developerConnection £urlÙ-https://github.com/composable-tu/osslibraries¬organizationÀ§funding£tag•¬osslibraries§license¨licenses«open-source£oss¨licenses‘Ù@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2‹¨uniqueId´osslibraries_ui_wear¯artifactVersion¥0.0.3¤name´osslibraries_ui_wear«descriptionى一个适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries 的预定义 UI(Wearable)部分。§websiteÙ-https://github.com/composable-tu/osslibrariesªdevelopers‘‚¤name­composable-tu¯organisationUrlÙ https://github.com/composable-tu£scmƒªconnection ³developerConnection £urlÙ-https://github.com/composable-tu/osslibraries¬organizationÀ§funding£tag—¬osslibraries§license¨licenses«open-source£oss¨wearable¤wear¨licenses‘Ù@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2¨licenses„Ù@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2…¤hashÙ@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2¤nameÙ,Mulan Permissive Software License, Version 2£urlÙ&https://license.coscl.org.cn/MulanPSL2¦spdxId¬MulanPSL-2.0§contentÚ$! 木兰宽松许可证, 第2版
‚©libraries–‹¨uniqueId¬@ohos/hamock¯artifactVersion¥1.0.0¤name¬@ohos/hamock«descriptionÙ-A mock framework for OpenHarmony application.§website ªdevelopers‘‚¤name¦huawei¯organisationUrl £scmÀ¬organizationÀ§funding£tag¨licenses‘Ù@9264a6b3c134511ccfcae48ed3808320688ae6933ec4fc547476a005095fc1ef‹¨uniqueId¬@ohos/hypium¯artifactVersion¦1.0.28¤name¬@ohos/hypium«descriptionÙ1A unit test framework for OpenHarmony application§websiteÙ.https://gitee.com/openharmony/testfwk_arkxtestªdevelopers‘‚¤name¦huawei¯organisationUrl £scmƒªconnection ³developerConnection £urlÙ.https://gitee.com/openharmony/testfwk_arkxtest¬organizationÀ§funding£tag“¬æµ‹è¯•框架¦except¤mock¨licenses‘Ù@0cec06e0e55fbc3dc5cee4fca9b607f66cb8f4e4dbcf3b3c013594dd156732e9‹¨uniqueId­@ohos/msgpack¯artifactVersion¥1.0.2¤name­@ohos/msgpack«descriptionÙŽThis library is an implementation of MessagePack for TypeScript and JavaScript, providing a compact and efficient binary serialization format.§website ªdevelopers‘‚¤name¨ohos_tpc¯organisationUrl £scmƒªconnection ³developerConnection £urlÙThttps://gitcode.com/openharmony-tpc/openharmony_tpc_samples/tree/master/ohos_msgpack¬organizationÀ§funding£tag“§msgpack©HarmonyOS«OpenHarmony¨licenses‘Ù@a0ecad9e3fd75dcac83c89ffe78180c784d47a37db94b87e18bd1a43e0f247ca‹¨uniqueId¬osslibraries¯artifactVersion¥0.0.4¤name¬osslibraries«descriptionÙo适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries çš„ Core 部分。§websiteÙ-https://github.com/composable-tu/osslibrariesªdevelopers‘‚¤name­composable-tu¯organisationUrlÙ https://github.com/composable-tu£scmƒªconnection ³developerConnection £urlÙ-https://github.com/composable-tu/osslibraries¬organizationÀ§funding£tag•¬osslibraries§license¨licenses«open-source£oss¨licenses‘Ù@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2‹¨uniqueId¯osslibraries_ui¯artifactVersion¥0.0.8¤name¯osslibraries_ui«descriptionÙv适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries 的预定义 UI 部分。§websiteÙ-https://github.com/composable-tu/osslibrariesªdevelopers‘‚¤name­composable-tu¯organisationUrlÙ https://github.com/composable-tu£scmƒªconnection ³developerConnection £urlÙ-https://github.com/composable-tu/osslibraries¬organizationÀ§funding£tag•¬osslibraries§license¨licenses«open-source£oss¨licenses‘Ù@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2‹¨uniqueId´osslibraries_ui_wear¯artifactVersion¥0.0.3¤name´osslibraries_ui_wear«descriptionى一个适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries 的预定义 UI(Wearable)部分。§websiteÙ-https://github.com/composable-tu/osslibrariesªdevelopers‘‚¤name­composable-tu¯organisationUrlÙ https://github.com/composable-tu£scmƒªconnection ³developerConnection £urlÙ-https://github.com/composable-tu/osslibraries¬organizationÀ§funding£tag—¬osslibraries§license¨licenses«open-source£oss¨wearable¤wear¨licenses‘Ù@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2¨licenses„Ù@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2…¤hashÙ@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2¤nameÙ,Mulan Permissive Software License, Version 2£urlÙ&https://license.coscl.org.cn/MulanPSL2¦spdxId¬MulanPSL-2.0§contentÚ$! 木兰宽松许可证, 第2版

木兰宽松许可证, 第2版
2020年1月 http://license.coscl.org.cn/MulanPSL2
Expand Down
2 changes: 1 addition & 1 deletion entry_wear/src/main/resources/rawfile/osslibraries.msgpack
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
‚©libraries–‹¨uniqueId¬@ohos/hamock¯artifactVersion¥1.0.0¤name¬@ohos/hamock«descriptionÙ-A mock framework for OpenHarmony application.§website ªdevelopers‘‚¤name¦huawei¯organisationUrl £scmÀ¬organizationÀ§funding£tag¨licenses‘Ù@9264a6b3c134511ccfcae48ed3808320688ae6933ec4fc547476a005095fc1ef‹¨uniqueId¬@ohos/hypium¯artifactVersion¦1.0.28¤name¬@ohos/hypium«descriptionÙ1A unit test framework for OpenHarmony application§websiteÙ.https://gitee.com/openharmony/testfwk_arkxtestªdevelopers‘‚¤name¦huawei¯organisationUrl £scmƒªconnection ³developerConnection £urlÙ.https://gitee.com/openharmony/testfwk_arkxtest¬organizationÀ§funding£tag“¬æµ‹è¯•框架¦except¤mock¨licenses‘Ù@0cec06e0e55fbc3dc5cee4fca9b607f66cb8f4e4dbcf3b3c013594dd156732e9‹¨uniqueId­@ohos/msgpack¯artifactVersion¥1.0.2¤name­@ohos/msgpack«descriptionÙŽThis library is an implementation of MessagePack for TypeScript and JavaScript, providing a compact and efficient binary serialization format.§website ªdevelopers‘‚¤name¨ohos_tpc¯organisationUrl £scmƒªconnection ³developerConnection £urlÙThttps://gitcode.com/openharmony-tpc/openharmony_tpc_samples/tree/master/ohos_msgpack¬organizationÀ§funding£tag“§msgpack©HarmonyOS«OpenHarmony¨licenses‘Ù@a0ecad9e3fd75dcac83c89ffe78180c784d47a37db94b87e18bd1a43e0f247ca‹¨uniqueId¬osslibraries¯artifactVersion¥0.0.4¤name¬osslibraries«descriptionÙo适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries çš„ Core 部分。§websiteÙ-https://github.com/composable-tu/osslibrariesªdevelopers‘‚¤name­composable-tu¯organisationUrlÙ https://github.com/composable-tu£scmƒªconnection ³developerConnection £urlÙ-https://github.com/composable-tu/osslibraries¬organizationÀ§funding£tag•¬osslibraries§license¨licenses«open-source£oss¨licenses‘Ù@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2‹¨uniqueId¯osslibraries_ui¯artifactVersion¥0.0.7¤name¯osslibraries_ui«descriptionÙv适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries 的预定义 UI 部分。§websiteÙ-https://github.com/composable-tu/osslibrariesªdevelopers‘‚¤name­composable-tu¯organisationUrlÙ https://github.com/composable-tu£scmƒªconnection ³developerConnection £urlÙ-https://github.com/composable-tu/osslibraries¬organizationÀ§funding£tag•¬osslibraries§license¨licenses«open-source£oss¨licenses‘Ù@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2‹¨uniqueId´osslibraries_ui_wear¯artifactVersion¥0.0.3¤name´osslibraries_ui_wear«descriptionى一个适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries 的预定义 UI(Wearable)部分。§websiteÙ-https://github.com/composable-tu/osslibrariesªdevelopers‘‚¤name­composable-tu¯organisationUrlÙ https://github.com/composable-tu£scmƒªconnection ³developerConnection £urlÙ-https://github.com/composable-tu/osslibraries¬organizationÀ§funding£tag—¬osslibraries§license¨licenses«open-source£oss¨wearable¤wear¨licenses‘Ù@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2¨licenses„Ù@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2…¤hashÙ@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2¤nameÙ,Mulan Permissive Software License, Version 2£urlÙ&https://license.coscl.org.cn/MulanPSL2¦spdxId¬MulanPSL-2.0§contentÚ$! 木兰宽松许可证, 第2版
‚©libraries–‹¨uniqueId¬@ohos/hamock¯artifactVersion¥1.0.0¤name¬@ohos/hamock«descriptionÙ-A mock framework for OpenHarmony application.§website ªdevelopers‘‚¤name¦huawei¯organisationUrl £scmÀ¬organizationÀ§funding£tag¨licenses‘Ù@9264a6b3c134511ccfcae48ed3808320688ae6933ec4fc547476a005095fc1ef‹¨uniqueId¬@ohos/hypium¯artifactVersion¦1.0.28¤name¬@ohos/hypium«descriptionÙ1A unit test framework for OpenHarmony application§websiteÙ.https://gitee.com/openharmony/testfwk_arkxtestªdevelopers‘‚¤name¦huawei¯organisationUrl £scmƒªconnection ³developerConnection £urlÙ.https://gitee.com/openharmony/testfwk_arkxtest¬organizationÀ§funding£tag“¬æµ‹è¯•框架¦except¤mock¨licenses‘Ù@0cec06e0e55fbc3dc5cee4fca9b607f66cb8f4e4dbcf3b3c013594dd156732e9‹¨uniqueId­@ohos/msgpack¯artifactVersion¥1.0.2¤name­@ohos/msgpack«descriptionÙŽThis library is an implementation of MessagePack for TypeScript and JavaScript, providing a compact and efficient binary serialization format.§website ªdevelopers‘‚¤name¨ohos_tpc¯organisationUrl £scmƒªconnection ³developerConnection £urlÙThttps://gitcode.com/openharmony-tpc/openharmony_tpc_samples/tree/master/ohos_msgpack¬organizationÀ§funding£tag“§msgpack©HarmonyOS«OpenHarmony¨licenses‘Ù@a0ecad9e3fd75dcac83c89ffe78180c784d47a37db94b87e18bd1a43e0f247ca‹¨uniqueId¬osslibraries¯artifactVersion¥0.0.4¤name¬osslibraries«descriptionÙo适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries çš„ Core 部分。§websiteÙ-https://github.com/composable-tu/osslibrariesªdevelopers‘‚¤name­composable-tu¯organisationUrlÙ https://github.com/composable-tu£scmƒªconnection ³developerConnection £urlÙ-https://github.com/composable-tu/osslibraries¬organizationÀ§funding£tag•¬osslibraries§license¨licenses«open-source£oss¨licenses‘Ù@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2‹¨uniqueId¯osslibraries_ui¯artifactVersion¥0.0.8¤name¯osslibraries_ui«descriptionÙv适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries 的预定义 UI 部分。§websiteÙ-https://github.com/composable-tu/osslibrariesªdevelopers‘‚¤name­composable-tu¯organisationUrlÙ https://github.com/composable-tu£scmƒªconnection ³developerConnection £urlÙ-https://github.com/composable-tu/osslibraries¬organizationÀ§funding£tag•¬osslibraries§license¨licenses«open-source£oss¨licenses‘Ù@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2‹¨uniqueId´osslibraries_ui_wear¯artifactVersion¥0.0.3¤name´osslibraries_ui_wear«descriptionى一个适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries 的预定义 UI(Wearable)部分。§websiteÙ-https://github.com/composable-tu/osslibrariesªdevelopers‘‚¤name­composable-tu¯organisationUrlÙ https://github.com/composable-tu£scmƒªconnection ³developerConnection £urlÙ-https://github.com/composable-tu/osslibraries¬organizationÀ§funding£tag—¬osslibraries§license¨licenses«open-source£oss¨wearable¤wear¨licenses‘Ù@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2¨licenses„Ù@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2…¤hashÙ@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2¤nameÙ,Mulan Permissive Software License, Version 2£urlÙ&https://license.coscl.org.cn/MulanPSL2¦spdxId¬MulanPSL-2.0§contentÚ$! 木兰宽松许可证, 第2版

木兰宽松许可证, 第2版
2020年1月 http://license.coscl.org.cn/MulanPSL2
Expand Down
2 changes: 1 addition & 1 deletion osslibraries_ui/BuildProfile.ets
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Use these variables when you tailor your ArkTS code. They must be of the const type.
*/
export const HAR_VERSION = '0.0.7';
export const HAR_VERSION = '0.0.8';
export const BUILD_MODE_NAME = 'debug';
export const DEBUG = true;
export const TARGET_NAME = 'default';
Expand Down
4 changes: 2 additions & 2 deletions osslibraries_ui/Index.ets
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

// OSSLibraries UI — reusable components, pages, and model types
export { LicenseItem } from './src/main/ets/components/LicenseItem';
export { LicenseDetailView } from './src/main/ets/components/LicenseDetailView';
export { buildTitleBarOpts, getMaterialLevel } from './src/main/ets/components/TitleBarBuilder';
export { LicenseDetailParams } from './src/main/ets/model/RouteParams';
export { OSSLibrariesLicenseListPage } from './src/main/ets/pages/OSSLibrariesLicenseListPage';
export { OSSLibrariesLicenseDetailPage } from './src/main/ets/pages/OSSLibrariesLicenseDetailPage';
export { OSSLibrariesLicensePage } from './src/main/ets/pages/OSSLibrariesLicensePage';
9 changes: 4 additions & 5 deletions osslibraries_ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,18 @@ export default {
在 `entry` 模块的页面文件顶部(如 `Index.ets`)添加:

```ets
import 'osslibraries_ui/src/main/ets/pages/OSSLibrariesLicenseListPage';
import 'osslibraries_ui/src/main/ets/pages/OSSLibrariesLicenseDetailPage';
import 'osslibraries_ui/src/main/ets/pages/OSSLibrariesLicensePage';
```

`entry` 模块的 `main_pages.json` 无需改动,只需保留自身页面即可。

### 跳转到许可列表页
### 跳转到许可页

在应用的任意页面中,通过 `pushNamedRoute` 跳转到列表页:
在应用的任意页面中,通过 `pushNamedRoute` 跳转到许可页:

```ets
this.getUIContext().getRouter().pushNamedRoute({
name: 'OSSLibrariesLicenseListPage'
name: 'OSSLibrariesLicensePage'
});
```

Expand Down
10 changes: 10 additions & 0 deletions osslibraries_ui/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## v0.0.9

- 优化:使 `navigateToDetail` 覆盖逻辑更安全

## v0.0.8

- 适配大屏设备,如平板、折叠屏、智慧屏。
- 该版本存在 API 变更:
- 列表页与详情页合并为单个自适应容器页 `OSSLibrariesLicensePage`,替换 `OSSLibrariesLicenseListPage` / `OSSLibrariesLicenseDetailPage`。

## v0.0.7

- 列表页改用 `osslibraries` 的 `LibsLoader.fromRawfile` 加载数据。
Expand Down
2 changes: 1 addition & 1 deletion osslibraries_ui/oh-package.json5
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
name: "osslibraries_ui",
version: "0.0.7",
version: "0.0.9",
description: "适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries 的预定义 UI 部分。",
main: "Index.ets",
author: {
Expand Down
Loading
Loading