(feat): add ttp-tauri and integrate it
(feat): change font to Public Sans
This commit is contained in:
parent
1e90171ee9
commit
4c0f2fde91
13 changed files with 73 additions and 64 deletions
|
|
@ -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"],
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue