note rectify for api9

Signed-off-by: guozejun <guozejun@huawei.com>
This commit is contained in:
guozejun 2022-04-21 21:20:23 +08:00
parent 632a37e8c4
commit 73773edd54
280 changed files with 2364 additions and 3532 deletions

18
.gitignore vendored
View File

@ -1,16 +1,4 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
/entry/.preview
.cxx
/node_modules /node_modules
/local.properties
/.idea
**/build

11
AppScope/app.json5 Normal file
View File

@ -0,0 +1,11 @@
{
"app": {
"bundleName": "com.ohos.note",
"vendor": "example",
"versionCode": 1000000,
"versionName": "1.0.0",
"icon": "$media:app_icon",
"label": "$string:app_name",
"distributedNotificationEnabled": true
}
}

View File

@ -0,0 +1,8 @@
{
"string": [
{
"name": "app_name",
"value": "ohos_note"
}
]
}

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -173,4 +173,4 @@ Apache License
incurred by, or claims asserted against, such Contributor by reason incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability. of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS END OF TERMS AND CONDITIONS

64
build-profile.json5 Normal file
View File

@ -0,0 +1,64 @@
{
"app": {
"signingConfigs": [
{
"name": "default",
"material": {
"certpath": "C:\\Users\\guozejun\\.ohos\\config\\openharmony\\auto_ohos.cer",
"storePassword": "00000018035E698FB1A7DFC883238A2A69A2877CEA9F7EADF6BC5D3D8918BD43F98F9E26BED5AC6D",
"keyAlias": "debugKey",
"keyPassword": "00000018E6C69A0418CAC1A82D15325871C768E48F487BF0FCC9D9CDB175416838102FE38F73863C",
"profile": "C:\\Users\\guozejun\\.ohos\\config\\openharmony\\auto_ohos_default_com.ohos.note.p7b",
"signAlg": "SHA256withECDSA",
"storeFile": "C:\\Users\\guozejun\\.ohos\\config\\openharmony\\auto_ohos.p12"
}
}
],
"compileSdkVersion": 9,
"compatibleSdkVersion": 9,
"products": [
{
"name": "default",
"signingConfig": "default",
}
]
},
"modules": [
{
"name": "phone",
"srcPath": "./product/phone",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
},
{
"name": "tablet",
"srcPath": "./product/tablet",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
},
{
"name": "utils",
"srcPath": "./common/utils"
},
{
"name": "component",
"srcPath": "./common/component"
},
{
"name": "resources",
"srcPath": "./common/resources"
}
]
}

View File

@ -1,38 +0,0 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply plugin: 'com.huawei.ohos.app'
//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
ohos {
compileSdkVersion 8
supportSystem "standard"
}
buildscript {
repositories {
maven {
url 'http://repo.ark.tools.huawei.com/artifactory/maven-public/'
allowInsecureProtocol = true
}
maven {
url 'http://mirrors.tools.huawei.com/maven/'
allowInsecureProtocol = true
}
}
dependencies {
classpath 'com.huawei.ohos:hap:3.0.6.4'
classpath 'com.huawei.ohos:decctest:1.2.7.2'
}
}
allprojects {
repositories {
maven {
url 'http://repo.ark.tools.huawei.com/artifactory/maven-public/'
allowInsecureProtocol = true
}
maven {
url 'http://mirrors.tools.huawei.com/maven/'
allowInsecureProtocol = true
}
}
}

3
common/component/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
/node_modules
/.preview
/build

View File

@ -0,0 +1,5 @@
{
"apiType": "stageMode",
"buildOption": {
}
}

View File

@ -1,20 +0,0 @@
apply plugin: 'com.huawei.ohos.library'
//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
ohos {
compileSdkVersion 8
defaultConfig {
compatibleSdkVersion 8
}
buildTypes {
release {
proguardOpt {
proguardEnabled false
rulesFiles 'proguard-rules.pro'
}
}
}
}
dependencies {
}

View File

@ -0,0 +1,3 @@
// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
module.exports = require('@ohos/hvigor-ohos-plugin').harTasks

View File

@ -0,0 +1,6 @@
export * from './src/main/ets/components/CusDialogComp';
export * from './src/main/ets/components/FolderListComp';
export * from './src/main/ets/components/NoteContent';
export { ToolBarComp, NoteContentComp, NoteContentOverViewComp } from './src/main/ets/components/NoteContentComp';
export { NoteContentCompPortrait } from './src/main/ets/components/NoteContentCompPortrait';
export * from './src/main/ets/components/NoteListComp';

