• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16import DateUtil from '@ohos/utils/src/main/ets/default/baseUtil/DateUtil'
17import RdbStoreUtil from '@ohos/utils/src/main/ets/default/baseUtil/RdbStoreUtil'
18import FolderData from '@ohos/utils/src/main/ets/default/model/databaseModel/FolderData'
19import NoteData from '@ohos/utils/src/main/ets/default/model/databaseModel/NoteData'
20import util from '@ohos.util'
21import {
22  TableName,
23  NoteTableColumn,
24  SysDefFolderUuid,
25  Favorite,
26  Delete
27} from '@ohos/utils/src/main/ets/default/model/databaseModel/EnumData'
28import StyleConstants from '@ohos/utils/src/main/ets/default/constants/StyleConstants'
29import { EditContentDialog, EditTitleDialog } from './CusDialogComp'
30import FolderUtil from '@ohos/utils/src/main/ets/default/baseUtil/FolderUtil'
31import NoteUtil from '@ohos/utils/src/main/ets/default/baseUtil/NoteUtil'
32import { LogUtil } from '@ohos/utils/src/main/ets/default/baseUtil/LogUtil'
33import OperationUtils from '@ohos/utils/src/main/ets/default/baseUtil/OperationUtils'
34import router from '@system.router';
35import inputMethod from '@ohos.inputMethod';
36import { folderTextMap } from '@ohos/utils/src/main/ets/default/model/NoteBaseData'
37
38const TAG = "NoteContent"
39
40var timeID: number
41
42@Component
43export struct NoteContent {
44  @Provide('SelectedNoteData') selectedNoteData: NoteData = AppStorage.Get('NewNote')
45  @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray')
46  @Provide('Issave') issave: number = 0
47  @Provide('EditModel') editModel: boolean = false
48  @StorageLink('dpi') dpi: number = 240
49  controllerShow: WebviewController
50  private editContentFlag = false
51  @StorageLink('ScrollTopPercent') scrollTopPercent: number = 0.0
52
53  storeScrollTop(scrollTop: number) {
54    if (scrollTop < 0) {
55      return
56    }
57    AppStorage.SetOrCreate<number>('ScrollTopPercent', scrollTop / this.controllerShow.getPageHeight())
58  }
59
60  restoreScrollTop() {
61    if (!AppStorage.Has('remoteScrollTopPercent')) {
62      return
63    }
64    var scrollTopPercent = AppStorage.Get<number>('remoteScrollTopPercent')
65    if (scrollTopPercent < 0) {
66      return
67    }
68    this.controllerShow.runJavaScript(
69      'document.documentElement.scrollTop = ' + this.controllerShow.getPageHeight() * scrollTopPercent
70    )
71    AppStorage.Delete('remoteScrollTopPercent')
72  }
73
74  restoreFocus() {
75    if (!AppStorage.Has('isRemoteFocusOnSearch')) {
76      return
77    }
78    let isRemoteFocusOnSearch = AppStorage.Get<boolean>('isRemoteFocusOnSearch')
79    if (isRemoteFocusOnSearch) {
80      focusControl.requestFocus('searchInput')
81    }
82    AppStorage.Delete('isRemoteFocusOnSearch')
83  }
84
85  noteContent = {
86    callbackhtml: (html) => {
87      LogUtil.info(TAG, 'note uuid is:' + this.selectedNoteData.uuid)
88      this.selectedNoteData.content_text = html
89      this.selectedNoteData.modified_time = new Date().getTime()
90      let predicates_note = RdbStoreUtil.getRdbPredicates(TableName.NoteTable)
91      predicates_note.equalTo(NoteTableColumn.Uuid, this.selectedNoteData.uuid)
92      RdbStoreUtil.update(this.selectedNoteData.toNoteObject(), predicates_note, null)
93      LogUtil.info(TAG, 'update note success:' + this.selectedNoteData.uuid)
94      AppStorage.SetOrCreate<NoteData>('NewNote', this.selectedNoteData)
95      AppStorage.SetOrCreate<boolean>('needRefresh', true)
96      // save continue data
97      let continueNote: string = JSON.stringify(this.selectedNoteData.toNoteObject())
98      AppStorage.SetOrCreate<string>('ContinueNote', continueNote)
99      LogUtil.info(TAG, "callbackhtml, set continue note success")
100    },
101    callbackImagePath: (imgName) => {
102      // updata note image
103      LogUtil.info(TAG, 'note imgPath is:' + imgName)
104      this.selectedNoteData.content_img = imgName
105    },
106
107    callbackScheduledSave: (html) => {
108      LogUtil.info(TAG, 'callbackScheduledSave')
109      if (this.selectedNoteData.content_text == html) {
110        LogUtil.info(TAG, 'callbackScheduledSave the same value return')
111        return;
112      }
113      this.selectedNoteData.content_text = html
114      this.selectedNoteData.modified_time = new Date().getTime()
115      let predicates_note = RdbStoreUtil.getRdbPredicates(TableName.NoteTable)
116      predicates_note.equalTo(NoteTableColumn.Uuid, this.selectedNoteData.uuid)
117      RdbStoreUtil.update(this.selectedNoteData.toNoteObject(), predicates_note, null)
118      LogUtil.info(TAG, 'callbackScheduledSave, update note success:' + this.selectedNoteData.uuid)
119      // save continue data
120      let continueNote: string = JSON.stringify(this.selectedNoteData.toNoteObject())
121      LogUtil.info(TAG, 'continueNote content', continueNote)
122      AppStorage.SetOrCreate<string>('ContinueNote', continueNote)
123      LogUtil.info(TAG, 'callbackScheduledSave, set continue note success')
124    },
125    callbackPasteImage: (html) => {
126      if (html) {
127        LogUtil.info(TAG, 'paste info' + html)
128        let realHtml = ""
129        let base64regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/
130        if (html && html.indexOf("base64") > 0) {
131          LogUtil.info(TAG, " getSrcFromHtml, src[1] : " + html)
132          let imgData = html.split(',')[1];
133          let imgType = 'png'
134          if (html.indexOf("jpeg") > 0) {
135            imgType = 'jpg'
136          } else if (html.indexOf("gif") > 0) {
137            imgType = 'gif'
138          }
139          let filePath = ""
140          if (base64regex.test(imgData)) {
141            let base64 = new util.Base64()
142            let decodeArr = base64.decodeSync(imgData)
143            filePath = OperationUtils.saveImageData(decodeArr, imgType)
144          } else {
145            filePath = OperationUtils.saveImage(imgData, imgType)
146          }
147          realHtml = "file://" + filePath
148        }
149        LogUtil.info(TAG, 'paste info11' + realHtml)
150        this.controllerShow.runJavaScript("javascript:RICH_EDITOR.insertImageHtml('" + realHtml + "')")
151      } else {
152        LogUtil.info(TAG, 'paste info22223')
153      }
154    },
155    callbackGetSize: (fontSize) => {
156      if (fontSize === 16) {
157        this.selectedNoteData.slider_value = 0
158      } else if (fontSize === 18) {
159        this.selectedNoteData.slider_value = 4
160      } else if (fontSize === 24) {
161        this.selectedNoteData.slider_value = 8
162      } else if (fontSize === 32) {
163        this.selectedNoteData.slider_value = 12
164      } else if (fontSize === 48) {
165        this.selectedNoteData.slider_value = 16
166      }
167    }
168  }
169
170  build() {
171    Stack({ alignContent: Alignment.Bottom }) {
172      Flex({ direction: FlexDirection.Column, wrap: FlexWrap.NoWrap,
173        alignItems: ItemAlign.Start, alignContent: FlexAlign.SpaceAround }) {
174        Column() {
175          ToolBarComp({ controllerShow: this.controllerShow })
176        }.margin({ left: 24, right: 24 })
177
178        Column() {
179          NoteContentOverViewComp()
180
181          Web({ src: $rawfile('editor.html'), controller: this.controllerShow })
182            .javaScriptAccess(true)
183            .javaScriptProxy({
184              object: this.noteContent,
185              name: "callBackToApp", // html-->  name.method
186              methodList: ["callbackhtml", "callbackScheduledSave", "callbackPasteImage", "callbackImagePath", "callbackGetSize"],
187              controller: this.controllerShow
188            })
189            .onPageEnd((e) => {
190              if (this.dpi <= 240) {
191                this.controllerShow.runJavaScript("changeSizeToRk()")
192              } else if (this.dpi <= 320 && this.dpi > 240) {
193                this.controllerShow.runJavaScript("changeSizeToPhone()")
194              } else {
195                this.controllerShow.runJavaScript("changeSizeToTablet()")
196              }
197              if (AppStorage.Get('breakPoint') !== 'sm') {
198                this.controllerShow.runJavaScript("hiddenButton()")
199              }
200              LogUtil.info(TAG, "finish loadurl")
201              if (this.selectedNoteData) {
202                let self = this
203                this.controllerShow.runJavaScript(
204                  "RICH_EDITOR.setHtml('" + this.selectedNoteData.content_text + "')",
205                  () => {
206                    // wait for the image in the note to load
207                    setTimeout(function () {
208                      self.restoreScrollTop()
209                      self.restoreFocus()
210                    }, 100)
211                  }
212                )
213              }
214            })
215            .zoomAccess(false)
216            .imageAccess(true)
217            .onlineImageAccess(true)
218            .fileAccess(true)
219            .domStorageAccess(true)
220            .height('88%')
221            .width('100%')
222            .onScroll((event) => {
223              this.storeScrollTop(event.yOffset)
224            })
225            .onClick(() => {
226              // 添加定时器:3s自动保存
227              if (timeID) {
228                clearInterval(timeID)
229              }
230              timeID = setInterval(() => {
231                this.controllerShow.runJavaScript("scheduledSaveContent()")
232              }, 3000)
233              LogUtil.info(TAG, "setInterval timeID : " + timeID)
234              this.issave = 0
235              this.editModel = true
236            })
237        }
238        .margin({ left: 12, right: 24, top: 16 })
239      }
240      .height(StyleConstants.PERCENTAGE_100)
241    }
242    .height(StyleConstants.PERCENTAGE_100)
243    .width(StyleConstants.PERCENTAGE_100)
244  }
245
246  aboutToAppear(): void {
247    LogUtil.info(TAG, "aboutToAppear")
248  }
249
250  aboutToDisappear(): void {
251    AppStorage.Set("refreshCurrentNote", true)
252    NoteUtil.refreshAll()
253    clearInterval(timeID)
254    LogUtil.info(TAG, "aboutToDisappear")
255  }
256}
257
258@Component
259export struct ToolBarComp {
260  @Consume('SelectedNoteData') selectedNoteData: NoteData
261  @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray')
262  @Consume('Issave') issave: number
263  @Consume('EditModel') editModel: boolean
264  controllerShow: WebviewController
265  editContentDialogCtl: CustomDialogController = new CustomDialogController({
266    builder: EditContentDialog({ confirm: this.confirm.bind(this) }),
267    alignment: DialogAlignment.Bottom,
268    autoCancel: true,
269    customStyle: true,
270  })
271
272  aboutToDisappear() {
273    this.editContentDialogCtl = null
274  }
275
276  confirm(excuteJs: string) {
277    this.controllerShow.runJavaScript(excuteJs)
278  }
279
280  build() {
281    Flex({ direction: FlexDirection.Row, wrap: FlexWrap.NoWrap,
282      justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
283      Image($r('app.media.narrow'))
284        .height(24)
285        .width(24)
286        .onClick(() => {
287          this.controllerShow.runJavaScript("RICH_EDITOR.setInputEnabled(false)")
288          this.controllerShow.runJavaScript("getHtmlContent()")
289          // 清除定时器
290          if (timeID != undefined) {
291            LogUtil.info(TAG, "zoom, clearInterval timeID : " + timeID)
292            clearInterval(timeID)
293          }
294          AppStorage.Set("refreshCurrentNote", true)
295          router.back()
296          NoteUtil.refreshAll()
297        })
298        .visibility(this.selectedNoteData.is_deleted == Delete.Yes ? Visibility.None : Visibility.Visible)
299
300      if (this.editModel == false) {
301        Row({ space: StyleConstants.SPACE_24 }) {
302          Image(this.selectedNoteData.is_favorite == Favorite.Yes ? $r('app.media.favorite') : $r('app.media.favorite_cancel'))
303            .height(24).width(24)
304            .onClick(() => {
305              this.selectedNoteData.is_favorite = (this.selectedNoteData.is_favorite == Favorite.Yes ? Favorite.No : Favorite.Yes)
306              // update note to db
307              let predicates_note = RdbStoreUtil.getRdbPredicates(TableName.NoteTable)
308              predicates_note.equalTo(NoteTableColumn.Uuid, this.selectedNoteData.uuid)
309              RdbStoreUtil.update(this.selectedNoteData.toNoteObject(), predicates_note, null)
310              // save continue data
311              let continueNote: string = JSON.stringify(this.selectedNoteData.toNoteObject())
312              AppStorage.SetOrCreate<string>('ContinueNote', continueNote)
313              LogUtil.info(TAG, 'ToolBarComp, set continue note success')
314              NoteUtil.refreshAll()
315            })
316        }.width(36)
317        .visibility(this.selectedNoteData.is_deleted == Delete.Yes ? Visibility.None : Visibility.Visible)
318      } else {
319        Row({ space: StyleConstants.SPACE_6 }) {
320          Button({ type: ButtonType.Normal, stateEffect: true }) {
321            Image($r('app.media.circle_tick1'))
322              .height(24)
323              .width(24)
324              .onClick(() => {
325                // 退出键盘
326                // @ts-ignore
327                inputMethod.getController().stopInputSession();
328                // 清单
329                this.controllerShow.runJavaScript("javascript:RICH_EDITOR.setTodo()")
330              })
331          }.width(42)
332          .height(42)
333          .borderRadius(8)
334          .backgroundColor($r('app.color.color_fffffB'))
335
336          Button({ type: ButtonType.Normal, stateEffect: true }) {
337            Image($r('app.media.font_style'))
338              .height(24)
339              .width(24)
340              .onClick(() => {
341                // 退出键盘
342                // @ts-ignore
343                inputMethod.getController().stopInputSession();
344                LogUtil.info(TAG, 'editContentDialogCtl start')
345                this.editContentDialogCtl.open()
346              })
347          }.width(42)
348          .height(42)
349          .borderRadius(8)
350          .backgroundColor($r('app.color.color_fffffB'))
351
352          Button({ type: ButtonType.Normal, stateEffect: true }) {
353            Image($r('app.media.picture_white')).height(24).width(24)
354              .onClick(async () => {
355                // 退出键盘
356                // @ts-ignore
357                inputMethod.getController().stopInputSession();
358                LogUtil.info(TAG, 'startAbility start')
359                await globalThis.noteContext.startAbilityForResult({
360                  parameters: { uri: "singleselect" },
361                  bundleName: "com.ohos.photos",
362                  abilityName: "com.ohos.photos.MainAbility",
363                })
364                  .then(v => {
365                    let want = v['want'];
366                    if (want != null && want != undefined) {
367                      let param = want['parameters'];
368                      let imageUri = ""
369                      if (param != null && param != undefined) {
370                        let uri = param['select-item-list'];
371                        imageUri = uri[0];
372                      }
373                      // 拷贝
374                      if (imageUri != null && imageUri != "") {
375                        OperationUtils.copy(imageUri).then((uriPath) => {
376                          var path = "file://" + uriPath
377                          LogUtil.info(TAG, 'image uri is:' + path)
378                          this.controllerShow.runJavaScript(
379                            "javascript:RICH_EDITOR.insertImage('" + path + "')"
380                          )
381                          this.issave = 1
382                          // 保存笔记信息到数据库
383                          this.controllerShow.runJavaScript("getHtmlContent()")
384                        })
385                      }
386                    }
387                  });
388              })
389          }.width(42)
390          .height(42)
391          .borderRadius(8)
392          .backgroundColor($r('app.color.color_fffffB'))
393
394          Button({ type: ButtonType.Normal, stateEffect: true }) {
395            Image($r('app.media.undo'))
396              .height(24)
397              .width(24)
398              .onClick(() => {
399                // 退出键盘
400                // @ts-ignore
401                inputMethod.getController().stopInputSession();
402                this.controllerShow.runJavaScript("RICH_EDITOR.undo()")
403              })
404          }.width(42)
405          .height(42)
406          .borderRadius(8)
407          .backgroundColor($r('app.color.color_fffffB'))
408
409          Button({ type: ButtonType.Normal, stateEffect: true }) {
410            Image($r('app.media.todo'))
411              .height(24)
412              .width(24)
413              .onClick(() => {
414                // 退出键盘
415                // @ts-ignore
416                inputMethod.getController().stopInputSession();
417                this.controllerShow.runJavaScript("RICH_EDITOR.redo()")
418              })
419          }.width(42)
420          .height(42)
421          .borderRadius(8)
422          .backgroundColor($r('app.color.color_fffffB'))
423
424
425          Button({ type: ButtonType.Normal, stateEffect: true }) {
426            Image($r('app.media.tick_thick'))
427              .height(24)
428              .width(24)
429              .fillColor(this.issave == 0 ? Color.Black : Color.Grey)
430              .onClick(() => {
431                this.issave = 1
432                // 保存笔记信息到数据库
433                this.controllerShow.runJavaScript("getHtmlContent()")
434              })
435          }.width(42)
436          .height(42)
437          .borderRadius(8)
438          .backgroundColor($r('app.color.color_fffffB'))
439        }.width(274)
440      }
441    }
442    .width(StyleConstants.PERCENTAGE_100)
443    .height(80)
444  }
445}
446
447@Component
448export struct NoteContentOverViewComp {
449  @Consume('SelectedNoteData') selectedNoteData: NoteData
450  @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = []
451  @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = []
452  @StorageLink('isUpdate') isUpdate: boolean = false
453  editTitleDialogCtl: CustomDialogController = new CustomDialogController({
454    builder: EditTitleDialog({ confirm: this.confirm.bind(this) }),
455    alignment: DialogAlignment.Center,
456    autoCancel: false,
457    customStyle: true,
458  })
459
460  aboutToDisappear() {
461    this.editTitleDialogCtl = null
462  }
463
464  confirm(newTitle: string) {
465    this.selectedNoteData.title = newTitle
466    this.selectedNoteData.modified_time = new Date().getTime()
467    let predicates_note = RdbStoreUtil.getRdbPredicates(TableName.NoteTable)
468    predicates_note.equalTo(NoteTableColumn.Uuid, this.selectedNoteData.uuid)
469    RdbStoreUtil.update(this.selectedNoteData.toNoteObject(), predicates_note, null)
470    // save continue data
471    let continueNote: string = JSON.stringify(this.selectedNoteData.toNoteObject())
472    AppStorage.SetOrCreate<string>('ContinueNote', continueNote)
473    LogUtil.info(TAG, "NoteContentOverViewComp confirm, set continue note success")
474    NoteUtil.refreshAll()
475  }
476
477  @Builder MenuBuilder() {
478    Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
479      List() {
480        ForEach(this.AllFolderArray, (item) => {
481          ListItem() {
482            NoteDataMoveItemComp({ folderItem: item })
483          }
484          .onClick(() => {
485            this.selectedNoteData.folder_uuid = item.uuid
486            let predicates_note = RdbStoreUtil.getRdbPredicates(TableName.NoteTable)
487            predicates_note.equalTo(NoteTableColumn.Uuid, this.selectedNoteData.uuid)
488            RdbStoreUtil.update(this.selectedNoteData.toNoteObject(), predicates_note, null)
489            // save continue data
490            let continueNote: string = JSON.stringify(this.selectedNoteData.toNoteObject())
491            AppStorage.SetOrCreate<string>('ContinueNote', continueNote)
492            LogUtil.info(TAG, "NoteContentOverViewComp MenuBuilder, set continue note success")
493            NoteUtil.refreshAll()
494          })
495        }, noteItem => JSON.stringify(noteItem))
496      }.listDirection(Axis.Vertical)
497      .edgeEffect(EdgeEffect.Spring)
498      .height(this.AllFolderArray.length > 12 ? 504 : (this.AllFolderArray.length - 3) * 56)
499    }
500    .width(148)
501    .backgroundColor($r("app.color.color_fffffB"))
502    .padding({ left: 24, right: 24 })
503  }
504
505  build() {
506    if (this.selectedNoteData) {
507      Flex({ direction: FlexDirection.Column, wrap: FlexWrap.NoWrap,
508        justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
509        Row() {
510          Text(this.selectedNoteData.title)
511            .id(this.isUpdate + '')
512            .fontSize(30)
513            .margin({ left: 12, right: 24 })
514            .onClick(() => {
515              clearInterval(timeID)
516              this.editTitleDialogCtl.open()
517            })
518        }.height(40)
519        .width(StyleConstants.PERCENTAGE_100)
520
521        Row() {
522          Text(DateUtil.formateDateForNoteContent(new Date(this.selectedNoteData.modified_time)))
523            .id(this.isUpdate + '')
524            .fontSize(12)
525            .padding({ top: 4, bottom: 4 })
526            .fontColor($r("app.color.modified_time_font_color"))
527            .margin({ left: 12 })
528          Row() {
529            Text(FolderUtil.getFolderText(FolderUtil.getFolderData(AppStorage.Get('AllFolderArray'), this.selectedNoteData.folder_uuid)) ==
530                 folderTextMap["sys_def_myFavorites_uuid"] ? folderTextMap["sys_def_unClassified_uuid"] :
531            FolderUtil.getFolderText(FolderUtil.getFolderData(AppStorage.Get('AllFolderArray'), this.selectedNoteData.folder_uuid)))
532              .id(this.isUpdate + '')
533              .fontSize(12)
534              .fontColor($r("app.color.list_modified_time_font_color"))
535            Image($r('app.media.triangle'))
536              .width(6)
537              .height(12)
538              .margin({ left: 4 })
539          }
540          .padding({ left: 8, right: 8, top: 4, bottom: 4 })
541          .margin({ left: 8 })
542          .borderRadius(16)
543          .backgroundColor(NoteUtil.getNoteBgColor(AppStorage.Get('AllFolderArray'), this.selectedNoteData.folder_uuid, SysDefFolderUuid.AllNotes, false))
544          .bindMenu(this.MenuBuilder)
545        }.alignItems(VerticalAlign.Top).height(40).width(StyleConstants.PERCENTAGE_100)
546      }
547      .opacity(this.selectedNoteData.is_deleted == Delete.Yes ? 0.4 : 1)
548      .width(StyleConstants.PERCENTAGE_100)
549      .height(80)
550    }
551  }
552}
553
554@Component
555struct NoteDataMoveItemComp {
556  @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = []
557  @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = []
558  private folderItem: FolderData
559
560  build() {
561    Flex({ alignItems: ItemAlign.Center, wrap: FlexWrap.NoWrap, justifyContent: FlexAlign.Center }) {
562      Flex({ alignItems: ItemAlign.Center, wrap: FlexWrap.NoWrap }) {
563        Image(FolderUtil.getFolderIcon(this.folderItem.uuid))
564          .objectFit(ImageFit.Fill)
565          .width(24)
566          .height(24)
567          .flexShrink(0)
568          .fillColor(FolderUtil.getFolderIconColor(this.AllFolderArray, this.folderItem.uuid, false))
569      }
570      .width(24)
571
572      Column() {
573        Flex({ alignItems: ItemAlign.Center, wrap: FlexWrap.NoWrap, justifyContent: FlexAlign.SpaceBetween }) {
574          Text(FolderUtil.getFolderText(this.folderItem))
575            .fontSize(16)
576            .fontColor(FolderUtil.getFolderIconColor(this.AllFolderArray, this.folderItem.uuid, false))
577            .textAlign(TextAlign.Center)
578            .maxLines(1)
579            .textOverflow({ overflow: TextOverflow.Ellipsis })
580            .flexShrink(1)
581        }
582        .width('100%')
583        .height(55)
584
585        Divider()
586          .color($r("app.color.divider_color_e4e4e4"))
587          .strokeWidth(1)
588      }
589      .padding({ left: 16 })
590    }
591    .width('100%')
592    .height(56)
593    .visibility(FolderUtil.isFolderMoveIn(this.folderItem) ? Visibility.Visible : Visibility.None)
594  }
595}