diff --git a/common/component/src/main/ets/components/CusDialogComp.ets b/common/component/src/main/ets/components/CusDialogComp.ets index 03bcf2d..9520cf6 100644 --- a/common/component/src/main/ets/components/CusDialogComp.ets +++ b/common/component/src/main/ets/components/CusDialogComp.ets @@ -555,6 +555,8 @@ export struct EditContentDialog { .height(16) .width(16) .margin({ top: 8 }) + .opacity(0.6) + .fillColor('#99182431') .onClick(() => { this.editContentDialogCtl.close() }) diff --git a/common/component/src/main/ets/components/NoteContentComp.ets b/common/component/src/main/ets/components/NoteContentComp.ets index a805d36..c00cfec 100644 --- a/common/component/src/main/ets/components/NoteContentComp.ets +++ b/common/component/src/main/ets/components/NoteContentComp.ets @@ -149,7 +149,7 @@ export struct NoteContentComp { .height('70%') .width('100%') } - .margin({ left: 12, right: 24, top: 16 }) + .margin({ left: 12, right: 24 }) .width(StyleConstants.PERCENTAGE_100) .enabled(this.selectedNoteData && this.selectedNoteData.is_deleted == Delete.Yes ? false : true) .onClick(() => { @@ -195,13 +195,14 @@ export struct NoteContentComp { @Component export struct NoteContentOverViewComp { @Consume('SelectedNoteData') selectedNoteData: NoteData - @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = [] + @StorageLink('AllFolderArray') @Watch('getArray') AllFolderArray: FolderData[] = [] @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') @Consume('SelectedFolderData') selectedFolderData: FolderData @Consume('EditModel') editModel: boolean @Consume('SectionStatus') sectionStatus: number @Consume('RefreshFlag') refreshFlag: number + NoteDataMoveArray: FolderData[] controllerShow: WebController editTitleDialogCtl: CustomDialogController = new CustomDialogController({ builder: EditTitleDialog({ confirm: this.confirm.bind(this) }), @@ -210,6 +211,15 @@ export struct NoteContentOverViewComp { customStyle: true, }) + getArray() { + this.NoteDataMoveArray = this.AllFolderArray.slice(2, this.AllFolderArray.length); + this.NoteDataMoveArray.push(this.AllFolderArray[1]); + } + aboutToAppear() { + this.NoteDataMoveArray = this.AllFolderArray.slice(2, this.AllFolderArray.length); + this.NoteDataMoveArray.push(this.AllFolderArray[1]); + } + confirm(newTitle: string) { this.selectedNoteData.title = newTitle this.selectedNoteData.modified_time = new Date().getTime() @@ -221,9 +231,9 @@ export struct NoteContentOverViewComp { @Builder MenuBuilder() { Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { List() { - ForEach(this.AllFolderArray, (item) => { + ForEach(this.NoteDataMoveArray, (item) => { ListItem() { - NoteDataMoveItemComp({ folderItem: item }) + NoteDataMoveItemCompTablet({ folderItem: item, uuid: this.selectedNoteData.folder_uuid }) } .onClick(() => { this.selectedNoteData.folder_uuid = item.uuid @@ -580,10 +590,11 @@ export struct ToolBarComp { } @Component -struct NoteDataMoveItemComp { +struct NoteDataMoveItemCompTablet { @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = [] - private folderItem: FolderData + folderItem: FolderData + uuid: String build() { Flex({ alignItems: ItemAlign.Center, wrap: FlexWrap.NoWrap, justifyContent: FlexAlign.Center }) { @@ -593,7 +604,7 @@ struct NoteDataMoveItemComp { .width(24) .height(24) .flexShrink(0) - .fillColor(FolderUtil.getFolderIconColor(this.AllFolderArray, this.folderItem.uuid, false)) + .fillColor(FolderUtil.getFolderIconColor(this.AllFolderArray, this.folderItem.uuid, this.folderItem.uuid == this.uuid)) } .width(24) @@ -601,7 +612,7 @@ struct NoteDataMoveItemComp { Flex({ alignItems: ItemAlign.Center, wrap: FlexWrap.NoWrap, justifyContent: FlexAlign.SpaceBetween }) { Text(FolderUtil.getFolderText(this.folderItem)) .fontSize(16) - .fontColor(FolderUtil.getFolderIconColor(this.AllFolderArray, this.folderItem.uuid, false)) + .fontColor(FolderUtil.getFolderIconColor(this.AllFolderArray, this.folderItem.uuid == this.uuid ? this.folderItem.uuid : '', this.folderItem.uuid == this.uuid)) .textAlign(TextAlign.Center) .maxLines(1) .textOverflow({ overflow: TextOverflow.Ellipsis }) @@ -610,9 +621,11 @@ struct NoteDataMoveItemComp { .width('100%') .height(55) - Divider() - .color($r("app.color.divider_color_e4e4e4")) - .strokeWidth(1) + if (this.folderItem.uuid != SysDefFolderUuid.UnClassified) { + Divider() + .color($r("app.color.divider_color_e4e4e4")) + .strokeWidth(1) + } } .padding({ left: 16 }) } diff --git a/common/component/src/main/ets/components/NoteListComp.ets b/common/component/src/main/ets/components/NoteListComp.ets index 7b0ef22..b7a5b18 100644 --- a/common/component/src/main/ets/components/NoteListComp.ets +++ b/common/component/src/main/ets/components/NoteListComp.ets @@ -56,12 +56,10 @@ export struct NoteListComp { NoteOverViewComp({ controllerShow: this.controllerShow }) Column() { } - .backgroundColor($r('app.color.notelist_bgcolor_f1f3f5')) .height(this.search ? 15 : 0) NoteItemListComp({ controllerShow: this.controllerShow }) } - .backgroundColor($r('app.color.notelist_bgcolor_f1f3f5')) .width('100%') .flexShrink(1) @@ -69,9 +67,7 @@ export struct NoteListComp { OperateNoteCompForPortrait() } .flexShrink(0) - .backgroundColor($r('app.color.notelist_bgcolor_f1f3f5')) } - .backgroundColor($r('app.color.notelist_bgcolor_f1f3f5')) .height('100%') .width('100%') } @@ -139,6 +135,7 @@ struct NoteOverViewComp { .fontColor($r("app.color.num_of_notes_font_color")) .textOverflow({ overflow: TextOverflow.Ellipsis }) } + .margin({ top: 5 }) .visibility((FolderUtil.getNoteCount(AppStorage.Get('AllNoteArray'), this.selectedFolderData.uuid) == 0) ? Visibility.None : Visibility.Visible) }.visibility(this.longpress ? Visibility.None : Visibility.Visible) @@ -167,7 +164,6 @@ struct NoteOverViewComp { OperateNoteComp({ controllerShow: this.controllerShow }) Text(this.refreshFlag.toString()).visibility(Visibility.None) } - .backgroundColor($r('app.color.notelist_bgcolor_f1f3f5')) .width('100%') .height(82) .padding({ left: this.sectionStatus == 2 ? 24 : 36, right: 24 }) // 两分栏时缩进图标与左侧不需要间距 @@ -371,7 +367,6 @@ export struct NoteItemListComp { } .width("100%") .padding({ left: 24, right: 24, bottom: 12 }) - .backgroundColor($r("app.color.notelist_bgcolor_f1f3f5")) .visibility((FolderUtil.getNoteCount(AppStorage.Get('AllNoteArray'), this.selectedFolderData.uuid) == 0) ? Visibility.None : Visibility.Visible) Stack() { @@ -382,7 +377,6 @@ export struct NoteItemListComp { .fontColor($r("app.color.Recently_delete_prompt_font_color")) } .padding({ bottom: this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes ? 12 : 0 }) - .backgroundColor($r("app.color.notelist_bgcolor_f1f3f5")) .width('100%') .visibility(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes ? Visibility.Visible : Visibility.None) @@ -398,7 +392,6 @@ export struct NoteItemListComp { .fontColor($r("app.color.Empty_page_font_color")) } } - .backgroundColor($r("app.color.notelist_bgcolor_f1f3f5")) .width('100%') .height('100%') .padding({ bottom: 120 }) @@ -416,16 +409,13 @@ export struct NoteItemListComp { } .padding({ left: 24, right: 24, bottom: 12 }) } - .backgroundColor($r("app.color.notelist_bgcolor_f1f3f5")) }, noteItem => noteItem.uuid.toString()) } .layoutWeight(1) - .backgroundColor($r("app.color.notelist_bgcolor_f1f3f5")) .listDirection(Axis.Vertical) .edgeEffect(EdgeEffect.Spring) } .layoutWeight(1) - .backgroundColor($r("app.color.notelist_bgcolor_f1f3f5")) .height("100%") .margin({ top: this.search ? 8 : 0 }) } @@ -441,10 +431,8 @@ export struct NoteItemListComp { .opacity(0.1) .visibility(this.search ? Visibility.Visible : Visibility.Hidden) } - .backgroundColor($r("app.color.notelist_bgcolor_f1f3f5")) .flexShrink(1) } - .backgroundColor($r("app.color.notelist_bgcolor_f1f3f5")) .flexShrink(1) .onClick(() => { this.search = false @@ -711,7 +699,6 @@ export struct SearchComp { .border({ width: 1.5, color: $r("app.color.divider_color_e4e4e4") }) .margin({ right: this.search ? 40 : 0 }) } - .backgroundColor($r('app.color.notelist_bgcolor_f1f3f5')) } } @@ -822,7 +809,6 @@ export struct OperateNoteCompForPortrait { .fontColor($r("app.color.set_top_font_color")) .padding({ top: 5 }) } - .backgroundColor($r('app.color.notelist_bgcolor_f1f3f5')) .width("25%") .height("100%") .opacity(this.greyOpacity ? 0.4 : 1) @@ -846,7 +832,6 @@ export struct OperateNoteCompForPortrait { .fontColor($r("app.color.delete_font_color")) .padding({ top: 5 }) } - .backgroundColor($r('app.color.notelist_bgcolor_f1f3f5')) .width(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes? 120 :"25%") .height("100%") .opacity(this.greyOpacity ? 0.4 : 1) @@ -870,7 +855,6 @@ export struct OperateNoteCompForPortrait { .fontColor($r("app.color.move_font_color")) .padding({ top: 5 }) } - .backgroundColor($r('app.color.notelist_bgcolor_f1f3f5')) .width("25%") .height("100%") .opacity(this.greyOpacity ? 0.4 : 1) @@ -905,7 +889,6 @@ export struct OperateNoteCompForPortrait { .fontColor($r("app.color.recover_font_color")) .padding({ top: 5 }) } - .backgroundColor($r('app.color.notelist_bgcolor_f1f3f5')) .width(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes? 120 :"25%") .height("100%") .opacity(this.greyOpacity ? 0.4 : 1) @@ -934,7 +917,6 @@ export struct OperateNoteCompForPortrait { .fontColor($r("app.color.check_all_font_color")) .padding({ top: 5 }) } - .backgroundColor($r('app.color.notelist_bgcolor_f1f3f5')) .width(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes? 120 :"25%") .height("100%") .alignItems(HorizontalAlign.Center) diff --git a/common/resources/src/main/resources/rawfile/rich_editor.js b/common/resources/src/main/resources/rawfile/rich_editor.js index 1b0c41e..5789247 100644 --- a/common/resources/src/main/resources/rawfile/rich_editor.js +++ b/common/resources/src/main/resources/rawfile/rich_editor.js @@ -297,7 +297,7 @@ RICH_EDITOR.setTodo = function () { var parent = document.getElementById('editorjs'); var isContentEmpty = parent.innerHTML.trim().length === 0 || parent.innerHTML === '
'; var html = (isContentEmpty ? '' : '
') - + '' + + '' + ' '; document.execCommand('insertHTML', false, html); }; diff --git a/product/phone/src/main/ets/pages/NoteHomePortrait.ets b/product/phone/src/main/ets/pages/NoteHomePortrait.ets index cb63418..73bc668 100644 --- a/product/phone/src/main/ets/pages/NoteHomePortrait.ets +++ b/product/phone/src/main/ets/pages/NoteHomePortrait.ets @@ -62,6 +62,7 @@ export struct NoteHomePortraitComp { .width(StyleConstants.PERCENTAGE_100) .height(StyleConstants.PERCENTAGE_100) .enabled(this.expandStatus ? false : true) + .backgroundColor($r("app.color.notelist_bgcolor_f1f3f5")) //Folder list display area Stack() {