mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-01 23:13:16 +02:00
Remove analytics and add more update headers
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
import type { AnalyticsAction, AnalyticsResource } from '../../src-tauri/bindings/analytics';
|
||||
import { invokeCmd } from './tauri';
|
||||
|
||||
export function trackEvent(
|
||||
resource: AnalyticsResource,
|
||||
action: AnalyticsAction,
|
||||
attributes: Record<string, string | number> = {},
|
||||
) {
|
||||
invokeCmd('cmd_track_event', {
|
||||
resource: resource,
|
||||
action,
|
||||
attributes,
|
||||
}).catch(console.error);
|
||||
}
|
||||
@@ -1,12 +1,10 @@
|
||||
import { atom } from 'jotai/index';
|
||||
import type { DialogInstance } from '../components/Dialogs';
|
||||
import { trackEvent } from './analytics';
|
||||
import { jotaiStore } from './jotai';
|
||||
|
||||
export const dialogsAtom = atom<DialogInstance[]>([]);
|
||||
|
||||
export function showDialog({ id, ...props }: DialogInstance) {
|
||||
trackEvent('dialog', 'show', { id });
|
||||
jotaiStore.set(dialogsAtom, (a) => [...a.filter((d) => d.id !== id), { id, ...props }]);
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,6 @@ type TauriCmd =
|
||||
| 'cmd_set_update_mode'
|
||||
| 'cmd_template_functions'
|
||||
| 'cmd_template_tokens_to_string'
|
||||
| 'cmd_track_event'
|
||||
| 'cmd_uninstall_plugin'
|
||||
| 'cmd_update_cookie_jar'
|
||||
| 'cmd_update_environment'
|
||||
|
||||
Reference in New Issue
Block a user