(feat): add ttp-tauri and integrate it
All checks were successful
/ build-web (push) Successful in 1m27s
/ build-desktop (linux) (push) Successful in 6m46s
/ build-mobile (push) Successful in 17m23s
/ release (push) Successful in 32s

(feat): change font to Public Sans
This commit is contained in:
Alois 2026-06-09 19:48:18 +02:00
commit 4c0f2fde91
13 changed files with 73 additions and 64 deletions

View file

@ -257,6 +257,7 @@ export interface Storage extends SettingsStorageDefaults {
cached_contacts: Contacts;
cached_communities: Communities;
ttp_url: string;
ttp_server_cert: string;
call_mute_range_start: number;
call_mute_range_end: number;
chat_trusted_domains: string[];
@ -293,6 +294,7 @@ export const storageDefaults: Storage = {
cached_contacts: [],
cached_communities: [],
ttp_url: "https://tensamin.net:959",
ttp_server_cert: "",
call_mute_range_start: -55,
call_mute_range_end: -45,
chat_trusted_domains: ["tenor.com", "c.tenor.com"],

View file

@ -195,10 +195,14 @@ export function Provider(props: {
// Load ttp url
const [ttpUrl, setTtpUrl] = useState<string | null>(null);
const [ttpServerCert, setTtpServerCert] = useState<string>("");
useEffect(() => {
load("ttp_url").then((url) => {
setTtpUrl(url);
});
load("ttp_server_cert").then((cert) => {
setTtpServerCert(cert.trim());
});
}, [load]);
/**
@ -373,6 +377,7 @@ export function Provider(props: {
const transportClient = !props.blockConnection
? createTransportClient(schemas, {
url: ttpUrl,
serverCert: ttpServerCert || undefined,
onReadyStateChange: (state) => {
currentReadyState = state;
setReadyState(state);
@ -494,7 +499,7 @@ export function Provider(props: {
setIdentifying(false);
identificationStartedRef.current = false;
};
}, [props.blockConnection, ttpUrl]);
}, [props.blockConnection, ttpServerCert, ttpUrl]);
useEffect(() => {
if (!connected) {