Переглянути джерело

Squash merge html-write into main

Rain 1 місяць тому
батько
коміт
78b1040980

+ 1 - 0
Cargo.toml

@@ -3,6 +3,7 @@ resolver = "2"
 members = [
     "client",
     "client_cli",
+    "client_html",
     "client_shared",
     "logging",
     "procmacro",

+ 4 - 0
client_html/.gitignore

@@ -0,0 +1,4 @@
+# Generated by Cargo
+# will have compiled files and executables
+/target/
+/gen/schemas

+ 27 - 0
client_html/Cargo.toml

@@ -0,0 +1,27 @@
+[package]
+name = "client_html"
+version = "0.1.0"
+description = "A Tauri App"
+authors = ["you"]
+license = ""
+repository = ""
+edition = "2021"
+rust-version = "1.77.2"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[lib]
+name = "app_lib"
+crate-type = ["staticlib", "cdylib", "rlib"]
+
+[build-dependencies]
+tauri-build = { version = "2.5.6", features = [] }
+
+[dependencies]
+serde_json = "1.0"
+serde = { version = "1.0", features = ["derive"] }
+log = "0.4"
+tauri = { version = "2.10.3", features = [] }
+tauri-plugin-log = "2"
+
+client_shared = { path = "../client_shared" }

+ 456 - 0
client_html/assets/index.html

@@ -0,0 +1,456 @@
+<!-- COPYRIGHT (C) AMY <RAIN@SKULD.NETWORK> & IDK THIS IS MOSTLY WRITTEN WITH COPILOT LOL -->
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Chatroom</title>
+    <style>
+
+:root {
+    --col-1: #2f3136;
+    --col-2: #36393f;
+    --col-3: #40444b;
+    --col-accent: #7289da;
+    --col-text-1: rgb(200, 200, 200);
+    --col-text-2: white;
+}
+
+/* SCROLLBARS */
+/* Firefox */
+* {
+    scrollbar-width: thin;
+    scrollbar-color: var(--col-3) var(--col-1);
+}
+
+/* WebKit browsers */
+*::-webkit-scrollbar {
+    width: 0.75em;
+    height: 0.75em;
+}
+
+*::-webkit-scrollbar-track {
+    background: var(--col-1);
+}
+
+*::-webkit-scrollbar-thumb {
+    background-color: var(--col-3);
+    border-radius: 0.5em;
+    border: 0.15em solid var(--col-1);
+}
+
+*::-webkit-scrollbar-thumb:hover {
+    background-color: var(--col-accent);
+}
+
+/* MAIN */
+
+html {
+    font-family: Arial, Helvetica, sans-serif;
+    font-size: 1rem;
+    background-color: var(--col-1);
+}
+
+body {
+    background-color: var(--col-1);
+    color: var(--col-text-1);
+
+    height: 100vh;
+    margin: 0;
+    padding: 0;
+}
+
+.panel-host {
+    display: flex;
+    width: 100%;
+    height: 100%;
+}
+
+.panel {
+    display: flex;
+    flex-direction: column;
+    overflow-y: auto;
+    padding: 1em;
+
+    background-color: var(--col-1);
+
+    border-style: solid;
+    border-collapse: collapse;
+    border-color: var(--col-3);
+    border-width: 0 0.1em 0 0;
+}
+
+#user-list,
+#channel-list {
+    flex-shrink: 0;
+    flex-grow: 1;
+    min-width: 15%;
+    max-width: 15%;
+    width: 15%;
+}
+
+#chat-area {
+    flex-grow: 5;
+    display: flex;
+    flex-direction: column;
+}
+
+#channels,
+#users,
+#messages {
+    flex-shrink: 0;
+    flex: 1;
+    overflow-y: auto;
+    display: flex;
+    flex-direction: column;
+}
+
+#messages {
+    flex-direction: column-reverse;
+}
+
+h2 {
+    margin: 0 0 1em 0;
+}
+
+button {
+    background-color: var(--col-accent);
+    color: var(--col-text-2);
+
+    border: none;
+    border-radius: 0.3em;
+    padding: 0.5em;
+
+    font-size: inherit;
+
+    cursor: pointer;
+    user-select: none;
+    -webkit-user-select: none;
+}
+
+button:disabled {
+    background-color: var(--col-3);
+    color: var(--col-text-1);
+    cursor: not-allowed;
+}
+
+#textentry {
+    display: flex;
+}
+
+#textentry input {
+    font-size: inherit;
+    width: 100%;
+    padding: 0.5em;
+    margin-right: 0.5em;
+    border: none;
+    border-radius: 0.3em;
+
+    background-color: var(--col-3);
+    color: var(--col-text-1);
+}
+
+.user-item,
+.message-item {
+    margin-bottom: 0.5em;
+}
+
+.channel-item {
+    cursor: pointer;
+    padding: 0.25em 0.5em;
+    border-radius: 0.3em;
+    margin-bottom: 0.2em;
+}
+
+.channel-item:hover {
+    background-color: var(--col-3);
+}
+
+.channel-item.active {
+    background-color: var(--col-accent);
+    color: var(--col-text-2);
+}
+
+    </style>
+</head>
+
+<body>
+    <div class="panel-host" style="flex-direction: column;">
+        <!-- <div class="panel-host">
+            <div class="panel">
+                <button onclick=switchTheme()>Appearance</button>
+            </div>
+        </div> -->
+        <div class="panel-host">
+
+            <div class="panel" id="channel-list">
+                <h2>Channels</h2>
+                <div id="channels">
+                    <!-- Add channel list here -->
+                </div>
+                <div id="channel-create" style="margin-top: auto; padding-top: 0.5em;">
+                    <input id="channel-input" type="text" placeholder="New channel name" style="font-size: inherit; width: 100%; padding: 0.5em; margin-bottom: 0.4em; border: none; border-radius: 0.3em; background-color: var(--col-3); color: var(--col-text-1); box-sizing: border-box;">
+                    <button style="width: 100%;" onclick="createChannel()">+ Create Channel</button>
+                </div>
+            </div>
+
+            <div class="panel" id="user-list">
+                <h2>Users</h2>
+                <div id="users">
+                    <!-- Add user list here -->
+                </div>
+                <div id="username-set" style="margin-top: auto; padding-top: 0.5em;">
+                    <input id="username-input" type="text" placeholder="Set username" style="font-size: inherit; width: 100%; padding: 0.5em; margin-bottom: 0.4em; border: none; border-radius: 0.3em; background-color: var(--col-3); color: var(--col-text-1); box-sizing: border-box;">
+                    <button style="width: 100%;" onclick="setUsername()">Set Username</button>
+                </div>
+            </div>
+
+            <div class="panel" id="chat-area">
+                <h2>Messages</h2>
+                <div id="messages">
+                    <!-- Add messages here -->
+                </div>
+                <div id="textentry">
+                    <input id="message-input" type="text" placeholder="Message #channel-name">
+                    <button onclick="submitMessageToServer()">Send</button>
+                </div>
+            </div>
+
+        </div>
+    </div>
+
+    <script>
+
+/// (time, channel, username, content, isPending)
+messages = [];
+selectedChannel = null;
+selectedUsers = new Set();
+username = `Myst#${randomNumericString(4)}`;
+customChannels = new Set();
+
+function randomNumericString(length) {
+    let v = 10 ** length;
+    return Math.floor(Math.random() * v * 0.9 + v * 0.1);
+}
+
+function switchTheme() {
+    const e = document.querySelector('body');
+    e.setAttribute('data-theme', e.getAttribute('data-theme') === 'light' ? 'dark' : 'light');
+}
+
+function createChannel() {
+    const input = document.querySelector('#channel-input');
+    const name = input.value.trim().replace(/\s+/g, '-').toLowerCase();
+    if (name) {
+        customChannels.add(name);
+        selectedChannel = name;
+        input.value = '';
+        visualUpdate();
+    }
+}
+
+function setUsername() {
+    const input = document.querySelector('#username-input');
+    const name = input.value.trim();
+    if (name) {
+        username = name;
+        input.value = '';
+        visualUpdate();
+    }
+}
+
+function bindEnterToAction(inputSelector, action) {
+    const input = document.querySelector(inputSelector);
+    if (!input) return;
+
+    input.addEventListener('keydown', (event) => {
+        if (event.key === 'Enter') {
+            event.preventDefault();
+            action();
+        }
+    });
+}
+
+function visualUpdate() {
+    const messagesDiv = document.querySelector('#messages');
+    messagesDiv.innerHTML = "";
+    const visibleMessages = selectedChannel
+        ? messages.filter(m => m[1] === selectedChannel)
+        : messages;
+    const filteredMessages = selectedUsers.size
+        ? visibleMessages.filter(m => selectedUsers.has(m[2]))
+        : visibleMessages;
+    for (const [time, channel, username, message] of filteredMessages.slice().reverse()) {
+        const messageDiv = document.createElement('div');
+        messageDiv.classList.add('message-item');
+        const timeString = new Date(time).toLocaleTimeString();
+        messageDiv.textContent = `[${timeString}] ${username}: ${message}`;
+        messagesDiv.appendChild(messageDiv);
+    }
+
+    // Disable input when no channel or "all" is selected
+    const input = document.querySelector('#message-input');
+    const sendButton = document.querySelector('#textentry button');
+    const isAllSelected = !selectedChannel;
+    input.disabled = isAllSelected;
+    sendButton.disabled = isAllSelected;
+    input.placeholder = isAllSelected ? 'Select a channel to send messages' : `Message #${selectedChannel} as ${username}`;
+
+    // Update channels
+    const channelsDiv = document.querySelector('#channels');
+
+    // Remove empty channels that aren't selected
+    customChannels = new Set(
+        [...customChannels].filter(channel =>
+            channel === selectedChannel || messages.some(m => m[1] === channel)
+        )
+    );
+
+    const channels = new Set([...customChannels, ...messages.map(m => m[1])]);
+    channelsDiv.innerHTML = "";
+
+    const allChannelsDiv = document.createElement('div');
+    allChannelsDiv.classList.add('channel-item');
+    if (!selectedChannel) {
+        allChannelsDiv.classList.add('active');
+    }
+    allChannelsDiv.textContent = '#all';
+    allChannelsDiv.onclick = () => {
+        selectedChannel = null;
+        selectedUsers.clear();
+        visualUpdate();
+    };
+    channelsDiv.appendChild(allChannelsDiv);
+
+    for (const channel of channels) {
+        const channelDiv = document.createElement('div');
+        channelDiv.classList.add('channel-item');
+        if (channel === selectedChannel) {
+            channelDiv.classList.add('active');
+        }
+        channelDiv.textContent = `#${channel}`;
+        channelDiv.onclick = () => {
+            selectedChannel = channel;
+            selectedUsers.clear();
+            visualUpdate();
+        };
+        channelsDiv.appendChild(channelDiv);
+    }
+
+    // Update users
+    const userList = document.querySelector('#users');
+    const users = new Set(
+        (selectedChannel ? messages.filter(m => m[1] === selectedChannel) : messages).map(m => m[2])
+    );
+    userList.innerHTML = "";
+
+    if (selectedUsers.size) {
+        const clearDiv = document.createElement('div');
+        clearDiv.classList.add('user-item');
+        clearDiv.style.cssText = 'cursor: pointer; color: var(--col-accent); margin-bottom: 0.5em;';
+        clearDiv.textContent = '✕ Clear filters';
+        clearDiv.onclick = () => {
+            selectedUsers.clear();
+            visualUpdate();
+        };
+        userList.appendChild(clearDiv);
+    }
+
+    for (const user of users) {
+        const userDiv = document.createElement('div');
+        userDiv.classList.add('user-item');
+        userDiv.textContent = user;
+        userDiv.style.cursor = 'pointer';
+
+        if (selectedUsers.has(user)) {
+            userDiv.style.color = 'var(--col-accent)';
+            userDiv.style.fontWeight = 'bold';
+        }
+
+        userDiv.onclick = () => {
+            if (selectedUsers.has(user)) {
+                selectedUsers.delete(user);
+            } else {
+                selectedUsers.add(user);
+            }
+            visualUpdate();
+        };
+
+        userList.appendChild(userDiv);
+    }
+}
+
+// TODO: Send to server
+async function submitMessageToServer() {
+    const input = document.querySelector('#message-input');
+    const message = input.value.trim();
+    if (message) {
+        messages.push([Date.now(), selectedChannel, username, message, true]);
+        input.value = '';
+    }
+    visualUpdate();
+
+    await window.__TAURI_INTERNALS__.invoke(
+        "send_message",
+        {
+            channel: selectedChannel,
+            sender: username,
+            content: message
+        }
+    );
+
+    // Scroll to bottom
+    const messagesDiv = document.querySelector('#messages');
+    messagesDiv.scrollTop = messagesDiv.scrollHeight;
+}
+
+async function receiveMessagesFromServer() {
+    const result = await window.__TAURI_INTERNALS__.invoke(
+        "receive_messages",
+        {}
+    );
+
+    console.log("Received messages from server:", result);
+
+    messages = result.map(m => [m[0], m[1], m[2], m[3], false]);
+}
+
+function main() {
+    receiveMessagesFromServer();
+    visualUpdate();
+
+    bindEnterToAction('#message-input', submitMessageToServer);
+    bindEnterToAction('#channel-input', createChannel);
+    bindEnterToAction('#username-input', setUsername);
+
+    setInterval(() => {
+        receiveMessagesFromServer();
+
+        // Don't update if user has scrolled up
+        const messagesDiv = document.querySelector('#messages');
+        if (messagesDiv.scrollTop + messagesDiv.clientHeight < messagesDiv.clientHeight) {
+            return;
+        }
+        visualUpdate();
+    }, 1000);
+}
+
+main();
+
+
+function simulateReceivingMessages() {
+    // Simulate receiving messages
+    setInterval(() => {
+        const channels = ["root", "general", "random"];
+        const channel = channels[Math.floor(Math.random() * channels.length)];
+        const username = `User${randomNumericString(4)}`;
+        const message = `Hello ${channel} from ${username}!`;
+        messages.push([Date.now(), channel, username, message]);
+    }, 100);
+}
+
+</script>
+</body>
+
+</html>

