Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions docs/backend/backend_python/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1117,9 +1117,14 @@
"in": "query",
"required": false,
"schema": {
"$ref": "#/components/schemas/InputType",
"allOf": [
{
"$ref": "#/components/schemas/InputType"
}
],
"description": "Choose input type: 'path' or 'base64'",
"default": "path"
"default": "path",
"title": "Input Type"
},
"description": "Choose input type: 'path' or 'base64'"
}
Expand Down Expand Up @@ -2199,7 +2204,6 @@
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
Expand Down
12 changes: 12 additions & 0 deletions frontend/src-tauri/2
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

removed 1 package, and audited 901 packages in 7s

165 packages are looking for funding
run `npm fund` for details

1 moderate severity vulnerability

To address all issues, run:
npm audit fix

Run `npm audit` for details.
Comment on lines +1 to +12

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove accidentally committed npm audit output.

This file appears to be npm audit command output that was unintentionally committed. Build artifacts and command output should not be tracked in version control.

Apply this fix:

#!/bin/bash
# Remove the accidentally committed file
git rm frontend/src-tauri/2

Additionally, consider addressing the reported moderate severity vulnerability by running:

cd frontend/src-tauri && npm audit fix
🤖 Prompt for AI Agents
In frontend/src-tauri/2 around lines 1-12 the file contains npm audit CLI output
that was accidentally committed; remove the file from the repo (use git rm and
commit the deletion), add a rule to .gitignore to prevent committing CLI/build
output in the future, and if you want to address the reported vulnerability run
npm audit fix in frontend/src-tauri, review and commit any updated lockfile
changes.

2 changes: 1 addition & 1 deletion frontend/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ tauri-plugin-dialog = "2.4.2"
tauri-plugin-process = "2.3.1"
tauri-plugin-store = "2.4.1"
tauri-plugin-updater = "2.9.0"
tauri-plugin-opener = "2.5.2"
tauri-plugin-opener = "2"

[features]
# This feature is used for production builds or when a dev server is not specified, DO NOT REMOVE!!
Expand Down
26 changes: 24 additions & 2 deletions frontend/src-tauri/capabilities/migrated.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,28 @@
"fs:default",
"dialog:default",
"store:default",
"opener:allow-reveal-item-in-dir"
"opener:allow-reveal-item-in-dir",
"opener:allow-open-path",
"opener:allow-open-url",
"opener:allow-default-urls",
{
"identifier": "opener:allow-open-path",
"allow": [
{
"path": "**"
}
]
},
{
"identifier": "opener:allow-open-url",
"allow": [
{
"url": "https://*"
},
{
"url": "http://*"
}
]
}
]
}
}
31 changes: 16 additions & 15 deletions frontend/src/components/Media/MediaInfoPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { open } from '@tauri-apps/plugin-shell';
import { openPath, openUrl } from '@tauri-apps/plugin-opener';
import {
X,
ImageIcon as ImageLucide,
Expand All @@ -26,6 +26,18 @@ export const MediaInfoPanel: React.FC<MediaInfoPanelProps> = ({
currentIndex,
totalImages,
}) => {
const handleLocationClick = async () => {
if (currentImage?.metadata?.latitude && currentImage?.metadata?.longitude) {
const { latitude, longitude } = currentImage.metadata;
const url = `https://maps.google.com/?q=${latitude},${longitude}`;
try {
await openUrl(url);
} catch (error) {
console.error('Failed to open map URL:', error);
}
}
};

const getFormattedDate = () => {
if (currentImage?.metadata?.date_created) {
return new Date(currentImage.metadata.date_created).toLocaleDateString(
Expand All @@ -46,18 +58,6 @@ export const MediaInfoPanel: React.FC<MediaInfoPanelProps> = ({
return currentImage.path?.split(/[/\\]/).pop() || 'Image';
};

const handleLocationClick = async () => {
if (currentImage?.metadata?.latitude && currentImage?.metadata?.longitude) {
const { latitude, longitude } = currentImage.metadata;
const url = `https://maps.google.com/?q=${latitude},${longitude}`;
try {
await open(url);
} catch (error) {
console.error('Failed to open map URL:', error);
}
}
};

if (!show) return null;

return (
Expand Down Expand Up @@ -163,17 +163,18 @@ export const MediaInfoPanel: React.FC<MediaInfoPanelProps> = ({
onClick={async () => {
if (currentImage?.path) {
try {
await open(currentImage.path);
await openPath(currentImage.path);
} catch (error) {
console.error('Failed to open file:', error);
}
}
}}
>
Open Original File
<SquareArrowOutUpRight className="ml-2 inline h-4 w-4" />
</button>
</div>
</div>
</div>
);
};
};