mirror of
https://gitee.com/openharmony/applications_permission_manager
synced 2024-11-30 06:30:53 +00:00
tab栏UI调整
Signed-off-by: fanchenxuan <fanchenxuan@huawei.com>
This commit is contained in:
parent
781870ccbf
commit
6eef7f8d53
@ -101,6 +101,7 @@ export struct globalDialog {
|
||||
.borderRadius(Constants.DIALOG_PRIVACY_BORDER_RADIUS)
|
||||
.width(Constants.FULL_WIDTH)
|
||||
.margin({ bottom: Constants.DIALOG_MARGIN_BOTTOM })
|
||||
.clip(true)
|
||||
}.width(Constants.FULL_WIDTH)
|
||||
.height(Constants.FULL_HEIGHT)
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ export struct textInput {
|
||||
this.applicationItem = this.oldApplicationItem;
|
||||
} else {
|
||||
this.applicationItem = this.oldApplicationItem.filter((item) => {
|
||||
return item.label.indexOf(value) > -1;
|
||||
return String(item.label).indexOf(value) > -1;
|
||||
})
|
||||
}
|
||||
if (this.applicationItem.length) {
|
||||
|
@ -116,6 +116,8 @@ export default class Constants {
|
||||
static SUBTITLE_PADDING_TOP = 16;
|
||||
static SUBTITLE_PADDING_BOTTOM = 8;
|
||||
static TAB_HEIGHT = 56;
|
||||
static TAB_LINE_HEIGHT = 100;
|
||||
static TAB_INNER_PADDING = 8;
|
||||
static TAB_DECORATION_HEIGHT = 2;
|
||||
static TAB_DECORATION_POSITION_Y = 6;
|
||||
static DEFAULT_PADDING_START = 12;
|
||||
|
@ -21,6 +21,7 @@ import bundle from "@ohos.bundle.bundleManager";
|
||||
import abilityAccessCtrl from '@ohos.abilityAccessCtrl';
|
||||
import audio from '@ohos.multimedia.audio'
|
||||
import camera from '@ohos.multimedia.camera'
|
||||
import display from '@ohos.display';
|
||||
import { groups, userGrantPermissions, permissionGroupPermissions, globalGroup } from "../common/model/permissionGroup";
|
||||
import { permissionGroups, permissionGroupIds, showSubpermissionsGrop } from "../common/model/permissionGroup";
|
||||
import { makePy, appSort, getSortId, indexValue } from "../common/utils/utils";
|
||||
@ -163,13 +164,15 @@ struct authorityManagementPage {
|
||||
Text(index ? $r('app.string.application') : $r('app.string.permission'))
|
||||
.fontSize(Constants.TEXT_MIDDLE_FONT_SIZE)
|
||||
.fontWeight(FontWeight.Bold)
|
||||
.lineHeight(Constants.TAB_LINE_HEIGHT)
|
||||
.height(Constants.TAB_DECORATION_HEIGHT)
|
||||
.fontColor($r('sys.color.ohos_id_color_subtab_text_on'))
|
||||
.backgroundColor($r('sys.color.ohos_id_color_subtab_text_on'))
|
||||
}
|
||||
}.height(Constants.TAB_HEIGHT)
|
||||
.width(Constants.FULL_WIDTH)
|
||||
.padding({ left: Constants.DEFAULT_PADDING_START, right: Constants.DEFAULT_PADDING_END })
|
||||
.padding({ left: globalThis.isVertical ? Constants.TAB_INNER_PADDING : Constants.DEFAULT_PADDING_START,
|
||||
right: globalThis.isVertical ? Constants.TAB_INNER_PADDING : Constants.DEFAULT_PADDING_END })
|
||||
}
|
||||
|
||||
/**
|
||||
@ -431,6 +434,8 @@ struct authorityManagementPage {
|
||||
aboutToAppear() {
|
||||
console.log(TAG + 'on aboutToAppear, version 1.01');
|
||||
this.getAllBundlePermissions();
|
||||
let dis = display.getDefaultDisplaySync();
|
||||
globalThis.isVertical = dis.height > dis.width ? true : false;
|
||||
var acManager = abilityAccessCtrl.createAtManager();
|
||||
bundle.getApplicationInfo(Constants.BUNDLE_NAME, bundle.ApplicationFlag.GET_APPLICATION_INFO_DEFAULT).then(data => {
|
||||
acManager.grantUserGrantedPermission(data.accessTokenId, "ohos.permission.MICROPHONE", 2);
|
||||
|
@ -187,6 +187,7 @@ struct PermissionDialog {
|
||||
.width(Constants.FULL_WIDTH)
|
||||
.padding({ bottom: Constants.DIALOG_PADDING_BOTTOM })
|
||||
.margin({ bottom: Constants.DIALOG_MARGIN_BOTTOM })
|
||||
.clip(true)
|
||||
}.width(Constants.FULL_WIDTH)
|
||||
.height(Constants.FULL_HEIGHT)
|
||||
}
|
||||
|
@ -99,6 +99,7 @@ struct globalDialog {
|
||||
.borderRadius(Constants.DIALOG_PRIVACY_BORDER_RADIUS)
|
||||
.width(Constants.FULL_WIDTH)
|
||||
.margin({ bottom: Constants.DIALOG_MARGIN_BOTTOM })
|
||||
.clip(true)
|
||||
}.width(Constants.FULL_WIDTH)
|
||||
.height(Constants.FULL_HEIGHT)
|
||||
}
|
||||
|
@ -66,12 +66,14 @@ struct permissionRecordPage {
|
||||
Text(index ? $r('app.string.application') : $r('app.string.permission'))
|
||||
.fontSize(Constants.TEXT_MIDDLE_FONT_SIZE)
|
||||
.fontWeight(FontWeight.Bold)
|
||||
.lineHeight(Constants.TAB_LINE_HEIGHT)
|
||||
.height(Constants.TAB_DECORATION_HEIGHT)
|
||||
.backgroundColor($r('sys.color.ohos_id_color_subtab_line_on'))
|
||||
}
|
||||
}.height(Constants.TAB_HEIGHT)
|
||||
.width(Constants.FULL_WIDTH)
|
||||
.padding({ left: Constants.DEFAULT_PADDING_START, right: Constants.DEFAULT_PADDING_END })
|
||||
.padding({ left: globalThis.isVertical ? Constants.TAB_INNER_PADDING : Constants.DEFAULT_PADDING_START,
|
||||
right: globalThis.isVertical ? Constants.TAB_INNER_PADDING : Constants.DEFAULT_PADDING_END })
|
||||
}
|
||||
|
||||
@Builder ListItemLayout(item, index, dimension) {
|
||||
|
Loading…
Reference in New Issue
Block a user