Commit Graph

54 Commits

Author SHA1 Message Date
RustDesk
ab64a32f30 avatar (#14440)
* avatar

* refactor avatar display: unify rendering and resolve at use time

  - Extract buildAvatarWidget() in common.dart to share avatar rendering
    logic across desktop settings, desktop CM and mobile CM
  - Add resolve_avatar_url() in Rust, exposed via FFI (SyncReturn),
    to resolve relative avatar paths (e.g. "/avatar/xxx") to absolute URLs
  - Store avatar as-is in local config, only resolve when displaying
    (settings page) or sending (LoginRequest)
  - Resolve avatar in LoginRequest before sending to remote peer
  - Add error handling for network image load failures
  - Guard against empty client.name[0] crash
  - Show avatar in mobile settings page account tile

Signed-off-by: 21pages <sunboeasy@gmail.com>

* web: implement mainResolveAvatarUrl via js getByName

Signed-off-by: 21pages <sunboeasy@gmail.com>

* increase ipc Data enum size limit to 120 bytes

Signed-off-by: 21pages <sunboeasy@gmail.com>

---------

Signed-off-by: 21pages <sunboeasy@gmail.com>
Co-authored-by: 21pages <sunboeasy@gmail.com>
2026-03-04 21:43:19 +08:00
RustDesk
6c3515588f - UI display: display_name first (#14358)
* - UI display: display_name first
  - Fallback: name
  - Technical identity: still name

  ### What changed

  - Added account display helpers and display_name state in user model:
      - flutter/lib/models/user_model.dart:16
  - Account/logout label now uses display_name (@name) when both exist:
      - flutter/lib/mobile/pages/settings_page.dart:689
      - flutter/lib/desktop/pages/desktop_setting_page.dart:2016
      - flutter/lib/desktop/pages/desktop_setting_page.dart:2135
  - Desktop Account info now shows both when applicable:
      - Display Name: ...
      - Username: ...
      - flutter/lib/desktop/pages/desktop_setting_page.dart:2039
  - Previously done group-list behavior remains:
      - group user list displays display_name with name fallback
      - flutter/lib/common/widgets/my_group.dart:187
  - Persistence path for display_name remains enabled (including group cache/submodule field):
      - libs/hbb_common/src/config.rs:2347
  - src/client.rs:2630
  - LoginRequest.my_name now resolves as:
      1. OPTION_DISPLAY_NAME (manual override)
      2. user_info.display_name
      3. user_info.name
      4. OS username fallback

* 1. GUID key (...Uninstall\{GUID}) is MSI-native metadata generated by Windows Installer.
  2. Non-GUID key (...Uninstall\RustDesk) is explicitly written by RustDesk’s MSI compatibility component in res/msi/Package/Components/Regs.wxs:44, populated by preprocess.py --arp from .github/workflows/
     flutter-build.yml:262.

  So they were not using the same EstimatedSize logic:

  - MSI GUID key: MSI-calculated size (KB).
  - RustDesk key: custom script value from res/msi/preprocess.py:339 (previously bytes, now fixed to KB).

  That mismatch is exactly why you saw different sizes.

* improve display name handling

  - Append (@username) when multiple users share the same display name
  - Trim whitespace from display_name before comparison and display
  - Add missing translate() for Logout button on desktop

Signed-off-by: 21pages <sunboeasy@gmail.com>

* group peer filter match both user's display name and user's name

Signed-off-by: 21pages <sunboeasy@gmail.com>

* case-insensitive search in group peer filter

Signed-off-by: 21pages <sunboeasy@gmail.com>

---------

Signed-off-by: 21pages <sunboeasy@gmail.com>
Co-authored-by: 21pages <sunboeasy@gmail.com>
2026-02-22 14:59:25 +08:00
21pages
5ff1740b5b set allowMalformed to true when decode utf8 (#12693)
Signed-off-by: 21pages <sunboeasy@gmail.com>
2025-08-20 14:55:52 +08:00
fufesou
c1b46b6b9d fix: login 2fa (#11715)
Signed-off-by: fufesou <linlong1266@gmail.com>
2025-05-11 20:27:41 +08:00
rustdesk
2c976eb1e2 prepare self-hosting web client 2025-05-10 21:49:23 +08:00
21pages
7e8d3bd2ac remove calling refreshCurrentUser when connect status become ready (#8849)
When refreshCurrentUser throw error, show check network in ab and group
tab.

Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-07-28 10:15:09 +08:00
yuluo
43a0a4f8e0 fix: http/https proxy (#7821)
* add http(s) proxy

* Add front-end translation

* fix ui description

* For linux platform, add rustls support

* fix: Fix the proxy address test function.

* add: Added default prompts for agency agreement and some multi-language translations

* add: Http proxy request client

* fix: add async http proxy func and format the code

* add: Preliminary support for flutter front-end calling rust back-end http request

* Optimize HTTP calls

* Optimize HTTP calls

* fix: Optimize HTTP requests, refine translations, and fix dependencies

* fix: Win and macOS compilation errors

* fix: web platforms

* fix: Optimize import

* fix: Fix web platform issues

* fix: Fix web platform issues

* fix: update ci

* fix: test ci

* test: test CI

* Revert "fix: update ci"

This reverts commit 2e5f247b2e.

* test: test CI

* test: test CI

* fix: fix lock file

* fix: Optimize imports
2024-04-25 11:46:21 +08:00
RustDesk
ac7f8a6447 Revert "http/https proxy (#7600)" (#7801)
This reverts commit da57fcb641.
2024-04-23 15:26:16 +08:00
yuluo
da57fcb641 http/https proxy (#7600)
* add http(s) proxy

* Add front-end translation

* fix ui description

* For linux platform, add rustls support

* fix: Fix the proxy address test function.

* add: Added default prompts for agency agreement and some multi-language translations

* add: Http proxy request client

* fix: add async http proxy func and format the code

* add: Preliminary support for flutter front-end calling rust back-end http request

* Optimize HTTP calls

* Optimize HTTP calls

* fix: Optimize HTTP requests, refine translations, and fix dependencies
2024-04-23 15:00:23 +08:00
rustdesk
3dc6e576df check isDisableAccount and isDisableAb before pull ab / group 2024-03-25 20:14:34 +08:00
21pages
49f717fcf8 opt pull ab (#7508)
1. Test legacy/new mode only upon logging out.
2. Avoid pulling all data unnecessarily:
* On startup: Retrieve list, current, and personal data.
* On refresh: Retrieve list and current data.
* On changing AB/switching tabs: Attempt to pull current data if not initialized.
3. Cache only personal and current AB.
4. Synchronize current AB from recent.
5. Remove AB loading CircularProgressIndicator.

Signed-off-by: 21pages <pages21@163.com>
2024-03-25 19:59:21 +08:00
21pages
b2a4f11e0b enable group, show accessible users and peers
Signed-off-by: 21pages <pages21@163.com>
2023-09-18 13:44:41 +08:00
21pages
c3abd3e2b3 save user info when refreshCurrentUser
Signed-off-by: 21pages <pages21@163.com>
2023-08-20 17:14:52 +08:00
21pages
b2f5e2f927 ab:deal push error, show error banner, fix splash empty by remove reset
Signed-off-by: 21pages <pages21@163.com>
2023-08-15 10:22:31 +08:00
21pages
eb8231af14 delete ab cache and show login button on http 401
Signed-off-by: 21pages <pages21@163.com>
2023-08-10 17:38:51 +08:00
dignow
7692dcd629 fix logout
Signed-off-by: dignow <linlong1265@gmail.com>
2023-08-08 21:37:34 +08:00
dignow
2c86fac208 refact, common oidc
Signed-off-by: dignow <linlong1265@gmail.com>
2023-08-07 19:08:43 +08:00
dignow
dab956fe85 common oidc
Signed-off-by: dignow <linlong1265@gmail.com>
2023-08-07 17:25:46 +08:00
21pages
5a0865559c peer card batch operation
Signed-off-by: 21pages <pages21@163.com>
2023-08-03 21:35:16 +08:00
dignow
a10433e2e0 Immediately show the login dialog
Signed-off-by: dignow <linlong1265@gmail.com>
2023-07-01 10:19:59 +08:00
21pages
08762ca727 fix note dialog
Signed-off-by: 21pages <pages21@163.com>
2023-06-29 06:48:11 +08:00
rustdesk
20db4bed01 avoid currentUser call more than once when initializing app 2023-06-22 23:19:26 +08:00
rustdesk
5831db260f fix login error 2023-06-22 22:33:54 +08:00
dignow
96b20ecc23 simple log refact
Signed-off-by: dignow <linlong1265@gmail.com>
2023-06-22 14:58:45 +08:00
rustdesk
bacba010e3 fix ci 2023-06-22 10:04:16 +08:00
RustDesk
2ea4e0ccab Merge pull request #4735 from 21pages/peer_tab
peer tab use icon
2023-06-22 09:41:42 +08:00
21pages
c02a502a7f peer tab use icon
Signed-off-by: 21pages <pages21@163.com>
2023-06-22 08:49:58 +08:00
fufesou
c7a417b2fb fix json decode, empty user info
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-06-22 08:25:29 +08:00
fufesou
8dd218235d store user info after login
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-06-22 00:55:50 +08:00
fufesou
321f193f4d fix address book state
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-06-21 18:28:52 +08:00
fufesou
10508a41b1 manage network state for both user info and user group
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-06-21 16:37:27 +08:00
fufesou
581e84d806 tmp debug, user login state
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-06-21 16:37:27 +08:00
fufesou
bf1cf29cb9 fix user login state
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-06-21 16:37:27 +08:00
21pages
ca19246f30 decode json with utf8 from names and show account info
Signed-off-by: 21pages <pages21@163.com>
2023-06-18 14:11:35 +08:00
21pages
8b7a145c61 fix group visit
Signed-off-by: 21pages <pages21@163.com>
2023-06-17 22:43:26 +08:00
21pages
5a14945666 fix login dialog can't pop when api server is invalid
Signed-off-by: 21pages <pages21@163.com>
2023-06-15 15:29:21 +08:00
fufesou
5a88841ffd oidc buttons, depends on server options
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-06-14 15:17:20 +08:00
21pages
40d0ea016b refactor peer tab with model, make it scrollable
Signed-off-by: 21pages <pages21@163.com>
2023-02-06 12:54:32 +08:00
csf
813b9ea79d fix logout failed 2023-01-28 22:02:42 +09:00
csf
a8536118c0 add verificationCodeDialog, opt loginDialog 2023-01-09 14:21:16 +09:00
csf
3e357159f3 refactor user login:
1. opt request json type.
2. desktop and mobile use same loginDialog.
3. opt loginDialog UI style.
4. opt login request Exception catch.
2023-01-06 19:26:19 +09:00
csf
c67b952869 fix logOut fail, add logOut request timeout and catch err 2022-12-20 23:57:02 +09:00
csf
3e8c1c46b6 fix logOut failing, add invoking logOut before id server change 2022-12-16 23:18:30 +09:00
21pages
880a0d4209 add group peer card
Signed-off-by: 21pages <pages21@163.com>
2022-12-14 11:25:31 +08:00
fufesou
50d885d3e7 Remove SharedPreferences, debug win
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2022-11-10 23:33:24 +08:00
fufesou
a84ee7a6ec oidc: init debug
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2022-11-07 15:20:18 +08:00
fufesou
87e53501e3 feat_account: mid commit
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2022-11-07 15:20:15 +08:00
fufesou
2c34112492 flutter_desktop: debug win cursor
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2022-10-30 13:50:44 +08:00
csf
715d837f54 logOut show loading 2022-10-09 19:57:38 +09:00
csf
8d23c11312 fix abModel multi request and state didn't refresh bug 2022-10-09 19:41:50 +09:00