+ 3 - 0
client_html/build.rs

@@ -0,0 +1,3 @@
+fn main() {
+  tauri_build::build()
+}

+ 11 - 0
client_html/capabilities/default.json

@@ -0,0 +1,11 @@
+{
+  "$schema": "../gen/schemas/desktop-schema.json",
+  "identifier": "default",
+  "description": "enables the default permissions",
+  "windows": [
+    "main"
+  ],
+  "permissions": [
+    "core:default"
+  ]
+}

BIN
client_html/icons/128x128.png


BIN
client_html/icons/128x128@2x.png


BIN
client_html/icons/32x32.png


BIN
client_html/icons/Square107x107Logo.png


BIN
client_html/icons/Square142x142Logo.png


BIN
client_html/icons/Square150x150Logo.png


BIN
client_html/icons/Square284x284Logo.png


BIN
client_html/icons/Square30x30Logo.png


BIN
client_html/icons/Square310x310Logo.png


BIN
client_html/icons/Square44x44Logo.png


BIN
client_html/icons/Square71x71Logo.png


BIN
client_html/icons/Square89x89Logo.png


BIN
client_html/icons/StoreLogo.png


BIN
client_html/icons/icon.icns


BIN
client_html/icons/icon.ico


BIN
client_html/icons/icon.png


