mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-21 08:21:19 +02:00
Add keyring template function
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::Value;
|
||||
use std::collections::HashMap;
|
||||
use tauri::{Runtime, WebviewWindow};
|
||||
use ts_rs::TS;
|
||||
@@ -163,7 +162,7 @@ pub enum InternalEventPayload {
|
||||
|
||||
impl InternalEventPayload {
|
||||
pub fn type_name(&self) -> String {
|
||||
if let Ok(Value::Object(map)) = serde_json::to_value(self) {
|
||||
if let Ok(serde_json::Value::Object(map)) = serde_json::to_value(self) {
|
||||
map.get("type").map(|s| s.as_str().unwrap_or("unknown").to_string())
|
||||
} else {
|
||||
None
|
||||
|
||||
Reference in New Issue
Block a user