web_lib

Common web application libraries
git clone https://radroots.dev/git/web_lib.git
Log | Files | Refs | LICENSE

commit e4e158b840ff738a8ce2662ae38f26d4654487d5
parent 45c1e50213ca858397947fccacf6f6a0133abf92
Author: triesap <137732411+triesap@users.noreply.github.com>
Date:   Fri,  6 Dec 2024 05:56:55 +0000

client: remove client map

Diffstat:
Mclient/package.json | 1-
Mclient/src/index.ts | 2--
Dclient/src/map/tauri.ts | 40----------------------------------------
Dclient/src/map/types.ts | 7-------
4 files changed, 0 insertions(+), 50 deletions(-)

diff --git a/client/package.json b/client/package.json @@ -13,7 +13,6 @@ "@noble/hashes": "^1.4.0", "@nostr-dev-kit/ndk": "^2.10.6", "@radroots/models": "workspace:*", - "@radroots/tauri-plugin-map-display": "workspace:*", "@radroots/utils": "workspace:*", "@tauri-apps/api": "2.0.3", "@tauri-apps/plugin-dialog": "^2.0.1", diff --git a/client/src/index.ts b/client/src/index.ts @@ -19,8 +19,6 @@ export * from "./keystore/tauri" export * from "./keystore/types" export * from "./logger/tauri" export * from "./logger/types" -export * from "./map/tauri" -export * from "./map/types" export * from "./nostr/client" export * from "./nostr/events" export * from "./nostr/lib" diff --git a/client/src/map/tauri.ts b/client/src/map/tauri.ts @@ -1,40 +0,0 @@ -import { setRegion, showMap } from '@radroots/tauri-plugin-map-display'; -import type { GeolocationCoordinatesPoint } from '@radroots/utils'; -import type { IClientMap } from './types'; - -export class TauriClientMap implements IClientMap { - public show_map = async (point: GeolocationCoordinatesPoint): Promise<boolean> => { - try { - const { lat: latitude, lng: longitude } = point; - const res = await showMap({ - mapType: 'standard', - region: { - latitude, - longitude, - latitudeDelta: 0.1, - longitudeDelta: 0.1 - } - }); - return res.success; - } catch (e) { - console.log(`e show_map`, e) - return false; - }; - }; - - public set_region = async (point: GeolocationCoordinatesPoint): Promise<boolean> => { - try { - const { lat: latitude, lng: longitude } = point; - const res = await setRegion({ - latitude, - longitude, - latitudeDelta: 0.1, - longitudeDelta: 0.1 - }); - return res.success; - } catch (e) { - console.log(`e set_region`, e) - return false; - }; - }; -} diff --git a/client/src/map/types.ts b/client/src/map/types.ts @@ -1,6 +0,0 @@ -import type { GeolocationCoordinatesPoint } from "@radroots/utils"; - -export type IClientMap = { - show_map: (point: GeolocationCoordinatesPoint) => Promise<boolean>; - set_region: (point: GeolocationCoordinatesPoint) => Promise<boolean>; -}; -\ No newline at end of file