+ 0 - 284
client_html/index.html

@@ -1,284 +0,0 @@
-<!-- COPYRIGHT (C) AMY <RAIN@SKULD.NETWORK> & IDK THIS IS MOSTLY WRITTEN WITH COPILOT LOL -->
-<!DOCTYPE html>
-<html lang="en">
-
-<head>
-    <meta charset="UTF-8">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <title>Chatroom</title>
-    <style>
-
-:root {
-    --col-1: #2f3136;
-    --col-2: #36393f;
-    --col-3: #40444b;
-    --col-accent: #7289da;
-    --col-text-1: rgb(200, 200, 200);
-    --col-text-2: white;
-}
-
-html {
-    font-family: Arial, Helvetica, sans-serif;
-    font-size: 1rem;
-    background-color: var(--col-1);
-}
-
-body {
-    background-color: var(--col-1);
-    color: var(--col-text-1);
-
-    height: 100vh;
-    margin: 0;
-    padding: 0;
-}
-
-.panel-host {
-    display: flex;
-    width: 100%;
-    height: 100%;
-}
-
-.panel {
-    display: flex;
-    flex-direction: column;
-    overflow-y: auto;
-    padding: 1em;
-
-    background-color: var(--col-1);
-
-    border-style: solid;
-    border-collapse: collapse;
-    border-color: var(--col-3);
-    border-width: 0 0.1em 0 0;
-}
-
-#user-list,
-#channel-list {
-    flex-shrink: 0;
-    flex-grow: 1;
-    min-width: 15%;
-    max-width: 15%;
-    width: 15%;
-}
-
-#chat-area {
-    flex-grow: 5;
-    display: flex;
-    flex-direction: column;
-}
-
-#messages {
-    flex-shrink: 0;
-    flex: 1;
-    overflow-y: auto;
-    display: flex;
-    flex-direction: column-reverse;
-}
-
-h2 {
-    margin: 0 0 1em 0;
-}
-
-button {
-    background-color: var(--col-accent);
-    color: var(--col-text-2);
-
-    border: none;
-    border-radius: 0.3em;
-    padding: 0.5em;
-
-    font-size: inherit;
-
-    cursor: pointer;
-    user-select: none;
-    -webkit-user-select: none;
-}
-
-#textentry {
-    display: flex;
-}
-
-#textentry input {
-    font-size: inherit;
-    width: 100%;
-    padding: 0.5em;
-    margin-right: 0.5em;
-    border: none;
-    border-radius: 0.3em;
-
-    background-color: var(--col-3);
-    color: var(--col-text-1);
-}
-
-.message {
-    margin-bottom: 0.5em;
-}
-
-.channel-item {
-    cursor: pointer;
-    padding: 0.25em 0.5em;
-    border-radius: 0.3em;
-    margin-bottom: 0.2em;
-}
-
-.channel-item:hover {
-    background-color: var(--col-3);
-}
-
-.channel-item.active {
-    background-color: var(--col-accent);
-    color: var(--col-text-2);
-}
-
-    </style>
-</head>
-
-<body>
-    <div class="panel-host" style="flex-direction: column;">
-        <!-- <div class="panel-host">
-            <div class="panel">
-                <button onclick=switchTheme()>Appearance</button>
-            </div>
-        </div> -->
-        <div class="panel-host">
-
-            <div class="panel" id="channel-list">
-                <h2>Channels</h2>
-                <!-- Add channel list here -->
-            </div>
-
-            <div class="panel" id="user-list">
-                <h2>Users</h2>
-                <!-- Add user list here -->
-            </div>
-
-            <div class="panel" id="chat-area">
-                <h2>Messages</h2>
-                <div id="messages">
-                    <!-- Add messages here -->
-                </div>
-                <div id="textentry">
-                    <input id="message-input" type="text" placeholder="Message #channel-name">
-                    <button onclick="submitMessage()">Send</button>
-                </div>
-            </div>
-
-        </div>
-    </div>
-
-    <script>
-
-/// (time, channel, username, content)
-messages = [];
-selectedChannel = null;
-
-function randomNumericString(length) {
-    let v = 10 ** length;
-    return Math.floor(Math.random() * v * 0.9 + v * 0.1);
-}
-
-function switchTheme() {
-    const e = document.querySelector('body');
-    e.setAttribute('data-theme', e.getAttribute('data-theme') === 'light' ? 'dark' : 'light');
-}
-
-function simulateReceivingMessages() {
-    // Simulate receiving messages
-    setInterval(() => {
-        const channels = ["root", "general", "random"];
-        const channel = channels[Math.floor(Math.random() * channels.length)];
-        const username = `User${randomNumericString(4)}`;
-        const message = `Hello ${channel} from ${username}!`;
-        messages.push([Date.now(), channel, username, message]);
-    }, 100);
-}
-
-function visualUpdate() {
-    const messagesDiv = document.querySelector('#messages');
-    messagesDiv.innerHTML = "";
-    const visibleMessages = selectedChannel
-        ? messages.filter(m => m[1] === selectedChannel)
-        : messages;
-    for (const [time, channel, username, message] of visibleMessages.slice().reverse()) {
-        const messageDiv = document.createElement('div');
-        messageDiv.classList.add('message');
-        const timeString = new Date(time).toLocaleTimeString();
-        messageDiv.textContent = `[${timeString}] ${username}: ${message}`;
-        messagesDiv.appendChild(messageDiv);
-    }
-
-    // Update channels
-    const channelList = document.querySelector('#channel-list');
-    const channels = new Set(messages.map(m => m[1]));
-    channelList.innerHTML = "<h2>Channels</h2>";
-
-    const allChannelsDiv = document.createElement('div');
-    allChannelsDiv.classList.add('channel-item');
-    if (!selectedChannel) {
-        allChannelsDiv.classList.add('active');
-    }
-    allChannelsDiv.textContent = '#all';
-    allChannelsDiv.onclick = () => {
-        selectedChannel = null;
-        visualUpdate();
-    };
-    channelList.appendChild(allChannelsDiv);
-
-    for (const channel of channels) {
-        const channelDiv = document.createElement('div');
-        channelDiv.classList.add('channel-item');
-        if (channel === selectedChannel) {
-            channelDiv.classList.add('active');
-        }
-        channelDiv.textContent = `#${channel}`;
-        channelDiv.onclick = () => {
-            selectedChannel = channel;
-            visualUpdate();
-        };
-        channelList.appendChild(channelDiv);
-    }
-
-    // Update users
-    const userList = document.querySelector('#user-list');
-    const users = new Set(messages.map(m => m[2]));
-    userList.innerHTML = "<h2>Users</h2>";
-    for (const user of users) {
-        const userDiv = document.createElement('div');
-        userDiv.textContent = user;
-        userList.appendChild(userDiv);
-    }
-}
-
-function submitMessage() {
-    const input = document.querySelector('#message-input');
-    const message = input.value.trim();
-    if (message) {
-        messages.push([Date.now(), "root", "You", message]);
-        input.value = '';
-    }
-    visualUpdate();
-
-    // Scroll to bottom
-    const messagesDiv = document.querySelector('#messages');
-    messagesDiv.scrollTop = messagesDiv.scrollHeight;
-}
-
-function main() {
-    setInterval(() => {
-        // Don't update if user has scrolled up
-        const messagesDiv = document.querySelector('#messages');
-        if (messagesDiv.scrollTop + messagesDiv.clientHeight < messagesDiv.clientHeight) {
-            return;
-        }
-        visualUpdate();
-    }, 1000);
-}
-
-simulateReceivingMessages();
-
-main();
-
-    </script>
-</body>
-
-</html>

