From dc71f3528ab02edfa1bbfdfc10e5e06bd180f2b1 Mon Sep 17 00:00:00 2001 From: liujuan Date: Thu, 30 May 2024 16:21:20 +0800 Subject: [PATCH] Signed-off-by: liujuan Changes to be committed: --- .../main/ets/default/model/common/TabItem.ets | 38 +++++++++---------- .../ets/default/view/actionbar/ToolBar.ets | 4 +- .../view/dialog/CancelOperationDialog.ets | 4 +- .../default/view/dialog/CopyOrMoveDialog.ets | 4 +- .../view/dialog/DeleteProgressDialog.ets | 6 +-- .../ets/default/view/dialog/DetailsDialog.ets | 20 +++++----- .../dialog/DownloadCancelOperationDialog.ets | 4 +- .../default/view/dialog/EditExitDialog.ets | 2 +- .../default/view/dialog/MultiSelectDialog.ets | 4 +- .../default/view/dialog/ProgressDialog.ets | 4 +- .../view/dialog/RemoveProgressDialog.ets | 6 +-- .../ets/default/view/dialog/SaveDialog.ets | 4 +- .../main/ets/default/view/MainMenuInfo.ets | 22 +++++------ .../src/main/ets/default/view/RefreshMenu.ets | 4 +- .../src/main/ets/view/TimelinePage.ets | 4 +- .../main/ets/view/SelectPhotoBrowserView.ets | 3 +- 16 files changed, 67 insertions(+), 66 deletions(-) diff --git a/common/src/main/ets/default/model/common/TabItem.ets b/common/src/main/ets/default/model/common/TabItem.ets index caabf096..31657ebe 100644 --- a/common/src/main/ets/default/model/common/TabItem.ets +++ b/common/src/main/ets/default/model/common/TabItem.ets @@ -16,17 +16,17 @@ import { Constants } from './Constants'; @Observed export class TabItem { - name: Resource; - iconResource: Resource; - iconSelectedResource: Resource; - iconDefault: Resource = $r('sys.color.ohos_id_color_bottom_tab_icon_off'); - iconSelected: Resource | null = null; - textColorDefault: Resource = $r('sys.color.ohos_id_color_text_primary'); - textColorSelected: Resource = $r('sys.color.ohos_id_color_bottom_tab_text_on'); - textFamilyDefault: Resource = $r('sys.string.ohos_id_text_font_family_medium'); - textFamilySelected: Resource = $r('sys.string.ohos_id_text_font_family_medium'); - isSelected: boolean; - componentKey: string; + public name: Resource; + public iconResource: Resource; + public iconSelectedResource: Resource; + public iconDefault: Resource = $r('sys.color.ohos_id_color_bottom_tab_icon_off'); + public iconSelected: Resource | null = null; + public textColorDefault: Resource = $r('sys.color.ohos_id_color_text_primary'); + public textColorSelected: Resource = $r('sys.color.ohos_id_color_bottom_tab_text_on'); + public textFamilyDefault: Resource = $r('sys.string.ohos_id_text_font_family_medium'); + public textFamilySelected: Resource = $r('sys.string.ohos_id_text_font_family_medium'); + public isSelected: boolean; + public componentKey: string; constructor(name: Resource, iconResource: Resource, iconSelectedResource: Resource, isSelected: boolean, textColorDefault: Resource, componentKey: string) { @@ -59,14 +59,14 @@ export class TabItem { // For Album Set @Observed export class TabItemWithText { - name: Resource; - isSelected: boolean; - textSizeDefault: Resource = $r('sys.float.ohos_id_text_size_body1'); - textSizeSelected: Resource = $r('sys.float.ohos_id_text_size_sub_title2'); - textWeightDefault: FontWeight = FontWeight.Regular; - textWeightSelected: FontWeight = FontWeight.Medium; - textColorDefault: Resource = $r('sys.color.ohos_id_color_bottom_tab_text_off'); - textColorSelected: Resource = $r('app.color.color_system_highlight'); + public name: Resource; + public isSelected: boolean; + public textSizeDefault: Resource = $r('sys.float.ohos_id_text_size_body1'); + public textSizeSelected: Resource = $r('sys.float.ohos_id_text_size_sub_title2'); + public textWeightDefault: FontWeight = FontWeight.Regular; + public textWeightSelected: FontWeight = FontWeight.Medium; + public textColorDefault: Resource = $r('sys.color.ohos_id_color_bottom_tab_text_off'); + public textColorSelected: Resource = $r('app.color.color_system_highlight'); constructor(name: Resource, isSelected: boolean) { this.name = name; diff --git a/common/src/main/ets/default/view/actionbar/ToolBar.ets b/common/src/main/ets/default/view/actionbar/ToolBar.ets index ee601ad5..cf7d8641 100644 --- a/common/src/main/ets/default/view/actionbar/ToolBar.ets +++ b/common/src/main/ets/default/view/actionbar/ToolBar.ets @@ -21,8 +21,8 @@ import { Action } from '../browserOperation/Action'; import { ActionBarMode } from '../browserOperation/ActionBarMode'; export class MenuItem { - value?: string; - action?: () => void; + public value?: string; + public action?: () => void; } @Component diff --git a/common/src/main/ets/default/view/dialog/CancelOperationDialog.ets b/common/src/main/ets/default/view/dialog/CancelOperationDialog.ets index 42f96394..52018aab 100644 --- a/common/src/main/ets/default/view/dialog/CancelOperationDialog.ets +++ b/common/src/main/ets/default/view/dialog/CancelOperationDialog.ets @@ -22,8 +22,8 @@ const TAG: string = 'common_CancelOperationDialog'; @Observed export class CancelParam { - continueFunc: Function = (): void => {}; - cancelFunc: Function = (): void => {}; + public continueFunc: Function = (): void => {}; + public cancelFunc: Function = (): void => {}; } @CustomDialog diff --git a/common/src/main/ets/default/view/dialog/CopyOrMoveDialog.ets b/common/src/main/ets/default/view/dialog/CopyOrMoveDialog.ets index c7f675b7..41b5cf55 100644 --- a/common/src/main/ets/default/view/dialog/CopyOrMoveDialog.ets +++ b/common/src/main/ets/default/view/dialog/CopyOrMoveDialog.ets @@ -21,8 +21,8 @@ const TAG: string = 'common_CopyOrMoveDialog'; @Observed export class OperateParam { - moveFunc: Function = (): void => {}; - copyFunc: Function = (): void => {}; + public moveFunc: Function = (): void => {}; + public copyFunc: Function = (): void => {}; } @CustomDialog diff --git a/common/src/main/ets/default/view/dialog/DeleteProgressDialog.ets b/common/src/main/ets/default/view/dialog/DeleteProgressDialog.ets index f48529e0..27b34d01 100644 --- a/common/src/main/ets/default/view/dialog/DeleteProgressDialog.ets +++ b/common/src/main/ets/default/view/dialog/DeleteProgressDialog.ets @@ -21,9 +21,9 @@ const TAG: string = 'common_DeleteProgressDialog'; @Observed export class DeleteProgressParam { - currentCount: number = 0; - totalCount: number = 0; - message?: Resource + public currentCount: number = 0; + public totalCount: number = 0; + public message?: Resource } @CustomDialog diff --git a/common/src/main/ets/default/view/dialog/DetailsDialog.ets b/common/src/main/ets/default/view/dialog/DetailsDialog.ets index fc09db35..ed9dceec 100644 --- a/common/src/main/ets/default/view/dialog/DetailsDialog.ets +++ b/common/src/main/ets/default/view/dialog/DetailsDialog.ets @@ -24,16 +24,16 @@ const TAG: string = 'common_DetailsDialog'; @Observed export class MediaDetails { - mediaType: number = 0; - height: number = 0; - width: number = 0; - size: number = 0; - duration: number = 0; - title: string = ''; - dateTaken: number = 0; - uri: string = ''; - displayName: string = ''; - dateModified: number = 0; + public mediaType: number = 0; + public height: number = 0; + public width: number = 0; + public size: number = 0; + public duration: number = 0; + public title: string = ''; + public dateTaken: number = 0; + public uri: string = ''; + public displayName: string = ''; + public dateModified: number = 0; } @CustomDialog diff --git a/common/src/main/ets/default/view/dialog/DownloadCancelOperationDialog.ets b/common/src/main/ets/default/view/dialog/DownloadCancelOperationDialog.ets index 6a420b77..ff1c7378 100644 --- a/common/src/main/ets/default/view/dialog/DownloadCancelOperationDialog.ets +++ b/common/src/main/ets/default/view/dialog/DownloadCancelOperationDialog.ets @@ -22,8 +22,8 @@ const TAG: string = 'common_DownloadCancelOperationDialog'; @Observed export class CancelParam { - continueFunc: Function = (): void => {}; - cancelFunc: Function = (): void => {}; + public continueFunc: Function = (): void => {}; + public cancelFunc: Function = (): void => {}; } @CustomDialog diff --git a/common/src/main/ets/default/view/dialog/EditExitDialog.ets b/common/src/main/ets/default/view/dialog/EditExitDialog.ets index 95113d41..98545579 100644 --- a/common/src/main/ets/default/view/dialog/EditExitDialog.ets +++ b/common/src/main/ets/default/view/dialog/EditExitDialog.ets @@ -19,7 +19,7 @@ import { Constants } from '../../model/common/Constants'; @Observed export class EditExitDialogCallback { - discardCallback: Function = (): void => {}; + public discardCallback: Function = (): void => {}; } @CustomDialog diff --git a/common/src/main/ets/default/view/dialog/MultiSelectDialog.ets b/common/src/main/ets/default/view/dialog/MultiSelectDialog.ets index 921da594..54f083a8 100644 --- a/common/src/main/ets/default/view/dialog/MultiSelectDialog.ets +++ b/common/src/main/ets/default/view/dialog/MultiSelectDialog.ets @@ -22,8 +22,8 @@ const TAG: string = 'common_MultiSelectDialog'; @Observed export class MultiSelectDetails { - count: number = 0; - size: number = 0; + public count: number = 0; + public size: number = 0; } @CustomDialog diff --git a/common/src/main/ets/default/view/dialog/ProgressDialog.ets b/common/src/main/ets/default/view/dialog/ProgressDialog.ets index 192dba02..2e3b8e36 100644 --- a/common/src/main/ets/default/view/dialog/ProgressDialog.ets +++ b/common/src/main/ets/default/view/dialog/ProgressDialog.ets @@ -22,8 +22,8 @@ const TAG: string = 'common_ProgressDialog'; @Observed export class ProgressParam { - cancelFunc: Function = (): void => {}; - operationType: string = ''; + public cancelFunc: Function = (): void => {}; + public operationType: string = ''; } @CustomDialog diff --git a/common/src/main/ets/default/view/dialog/RemoveProgressDialog.ets b/common/src/main/ets/default/view/dialog/RemoveProgressDialog.ets index e5ed1bc4..a4a74d1a 100644 --- a/common/src/main/ets/default/view/dialog/RemoveProgressDialog.ets +++ b/common/src/main/ets/default/view/dialog/RemoveProgressDialog.ets @@ -21,9 +21,9 @@ const TAG: string = 'common_RemoveProgressDialog'; @Observed export class RemoveProgressParam { - currentCount: number = 0; - totalCount: number = 0; - message?: Resource + public currentCount: number = 0; + public totalCount: number = 0; + public message?: Resource } @CustomDialog diff --git a/common/src/main/ets/default/view/dialog/SaveDialog.ets b/common/src/main/ets/default/view/dialog/SaveDialog.ets index 3a648e0d..5b498974 100644 --- a/common/src/main/ets/default/view/dialog/SaveDialog.ets +++ b/common/src/main/ets/default/view/dialog/SaveDialog.ets @@ -20,8 +20,8 @@ import { Constants } from '../../model/common/Constants'; @Observed export class SaveDialogCallback { - saveAsNewCallback: Function = (): void => {}; - replaceOriginalCallback: Function = (): void => {}; + public saveAsNewCallback: Function = (): void => {}; + public replaceOriginalCallback: Function = (): void => {}; } @Extend(Text) diff --git a/feature/editor/src/main/ets/default/view/MainMenuInfo.ets b/feature/editor/src/main/ets/default/view/MainMenuInfo.ets index 48f59857..8cbe07ab 100644 --- a/feature/editor/src/main/ets/default/view/MainMenuInfo.ets +++ b/feature/editor/src/main/ets/default/view/MainMenuInfo.ets @@ -36,17 +36,17 @@ export interface ActionInfo { } export class ActionButtonInfo { - src?: Resource; - isActive: boolean; - isDoubleClicked: boolean; - actionID?: number; - text: Resource | null = null; - mode: number = 0; - height: Resource | null = null; - width: Resource | null = null; - color: Resource | null = null; - uri: string = ''; - componentKey: string; + public src?: Resource; + public isActive: boolean; + public isDoubleClicked: boolean; + public actionID?: number; + public text: Resource | null = null; + public mode: number = 0; + public height: Resource | null = null; + public width: Resource | null = null; + public color: Resource | null = null; + public uri: string = ''; + public componentKey: string; constructor(action: ActionInfo) { this.src = action.src == undefined ? undefined : action.src; diff --git a/feature/editor/src/main/ets/default/view/RefreshMenu.ets b/feature/editor/src/main/ets/default/view/RefreshMenu.ets index 423d5882..123ca73c 100644 --- a/feature/editor/src/main/ets/default/view/RefreshMenu.ets +++ b/feature/editor/src/main/ets/default/view/RefreshMenu.ets @@ -17,8 +17,8 @@ import { ActionButtonInfo } from './MainMenuInfo'; import { Constants } from '@ohos/common'; export class RefreshActionMenu { - isChanged: number; - menuArray: Array; + public isChanged: number; + public menuArray: Array; constructor(isChanged: number, menuArray: Array) { this.isChanged = isChanged; diff --git a/feature/timeline/src/main/ets/view/TimelinePage.ets b/feature/timeline/src/main/ets/view/TimelinePage.ets index f8e14b5d..c43a4bb6 100644 --- a/feature/timeline/src/main/ets/view/TimelinePage.ets +++ b/feature/timeline/src/main/ets/view/TimelinePage.ets @@ -727,8 +727,8 @@ export struct TimelinePage { item: item.mediaItem, mPosition: item.viewIndex, isSelected: this.isSelectedMode ? - this.mSelectManager.isItemSelected((item.mediaItem as MediaItem).uri as string, item.viewIndex) : - false, + this.mSelectManager.isItemSelected((item.mediaItem as MediaItem).uri as string, + item.viewIndex) : false, pageName: Constants.PHOTO_TRANSITION_TIMELINE, onMenuClicked: (action: Action): void => this.onMenuClicked(action), onMenuClickedForSingleItem: (action: Action, currentPhoto: MediaItem): void => diff --git a/product/phone/src/main/ets/view/SelectPhotoBrowserView.ets b/product/phone/src/main/ets/view/SelectPhotoBrowserView.ets index 48225330..1e0b3d78 100644 --- a/product/phone/src/main/ets/view/SelectPhotoBrowserView.ets +++ b/product/phone/src/main/ets/view/SelectPhotoBrowserView.ets @@ -144,7 +144,8 @@ export struct SelectPhotoBrowserView { } else if (this.pageFrom == Constants.ENTRY_FROM.DISTRIBUTED) { this.dataSource.setDeviceId(param.deviceId); } - this.dataSource.setAlbumDataSource(AppStorage.get(Constants.APP_KEY_PHOTO_BROWSER) as MediaDataSource); + this.dataSource.setAlbumDataSource( + AppStorage.get(Constants.APP_KEY_PHOTO_BROWSER) as MediaDataSource); if (this.isMultiPick == true && this.selectManager) { this.selectedCount = this.selectManager.getSelectedCount(); }