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 NoteData from '../model/databaseModel/NoteData'
17
18export const circleColorArray: string[] = [
19  "#f86d05", // 深红
20  "#ff7500", // 浅红
21  "#ffbf00", // 黄色
22  "#41ba41", // 绿色
23  "#00bfc9", // 浅蓝
24  "#00aaee", // 中蓝
25  "#3f56ea", // 深蓝
26  "#8a2be2", // 紫色
27]
28
29export const fontColorArray: string[] = [
30  "#f86d05", // 深红
31  "#ffbf00", // 黄色
32  "#41ba41", // 绿色
33  "#00aaee", // 中蓝
34  "#3f56ea", // 深蓝
35  "#8a2be2", // 紫色
36  "#182431", //黑色
37]
38
39export const unSelectedNoteBgColorMap = {
40  "#f86d05": "#fff8eceb",
41  "#ff7500": "#f3d9c4",
42  "#ffbf00": "#f3e8c4",
43  "#41ba41": "#cde7d1",
44  "#00bfc9": "#c0e8ec",
45  "#00aaee": "#c0e4f4",
46  "#3f56ea": "#cdd3f3",
47  "#8a2be2": "#dccbf1",
48  "#ffffff": "#ffffff"
49}
50
51export const selectedNoteBgColorMap = {
52  "#f86d05": "#eec4b8",
53  "#ff7500": "#f1d8c7",
54  "#ffbf00": "#f3cdb1",
55  "#41ba41": "#d1dabc",
56  "#00bfc9": "#c5dbd4",
57  "#00aaee": "#c5d7dc",
58  "#3f56ea": "#d1c8db",
59  "#8a2be2": "#dec1d9",
60  "#ffffff": "#19007dff"
61}
62
63export const folderTextMap = {
64  "sys_def_allNotes_uuid": $r('app.string.allNotes'),
65  "sys_def_unClassified_uuid": $r('app.string.unClassified'),
66  "sys_def_myFavorites_uuid": $r('app.string.myFavorites'),
67  "sys_def_recentDeletes_uuid": $r('app.string.recentDeletes'),
68}
69
70export const folderIconMap = {
71  "sys_def_allNotes_uuid": $r('app.media.allNotes'),
72  "sys_def_unClassified_uuid": $r('app.media.unClassified'),
73  "sys_def_myFavorites_uuid": $r('app.media.favorite_cancel'),
74  "sys_def_recentDeletes_uuid": $r('app.media.delete'),
75}
76
77let CheckedNoteArray: NoteData[] = []
78
79AppStorage.SetOrCreate('CheckedNoteArray', CheckedNoteArray)
80
81export class WidthWeightMessage {
82  folderListWeight: string // 三分栏每个分栏的比例, 用百分比表示 例如16%
83  folderListVisibility: number // 分栏的可见性 0:表示Visibility.None 1:表示Visibility.Visible
84  noteListWeight: string
85  noteListVisibility: number
86  noteCotentWeight: string
87  noteCotentVisibility: number
88
89  constructor(folderListWeight: string, folderListVisibility: number, noteListWeight: string, noteListVisibility: number,
90              noteCotentWeight: string, noteCotentVisibility: number) {
91    this.folderListWeight = folderListWeight
92    this.folderListVisibility = folderListVisibility
93    this.noteListWeight = noteListWeight
94    this.noteListVisibility = noteListVisibility
95    this.noteCotentWeight = noteCotentWeight
96    this.noteCotentVisibility = noteCotentVisibility
97  }
98}
99
100let widthWeightOneSection: WidthWeightMessage = new WidthWeightMessage("0%", 0, "0%", 0, "100%", 1)
101let widthWeightTwoSection = new WidthWeightMessage("0%", 0, "34%", 1, "66%", 1)
102let widthWeightThreeSection = new WidthWeightMessage("16%", 1, "34%", 1, "50%", 1)
103
104export const widthWeightMessageMap = {
105  1: widthWeightOneSection,
106  2: widthWeightTwoSection,
107  3: widthWeightThreeSection
108}