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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user