-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e3ad1ca
commit 4cec322
Showing
15 changed files
with
209 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "celeste-tray" | ||
version = "0.5.8" | ||
version = "0.6.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "celeste" | ||
version = "0.5.8" | ||
version = "0.6.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
//! The data for a Proton Drive Rclone config. | ||
use super::ServerType; | ||
use crate::{login::login_util, mpsc::Sender}; | ||
use adw::{glib, gtk::Button, prelude::*, ApplicationWindow, EntryRow}; | ||
|
||
#[derive(Clone, Debug, Default)] | ||
pub struct ProtonDriveConfig { | ||
pub server_name: String, | ||
pub username: String, | ||
pub password: String, | ||
pub totp: String, | ||
} | ||
|
||
impl super::LoginTrait for ProtonDriveConfig { | ||
fn get_sections( | ||
_window: &ApplicationWindow, | ||
sender: Sender<Option<ServerType>>, | ||
) -> (Vec<EntryRow>, Button) { | ||
let mut sections = vec![]; | ||
let server_name = login_util::server_name_input(); | ||
let username = login_util::username_input(); | ||
let password = login_util::password_input(); | ||
let totp = login_util::totp_input(); | ||
let submit_button = login_util::submit_button(); | ||
|
||
sections.push(server_name.clone()); | ||
sections.push(username.clone()); | ||
sections.push(password.clone().into()); | ||
sections.push(totp.clone()); | ||
|
||
submit_button.connect_clicked( | ||
glib::clone!(@weak server_name, @weak username, @weak password, @weak totp => move |_| { | ||
sender.send(Some(ServerType::ProtonDrive(ProtonDriveConfig { | ||
server_name: server_name.text().to_string(), | ||
username: username.text().to_string(), | ||
password: password.text().to_string(), | ||
totp: totp.text().to_string() | ||
}))); | ||
}), | ||
); | ||
|
||
server_name.connect_changed(glib::clone!(@weak server_name, @weak username, @weak password, @weak totp, @weak submit_button => move |_| login_util::check_responses(&[&server_name, &username, &password.into(), &totp], &submit_button))); | ||
username.connect_changed(glib::clone!(@weak server_name, @weak username, @weak password, @weak totp, @weak submit_button => move |_| login_util::check_responses(&[&server_name, &username, &password.into(), &totp], &submit_button))); | ||
password.connect_changed(glib::clone!(@weak server_name, @weak username, @weak password, @weak totp, @weak submit_button => move |_| login_util::check_responses(&[&server_name, &username, &password.into(), &totp], &submit_button))); | ||
totp.connect_changed(glib::clone!(@weak server_name, @weak username, @weak password, @weak totp, @weak submit_button => move |_| login_util::check_responses(&[&server_name, &username, &password.into(), &totp], &submit_button))); | ||
|
||
(sections, submit_button) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "libceleste" | ||
version = "0.5.8" | ||
version = "0.6.0" | ||
edition = "2021" | ||
|
||
[lib] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Maintainer: Hunter Wittenborn <[email protected]> | ||
pkgname=celeste | ||
pkgver=0.5.8 | ||
pkgver=0.6.0 | ||
pkgrel=1 | ||
pkgdesc='Sync your cloud files' | ||
arch=('any') | ||
|
Oops, something went wrong.