22
common/component/package-lock.json generated Normal file
View File

@ -0,0 +1,22 @@
{
"name": "@ohos/component",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@ohos/source": {
"version": "file:../resources"
},
"@ohos/utils": {
"version": "file:../utils",
"requires": {
"@ohos/source": "file:../resources"
},
"dependencies": {
"@ohos/source": {
"version": "file:../resources"
}
}
}
}
}

View File

@ -0,0 +1,17 @@
{
"license":"ISC",
"types":"",
"devDependencies":{},
"name":"@ohos/component",
"description":"a npm package which contains arkUI2.0 page",
"ohos":{
"org":""
},
"main":"index.ets",
"repository":{},
"version":"1.0.0",
"dependencies":{
"@ohos/utils":"file:../utils",
"@ohos/source":"file:../resources"
}
}

View File

@ -1 +0,0 @@
# config module specific ProGuard rules here.

View File

@ -1,22 +0,0 @@
{
"app": {
"bundleName": "com.ohos.note",
"vendor": "ohos",
"version": {
"code": 1000003,
"name": "1.0.3"
}
},
"deviceConfig": {},
"module": {
"package": "com.ohos.note.common",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "component",
"moduleType": "har"
}
}
}

View File

@ -13,16 +13,15 @@
* limitations under the License. * limitations under the License.
*/ */
import FolderData from '../../../../../../common/utils/src/main/ets/default/model/databaseModel/FolderData.ets' import GlobalResourceManager from '@ohos/utils/src/main/ets/default/baseUtil/GlobalResourceManager'
import NoteData from '../../../../../../common/utils/src/main/ets/default/model/databaseModel/NoteData.ets' import FolderData from '@ohos/utils/src/main/ets/default/model/databaseModel/FolderData'
import {circleColorArray, fontColorArray} from '../../../../../../common/utils/src/main/ets/default/model/NoteBaseData.ets' import FolderUtil from '@ohos/utils/src/main/ets/default/baseUtil/FolderUtil'
import {SysDefFolderUuid, DeleteFileType, FolderType} from '../../../../../../common/utils/src/main/ets/default/model/databaseModel/EnumData.ets' import NoteData from '@ohos/utils/src/main/ets/default/model/databaseModel/NoteData'
import GlobalResourceManager from '../../../../../../common/utils/src/main/ets/default/baseUtil/GlobalResourceManager.ets' import NoteUtil from '@ohos/utils/src/main/ets/default/baseUtil/NoteUtil'
import FolderUtil from '../../../../../../common/utils/src/main/ets/default/baseUtil/FolderUtil.ets' import { circleColorArray, fontColorArray, SysDefFolderUuid, DeleteFileType, FolderType, LogUtil } from '@ohos/utils'
import NoteUtil from '../../../../../../common/utils/src/main/ets/default/baseUtil/NoteUtil.ets'
import {LogUtil} from '../../../../../../common/utils/src/main/ets/default/baseUtil/LogUtil.ets'
const TAG = "CusDialogComp" const TAG = "CusDialogComp"
@CustomDialog @CustomDialog
export struct NewOrEditFolderDialog { export struct NewOrEditFolderDialog {
newOrEditFolderDialogCtl: CustomDialogController newOrEditFolderDialogCtl: CustomDialogController
@ -69,10 +68,10 @@ export struct NewOrEditFolderDialog {
}) })
}.margin({ bottom: 4, left: 24, right: 24 }) }.margin({ bottom: 4, left: 24, right: 24 })
Divider() Divider()
.height(1) .height(1)
.margin({ left: 64, right: 24 }) .margin({ left: 64, right: 24 })
.color((this.isExisted && this.inputName != this.oriInputName) ? $r("app.color.category_already_exist_divider_color"):$r("app.color.divider_color_182431")) .color((this.isExisted && this.inputName != this.oriInputName) ? $r("app.color.category_already_exist_divider_color") : $r("app.color.divider_color_182431"))
Text($r("app.string.category_already_exist")) Text($r("app.string.category_already_exist"))
.fontSize(10) .fontSize(10)

View File

