2
0
Fork 0

MOBILE-3947 chore: Remove some ionicons usage

main
Pau Ferrer Ocaña 2024-01-10 16:47:55 +01:00
parent cbc6beae40
commit 0975669042
7 changed files with 25 additions and 67 deletions

View File

@ -30,19 +30,14 @@ export class CoreFileUploaderAlbumHandlerService implements CoreFileUploaderHand
priority = 2000; priority = 2000;
/** /**
* Whether or not the handler is enabled on a site level. * @inheritdoc
*
* @returns Promise resolved with true if enabled.
*/ */
async isEnabled(): Promise<boolean> { async isEnabled(): Promise<boolean> {
return CorePlatform.isMobile(); return CorePlatform.isMobile();
} }
/** /**
* Given a list of mimetypes, return the ones that are supported by the handler. * @inheritdoc
*
* @param mimetypes List of mimetypes.
* @returns Supported mimetypes.
*/ */
getSupportedMimetypes(mimetypes: string[]): string[] { getSupportedMimetypes(mimetypes: string[]): string[] {
// Album allows picking images and videos. // Album allows picking images and videos.
@ -50,15 +45,13 @@ export class CoreFileUploaderAlbumHandlerService implements CoreFileUploaderHand
} }
/** /**
* Get the data to display the handler. * @inheritdoc
*
* @returns Data.
*/ */
getData(): CoreFileUploaderHandlerData { getData(): CoreFileUploaderHandlerData {
return { return {
title: 'core.fileuploader.photoalbums', title: 'core.fileuploader.photoalbums',
class: 'core-fileuploader-album-handler', class: 'core-fileuploader-album-handler',
icon: 'images', // Cannot use font-awesome in action sheet. icon: 'fas-images',
action: async ( action: async (
maxSize?: number, maxSize?: number,
upload?: boolean, upload?: boolean,

View File

@ -30,19 +30,14 @@ export class CoreFileUploaderAudioHandlerService implements CoreFileUploaderHand
priority = 1600; priority = 1600;
/** /**
* Whether or not the handler is enabled on a site level. * @inheritdoc
*
* @returns Promise resolved with true if enabled.
*/ */
async isEnabled(): Promise<boolean> { async isEnabled(): Promise<boolean> {
return CorePlatform.isMobile() || (CoreApp.canGetUserMedia() && CoreApp.canRecordMedia()); return CorePlatform.isMobile() || (CoreApp.canGetUserMedia() && CoreApp.canRecordMedia());
} }
/** /**
* Given a list of mimetypes, return the ones that are supported by the handler. * @inheritdoc
*
* @param mimetypes List of mimetypes.
* @returns Supported mimetypes.
*/ */
getSupportedMimetypes(mimetypes: string[]): string[] { getSupportedMimetypes(mimetypes: string[]): string[] {
if (CorePlatform.isIOS()) { if (CorePlatform.isIOS()) {
@ -66,15 +61,13 @@ export class CoreFileUploaderAudioHandlerService implements CoreFileUploaderHand
} }
/** /**
* Get the data to display the handler. * @inheritdoc
*
* @returns Data.
*/ */
getData(): CoreFileUploaderHandlerData { getData(): CoreFileUploaderHandlerData {
return { return {
title: 'core.fileuploader.audio', title: 'core.fileuploader.audio',
class: 'core-fileuploader-audio-handler', class: 'core-fileuploader-audio-handler',
icon: 'mic', // Cannot use font-awesome in action sheet. icon: 'fas-microphone',
action: async ( action: async (
maxSize?: number, maxSize?: number,
upload?: boolean, upload?: boolean,

View File

@ -31,19 +31,14 @@ export class CoreFileUploaderCameraHandlerService implements CoreFileUploaderHan
priority = 1800; priority = 1800;
/** /**
* Whether or not the handler is enabled on a site level. * @inheritdoc
*
* @returns Promise resolved with true if enabled.
*/ */
async isEnabled(): Promise<boolean> { async isEnabled(): Promise<boolean> {
return CorePlatform.isMobile() || CoreApp.canGetUserMedia(); return CorePlatform.isMobile() || CoreApp.canGetUserMedia();
} }
/** /**
* Given a list of mimetypes, return the ones that are supported by the handler. * @inheritdoc
*
* @param mimetypes List of mimetypes.
* @returns Supported mimetypes.
*/ */
getSupportedMimetypes(mimetypes: string[]): string[] { getSupportedMimetypes(mimetypes: string[]): string[] {
// Camera only supports JPEG and PNG. // Camera only supports JPEG and PNG.
@ -51,15 +46,13 @@ export class CoreFileUploaderCameraHandlerService implements CoreFileUploaderHan
} }
/** /**
* Get the data to display the handler. * @inheritdoc
*
* @returns Data.
*/ */
getData(): CoreFileUploaderHandlerData { getData(): CoreFileUploaderHandlerData {
return { return {
title: 'core.fileuploader.camera', title: 'core.fileuploader.camera',
class: 'core-fileuploader-camera-handler', class: 'core-fileuploader-camera-handler',
icon: 'camera', // Cannot use font-awesome in action sheet. icon: 'fas-camera',
action: async ( action: async (
maxSize?: number, maxSize?: number,
upload?: boolean, upload?: boolean,

View File

@ -31,34 +31,27 @@ export class CoreFileUploaderFileHandlerService implements CoreFileUploaderHandl
priority = 1200; priority = 1200;
/** /**
* Whether or not the handler is enabled on a site level. * @inheritdoc
*
* @returns Promise resolved with true if enabled.
*/ */
async isEnabled(): Promise<boolean> { async isEnabled(): Promise<boolean> {
return true; return true;
} }
/** /**
* Given a list of mimetypes, return the ones that are supported by the handler. * @inheritdoc
*
* @param mimetypes List of mimetypes.
* @returns Supported mimetypes.
*/ */
getSupportedMimetypes(mimetypes: string[]): string[] { getSupportedMimetypes(mimetypes: string[]): string[] {
return mimetypes; return mimetypes;
} }
/** /**
* Get the data to display the handler. * @inheritdoc
*
* @returns Data.
*/ */
getData(): CoreFileUploaderHandlerData { getData(): CoreFileUploaderHandlerData {
const handler: CoreFileUploaderHandlerData = { const handler: CoreFileUploaderHandlerData = {
title: 'core.fileuploader.file', title: 'core.fileuploader.file',
class: 'core-fileuploader-file-handler', class: 'core-fileuploader-file-handler',
icon: 'folder', // Cannot use font-awesome in action sheet. icon: 'fas-file-lines',
}; };
if (CorePlatform.isMobile()) { if (CorePlatform.isMobile()) {

View File

@ -30,19 +30,14 @@ export class CoreFileUploaderVideoHandlerService implements CoreFileUploaderHand
priority = 1400; priority = 1400;
/** /**
* Whether or not the handler is enabled on a site level. * @inheritdoc
*
* @returns Promise resolved with true if enabled.
*/ */
async isEnabled(): Promise<boolean> { async isEnabled(): Promise<boolean> {
return CorePlatform.isMobile() || (CoreApp.canGetUserMedia() && CoreApp.canRecordMedia()); return CorePlatform.isMobile() || (CoreApp.canGetUserMedia() && CoreApp.canRecordMedia());
} }
/** /**
* Given a list of mimetypes, return the ones that are supported by the handler. * @inheritdoc
*
* @param mimetypes List of mimetypes.
* @returns Supported mimetypes.
*/ */
getSupportedMimetypes(mimetypes: string[]): string[] { getSupportedMimetypes(mimetypes: string[]): string[] {
if (CorePlatform.isIOS()) { if (CorePlatform.isIOS()) {
@ -66,15 +61,13 @@ export class CoreFileUploaderVideoHandlerService implements CoreFileUploaderHand
} }
/** /**
* Get the data to display the handler. * @inheritdoc
*
* @returns Data.
*/ */
getData(): CoreFileUploaderHandlerData { getData(): CoreFileUploaderHandlerData {
return { return {
title: 'core.fileuploader.video', title: 'core.fileuploader.video',
class: 'core-fileuploader-video-handler', class: 'core-fileuploader-video-handler',
icon: 'videocam', // Cannot use font-awesome in action sheet. icon: 'fas-video',
action: async ( action: async (
maxSize?: number, maxSize?: number,
upload?: boolean, upload?: boolean,

View File

@ -32,34 +32,27 @@ export class CoreSharedFilesUploadHandlerService implements CoreFileUploaderHand
priority = 1300; priority = 1300;
/** /**
* Whether or not the handler is enabled on a site level. * @inheritdoc
*
* @returns True or promise resolved with true if enabled.
*/ */
async isEnabled(): Promise<boolean> { async isEnabled(): Promise<boolean> {
return CorePlatform.isIOS(); return CorePlatform.isIOS();
} }
/** /**
* Given a list of mimetypes, return the ones that are supported by the handler. * @inheritdoc
*
* @param mimetypes List of mimetypes.
* @returns Supported mimetypes.
*/ */
getSupportedMimetypes(mimetypes: string[]): string[] { getSupportedMimetypes(mimetypes: string[]): string[] {
return mimetypes; return mimetypes;
} }
/** /**
* Get the data to display the handler. * @inheritdoc
*
* @returns Data.
*/ */
getData(): CoreFileUploaderHandlerData { getData(): CoreFileUploaderHandlerData {
return { return {
title: 'core.sharedfiles.sharedfiles', title: 'core.sharedfiles.sharedfiles',
class: 'core-sharedfiles-fileuploader-handler', class: 'core-sharedfiles-fileuploader-handler',
icon: 'folder', // Cannot use font-awesome in action sheet. icon: 'fas-folder',
action: ( action: (
maxSize?: number, maxSize?: number,
upload?: boolean, upload?: boolean,

View File

@ -49,7 +49,7 @@ export class CoreUserProfileMailHandlerService implements CoreUserProfileHandler
*/ */
getDisplayData(): CoreUserProfileHandlerData { getDisplayData(): CoreUserProfileHandlerData {
return { return {
icon: 'mail', icon: 'fas-envelope',
title: 'core.user.sendemail', title: 'core.user.sendemail',
class: 'core-user-profile-mail', class: 'core-user-profile-mail',
action: (event, user): void => { action: (event, user): void => {