mirror of
https://gitee.com/openharmony/applications_dlp_manager
synced 2025-03-07 10:07:18 +00:00
胶囊数量计算
Signed-off-by: li-li-wang <wangliliang5@huawei.com>
This commit is contained in:
parent
1f2d11b9a0
commit
3ebf7c32c3
@ -36,7 +36,7 @@ export default class Constants {
|
||||
static ENCRYPTION_SUCCESS_TRANSLATE= 180;
|
||||
static ENCRYPTION_SUCCESS_TRANSLATE_WIDTH= 180;
|
||||
static ENCRYPTION_SUCCESS_CHANGE_TOP= 32;
|
||||
static ENCRYPTION_ADD_STAFF_WIDTH= 120;
|
||||
static ENCRYPTION_ADD_STAFF_WIDTH= 110;
|
||||
static ENCRYPTION_LOADING_HEIGHT= 340;
|
||||
static ENCRYPTION_LOADING_ICON_HEIGHT= 72;
|
||||
static ENCRYPTION_LOADING_CONTENT_HEIGHT= '65%';
|
||||
@ -44,6 +44,7 @@ export default class Constants {
|
||||
static ENCRYPTION_STAFF_BORDER_RADIUS = 999;
|
||||
static ENCRYPTION_STAFF_MAX_WIDTH = 82;
|
||||
static ENCRYPTION_STAFF_WIDTH = 112;
|
||||
static ENCRYPTION_STAFF_WIDTH_NAME = 82;
|
||||
static ENCRYPTION_STAFF_PAD = 8;
|
||||
static ENCRYPTION_PERMISSION_STATUS_WIDTH = '70%';
|
||||
static ENCRYPTION_PERMISSION_STATUS_IMAGE = '90%';
|
||||
@ -134,6 +135,8 @@ export default class Constants {
|
||||
static ENCRYPTION_MESSAGE_ALERT_MESSAGE_PADDING_LEFT = 24;
|
||||
static ENCRYPTION_MESSAGE_ALERT_MESSAGE_PADDING_TOP = 16;
|
||||
static ENCRYPTION_PC_FIXING_WIDTH = 606;
|
||||
static ENCRYPTION_PC_FIXING_STATUS_WIDTH = 394;
|
||||
static ENCRYPTION_PC_FIXING_MINWIDTH = 0;
|
||||
|
||||
static DLPRPC_SERVICE_PROXY_ERRCODE = 0;
|
||||
static DLP_MANAGER_BUNDLE_NAME = 'com.ohos.dlpmanager';
|
||||
|
@ -59,6 +59,7 @@ struct EncryptingPanel {
|
||||
.height(Constants.ENCRYPTION_LOADING_HEIGHT)
|
||||
.backgroundColor($r('sys.color.ohos_id_color_dialog_bg'))
|
||||
.borderRadius($r('sys.float.ohos_id_corner_radius_dialog'))
|
||||
.constraintSize({ minWidth: isPC() ? Constants.ENCRYPTION_PC_FIXING_WIDTH : Constants.ENCRYPTION_PC_FIXING_MINWIDTH })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -305,8 +305,9 @@ let removeDuplicate = (arr: AuthAccount[], arg: string) => {
|
||||
|
||||
let calculate = (newValue: Area, allNames: AuthAccount[]) => {
|
||||
let editLength = allNames.length;
|
||||
let screenWidth = Number(newValue['width']) - Constants.HEADER_COLUMN_PADDING_LEFT;
|
||||
let rowNamesLen = Math.floor(screenWidth / (Constants.ENCRYPTION_STAFF_WIDTH + Constants.ENCRYPTION_ADD_STAFF_MARGIN_RIGHT));
|
||||
let screenWidth = Number(newValue['width']);
|
||||
let nameChange = GlobalContext.load('domainAccount') ? Constants.ENCRYPTION_STAFF_WIDTH_NAME : Constants.ENCRYPTION_STAFF_WIDTH;
|
||||
let rowNamesLen = Math.floor(screenWidth / (nameChange + Constants.ENCRYPTION_ADD_STAFF_MARGIN_RIGHT));
|
||||
let showNamesArr = editLength > Constants.ENCRYPTION_DOUBLED_NUMBER * rowNamesLen
|
||||
? allNames.slice(0, 2 * rowNamesLen - 1)
|
||||
: allNames.slice(0, 2 * rowNamesLen);
|
||||
|
@ -821,6 +821,7 @@ struct changeEncryption {
|
||||
.width( isPC() ? Constants.ENCRYPTION_PC_FIXING_WIDTH : Constants.HEADER_COLUMN_WIDTH)
|
||||
.backgroundColor($r('sys.color.ohos_id_color_dialog_bg'))
|
||||
.borderRadius($r('sys.float.ohos_id_corner_radius_dialog'))
|
||||
.constraintSize({ minWidth: isPC() ? Constants.ENCRYPTION_PC_FIXING_WIDTH : Constants.ENCRYPTION_PC_FIXING_MINWIDTH })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -947,6 +947,7 @@ struct DlpDialog {
|
||||
.width( isPC() ? Constants.ENCRYPTION_PC_FIXING_WIDTH : Constants.HEADER_COLUMN_WIDTH)
|
||||
.backgroundColor($r('sys.color.ohos_id_color_dialog_bg'))
|
||||
.borderRadius($r('sys.float.ohos_id_corner_radius_dialog'))
|
||||
.constraintSize({ minWidth: isPC() ? Constants.ENCRYPTION_PC_FIXING_WIDTH : Constants.ENCRYPTION_PC_FIXING_MINWIDTH })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -614,6 +614,7 @@ struct encryptionSuccess {
|
||||
.width( isPC() ? Constants.ENCRYPTION_PC_FIXING_WIDTH : Constants.HEADER_COLUMN_WIDTH)
|
||||
.backgroundColor($r('sys.color.ohos_id_color_dialog_bg'))
|
||||
.borderRadius($r('sys.float.ohos_id_corner_radius_dialog'))
|
||||
.constraintSize({ minWidth: isPC() ? Constants.ENCRYPTION_PC_FIXING_WIDTH : Constants.ENCRYPTION_PC_FIXING_MINWIDTH })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -351,10 +351,11 @@ struct PermissionStatus {
|
||||
right: Constants.FOOTER_ROW_PAD_RIGHT
|
||||
})
|
||||
}
|
||||
.width( isPC() ? Constants.ENCRYPTION_PC_FIXING_WIDTH : Constants.HEADER_COLUMN_WIDTH)
|
||||
.width( isPC() ? Constants.ENCRYPTION_PC_FIXING_STATUS_WIDTH : Constants.HEADER_COLUMN_WIDTH)
|
||||
.backgroundColor($r('sys.color.ohos_id_color_dialog_bg'))
|
||||
.borderRadius($r('sys.float.ohos_id_corner_radius_dialog'))
|
||||
.shadow(ShadowStyle.OUTER_DEFAULT_SM)
|
||||
.constraintSize({ minWidth: isPC() ? Constants.ENCRYPTION_PC_FIXING_STATUS_WIDTH : Constants.ENCRYPTION_PC_FIXING_MINWIDTH })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -120,10 +120,6 @@
|
||||
"name": "storage_path",
|
||||
"value": "Save path"
|
||||
},
|
||||
{
|
||||
"name": "document_valid_until",
|
||||
"value": "File valid until:"
|
||||
},
|
||||
{
|
||||
"name": "permanently",
|
||||
"value": "Permanent"
|
||||
@ -218,7 +214,7 @@
|
||||
},
|
||||
{
|
||||
"name": "MESSAGE_APP_NOT_HAVE_PERM_VISIT",
|
||||
"value": "You don't have permission to view this file. To apply for permission, contact:%s"
|
||||
"value": "You don't have permission to view this file. To apply for permission, contact %s."
|
||||
},
|
||||
{
|
||||
"name": "MESSAGE_APP_FILE_PARAM_ERROR",
|
||||
@ -230,11 +226,11 @@
|
||||
},
|
||||
{
|
||||
"name": "permission_status_readOnly",
|
||||
"value": "This file is protected. You have the read-only permission."
|
||||
"value": "This file is protected. You have \"Read-only\" permission."
|
||||
},
|
||||
{
|
||||
"name": "permission_status_title",
|
||||
"value": "This file is protected. You have the read-only and change permissions."
|
||||
"value": "This file is protected. You have \"Read-only\" and \"Edit\" permissions."
|
||||
},
|
||||
{
|
||||
"name": "apply_for_the_permission",
|
||||
@ -258,7 +254,7 @@
|
||||
},
|
||||
{
|
||||
"name": "encrypt_employee_id",
|
||||
"value": "Employee ID:%s"
|
||||
"value": "Employee ID: %s"
|
||||
},
|
||||
{
|
||||
"name": "SYSTEM_IS_AUTHENTICATED_LOGIN",
|
||||
|
@ -120,10 +120,6 @@
|
||||
"name": "storage_path",
|
||||
"value": "储存路径"
|
||||
},
|
||||
{
|
||||
"name": "document_valid_until",
|
||||
"value": "文件有效期至:"
|
||||
},
|
||||
{
|
||||
"name": "permanently",
|
||||
"value": "永久"
|
||||
|
Loading…
x
Reference in New Issue
Block a user