MOBILE-3947 chore: Remove some ionicons usage
parent
cbc6beae40
commit
0975669042
|
@ -30,19 +30,14 @@ export class CoreFileUploaderAlbumHandlerService implements CoreFileUploaderHand
|
|||
priority = 2000;
|
||||
|
||||
/**
|
||||
* Whether or not the handler is enabled on a site level.
|
||||
*
|
||||
* @returns Promise resolved with true if enabled.
|
||||
* @inheritdoc
|
||||
*/
|
||||
async isEnabled(): Promise<boolean> {
|
||||
return CorePlatform.isMobile();
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a list of mimetypes, return the ones that are supported by the handler.
|
||||
*
|
||||
* @param mimetypes List of mimetypes.
|
||||
* @returns Supported mimetypes.
|
||||
* @inheritdoc
|
||||
*/
|
||||
getSupportedMimetypes(mimetypes: string[]): string[] {
|
||||
// Album allows picking images and videos.
|
||||
|
@ -50,15 +45,13 @@ export class CoreFileUploaderAlbumHandlerService implements CoreFileUploaderHand
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the data to display the handler.
|
||||
*
|
||||
* @returns Data.
|
||||
* @inheritdoc
|
||||
*/
|
||||
getData(): CoreFileUploaderHandlerData {
|
||||
return {
|
||||
title: 'core.fileuploader.photoalbums',
|
||||
class: 'core-fileuploader-album-handler',
|
||||
icon: 'images', // Cannot use font-awesome in action sheet.
|
||||
icon: 'fas-images',
|
||||
action: async (
|
||||
maxSize?: number,
|
||||
upload?: boolean,
|
||||
|
|
|
@ -30,19 +30,14 @@ export class CoreFileUploaderAudioHandlerService implements CoreFileUploaderHand
|
|||
priority = 1600;
|
||||
|
||||
/**
|
||||
* Whether or not the handler is enabled on a site level.
|
||||
*
|
||||
* @returns Promise resolved with true if enabled.
|
||||
* @inheritdoc
|
||||
*/
|
||||
async isEnabled(): Promise<boolean> {
|
||||
return CorePlatform.isMobile() || (CoreApp.canGetUserMedia() && CoreApp.canRecordMedia());
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a list of mimetypes, return the ones that are supported by the handler.
|
||||
*
|
||||
* @param mimetypes List of mimetypes.
|
||||
* @returns Supported mimetypes.
|
||||
* @inheritdoc
|
||||
*/
|
||||
getSupportedMimetypes(mimetypes: string[]): string[] {
|
||||
if (CorePlatform.isIOS()) {
|
||||
|
@ -66,15 +61,13 @@ export class CoreFileUploaderAudioHandlerService implements CoreFileUploaderHand
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the data to display the handler.
|
||||
*
|
||||
* @returns Data.
|
||||
* @inheritdoc
|
||||
*/
|
||||
getData(): CoreFileUploaderHandlerData {
|
||||
return {
|
||||
title: 'core.fileuploader.audio',
|
||||
class: 'core-fileuploader-audio-handler',
|
||||
icon: 'mic', // Cannot use font-awesome in action sheet.
|
||||
icon: 'fas-microphone',
|
||||
action: async (
|
||||
maxSize?: number,
|
||||
upload?: boolean,
|
||||
|
|
|
@ -31,19 +31,14 @@ export class CoreFileUploaderCameraHandlerService implements CoreFileUploaderHan
|
|||
priority = 1800;
|
||||
|
||||
/**
|
||||
* Whether or not the handler is enabled on a site level.
|
||||
*
|
||||
* @returns Promise resolved with true if enabled.
|
||||
* @inheritdoc
|
||||
*/
|
||||
async isEnabled(): Promise<boolean> {
|
||||
return CorePlatform.isMobile() || CoreApp.canGetUserMedia();
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a list of mimetypes, return the ones that are supported by the handler.
|
||||
*
|
||||
* @param mimetypes List of mimetypes.
|
||||
* @returns Supported mimetypes.
|
||||
* @inheritdoc
|
||||
*/
|
||||
getSupportedMimetypes(mimetypes: string[]): string[] {
|
||||
// Camera only supports JPEG and PNG.
|
||||
|
@ -51,15 +46,13 @@ export class CoreFileUploaderCameraHandlerService implements CoreFileUploaderHan
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the data to display the handler.
|
||||
*
|
||||
* @returns Data.
|
||||
* @inheritdoc
|
||||
*/
|
||||
getData(): CoreFileUploaderHandlerData {
|
||||
return {
|
||||
title: 'core.fileuploader.camera',
|
||||
class: 'core-fileuploader-camera-handler',
|
||||
icon: 'camera', // Cannot use font-awesome in action sheet.
|
||||
icon: 'fas-camera',
|
||||
action: async (
|
||||
maxSize?: number,
|
||||
upload?: boolean,
|
||||
|
|
|
@ -31,34 +31,27 @@ export class CoreFileUploaderFileHandlerService implements CoreFileUploaderHandl
|
|||
priority = 1200;
|
||||
|
||||
/**
|
||||
* Whether or not the handler is enabled on a site level.
|
||||
*
|
||||
* @returns Promise resolved with true if enabled.
|
||||
* @inheritdoc
|
||||
*/
|
||||
async isEnabled(): Promise<boolean> {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a list of mimetypes, return the ones that are supported by the handler.
|
||||
*
|
||||
* @param mimetypes List of mimetypes.
|
||||
* @returns Supported mimetypes.
|
||||
* @inheritdoc
|
||||
*/
|
||||
getSupportedMimetypes(mimetypes: string[]): string[] {
|
||||
return mimetypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the data to display the handler.
|
||||
*
|
||||
* @returns Data.
|
||||
* @inheritdoc
|
||||
*/
|
||||
getData(): CoreFileUploaderHandlerData {
|
||||
const handler: CoreFileUploaderHandlerData = {
|
||||
title: 'core.fileuploader.file',
|
||||
class: 'core-fileuploader-file-handler',
|
||||
icon: 'folder', // Cannot use font-awesome in action sheet.
|
||||
icon: 'fas-file-lines',
|
||||
};
|
||||
|
||||
if (CorePlatform.isMobile()) {
|
||||
|
|
|
@ -30,19 +30,14 @@ export class CoreFileUploaderVideoHandlerService implements CoreFileUploaderHand
|
|||
priority = 1400;
|
||||
|
||||
/**
|
||||
* Whether or not the handler is enabled on a site level.
|
||||
*
|
||||
* @returns Promise resolved with true if enabled.
|
||||
* @inheritdoc
|
||||
*/
|
||||
async isEnabled(): Promise<boolean> {
|
||||
return CorePlatform.isMobile() || (CoreApp.canGetUserMedia() && CoreApp.canRecordMedia());
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a list of mimetypes, return the ones that are supported by the handler.
|
||||
*
|
||||
* @param mimetypes List of mimetypes.
|
||||
* @returns Supported mimetypes.
|
||||
* @inheritdoc
|
||||
*/
|
||||
getSupportedMimetypes(mimetypes: string[]): string[] {
|
||||
if (CorePlatform.isIOS()) {
|
||||
|
@ -66,15 +61,13 @@ export class CoreFileUploaderVideoHandlerService implements CoreFileUploaderHand
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the data to display the handler.
|
||||
*
|
||||
* @returns Data.
|
||||
* @inheritdoc
|
||||
*/
|
||||
getData(): CoreFileUploaderHandlerData {
|
||||
return {
|
||||
title: 'core.fileuploader.video',
|
||||
class: 'core-fileuploader-video-handler',
|
||||
icon: 'videocam', // Cannot use font-awesome in action sheet.
|
||||
icon: 'fas-video',
|
||||
action: async (
|
||||
maxSize?: number,
|
||||
upload?: boolean,
|
||||
|
|
|
@ -32,34 +32,27 @@ export class CoreSharedFilesUploadHandlerService implements CoreFileUploaderHand
|
|||
priority = 1300;
|
||||
|
||||
/**
|
||||
* Whether or not the handler is enabled on a site level.
|
||||
*
|
||||
* @returns True or promise resolved with true if enabled.
|
||||
* @inheritdoc
|
||||
*/
|
||||
async isEnabled(): Promise<boolean> {
|
||||
return CorePlatform.isIOS();
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a list of mimetypes, return the ones that are supported by the handler.
|
||||
*
|
||||
* @param mimetypes List of mimetypes.
|
||||
* @returns Supported mimetypes.
|
||||
* @inheritdoc
|
||||
*/
|
||||
getSupportedMimetypes(mimetypes: string[]): string[] {
|
||||
return mimetypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the data to display the handler.
|
||||
*
|
||||
* @returns Data.
|
||||
* @inheritdoc
|
||||
*/
|
||||
getData(): CoreFileUploaderHandlerData {
|
||||
return {
|
||||
title: 'core.sharedfiles.sharedfiles',
|
||||
class: 'core-sharedfiles-fileuploader-handler',
|
||||
icon: 'folder', // Cannot use font-awesome in action sheet.
|
||||
icon: 'fas-folder',
|
||||
action: (
|
||||
maxSize?: number,
|
||||
upload?: boolean,
|
||||
|
|
|
@ -49,7 +49,7 @@ export class CoreUserProfileMailHandlerService implements CoreUserProfileHandler
|
|||
*/
|
||||
getDisplayData(): CoreUserProfileHandlerData {
|
||||
return {
|
||||
icon: 'mail',
|
||||
icon: 'fas-envelope',
|
||||
title: 'core.user.sendemail',
|
||||
class: 'core-user-profile-mail',
|
||||
action: (event, user): void => {
|
||||
|
|
Loading…
Reference in New Issue