mirror of
https://github.com/VallierDev/uu-remote-linux.git
synced 2026-11-16 08:50:40 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0fe9b979e5 | ||
|
|
cb4850d296 |
No files matched your search
@@ -131,8 +131,9 @@ viewer does not reconnect them automatically.
|
||||
| `UU_USE_PROXY=1` | honor HTTP/SOCKS proxy env vars; cloud API clients bypass env proxies by default |
|
||||
| `UU_REMOTE_ASSIST=0`, `UU_ASSIST_ALLOW=1`, `UU_ASSIST_UI=tty`, `UU_ASSIST_DEBUG=1` | disable assistance / allow at start / terminal UI for `assist` / include the server's short error message in assist errors |
|
||||
|
||||
Token has no expiry field; API code 1120 (HTTP 422) means invalid/expired → re-login. The config is re-read
|
||||
every 60 s.
|
||||
Token has no expiry field; API code 1120 (HTTP 422) means invalid/expired → re-login. `config.json` is parsed once
|
||||
(`config::file()`); only a `LoginExpired` room answer re-reads it from disk (`config::read_fresh()`) before waiting
|
||||
for a new QR login.
|
||||
|
||||
## 6. Code map
|
||||
|
||||
|
||||
Generated
+1
-1
@@ -2741,7 +2741,7 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
||||
|
||||
[[package]]
|
||||
name = "uu-remote-linux"
|
||||
version = "0.2.24"
|
||||
version = "0.2.25"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"base64 0.22.1",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "uu-remote-linux"
|
||||
version = "0.2.24"
|
||||
version = "0.2.25"
|
||||
edition = "2021"
|
||||
default-run = "uuremote-server"
|
||||
authors = ["uu-remote-linux contributors"]
|
||||
|
||||
@@ -305,6 +305,29 @@ static void on_status_menu(GtkStatusIcon *i, guint button, guint time, gpointer
|
||||
(void)i; (void)button; (void)time; (void)d;
|
||||
gtk_menu_popup_at_pointer(GTK_MENU(tray_menu), NULL);
|
||||
}
|
||||
// Monochrome tray icon that follows light/dark panels: GTK and the GNOME AppIndicator extension
|
||||
// recolor "-symbolic" names, KDE recolors the ColorScheme-Text class. Written to the user cache
|
||||
// and offered as an icon theme path, so it needs no package install.
|
||||
static const char TRAY_ICON_NAME[] = "uu-remote-linux-symbolic";
|
||||
static const char TRAY_ICON_SVG[] =
|
||||
"<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\">"
|
||||
"<style id=\"current-color-scheme\">.ColorScheme-Text{color:#232629}</style>"
|
||||
"<path class=\"ColorScheme-Text\" fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M2.5 2h11A1.5 1.5 0 0 1 15 3.5v7a1.5 1.5 0 0 1-1.5 1.5h-11"
|
||||
"A1.5 1.5 0 0 1 1 10.5v-7A1.5 1.5 0 0 1 2.5 2zm0 1.5v7h11v-7z\"/>"
|
||||
"<path class=\"ColorScheme-Text\" fill=\"currentColor\" d=\"M7.25 12h1.5v1.5H11a.75.75 0 0 1 0 1.5H5a.75.75 0 0 1 0-1.5h2.25z"
|
||||
"M11.5 4.5v4l-1.35-1.35-3.1 3.1-1.2-1.2 3.1-3.1L7.5 4.5z\"/></svg>\n";
|
||||
// Returns the theme path holding the icon (hicolor layout plus a loose copy), or NULL.
|
||||
static gchar *write_tray_icon(void) {
|
||||
gchar *root = g_build_filename(g_get_user_cache_dir(), "uu-remote-linux", "icons", NULL);
|
||||
gchar *apps = g_build_filename(root, "hicolor", "scalable", "apps", NULL);
|
||||
gchar *file = g_strconcat(TRAY_ICON_NAME, ".svg", NULL);
|
||||
gchar *themed = g_build_filename(apps, file, NULL), *loose = g_build_filename(root, file, NULL);
|
||||
int ok = g_mkdir_with_parents(apps, 0700) == 0 && g_file_set_contents(themed, TRAY_ICON_SVG, -1, NULL)
|
||||
&& g_file_set_contents(loose, TRAY_ICON_SVG, -1, NULL);
|
||||
g_free(apps); g_free(file); g_free(themed); g_free(loose);
|
||||
if (!ok) { g_free(root); return NULL; }
|
||||
return root;
|
||||
}
|
||||
static void build_tray(void) {
|
||||
tray_menu = gtk_menu_new();
|
||||
GtkWidget *open = gtk_menu_item_new_with_label("打开主窗口");
|
||||
@@ -318,7 +341,10 @@ static void build_tray(void) {
|
||||
gtk_menu_shell_append(GTK_MENU_SHELL(tray_menu), gtk_separator_menu_item_new());
|
||||
gtk_menu_shell_append(GTK_MENU_SHELL(tray_menu), quit);
|
||||
gtk_widget_show_all(tray_menu);
|
||||
const char *icon = gtk_icon_theme_has_icon(gtk_icon_theme_get_default(), "uu-remote-linux") ? "uu-remote-linux" : "computer";
|
||||
gchar *icon_path = write_tray_icon();
|
||||
if (icon_path) gtk_icon_theme_append_search_path(gtk_icon_theme_get_default(), icon_path);
|
||||
const char *fallback = gtk_icon_theme_has_icon(gtk_icon_theme_get_default(), "uu-remote-linux") ? "uu-remote-linux" : "computer";
|
||||
const char *icon = icon_path ? TRAY_ICON_NAME : fallback;
|
||||
|
||||
// StatusNotifierItem (GNOME AppIndicator extension, KDE): libayatana-appindicator3 / libappindicator3.
|
||||
const char *libs[] = { "libayatana-appindicator3.so.1", "libappindicator3.so.1" };
|
||||
@@ -329,8 +355,11 @@ static void build_tray(void) {
|
||||
void (*set_status)(void *, int) = (void (*)(void *, int))dlsym(h, "app_indicator_set_status");
|
||||
void (*set_menu)(void *, GtkMenu *) = (void (*)(void *, GtkMenu *))dlsym(h, "app_indicator_set_menu");
|
||||
void (*set_title)(void *, const char *) = (void (*)(void *, const char *))dlsym(h, "app_indicator_set_title");
|
||||
void (*set_theme_path)(void *, const char *) = (void (*)(void *, const char *))dlsym(h, "app_indicator_set_icon_theme_path");
|
||||
if (ind_new && set_status && set_menu) {
|
||||
void *ind = ind_new("uu-remote-linux", icon, 0 /* APPLICATION_STATUS */);
|
||||
// Without a theme path the panel cannot find the cached icon; keep the installed one.
|
||||
void *ind = ind_new("uu-remote-linux", set_theme_path ? icon : fallback, 0 /* APPLICATION_STATUS */);
|
||||
if (icon_path && set_theme_path) set_theme_path(ind, icon_path);
|
||||
if (set_title) set_title(ind, "UU 远程 Linux 主机");
|
||||
set_menu(ind, GTK_MENU(tray_menu));
|
||||
set_status(ind, 1 /* ACTIVE */);
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
托盘图标随深色/浅色模式自动变色。/ The tray icon now follows light and dark panels.
|
||||
|
||||
### 修复 / Fixed
|
||||
- **深色模式下托盘图标看不清**(#87):托盘改用内置单色符号图标,GNOME(AppIndicator 扩展)和 KDE 会按面板主题自动着色,
|
||||
tarball 安装也不用另装图标。旧版 AppIndicator 库或缓存目录不可写时沿用原图标。目前只经过 CI 编译,尚未在 KDE / GNOME 面板上实机确认。
|
||||
- The tray uses a built-in monochrome symbolic icon (written to the user cache and offered as the indicator's icon theme
|
||||
path) that GNOME's AppIndicator extension and KDE recolor for the panel theme. Built in CI; not yet checked on a real panel.
|
||||
|
||||
### 下载 / Download
|
||||
`uu-remote-linux_0.2.25_<amd64|arm64>.deb`,或 `uu-remote-linux-v0.2.25-<x86_64|aarch64>-linux.tar.gz`,或 `docker pull ghcr.io/vallierdev/uu-remote-linux:v0.2.25`(x86_64)。
|
||||
|
||||
**非官方项目,与网易无关。** / **Unofficial, not affiliated with NetEase.**
|
||||
Reference in new issue
Block a user