@ -13,15 +13,15 @@
* limitations under the License. * limitations under the License.
*/ */
import FolderData from '../../../../../../common/utils/src/main/ets/default/model/databaseModel/FolderData.ets' import FolderData from '@ohos/utils/src/main/ets/default/model/databaseModel/FolderData'
import NoteData from '../../../../../../common/utils/src/main/ets/default/model/databaseModel/NoteData.ets' import NoteData from '@ohos/utils/src/main/ets/default/model/databaseModel/NoteData'
import {SysDefFolderUuid, TableName, FolderType, FolderTableColumn, NoteTableColumn, Delete, DeleteFileType} from '../../../../../../common/utils/src/main/ets/default/model/databaseModel/EnumData.ets' import {SysDefFolderUuid, TableName, FolderType, FolderTableColumn, NoteTableColumn, Delete, DeleteFileType} from '@ohos/utils/src/main/ets/default/model/databaseModel/EnumData'
import {NewOrEditFolderDialog, DeleteDialog} from './CusDialogComp.ets' import {NewOrEditFolderDialog, DeleteDialog} from './CusDialogComp'
import StyleConstants from '../../../../../../common/utils/src/main/ets/default/constants/StyleConstants.ets' import StyleConstants from '@ohos/utils/src/main/ets/default/constants/StyleConstants'
import RdbStoreUtil from '../../../../../../common/utils/src/main/ets/default/baseUtil/RdbStoreUtil.ets' import RdbStoreUtil from '@ohos/utils/src/main/ets/default/baseUtil/RdbStoreUtil'
import FolderUtil from '../../../../../../common/utils/src/main/ets/default/baseUtil/FolderUtil.ets' import FolderUtil from '@ohos/utils/src/main/ets/default/baseUtil/FolderUtil'
import NoteUtil from '../../../../../../common/utils/src/main/ets/default/baseUtil/NoteUtil.ets' import NoteUtil from '@ohos/utils/src/main/ets/default/baseUtil/NoteUtil'
import {LogUtil} from '../../../../../../common/utils/src/main/ets/default/baseUtil/LogUtil.ets' import {LogUtil} from '@ohos/utils/src/main/ets/default/baseUtil/LogUtil'
// Folder list component // Folder list component
@Component @Component
@ -67,7 +67,6 @@ export struct FolderListComp {
}.width('100%') }.width('100%')
.padding({ left: 12, right: 12 }) .padding({ left: 12, right: 12 })
Blank()
Column() { Column() {
FolderItemComp({ FolderItemComp({
folderItem: FolderUtil.getFolderData(AppStorage.Get('AllFolderArray'), SysDefFolderUuid.MyFavorites), folderItem: FolderUtil.getFolderData(AppStorage.Get('AllFolderArray'), SysDefFolderUuid.MyFavorites),

View File

@ -13,23 +13,23 @@
* limitations under the License. * limitations under the License.
*/ */
import DateUtil from '../../../../../../common/utils/src/main/ets/default/baseUtil/DateUtil.ets' import DateUtil from '@ohos/utils/src/main/ets/default/baseUtil/DateUtil'
import RdbStoreUtil from '../../../../../../common/utils/src/main/ets/default/baseUtil/RdbStoreUtil.ets' import RdbStoreUtil from '@ohos/utils/src/main/ets/default/baseUtil/RdbStoreUtil'
import FolderData from '../../../../../../common/utils/src/main/ets/default/model/databaseModel/FolderData.ets' import FolderData from '@ohos/utils/src/main/ets/default/model/databaseModel/FolderData'
import NoteData from '../../../../../../common/utils/src/main/ets/default/model/databaseModel/NoteData.ets' import NoteData from '@ohos/utils/src/main/ets/default/model/databaseModel/NoteData'
import {TableName, NoteTableColumn, SysDefFolderUuid, Favorite, Delete import {TableName, NoteTableColumn, SysDefFolderUuid, Favorite, Delete
} from '../../../../../../common/utils/src/main/ets/default/model/databaseModel/EnumData.ets' } from '@ohos/utils/src/main/ets/default/model/databaseModel/EnumData'
import StyleConstants from '../../../../../../common/utils/src/main/ets/default/constants/StyleConstants.ets' import StyleConstants from '@ohos/utils/src/main/ets/default/constants/StyleConstants'
import {EditContentDialog, DeleteDialog, EditTitleDialog} from './CusDialogComp.ets' import {EditContentDialog, DeleteDialog, EditTitleDialog} from './CusDialogComp'
import FolderUtil from '../../../../../../common/utils/src/main/ets/default/baseUtil/FolderUtil.ets' import FolderUtil from '@ohos/utils/src/main/ets/default/baseUtil/FolderUtil'
import NoteUtil from '../../../../../../common/utils/src/main/ets/default/baseUtil/NoteUtil.ets' import NoteUtil from '@ohos/utils/src/main/ets/default/baseUtil/NoteUtil'
import prompt from '@system.prompt' import prompt from '@system.prompt'
import featureAbility from '@ohos.ability.featureAbility' import featureAbility from '@ohos.ability.featureAbility'
import {LogUtil} from '../../../../../../common/utils/src/main/ets/default/baseUtil/LogUtil.ets' import {LogUtil} from '@ohos/utils/src/main/ets/default/baseUtil/LogUtil'
import OperationUtils from '../../../../../../common/utils/src/main/ets/default/baseUtil/OperationUtils.ets' import OperationUtils from '@ohos/utils/src/main/ets/default/baseUtil/OperationUtils'
import mediaquery from '@ohos.mediaquery' import mediaquery from '@ohos.mediaquery'
import router from '@system.router'; import router from '@system.router';
import inputMethod from '@ohos.inputMethod'; import inputMethod from '@ohos.inputmethod';
const TAG = "NoteContent" const TAG = "NoteContent"
@ -147,7 +147,7 @@ export struct ToolBarComp {
controllerShow: WebController controllerShow: WebController
editContentDialogCtl: CustomDialogController = new CustomDialogController({ editContentDialogCtl: CustomDialogController = new CustomDialogController({
builder: EditContentDialog({ confirm: this.confirm.bind(this), dialogType: 0 }), builder: EditContentDialog({ confirm: this.confirm.bind(this) }),
alignment: DialogAlignment.Bottom, alignment: DialogAlignment.Bottom,
autoCancel: true, autoCancel: true,
customStyle: true, customStyle: true,
@ -318,7 +318,7 @@ export struct NoteContentOverViewComp {
@StorageLink('AllFolderArray') AllFolderArray: FolderData[] = [] @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = []
@StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = []
editTitleDialogCtl: CustomDialogController = new CustomDialogController({ editTitleDialogCtl: CustomDialogController = new CustomDialogController({
builder: EditTitleDialog({ confirm: this.confirm.bind(this), dialogType: 0 }), builder: EditTitleDialog({ confirm: this.confirm.bind(this) }),
alignment: DialogAlignment.Center, alignment: DialogAlignment.Center,
autoCancel: false, autoCancel: false,
customStyle: true, customStyle: true,

View File

@ -13,21 +13,21 @@
* limitations under the License. * limitations under the License.
*/ */
import DateUtil from '../../../../../../common/utils/src/main/ets/default/baseUtil/DateUtil.ets' import DateUtil from '@ohos/utils/src/main/ets/default/baseUtil/DateUtil'
import RdbStoreUtil from '../../../../../../common/utils/src/main/ets/default/baseUtil/RdbStoreUtil.ets' import RdbStoreUtil from '@ohos/utils/src/main/ets/default/baseUtil/RdbStoreUtil'
import FolderData from '../../../../../../common/utils/src/main/ets/default/model/databaseModel/FolderData.ets' import FolderData from '@ohos/utils/src/main/ets/default/model/databaseModel/FolderData'
import NoteData from '../../../../../../common/utils/src/main/ets/default/model/databaseModel/NoteData.ets' import NoteData from '@ohos/utils/src/main/ets/default/model/databaseModel/NoteData'
import {TableName, NoteTableColumn, SysDefFolderUuid, Favorite, Delete} from '../../../../../../common/utils/src/main/ets/default/model/databaseModel/EnumData.ets' import {TableName, NoteTableColumn, SysDefFolderUuid, Favorite, Delete} from '@ohos/utils/src/main/ets/default/model/databaseModel/EnumData'
import StyleConstants from '../../../../../../common/utils/src/main/ets/default/constants/StyleConstants.ets' import StyleConstants from '@ohos/utils/src/main/ets/default/constants/StyleConstants'
import {EditContentDialog, DeleteDialog, EditTitleDialog} from './CusDialogComp.ets' import {EditContentDialog, DeleteDialog, EditTitleDialog} from './CusDialogComp'
import FolderUtil from '../../../../../../common/utils/src/main/ets/default/baseUtil/FolderUtil.ets' import FolderUtil from '@ohos/utils/src/main/ets/default/baseUtil/FolderUtil'
import NoteUtil from '../../../../../../common/utils/src/main/ets/default/baseUtil/NoteUtil.ets' import NoteUtil from '@ohos/utils/src/main/ets/default/baseUtil/NoteUtil'
import prompt from '@system.prompt' import prompt from '@system.prompt'
import featureAbility from '@ohos.ability.featureAbility' import featureAbility from '@ohos.ability.featureAbility'
import {LogUtil} from '../../../../../../common/utils/src/main/ets/default/baseUtil/LogUtil.ets' import {LogUtil} from '@ohos/utils/src/main/ets/default/baseUtil/LogUtil'
import OperationUtils from '../../../../../../common/utils/src/main/ets/default/baseUtil/OperationUtils.ets' import OperationUtils from '@ohos/utils/src/main/ets/default/baseUtil/OperationUtils'
import mediaquery from '@ohos.mediaquery' import mediaquery from '@ohos.mediaquery'
import inputMethod from '@ohos.inputMethod'; import inputMethod from '@ohos.inputmethod';
const TAG = "NoteContentComp" const TAG = "NoteContentComp"
@ -197,7 +197,7 @@ export struct NoteContentOverViewComp {
@Consume('RefreshFlag') refreshFlag: number @Consume('RefreshFlag') refreshFlag: number
controllerShow: WebController controllerShow: WebController
editTitleDialogCtl: CustomDialogController = new CustomDialogController({ editTitleDialogCtl: CustomDialogController = new CustomDialogController({
builder: EditTitleDialog({ confirm: this.confirm.bind(this), dialogType: 0 }), builder: EditTitleDialog({ confirm: this.confirm.bind(this) }),
alignment: DialogAlignment.Center, alignment: DialogAlignment.Center,
autoCancel: false, autoCancel: false,
customStyle: true, customStyle: true,
@ -339,7 +339,7 @@ export struct ToolBarComp {
} }
editContentDialogCtl: CustomDialogController = new CustomDialogController({ editContentDialogCtl: CustomDialogController = new CustomDialogController({
builder: EditContentDialog({ confirm: this.confirm.bind(this), dialogType: 0 }), builder: EditContentDialog({ confirm: this.confirm.bind(this) }),
alignment: DialogAlignment.Bottom, alignment: DialogAlignment.Bottom,
autoCancel: true, autoCancel: true,
customStyle: true, customStyle: true,

View File

@ -13,22 +13,22 @@
* limitations under the License. * limitations under the License.
*/ */
import DateUtil from '../../../../../../common/utils/src/main/ets/default/baseUtil/DateUtil.ets' import DateUtil from '@ohos/utils/src/main/ets/default/baseUtil/DateUtil'
import RdbStoreUtil from '../../../../../../common/utils/src/main/ets/default/baseUtil/RdbStoreUtil.ets' import RdbStoreUtil from '@ohos/utils/src/main/ets/default/baseUtil/RdbStoreUtil'
import FolderData from '../../../../../../common/utils/src/main/ets/default/model/databaseModel/FolderData.ets' import FolderData from '@ohos/utils/src/main/ets/default/model/databaseModel/FolderData'
import NoteData from '../../../../../../common/utils/src/main/ets/default/model/databaseModel/NoteData.ets' import NoteData from '@ohos/utils/src/main/ets/default/model/databaseModel/NoteData'
import {TableName, NoteTableColumn, SysDefFolderUuid, Favorite, Delete import {TableName, NoteTableColumn, SysDefFolderUuid, Favorite, Delete
} from '../../../../../../common/utils/src/main/ets/default/model/databaseModel/EnumData.ets' } from '@ohos/utils/src/main/ets/default/model/databaseModel/EnumData'
import StyleConstants from '../../../../../../common/utils/src/main/ets/default/constants/StyleConstants.ets' import StyleConstants from '@ohos/utils/src/main/ets/default/constants/StyleConstants'
import {EditContentDialogPortrait, DeleteDialog, EditTitleDialog} from './CusDialogComp.ets' import {EditContentDialogPortrait, DeleteDialog, EditTitleDialog} from './CusDialogComp'
import FolderUtil from '../../../../../../common/utils/src/main/ets/default/baseUtil/FolderUtil.ets' import FolderUtil from '@ohos/utils/src/main/ets/default/baseUtil/FolderUtil'
import NoteUtil from '../../../../../../common/utils/src/main/ets/default/baseUtil/NoteUtil.ets' import NoteUtil from '@ohos/utils/src/main/ets/default/baseUtil/NoteUtil'
import prompt from '@system.prompt' import prompt from '@system.prompt'
import featureAbility from '@ohos.ability.featureAbility'; import featureAbility from '@ohos.ability.featureAbility';
import {LogUtil} from '../../../../../../common/utils/src/main/ets/default/baseUtil/LogUtil.ets' import {LogUtil} from '@ohos/utils/src/main/ets/default/baseUtil/LogUtil'
import OperationUtils from '../../../../../../common/utils/src/main/ets/default/baseUtil/OperationUtils.ets' import OperationUtils from '@ohos/utils/src/main/ets/default/baseUtil/OperationUtils'
import router from '@system.router' import router from '@system.router'
import inputMethod from '@ohos.inputMethod'; import inputMethod from '@ohos.inputmethod';
var time_id: number var time_id: number
@ -146,7 +146,7 @@ export struct NoteContentOverViewComp {
@StorageLink('AllFolderArray') AllFolderArray: FolderData[] = [] @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = []
@StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = []
editTitleDialogCtl: CustomDialogController = new CustomDialogController({ editTitleDialogCtl: CustomDialogController = new CustomDialogController({
builder: EditTitleDialog({ confirm: this.confirm.bind(this), dialogType: 0 }), builder: EditTitleDialog({ confirm: this.confirm.bind(this) }),
alignment: DialogAlignment.Center, alignment: DialogAlignment.Center,
autoCancel: false, autoCancel: false,
customStyle: true, customStyle: true,
@ -377,7 +377,7 @@ export struct DeleteNoteComp {
.onClick(() => { .onClick(() => {
this.selectedNoteData.is_deleted = Delete.No this.selectedNoteData.is_deleted = Delete.No
this.selectedNoteData.deleted_time = 0 this.selectedNoteData.deleted_time = 0
prompt.showToast({ message: $r('app.string.restore'), duration: 2000 }) prompt.showToast({ message: $r('app.string.restore').toString(), duration: 2000 })
this.refreshFlag = (this.refreshFlag == 0 ? 1 : 0) this.refreshFlag = (this.refreshFlag == 0 ? 1 : 0)
// update note to db // update note to db
let predicates_note = RdbStoreUtil.getRdbPredicates(TableName.NoteTable) let predicates_note = RdbStoreUtil.getRdbPredicates(TableName.NoteTable)
@ -407,7 +407,7 @@ export struct EditNoteCompForPortrait {
@Consume('EditModel') editModel: boolean @Consume('EditModel') editModel: boolean
controllerShow: WebController controllerShow: WebController
editContentDialogCtl: CustomDialogController = new CustomDialogController({ editContentDialogCtl: CustomDialogController = new CustomDialogController({
builder: EditContentDialogPortrait({ confirm: this.confirm.bind(this), dialogType: 0 }), builder: EditContentDialogPortrait({ confirm: this.confirm.bind(this) }),
alignment: DialogAlignment.Bottom, alignment: DialogAlignment.Bottom,
autoCancel: true, autoCancel: true,
customStyle: true, customStyle: true,

View File

@ -13,18 +13,18 @@
* limitations under the License. * limitations under the License.
*/ */
import DateUtil from '../../../../../../common/utils/src/main/ets/default/baseUtil/DateUtil.ets' import DateUtil from '@ohos/utils/src/main/ets/default/baseUtil/DateUtil'
import FolderData from '../../../../../../common/utils/src/main/ets/default/model/databaseModel/FolderData.ets' import FolderData from '@ohos/utils/src/main/ets/default/model/databaseModel/FolderData'
import NoteData from '../../../../../../common/utils/src/main/ets/default/model/databaseModel/NoteData.ets' import NoteData from '@ohos/utils/src/main/ets/default/model/databaseModel/NoteData'
import {TableName, NoteTableColumn, SysDefFolderUuid, Favorite, Delete, Top, NoteType} from '../../../../../../common/utils/src/main/ets/default/model/databaseModel/EnumData.ets' import {TableName, NoteTableColumn, SysDefFolderUuid, Favorite, Delete, Top, NoteType} from '@ohos/utils/src/main/ets/default/model/databaseModel/EnumData'
import {NoteDataMoveDialog, DeleteDialog} from './CusDialogComp.ets' import {NoteDataMoveDialog, DeleteDialog} from './CusDialogComp'
import RdbStoreUtil from '../../../../../../common/utils/src/main/ets/default/baseUtil/RdbStoreUtil.ets' import RdbStoreUtil from '@ohos/utils/src/main/ets/default/baseUtil/RdbStoreUtil'
import prompt from '@system.prompt' import prompt from '@system.prompt'
import NoteUtil from '../../../../../../common/utils/src/main/ets/default/baseUtil/NoteUtil.ets' import NoteUtil from '@ohos/utils/src/main/ets/default/baseUtil/NoteUtil'
import FolderUtil from '../../../../../../common/utils/src/main/ets/default/baseUtil/FolderUtil.ets' import FolderUtil from '@ohos/utils/src/main/ets/default/baseUtil/FolderUtil'
import StyleConstants from '../../../../../../common/utils/src/main/ets/default/constants/StyleConstants.ets' import StyleConstants from '@ohos/utils/src/main/ets/default/constants/StyleConstants'
import SearchModel from '../../../../../../common/utils/src/main/ets/default/model/searchModel/SearchModel.ets' import SearchModel from '@ohos/utils/src/main/ets/default/model/searchModel/SearchModel'
import {LogUtil} from '../../../../../../common/utils/src/main/ets/default/baseUtil/LogUtil.ets' import {LogUtil} from '@ohos/utils/src/main/ets/default/baseUtil/LogUtil'
import router from '@system.router'; import router from '@system.router';
const TAG = "NoteListComp" const TAG = "NoteListComp"
@ -521,7 +521,7 @@ export struct OperateNoteComp {
this.CheckedNoteArray.forEach((noteItem) => { this.CheckedNoteArray.forEach((noteItem) => {
noteItem.is_deleted = Delete.No noteItem.is_deleted = Delete.No
noteItem.deleted_time = 0 noteItem.deleted_time = 0
prompt.showToast({ message: $r('app.string.restore'), duration: 2000 }) prompt.showToast({ message: $r('app.string.restore').toString(), duration: 2000 })
// update note to db // update note to db
let predicates_note = RdbStoreUtil.getRdbPredicates(TableName.NoteTable) let predicates_note = RdbStoreUtil.getRdbPredicates(TableName.NoteTable)
predicates_note.equalTo(NoteTableColumn.Uuid, noteItem.uuid) predicates_note.equalTo(NoteTableColumn.Uuid, noteItem.uuid)
@ -788,7 +788,7 @@ export struct OperateNoteCompForPortrait {
this.CheckedNoteArray.forEach((noteItem) => { this.CheckedNoteArray.forEach((noteItem) => {
noteItem.is_deleted = Delete.No noteItem.is_deleted = Delete.No
noteItem.deleted_time = 0 noteItem.deleted_time = 0
prompt.showToast({ message: $r('app.string.restore'), duration: 2000 }) prompt.showToast({ message: $r('app.string.restore').toString(), duration: 2000 })
// update note to db // update note to db
let predicates_note = RdbStoreUtil.getRdbPredicates(TableName.NoteTable) let predicates_note = RdbStoreUtil.getRdbPredicates(TableName.NoteTable)
predicates_note.equalTo(NoteTableColumn.Uuid, noteItem.uuid) predicates_note.equalTo(NoteTableColumn.Uuid, noteItem.uuid)

View File

@ -0,0 +1,11 @@
{
"module": {
"name": "component",
"type": "har",
"deviceTypes": [
"phone",
"tablet"
],
"uiSyntax": "ets"
}
}

3
common/resources/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
/node_modules
/.preview
/build

View File

@ -0,0 +1,5 @@
{
"apiType": "stageMode",
"buildOption": {
}
}

View File

@ -0,0 +1,3 @@
// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
module.exports = require('@ohos/hvigor-ohos-plugin').harTasks

View File

@ -0,0 +1 @@
export { MainPage } from './src/main/ets/components/MainPage/MainPage'

5
common/resources/package-lock.json generated Normal file
View File

@ -0,0 +1,5 @@
{
"name": "@ohos/source",
"version": "1.0.0",
"lockfileVersion": 1
}

View File

@ -0,0 +1,14 @@
{
"license":"ISC",
"types":"",
"devDependencies":{},
"name":"@ohos/resources",
"description":"a npm package which contains arkUI2.0 page",
"ohos":{
"org":""
},
"main":"index.ets",
"repository":{},
"version":"1.0.0",
"dependencies":{}
}

View File

@ -0,0 +1,17 @@
@Entry
@Component
export struct MainPage {
@State message: string = 'Hello World'
build() {
Row() {
Column() {
Text(this.message)
.fontSize(50)
.fontWeight(FontWeight.Bold)
}
.width('100%')
}
.height('100%')
}
}

View File

@ -0,0 +1,11 @@
{
"module": {
"name": "resources",
"type": "har",
"deviceTypes": [
"phone",
"tablet"
],
"uiSyntax": "ets"
}
}

View File

Before

Width:  |  Height:  |  Size: 502 B

After

Width:  |  Height:  |  Size: 502 B

View File

Before

Width:  |  Height:  |  Size: 330 B

After

Width:  |  Height:  |  Size: 330 B

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 475 B

After

Width:  |  Height:  |  Size: 475 B

View File

Before

Width:  |  Height:  |  Size: 475 B

After

Width:  |  Height:  |  Size: 475 B

View File

Before

Width:  |  Height:  |  Size: 604 B

After

Width:  |  Height:  |  Size: 604 B

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 474 B

After

Width:  |  Height:  |  Size: 474 B

View File

Before

Width:  |  Height:  |  Size: 467 B

After

Width:  |  Height:  |  Size: 467 B

View File

Before

Width:  |  Height:  |  Size: 350 B

After

Width:  |  Height:  |  Size: 350 B

View File

Before

Width:  |  Height:  |  Size: 350 B

After

Width:  |  Height:  |  Size: 350 B

View File

Before

Width:  |  Height:  |  Size: 478 B

After

Width:  |  Height:  |  Size: 478 B

View File

Before

Width:  |  Height:  |  Size: 585 B

After

Width:  |  Height:  |  Size: 585 B

View File

Before

Width:  |  Height:  |  Size: 904 B

After

Width:  |  Height:  |  Size: 904 B

View File

Before

Width:  |  Height:  |  Size: 590 B

After

Width:  |  Height:  |  Size: 590 B

View File

Before

Width:  |  Height:  |  Size: 904 B

After

Width:  |  Height:  |  Size: 904 B

View File

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

Before

Width:  |  Height:  |  Size: 813 B

After

Width:  |  Height:  |  Size: 813 B

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 880 B

After

Width:  |  Height:  |  Size: 880 B

View File

Before

Width:  |  Height:  |  Size: 643 B

After

Width:  |  Height:  |  Size: 643 B

View File

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 406 B

View File

Before

Width:  |  Height:  |  Size: 567 B

After

Width:  |  Height:  |  Size: 567 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 555 B

After

Width:  |  Height:  |  Size: 555 B

View File

Before

Width:  |  Height:  |  Size: 678 B

After

Width:  |  Height:  |  Size: 678 B

View File

Before

Width:  |  Height:  |  Size: 344 B

After

Width:  |  Height:  |  Size: 344 B

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

Before

Width:  |  Height:  |  Size: 404 B

After

Width:  |  Height:  |  Size: 404 B

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 402 B

After

Width:  |  Height:  |  Size: 402 B

View File

Before

Width:  |  Height:  |  Size: 168 B

After

Width:  |  Height:  |  Size: 168 B

View File

Before

Width:  |  Height:  |  Size: 443 B

After

Width:  |  Height:  |  Size: 443 B

View File

Before

Width:  |  Height:  |  Size: 325 B

After

Width:  |  Height:  |  Size: 325 B

View File

Before

Width:  |  Height:  |  Size: 879 B

After

Width:  |  Height:  |  Size: 879 B

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 630 B

After

Width:  |  Height:  |  Size: 630 B

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1017 B

After

Width:  |  Height:  |  Size: 1017 B

View File

Before

Width:  |  Height:  |  Size: 411 B

After

Width:  |  Height:  |  Size: 411 B

View File

Before

Width:  |  Height:  |  Size: 407 B

After

Width:  |  Height:  |  Size: 407 B

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 840 B

After

Width:  |  Height:  |  Size: 840 B

View File

Before

Width:  |  Height:  |  Size: 619 B

After

Width:  |  Height:  |  Size: 619 B

View File

Before

Width:  |  Height:  |  Size: 921 B

After

Width:  |  Height:  |  Size: 921 B

View File

Before

Width:  |  Height:  |  Size: 499 B

After

Width:  |  Height:  |  Size: 499 B

View File

Before

Width:  |  Height:  |  Size: 879 B

After

Width:  |  Height:  |  Size: 879 B

View File

Before

Width:  |  Height:  |  Size: 625 B

After

Width:  |  Height:  |  Size: 625 B

View File

Before

Width:  |  Height:  |  Size: 662 B

After

Width:  |  Height:  |  Size: 662 B

View File

Before

Width:  |  Height:  |  Size: 478 B

After

Width:  |  Height:  |  Size: 478 B

View File

Before

Width:  |  Height:  |  Size: 427 B

After

Width:  |  Height:  |  Size: 427 B

View File

Before

Width:  |  Height:  |  Size: 370 B

After

Width:  |  Height:  |  Size: 370 B

View File

Before

Width:  |  Height:  |  Size: 438 B

After

Width:  |  Height:  |  Size: 438 B

View File

Before

Width:  |  Height:  |  Size: 559 B

After

Width:  |  Height:  |  Size: 559 B

Some files were not shown because too many files have changed in this diff Show More