Skip to content

TagSpaces is an offline, open source, document manager with tagging support

chore: refactoring file types

Ilian Sapundshiev158d327391e1
diff --git a/app/services/search.ts b/app/services/search.ts
index 144071d07..bdcccb8e2 100644
--- a/app/services/search.ts
+++ b/app/services/search.ts
@@ -39,15 +39,15 @@ export const FileTypeGroups = {
'svg',
'webp',
'bmp',
+ 'tga',
'tif',
'tiff',
- 'ico',
- 'psd',
- 'cr2',
'nef',
+ 'cr2',
'dng',
+ 'psd',
'avif',
- 'tga'
+ 'nef'
],
notes: ['md', 'mdown', 'txt', 'html'],
documents: [
diff --git a/app/services/thumbsgenerator.ts b/app/services/thumbsgenerator.ts
index 082edc4c4..c49b23d79 100644
--- a/app/services/thumbsgenerator.ts
+++ b/app/services/thumbsgenerator.ts
@@ -29,30 +29,13 @@ import AppConfig from '-/AppConfig';
import { base64ToArrayBuffer } from '-/utils/dom';
import PlatformIO from '../services/platform-facade';
import { Pro } from '../pro';
+import { FileTypeGroups } from '-/services/search';
let maxSize = AppConfig.maxThumbSize;
const thumbnailBackgroundColor = AppConfig.thumbBgColor;
export const supportedMisc = ['url', 'html'];
-export const supportedImgs = [
- 'jpg',
- 'jpeg',
- 'jif',
- 'jfif',
- 'png',
- 'gif',
- 'svg',
- 'webp',
- 'bmp',
- 'tga',
- 'tif',
- 'tiff',
- 'nef',
- 'cr2',
- 'dng',
- 'psd',
- 'avif'
-];
+export const supportedImgs = FileTypeGroups.images;
export const supportedContainers = [
'zip',
'pages',
diff --git a/playwright.unit.js b/playwright.unit.js
index 18634e8ec..863b2916e 100644
--- a/playwright.unit.js
+++ b/playwright.unit.js
@@ -11,5 +11,5 @@ module.exports = defineConfig({
timeout: 30000,
// (3 hours) Maximum time in milliseconds the whole test suite can run. Useful on CI to prevent broken setup from running too long and wasting resources.
globalTimeout: process.env.CI ? 3 * 60 * 60 * 1000 : undefined,
- reporter: process.env.CI ? 'github' : 'list',
+ reporter: process.env.CI ? 'github' : 'list'
});