+ 16 - 0
client_html/src/lib.rs

@@ -0,0 +1,16 @@
+#[cfg_attr(mobile, tauri::mobile_entry_point)]
+pub fn run() {
+  tauri::Builder::default()
+    .setup(|app| {
+      if cfg!(debug_assertions) {
+        app.handle().plugin(
+          tauri_plugin_log::Builder::default()
+            .level(log::LevelFilter::Info)
+            .build(),
+        )?;
+      }
+      Ok(())
+    })
+    .run(tauri::generate_context!())
+    .expect("error while running tauri application");
+}

+ 47 - 0
client_html/src/main.rs

@@ -0,0 +1,47 @@
+// Prevents additional console window on Windows in release, DO NOT REMOVE!!
+#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
+
+// fn main() {
+//   app_lib::run();
+// }
+
+fn main() {
+    tauri::Builder::default()
+        .invoke_handler(tauri::generate_handler![
+            greet,
+            receive_messages,
+            send_message
+        ])
+        .run(tauri::generate_context!())
+        .expect("error while running tauri application");
+}
+
+#[tauri::command]
+fn greet(name: &str) -> String {
+    format!("Hello, {}!", name)
+}
+
+// TODO: Pass hostname and password from frontend
+#[tauri::command]
+fn receive_messages() -> Vec<(u128, String, String, String)> {
+    let msges = client_shared::utils::rx_messages("ch.skuld.network", "null", 2);
+
+    let Ok(msges) = msges else {
+        return vec![];
+    };
+
+    let mut out = vec![];
+    for msg in msges {
+        out.push((msg.time, msg.channel, msg.sender, msg.content));
+    }
+
+    out
+}
+
+// TODO: Pass hostname and password from frontend
+// TODO: Handle errors
+#[tauri::command]
+fn send_message(channel: &str, sender: &str, content: &str) {
+    let message = client_shared::message::Message::new(sender, content, channel);
+    let _ = client_shared::utils::tx_message("ch.skuld.network", "null", 2, message);
+}

+ 35 - 0
client_html/tauri.conf.json

@@ -0,0 +1,35 @@
+{
+  "$schema": "https://schema.tauri.app/config/2",
+  "productName": "Channel",
+  "version": "0.1.0",
+  "identifier": "com.tauri.dev",
+  "build": {
+    "frontendDist": "./assets",
+    "devUrl": null
+  },
+  "app": {
+    "windows": [
+      {
+        "title": "Channel",
+        "width": 800,
+        "height": 600,
+        "resizable": true,
+        "fullscreen": false
+      }
+    ],
+    "security": {
+      "csp": null
+    }
+  },
+  "bundle": {
+    "active": true,
+    "targets": "all",
+    "icon": [
+      "icons/32x32.png",
+      "icons/128x128.png",
+      "icons/128x128@2x.png",
+      "icons/icon.icns",
+      "icons/icon.ico"
+    ]
+  }
+}