mirror of
				https://github.com/C4illin/ConvertX.git
				synced 2025-11-03 21:43:22 +00:00 
			
		
		
		
	format all
This commit is contained in:
		@@ -108,7 +108,7 @@ export async function mainConverter(
 | 
			
		||||
    console.log(
 | 
			
		||||
      `No available converter supports converting from ${fileType} to ${convertTo}.`,
 | 
			
		||||
    );
 | 
			
		||||
    return "File type not supported"
 | 
			
		||||
    return "File type not supported";
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  try {
 | 
			
		||||
@@ -123,13 +123,13 @@ export async function mainConverter(
 | 
			
		||||
    console.log(
 | 
			
		||||
      `Converted ${inputFilePath} from ${fileType} to ${convertTo} successfully using ${converterName}.`,
 | 
			
		||||
    );
 | 
			
		||||
    return "Done"
 | 
			
		||||
    return "Done";
 | 
			
		||||
  } catch (error) {
 | 
			
		||||
    console.error(
 | 
			
		||||
      `Failed to convert ${inputFilePath} from ${fileType} to ${convertTo} using ${converterName}.`,
 | 
			
		||||
      error,
 | 
			
		||||
    );
 | 
			
		||||
    return "Failed, check logs"
 | 
			
		||||
    return "Failed, check logs";
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
export const normalizeFiletype = (filetype: string): string => {
 | 
			
		||||
  const lowercaseFiletype = filetype.toLowerCase();
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  switch (lowercaseFiletype) {
 | 
			
		||||
    case "jpg":
 | 
			
		||||
      return "jpeg";
 | 
			
		||||
@@ -11,11 +11,11 @@ export const normalizeFiletype = (filetype: string): string => {
 | 
			
		||||
    default:
 | 
			
		||||
      return lowercaseFiletype;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export const normalizeOutputFiletype = (filetype: string): string => {
 | 
			
		||||
  const lowercaseFiletype = filetype.toLowerCase();
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  switch (lowercaseFiletype) {
 | 
			
		||||
    case "jpeg":
 | 
			
		||||
      return "jpg";
 | 
			
		||||
@@ -24,4 +24,4 @@ export const normalizeOutputFiletype = (filetype: string): string => {
 | 
			
		||||
    default:
 | 
			
		||||
      return lowercaseFiletype;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
@@ -458,7 +458,9 @@ const app = new Elysia()
 | 
			
		||||
                  <optgroup label={converter}>
 | 
			
		||||
                    {targets.map((target) => (
 | 
			
		||||
                      // biome-ignore lint/correctness/useJsxKeyInIterable: <explanation>
 | 
			
		||||
                      <option value={`${target},${converter}`} safe>{target}</option>
 | 
			
		||||
                      <option value={`${target},${converter}`} safe>
 | 
			
		||||
                        {target}
 | 
			
		||||
                      </option>
 | 
			
		||||
                    ))}
 | 
			
		||||
                  </optgroup>
 | 
			
		||||
                ))}
 | 
			
		||||
@@ -485,7 +487,9 @@ const app = new Elysia()
 | 
			
		||||
              <optgroup label={converter}>
 | 
			
		||||
                {targets.map((target) => (
 | 
			
		||||
                  // biome-ignore lint/correctness/useJsxKeyInIterable: <explanation>
 | 
			
		||||
                  <option value={`${target},${converter}`} safe>{target}</option>
 | 
			
		||||
                  <option value={`${target},${converter}`} safe>
 | 
			
		||||
                    {target}
 | 
			
		||||
                  </option>
 | 
			
		||||
                ))}
 | 
			
		||||
              </optgroup>
 | 
			
		||||
            ),
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user