Skip to content

Commit

Permalink
[+] add README.md and improve ui
Browse files Browse the repository at this point in the history
  • Loading branch information
heng30 committed Jul 13, 2024
1 parent c965b99 commit 37776fe
Show file tree
Hide file tree
Showing 14 changed files with 41 additions and 18 deletions.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,29 @@
<img src="./screenshot/5.png" width="100"/>
<img src="./screenshot/6.png" width="100"/>
<img src="./screenshot/7.png" width="100"/>
<img src="./screenshot/8.png" width="100"/>
</div>

[中文文档](./README.zh-CN.md)

#### Warning
**If you can't review the source codes, I don't recommand you to use this wallet. If you use this wallet, you take your own risk.**

#### Introduction
It's a `Solana` desktop wallet. Based on Rust and Slint-ui. It's under developing...
It's a `Solana` wallet. Based on Rust and Slint-ui. You can compile it for Linux, Windows and Android. However, There are some bad user experience on Android platform.

#### Features
- [x] Create and recover account
- [x] Derive child accounts
- [x] Address book
- [x] Transaction history
- [x] Development mode of TestNet and DevNet
- [x] Send SOL and spl token in MainNet
- [x] Genarate QrCode for address

#### TODO
- [ ] fetch spl token price
- [ ] copy and paste text on Android

##### Android platform build information
- `min-sdk-version = 23`
Expand All @@ -24,6 +39,7 @@ It's a `Solana` desktop wallet. Based on Rust and Slint-ui. It's under developin
- Install Android `sdk`, `ndk`, `jdk17`, and set environment variables
- Run `make` to build a release version android APK
- Run `make debug` to run it on desktop platform
- Run `make build-desktop-release` to build a release version desktop APK
- Refer to [Makefile](./Makefile) for more information

#### Reference
Expand Down
19 changes: 18 additions & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,29 @@
<img src="./screenshot/5.png" width="100"/>
<img src="./screenshot/6.png" width="100"/>
<img src="./screenshot/7.png" width="100"/>
<img src="./screenshot/8.png" width="100"/>
</div>

[English Documentation](./README.md)

#### 警告
**如果你没有审查代码的能力,我不建议你使用这个Solana钱包。如果你一定要使用这个钱包,你自己承担风险。**

#### 简介
这个一个基于Rust和Slint-ui的`Solana`钱包。你可以编译到Linux、Windows和Android平台。不过,Android 平台的用户体验并不是太友好。

#### 功能
- [x] 创建和恢复账户
- [x] 生成子账户
- [x] 地址簿
- [x] 交易历史
- [x] 测试模式:支持测试网和开发网
- [x] 在主网发送和接收Sol和Token
- [x] 支持给地址生成QrCode

#### TODO
- [ ] 获取 spl token 价格
- [ ] 在Android平台复制和粘贴文本

##### 安卓平台编译信息
- `min-sdk-version = 23`
Expand All @@ -22,7 +38,8 @@
- 安装 `Rust``Cargo`
- 安装 Android `sdk`, `ndk`, `jdk17`, 和设置对应的环境变量
- 运行 `make` 编译安卓平台程序
- 运行 `make debug` 编译桌面平台程序
- 运行 `make debug` 调试桌面平台程序
- 运行 `make build-desktop-release` 编译桌面平台程序
- 参考 [Makefile](./Makefile) 了解更多信息

#### 参考
Expand Down
Binary file added screenshot/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshot/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshot/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshot/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshot/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshot/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshot/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshot/8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 3 additions & 6 deletions src/logic/history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::{
def::{HistoryEntry, HISTORY_TABLE},
},
logic::message::async_message_success,
message_info, message_success, message_warn,
message_success, message_warn,
slint_generatedAppWindow::{
AppWindow, HistorySetting, Logic, TransactionTileEntry as UIHistoryEntry,
TransactionTileStatus, Util,
Expand Down Expand Up @@ -169,13 +169,10 @@ pub fn init(ui: &AppWindow) {
ui.global::<Logic>()
.on_refresh_all_pending_and_error_history(move || {
let ui = ui_handle.unwrap();
for (index, item) in get_pending_and_error_entries(&ui).into_iter().enumerate() {
if index == 0 {
message_info!(ui, tr("正在刷新..."));
}

for item in get_pending_and_error_entries(&ui).into_iter() {
_refresh_pending_and_error_history(&ui, item);
}
message_success!(ui, tr("刷新完成"));
});

let ui_handle = ui.as_weak();
Expand Down
2 changes: 1 addition & 1 deletion src/version.rs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pub static VERSION: &str = "v0.9.6";
pub static VERSION: &str = "v0.1.0";
8 changes: 0 additions & 8 deletions ui/appwindow.slint
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import { AccountMnemonicSetting } from "./panel/bodyer/setting.slint";
import { HistorySetting } from "./panel/bodyer/history.slint";
import { TokensSetting } from "./panel/bodyer/home.slint";

import { Mnemonic } from "./base/widgets.slint";

export component AppWindow inherits Window {
default-font-size: Theme.default-font-size;
default-font-family: Theme.default-font-family;
Expand Down Expand Up @@ -114,12 +112,6 @@ export component AppWindow inherits Window {
Store.is-show-landing-page = false;
}
}

Rectangle {
visible: false;
background: white;
Mnemonic {}
}
}

export { Util, Logic, Store, Theme, Icons, IconsDialogSetting, LoadingStatus, SettingDetailIndex, AccountMnemonicSetting, AddressBookEntry, AddressBookSetting, PasswordSetting, AboutSetting, TransactionTileEntry, TransactionTileStatus, HistorySetting, SettingDeveloperMode, TokenTileEntry, TokensSetting, TokenTileWithSwitchEntry, SendTokenProps, HomeIndex }
3 changes: 2 additions & 1 deletion ui/base/token-sender.slint
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ export component TokenSender inherits SettingDetail {

HorizontalLayout {
alignment: LayoutAlignment.center;
padding-top: Theme.padding * 10;
padding-top: Theme.padding * 5;
padding-bottom: Theme.padding * 5;
spacing: Theme.spacing * 10;

cancel-btn := CancelBtn {
Expand Down

0 comments on commit 37776fe

Please sign in to comment.