mirror of
https://gitee.com/openharmony/applications_permission_manager
synced 2024-11-26 20:50:48 +00:00
commit
29dedeba6c
@ -23,8 +23,7 @@ import { GlobalContext } from '../utils/globalContext';
|
||||
|
||||
let bottomPopoverTypes = ['default', 'phone'];
|
||||
|
||||
@Extend (Button) function customizeButton()
|
||||
{
|
||||
@Extend(Button)function customizeButton() {
|
||||
.backgroundColor($r('sys.color.ohos_id_color_dialog_bg'))
|
||||
.fontColor($r('sys.color.ohos_id_color_text_primary_activated'))
|
||||
.fontSize(Constants.TEXT_MIDDLE_FONT_SIZE)
|
||||
|
@ -15,8 +15,7 @@
|
||||
|
||||
import Constants from '../utils/constant';
|
||||
|
||||
@Extend (Button) function locationButton()
|
||||
{
|
||||
@Extend(Button)function locationButton() {
|
||||
.backgroundColor($r('sys.color.ohos_id_color_dialog_bg'))
|
||||
.fontWeight(FontWeight.Medium)
|
||||
.fontSize(Constants.TEXT_SMALLER_FONT_SIZE)
|
||||
|
@ -379,7 +379,7 @@ export class AppGroupRecordInfo {
|
||||
}
|
||||
}
|
||||
|
||||
export class RouterParams_1 {
|
||||
export class RouterParams1 {
|
||||
public list: PermissionApplications[]
|
||||
public backTitle: ResourceStr
|
||||
public group: string
|
||||
@ -393,7 +393,7 @@ export class RouterParams_1 {
|
||||
}
|
||||
}
|
||||
|
||||
export class RouterParams_2 {
|
||||
export class RouterParams2 {
|
||||
public list: PermissionApplications[]
|
||||
public backTitle: ResourceStr
|
||||
public permissionName: string
|
||||
@ -405,7 +405,7 @@ export class RouterParams_2 {
|
||||
}
|
||||
}
|
||||
|
||||
export class RouterParams_3 {
|
||||
export class RouterParams3 {
|
||||
public bundleName: string
|
||||
public backTitle: ResourceStr
|
||||
public permission: Permissions[]
|
||||
|
@ -22,7 +22,7 @@ import { BusinessError } from '@ohos.base';
|
||||
import { showSubpermissionsGrop } from '../common/model/permissionGroup';
|
||||
import { verifyAccessToken, getPermissionLabel } from '../common/utils/utils';
|
||||
import Constants from '../common/utils/constant';
|
||||
import { MediaDocObj, RouterParams_3, AppInfo, CheckboxInfo } from '../common/utils/typedef';
|
||||
import { MediaDocObj, RouterParams3, AppInfo, CheckboxInfo } from '../common/utils/typedef';
|
||||
import { GlobalContext } from '../common/utils/globalContext';
|
||||
|
||||
const TAG = 'PermissionManager_MainAbility:';
|
||||
@ -40,9 +40,9 @@ let reqPermissionInfo: bundleManager.ReqPermissionDetail;
|
||||
@Entry
|
||||
@Component
|
||||
struct mediaDocumentPage {
|
||||
private backTitle: ResourceStr = (router.getParams() as RouterParams_3).backTitle;
|
||||
private permissions: Permissions[] = (router.getParams() as RouterParams_3).permission;
|
||||
private tokenId: number = (router.getParams() as RouterParams_3).tokenId;
|
||||
private backTitle: ResourceStr = (router.getParams() as RouterParams3).backTitle;
|
||||
private permissions: Permissions[] = (router.getParams() as RouterParams3).permission;
|
||||
private tokenId: number = (router.getParams() as RouterParams3).tokenId;
|
||||
@State currentGroup: string = GlobalContext.load('currentPermissionGroup');
|
||||
@State folderStatus: boolean[] = GlobalContext.load('folderStatus');
|
||||
@State refresh: boolean = false;
|
||||
@ -159,10 +159,10 @@ struct mediaDocumentPage {
|
||||
@Component
|
||||
struct mediaDocumentItem {
|
||||
private context = getContext(this) as common.UIAbilityContext;
|
||||
private backTitle: ResourceStr = (router.getParams() as RouterParams_3).backTitle;
|
||||
private bundleName: string = (router.getParams() as RouterParams_3).bundleName;
|
||||
private permissions: Permissions[] = (router.getParams() as RouterParams_3).permission;
|
||||
private status: number = (router.getParams() as RouterParams_3).status;
|
||||
private backTitle: ResourceStr = (router.getParams() as RouterParams3).backTitle;
|
||||
private bundleName: string = (router.getParams() as RouterParams3).bundleName;
|
||||
private permissions: Permissions[] = (router.getParams() as RouterParams3).permission;
|
||||
private status: number = (router.getParams() as RouterParams3).status;
|
||||
@State currentGroup: string = GlobalContext.load('currentPermissionGroup');
|
||||
@State applicationInfo: AppInfo = GlobalContext.load('applicationInfo');
|
||||
@Link folderStatus: boolean[];
|
||||
|
@ -34,8 +34,7 @@ const FUZZY_LOCATION_PERMISSION = 'ohos.permission.APPROXIMATELY_LOCATION';
|
||||
const PRECISE_LOCATION_PERMISSION = 'ohos.permission.LOCATION';
|
||||
let storage = LocalStorage.getShared();
|
||||
|
||||
@Extend (Image) function customizeImage(width: number, height: number)
|
||||
{
|
||||
@Extend(Image)function customizeImage(width: number, height: number) {
|
||||
.objectFit(ImageFit.Contain)
|
||||
.width(width)
|
||||
.height(height)
|
||||
|
@ -17,12 +17,12 @@ import { backBar } from '../common/components/backBar';
|
||||
import { permissionGroups, groups } from '../common/model/permissionGroup';
|
||||
import router from '@ohos.router';
|
||||
import Constants from '../common/utils/constant';
|
||||
import { CalendarObj, RouterParams_1, PermissionApplications } from '../common/utils/typedef';
|
||||
import { CalendarObj, RouterParams1, PermissionApplications } from '../common/utils/typedef';
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct appNamePage {
|
||||
private backTitle: ResourceStr = (router.getParams() as RouterParams_1).backTitle;
|
||||
private backTitle: ResourceStr = (router.getParams() as RouterParams1).backTitle;
|
||||
|
||||
build() {
|
||||
GridRow({ gutter: Constants.GUTTER, columns: {
|
||||
@ -56,8 +56,8 @@ struct appNamePage {
|
||||
@Component
|
||||
struct appNameItem {
|
||||
@State calendarListItem: CalendarObj[] = []; // Permission management secondary interface data array
|
||||
private list: PermissionApplications[] = (router.getParams() as RouterParams_1).list; // Routing jump data
|
||||
private group: string = (router.getParams() as RouterParams_1).group;
|
||||
private list: PermissionApplications[] = (router.getParams() as RouterParams1).list; // Routing jump data
|
||||
private group: string = (router.getParams() as RouterParams1).group;
|
||||
@State isTouch: string = '';
|
||||
|
||||
@Builder ListItemLayout(item: CalendarObj) {
|
||||
|
@ -24,7 +24,7 @@ import audio from '@ohos.multimedia.audio'
|
||||
import camera from '@ohos.multimedia.camera'
|
||||
import common from '@ohos.app.ability.common';
|
||||
import { verifyAccessToken, indexValue, sortByName } from '../common/utils/utils';
|
||||
import { ApplicationObj, GroupInfo, RouterParams_1, PermissionApplications, AppInfo } from '../common/utils/typedef';
|
||||
import { ApplicationObj, GroupInfo, RouterParams1, PermissionApplications, AppInfo } from '../common/utils/typedef';
|
||||
import { GlobalContext } from '../common/utils/globalContext';
|
||||
import { globalDialog } from '../common/components/dialog';
|
||||
import Constants from '../common/utils/constant';
|
||||
@ -37,10 +37,9 @@ const BACKGROUND_LOCATION_PERMISSION = 'ohos.permission.LOCATION_IN_BACKGROUND';
|
||||
const DOWNLOAD_PERMISSION = 'ohos.permission.READ_WRITE_DOWNLOAD_DIRECTORY';
|
||||
const DESKTOP_PERMISSION = 'ohos.permission.READ_WRITE_DESKTOP_DIRECTORY';
|
||||
const DOCUMENTS_PERMISSION = 'ohos.permission.READ_WRITE_DOCUMENTS_DIRECTORY';
|
||||
let globalIsOn: boolean = (router.getParams() as RouterParams_1).globalIsOn; // return title name
|
||||
let globalIsOn: boolean = (router.getParams() as RouterParams1).globalIsOn; // return title name
|
||||
|
||||
@Extend (Image) function customizeImage(width: number, height: number)
|
||||
{
|
||||
@Extend(Image)function customizeImage(width: number, height: number) {
|
||||
.objectFit(ImageFit.Contain)
|
||||
.width(width)
|
||||
.height(height)
|
||||
@ -50,8 +49,8 @@ let globalIsOn: boolean = (router.getParams() as RouterParams_1).globalIsOn; //
|
||||
@Entry
|
||||
@Component
|
||||
struct locationInfoPage {
|
||||
private backTitle: ResourceStr = (router.getParams() as RouterParams_1).backTitle;
|
||||
private list: PermissionApplications[] = (router.getParams() as RouterParams_1).list;
|
||||
private backTitle: ResourceStr = (router.getParams() as RouterParams1).backTitle;
|
||||
private list: PermissionApplications[] = (router.getParams() as RouterParams1).list;
|
||||
@State currentGroup: string = GlobalContext.load('currentPermissionGroup');
|
||||
@State polymorphismIsOn: Array<boolean> = [];
|
||||
@State folderStatusArray: Array<Array<boolean>> = [[]];
|
||||
@ -175,8 +174,8 @@ struct locationInfoPage {
|
||||
@Component
|
||||
struct applicationItem {
|
||||
private context = getContext(this) as common.UIAbilityContext;
|
||||
private backTitle: ResourceStr = (router.getParams() as RouterParams_1).backTitle;
|
||||
private list: PermissionApplications[] = (router.getParams() as RouterParams_1).list;
|
||||
private backTitle: ResourceStr = (router.getParams() as RouterParams1).backTitle;
|
||||
private list: PermissionApplications[] = (router.getParams() as RouterParams1).list;
|
||||
@State permissionNum: number = Constants.PERMISSION_NUM; // permission num
|
||||
@State toggleIsOn: boolean[] = []; // toggle switch state array
|
||||
@State isRisk: boolean[] = [];
|
||||
|
@ -20,15 +20,14 @@ import router from '@ohos.router';
|
||||
import abilityAccessCtrl, { Permissions } from '@ohos.abilityAccessCtrl';
|
||||
import { BusinessError } from '@ohos.base';
|
||||
import { verifyAccessToken, indexValue, sortByName } from '../common/utils/utils';
|
||||
import { ApplicationObj, PermissionInfo, RouterParams_2, PermissionApplications, AppInfo } from '../common/utils/typedef';
|
||||
import { ApplicationObj, PermissionInfo, RouterParams2, PermissionApplications, AppInfo } from '../common/utils/typedef';
|
||||
import { GlobalContext } from '../common/utils/globalContext';
|
||||
import Constants from '../common/utils/constant';
|
||||
import { permissionGroups } from '../common/model/permissionGroup';
|
||||
|
||||
const TAG = 'PermissionManager_MainAbility:';
|
||||
|
||||
@Extend (Image) function customizeImage(width: number, height: number)
|
||||
{
|
||||
@Extend(Image)function customizeImage(width: number, height: number) {
|
||||
.objectFit(ImageFit.Contain)
|
||||
.width(width)
|
||||
.height(height)
|
||||
@ -37,7 +36,7 @@ const TAG = 'PermissionManager_MainAbility:';
|
||||
@Entry
|
||||
@Component
|
||||
struct locationInfoPage {
|
||||
private backTitle: ResourceStr = (router.getParams() as RouterParams_2).backTitle;
|
||||
private backTitle: ResourceStr = (router.getParams() as RouterParams2).backTitle;
|
||||
|
||||
build() {
|
||||
GridRow({ gutter: Constants.GUTTER, columns: {
|
||||
@ -70,8 +69,8 @@ struct locationInfoPage {
|
||||
|
||||
@Component
|
||||
struct applicationItem {
|
||||
private list: PermissionApplications[] = (router.getParams() as RouterParams_2).list;
|
||||
private permissionName: string = (router.getParams() as RouterParams_2).permissionName;
|
||||
private list: PermissionApplications[] = (router.getParams() as RouterParams2).list;
|
||||
private permissionName: string = (router.getParams() as RouterParams2).permissionName;
|
||||
@State permissionNum: number = Constants.PERMISSION_NUM; // permission num
|
||||
@State toggleIsOn: boolean[] = []; // toggle switch state array
|
||||
@State isRisk: boolean[] = [];
|
||||
|
@ -29,8 +29,7 @@ import Constants from '../common/utils/constant';
|
||||
import { showSubpermissionsGrop, userGrantPermissions } from '../common/model/permissionGroup';
|
||||
import { LocationCanvas } from '../common/components/location';
|
||||
|
||||
@Extend (Button) function customizeButton()
|
||||
{
|
||||
@Extend(Button)function customizeButton() {
|
||||
.backgroundColor($r('sys.color.ohos_id_color_dialog_bg'))
|
||||
.fontColor($r('sys.color.ohos_id_color_text_primary_activated'))
|
||||
.fontSize(Constants.TEXT_MIDDLE_FONT_SIZE)
|
||||
|
@ -26,8 +26,7 @@ const MICROPHONE = 'microphone';
|
||||
const CAMERA = 'camera';
|
||||
let bottomPopoverTypes = ['default', 'phone'];
|
||||
|
||||
@Extend (Button) function customizeButton()
|
||||
{
|
||||
@Extend(Button)function customizeButton() {
|
||||
.backgroundColor($r('sys.color.ohos_id_color_dialog_bg'))
|
||||
.fontColor($r('sys.color.ohos_id_color_text_primary_activated'))
|
||||
.fontSize(Constants.TEXT_MIDDLE_FONT_SIZE)
|
||||
|
@ -18,12 +18,12 @@ import router from '@ohos.router';
|
||||
import Constants from '../common/utils/constant';
|
||||
import { permissionGroups } from '../common/model/permissionGroup';
|
||||
import { verifyAccessToken } from '../common/utils/utils';
|
||||
import { OtherPermission, RouterParams_3 } from '../common/utils/typedef';
|
||||
import { OtherPermission, RouterParams3 } from '../common/utils/typedef';
|
||||
import { Permissions } from '@ohos.abilityAccessCtrl';
|
||||
|
||||
const TAG = 'PermissionManager_MainAbility:';
|
||||
let status: number = (router.getParams() as RouterParams_3).status; // Status: Allowed, Forbidden
|
||||
let permissions: Permissions[] = (router.getParams() as RouterParams_3).permission; // permissions name
|
||||
let status: number = (router.getParams() as RouterParams3).status; // Status: Allowed, Forbidden
|
||||
let permissions: Permissions[] = (router.getParams() as RouterParams3).permission; // permissions name
|
||||
let otherPermissionList: OtherPermission[] = []; // otherPermission List
|
||||
for (let i = 0; i < permissions.length; i++) {
|
||||
otherPermissionList.push(
|
||||
@ -34,8 +34,8 @@ for (let i = 0; i < permissions.length; i++) {
|
||||
@Entry
|
||||
@Component
|
||||
struct appNamePage {
|
||||
private backTitle: ResourceStr = (router.getParams() as RouterParams_3).backTitle;
|
||||
private tokenId: number = (router.getParams() as RouterParams_3).tokenId;
|
||||
private backTitle: ResourceStr = (router.getParams() as RouterParams3).backTitle;
|
||||
private tokenId: number = (router.getParams() as RouterParams3).tokenId;
|
||||
|
||||
build() {
|
||||
GridRow({ gutter: Constants.GUTTER, columns: {
|
||||
@ -80,8 +80,8 @@ struct appNamePage {
|
||||
|
||||
@Component
|
||||
struct appNameItem {
|
||||
private bundleName: string = (router.getParams() as RouterParams_3).bundleName;
|
||||
private tokenId: number = (router.getParams() as RouterParams_3).tokenId;
|
||||
private bundleName: string = (router.getParams() as RouterParams3).bundleName;
|
||||
private tokenId: number = (router.getParams() as RouterParams3).tokenId;
|
||||
@State otherPermissionListItem: OtherPermission[] = otherPermissionList; // Other permission interface data array
|
||||
@State isTouch: string = '';
|
||||
|
||||
|
@ -27,8 +27,7 @@ import { GlobalContext } from '../common/utils/globalContext';
|
||||
|
||||
const TAG = 'PermissionManager_MainAbility:';
|
||||
|
||||
@Extend (Image) function customizeImage(width: number, height: number)
|
||||
{
|
||||
@Extend(Image)function customizeImage(width: number, height: number) {
|
||||
.objectFit(ImageFit.Contain)
|
||||
.width(width)
|
||||
.height(height)
|
||||
|
Loading…
Reference in New Issue
Block a user