From 5a2b85332158dbdad56aa3be58466403d41d3a7a Mon Sep 17 00:00:00 2001 From: Gloria Date: Wed, 23 Nov 2022 10:01:17 +0800 Subject: [PATCH] Update docs against 11278+8776 Signed-off-by: wusongqing --- .../apis/js-apis-bundle-ShortcutInfo.md | 21 ++-- .../js-apis-bundleManager-shortcutInfo.md | 37 ++++++ .../reference/apis/js-apis-uiappearance.md | 106 ------------------ 3 files changed, 48 insertions(+), 116 deletions(-) create mode 100644 en/application-dev/reference/apis/js-apis-bundleManager-shortcutInfo.md delete mode 100644 en/application-dev/reference/apis/js-apis-uiappearance.md diff --git a/en/application-dev/reference/apis/js-apis-bundle-ShortcutInfo.md b/en/application-dev/reference/apis/js-apis-bundle-ShortcutInfo.md index 9e70a90e4f..adf30d8b74 100644 --- a/en/application-dev/reference/apis/js-apis-bundle-ShortcutInfo.md +++ b/en/application-dev/reference/apis/js-apis-bundle-ShortcutInfo.md @@ -1,30 +1,32 @@ -# ShortcutInfo +# ShortcutInfo(deprecated) The **ShortcutInfo** module provides shortcut information defined in the configuration file. For details about the configuration in the FA model, see [config.json](../../quick-start/package-structure.md). For details about the configuration in the stage model, see [Internal Structure of the shortcuts Attribute](../../quick-start/stage-structure.md#internal-structure-of-the-shortcuts-attribute). > **NOTE** > +> This module is deprecated since API version 9. You are advised to use [ShortcutInfo](js-apis-bundleManager-shortcutInfo.md) instead. +> > The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version. -## ShortcutWant +## ShortcutWant(deprecated) -Describes the information about the target to which the shortcut points. +> This API is deprecated since API version 9. You are advised to use [ShortcutWant](js-apis-bundleManager-shortcutInfo.md) instead. -**System capability**: SystemCapability.BundleManager.BundleFramework + **System capability**: SystemCapability.BundleManager.BundleFramework -**System API**: This is a system API and cannot be called by third-party applications. + **System API**: This is a system API and cannot be called by third-party applications. | Name | Type | Readable| Writable| Description | | ------------------------- | ------ | ---- | ---- | -------------------- | | targetBundle | string | Yes | No | Target bundle of the shortcut.| -| targetModule9+ | string | Yes | No | Target module of the shortcut. | | targetClass | string | Yes | No | Target class required by the shortcut.| -## ShortcutInfo +## ShortcutInfo(deprecated) + +> This API is deprecated since API version 9. You are advised to use [ShortcutInfo](js-apis-bundleManager-shortcutInfo.md) instead. -Describes the shortcut attribute information. -**System capability**: SystemCapability.BundleManager.BundleFramework + **System capability**: SystemCapability.BundleManager.BundleFramework | Name | Type | Readable| Writable| Description | | ----------------------- | ------------------------------------------ | ---- | ---- | ---------------------------- | @@ -40,4 +42,3 @@ Describes the shortcut attribute information. | isStatic | boolean | Yes | No | Whether the shortcut is static. | | isHomeShortcut | boolean | Yes | No | Whether the shortcut is a home shortcut.| | isEnabled | boolean | Yes | No | Whether the shortcut is enabled. | -| moduleName9+ | string | Yes | No | Module name of the shortcut. | diff --git a/en/application-dev/reference/apis/js-apis-bundleManager-shortcutInfo.md b/en/application-dev/reference/apis/js-apis-bundleManager-shortcutInfo.md new file mode 100644 index 0000000000..0f1d6b7e99 --- /dev/null +++ b/en/application-dev/reference/apis/js-apis-bundleManager-shortcutInfo.md @@ -0,0 +1,37 @@ +# ShortcutInfo + +The **ShortcutInfo** module provides shortcut information defined in the configuration file. For details about the configuration in the FA model, see [config.json](../../quick-start/package-structure.md). For details about the configuration in the stage model, see [Internal Structure of the shortcuts Attribute](../../quick-start/stage-structure.md#internal-structure-of-the-shortcuts-attribute). + +> **NOTE** +> +> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. + +## ShortcutWant + +**System capability**: SystemCapability.BundleManager.BundleFramework.Launcher + +**System API**: This is a system API. + +| Name | Type | Readable| Writable| Description | +| ------------------------- | ------ | ---- | ---- | -------------------- | +| targetBundle | string | Yes | No | Target bundle name of the shortcut.| +| targetModule | string | Yes | No | Target module name of the shortcut. | +| targetAbility | string | Yes | No | Target ability name of the shortcut.| + +## ShortcutInfo + +**System capability**: SystemCapability.BundleManager.BundleFramework.Launcher + +**System API**: This is a system API. + +| Name | Type | Readable| Writable| Description | +| ----------------------- | ------------------------------------------ | ---- | ---- | ---------------------------- | +| id | string | Yes | No | ID of the application to which the shortcut belongs. | +| bundleName | string | Yes | No | Name of the bundle that contains the shortcut. | +| moduleName | string | Yes | No | Module name of the shortcut. | +| hostAbility | string | Yes | No | Local ability name of the shortcut. | +| icon | string | Yes | No | Icon of the shortcut. | +| iconId | number | Yes | No | Icon ID of the shortcut. | +| label | string | Yes | No | Label of the shortcut. | +| labelId | number | Yes | No | Label ID of the shortcut. | +| wants | Array\<[ShortcutWant](#shortcutwant)> | Yes | No | Want information required for the shortcut. | diff --git a/en/application-dev/reference/apis/js-apis-uiappearance.md b/en/application-dev/reference/apis/js-apis-uiappearance.md deleted file mode 100644 index 3bac964627..0000000000 --- a/en/application-dev/reference/apis/js-apis-uiappearance.md +++ /dev/null @@ -1,106 +0,0 @@ -# UI Appearance - -The **uiAppearance** module provides basic capabilities for managing the system appearance. It allows for color mode configuration currently, and will introduce more features over time. - -> **NOTE** -> -> The APIs of this module are supported since API version 9. Updates will be marked with a superscript to indicate their earliest API version. -> -> The APIs provided by this module are system APIs. - - -## Modules to Import - -```ts -import uiAppearance from '@ohos.uiAppearance' -``` - - -## DarkMode - -Enumerates the color modes. - - -**System capability**: SystemCapability.ArkUI.UiAppearance - -| Name| Value| Description| -| -- | -- | -- | -| ALWAYS_DARK | 0 | The system is always in dark mode. | -| ALWAYS_LIGHT | 1 | The system is always in light mode.| - - -## uiAppearance.setDarkMode - -setDarkMode(mode: DarkMode, callback: AsyncCallback\): void - -Sets the system color mode. This API uses an asynchronous callback to return the result. - -**Permission required**: ohos.permission.UPDATE_CONFIGURATION - -**System capability**: SystemCapability.ArkUI.UiAppearance - -**Parameters** -| Name| Type| Mandatory| Description| -| -- | -- | -- | -- | -| mode | [DarkMode](#darkmode) | Yes| Color mode to set.| -| callback | AsyncCallback\| Yes| Callback used to return the result.| - -**Example** - ```ts -uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK, (err) => { - console.info(`${err}`); -}) - ``` - - -## uiAppearance.setDarkMode - -setDarkMode(mode: DarkMode): Promise\; - -Sets the system color mode. This API uses a promise to return the result. - -**Permission required**: ohos.permission.UPDATE_CONFIGURATION - -**System capability**: SystemCapability.ArkUI.UiAppearance - -**Parameters** -| Name| Type| Mandatory| Description| -| -- | -- | -- | -- | -| mode | [DarkMode](#darkmode) | Yes| Color mode to set.| - -**Return value** - -| Type | Description | -| ------ | ------------------------------ | -| Promise\ | Promise that returns no value.| - -**Example** - ```ts -uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK).then(() => { - console.log('Set dark-mode successfully.'); -}).catch((err) => { - console.log(`Set dark-mode failed, ${err}`); -}); - ``` - - -## uiAppearance.getDarkMode - -getDarkMode(): DarkMode; - -Obtains the system color mode. - -**Permission required**: ohos.permission.UPDATE_CONFIGURATION - -**System capability**: SystemCapability.ArkUI.UiAppearance - -**Return value** -| Type| Description| -| -- | -- | -|[DarkMode](#darkmode) | Color mode obtained.| - -**Example** - ```ts -let darkMode = uiAppearance.getDarkMode(); -console.log(`Get dark-mode ${darkMode}`); - ``` -- GitLab