use full file type name

This commit is contained in:
ThatOneCalculator 2023-10-02 23:45:46 -07:00
parent c95d143065
commit 1c36662813
No known key found for this signature in database
GPG key ID: 8703CACD01000000

View file

@ -78,7 +78,6 @@ function toggleSensitive(file) {
} }
function cropImage(file) { function cropImage(file) {
if (!["png", "webp", "jpg", "jpeg"].includes(file.type)) return;
os.cropImage(file).then((newFile) => { os.cropImage(file).then((newFile) => {
emits("cropImage", newFile); emits("cropImage", newFile);
}); });
@ -155,7 +154,7 @@ function showFileMenu(file, ev: MouseEvent) {
describe(file); describe(file);
}, },
}, },
["png", "webp", "jpg", "jpeg"].includes(file.type) ? { ["image/png", "image/webp", "image/jpeg"].includes(file.type) ? {
text: i18n.ts.cropImage, text: i18n.ts.cropImage,
icon: "ph-crop ph-bold ph-lg", icon: "ph-crop ph-bold ph-lg",
action: () => { action: () => {