support receiving images from the Web Share Target API Level 2 and directly opening AI image recognition on mobile version

This commit is contained in:
MaysWind
2026-03-08 15:25:19 +08:00
parent 5ce1dc973c
commit 282b74c95e
8 changed files with 130 additions and 8 deletions
+13
View File
@@ -220,8 +220,11 @@ import { useDesktopPageStore } from '@/stores/desktopPage.ts';
import { APPLICATION_LOGO_PATH } from '@/consts/asset.ts';
import { ThemeType } from '@/core/theme.ts';
import { getShareCacheImageBlob } from '@/lib/cache.ts';
import { isUserScheduledTransactionEnabled } from '@/lib/server_settings.ts';
import { getSystemTheme, setExpenseAndIncomeAmountColor } from '@/lib/ui/common.ts';
import logger from '@/lib/logger.ts';
import {
mdiMenu,
@@ -300,6 +303,14 @@ function handleNavScroll(e: Event): void {
isVerticalNavScrolled.value = (e.target as HTMLElement).scrollTop > 0;
}
function clearShareImageCache(): void {
getShareCacheImageBlob().then(blob => {
if (blob) {
logger.warn('desktop version does not support receving shared image, the share image cache has been cleared');
}
});
}
function lock(): void {
rootStore.lock();
router.replace('/unlock');
@@ -334,6 +345,8 @@ function logout(): void {
function showAddDialogInTransactionListPage(): void {
desktopPageStore.setShowAddTransactionDialogInTransactionList();
}
clearShareImageCache();
</script>
<style>