Skip to content

Commit

Permalink
♻️ zero-wrangs
Browse files Browse the repository at this point in the history
  • Loading branch information
niuhuan committed Nov 20, 2023
1 parent fe5beee commit 44fd607
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 17 deletions.
2 changes: 1 addition & 1 deletion ci/version.code.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.0.4
v0.0.5
16 changes: 5 additions & 11 deletions ci/version.info.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
v0.0.4
v0.0.5

## 需要删除原来的APP重新安装
## 如果图片显示不出来需要删除原来的APP重新安装
## PC端需要手动找到文件夹删除

- [x] 修复卡在init的问题
- [x] 修复页面顺序不对
- [x] 登录和注册
- [x] 下载

计划

- [ ] 检测更新
- [ ] 在线以及离线书签
- [x] 登录以后可以收藏漫画
- [x] 收藏漫画的列表
4 changes: 3 additions & 1 deletion native/src/copy_client/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use crate::copy_client::{
ComicQuery, LoginResult, MemberInfo, Page, RankItem, RecommendItem, RegisterResult, Response,
Tags,
};
use base64::Engine;
use std::sync::Arc;
use tokio::sync::Mutex;

Expand Down Expand Up @@ -109,7 +110,8 @@ impl Client {

pub async fn login(&self, username: &str, password: &str) -> Result<LoginResult> {
let salt = chrono::Local::now().timestamp_millis() % (u16::MAX as i64);
let password_b64 = base64::encode(format!("{}-{}", password, salt).as_bytes());
let password_b64 =
base64::prelude::BASE64_STANDARD.encode(format!("{}-{}", password, salt).as_bytes());
self.request(
reqwest::Method::POST,
"/api/v3/login",
Expand Down
2 changes: 1 addition & 1 deletion native/src/copy_client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pub mod types;

pub use client::*;
pub use dtos::*;
#[allow(dead_code)]
#[allow(unused_imports)]
pub use types::*;

#[cfg(test)]
Expand Down
1 change: 0 additions & 1 deletion native/src/database/active/local_collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use crate::database::active::ACTIVE_DATABASE;
use crate::database::create_table_if_not_exists;
use sea_orm::entity::prelude::*;
use sea_orm::EntityTrait;
use sea_orm::QuerySelect;
use serde_derive::{Deserialize, Serialize};
use std::convert::TryInto;
use std::ops::Deref;
Expand Down
2 changes: 1 addition & 1 deletion native/src/database/download/download_comic_chapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::database::download::DOWNLOAD_DATABASE;
use crate::database::{create_index, create_table_if_not_exists, index_exists};
use sea_orm::entity::prelude::*;
use sea_orm::sea_query::OnConflict;
use sea_orm::{ConnectionTrait, DeleteResult, IntoActiveModel, Order, QueryOrder, QuerySelect};
use sea_orm::{ConnectionTrait, DeleteResult, IntoActiveModel, Order, QueryOrder};
use sea_orm::{EntityTrait, UpdateResult};
use serde_derive::{Deserialize, Serialize};
use std::convert::TryInto;
Expand Down
2 changes: 1 addition & 1 deletion native/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use utils::join_paths;

pub mod api;
mod bridge_generated;
mod copy_client;
pub mod copy_client;
mod database;
pub mod downloading;
mod udto;
Expand Down

0 comments on commit 44fd607

Please sign in to comment.