feat: Update assets and improve code comments across multiple components
- Updated favicon and various image assets. - Enhanced comments. - Adjusted styles and functionality in several components for improved user experience. - Updated package-lock.json to reflect dependency updates.
This commit is contained in:
@@ -1,16 +1,12 @@
|
||||
import api from '@/utils/api';
|
||||
import { Directory, File, Paths } from 'expo-file-system';
|
||||
import * as FileSystem from 'expo-file-system/legacy';
|
||||
import { StorageAccessFramework } from 'expo-file-system/legacy';
|
||||
import * as Sharing from 'expo-sharing';
|
||||
import * as Linking from 'expo-linking';
|
||||
import { Platform } from 'react-native';
|
||||
|
||||
/**
|
||||
* Gestisce l'upload di un documento verso il server usando FormData
|
||||
* @param file File da caricare (deve avere almeno la proprietà 'uri')
|
||||
* @param siteId ID del sito a cui associare il documento (null per registro generale)
|
||||
* @param customTitle Titolo personalizzato per il documento (opzionale)
|
||||
* Handles upload of a document through the server using FormData
|
||||
* @param file File to upload (must have at least the 'uri' property)
|
||||
* @param siteId ID of the site to associate the document with (null for general register)
|
||||
* @param customTitle Custom title for the document (optional)
|
||||
*/
|
||||
export const uploadDocument = async (
|
||||
file: any,
|
||||
@@ -64,10 +60,10 @@ export const uploadDocument = async (
|
||||
};
|
||||
|
||||
/**
|
||||
* Scarica un documento e offre di aprirlo/condividerlo (expo-sharing)
|
||||
* @param attachmentId ID o URL relativo del documento
|
||||
* @param fileName Nome con cui salvare il file
|
||||
* @param fileUrl URL completo del file da scaricare
|
||||
* Download and share a document (expo-sharing)
|
||||
* @param attachmentId ID or relative URL of the document
|
||||
* @param fileName Name to save the file as
|
||||
* @param fileUrl Full URL of the file to download
|
||||
*/
|
||||
export const downloadAndShareDocument = async (
|
||||
mimetype: string,
|
||||
@@ -75,7 +71,7 @@ export const downloadAndShareDocument = async (
|
||||
fileUrl: string
|
||||
): Promise<void> => {
|
||||
try {
|
||||
// TODO: Gestire meglio il download (attualmente si basa su expo-sharing)
|
||||
// TODO: Download based on expo-sharing - some mime types may not be supported
|
||||
if (!fileUrl || !fileName) {
|
||||
throw new Error("Parametri mancanti per il download del documento.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user