소스 검색

app: run `make fmt`

darkfi 1 일 전
부모
커밋
cb7f2ae9e8

+ 18 - 15
bin/app/src/app/schema/menu/channel.rs

@@ -18,8 +18,7 @@
 
 use bs58;
 use darkfi_serial::{async_trait, deserialize, Encodable, SerialDecodable, SerialEncodable};
-use rand::rngs::OsRng;
-use rand::Rng;
+use rand::{rngs::OsRng, Rng};
 use sled_overlay::sled;
 use ui_consts::*;
 
@@ -99,10 +98,8 @@ mod android_ui_consts {
     pub const TAB_LABEL_X: f32 = 90.;
     pub const CHANNELS_TAB_ICON_GAP: f32 = 12.;
     pub const CONTACTS_TAB_ICON_GAP: f32 = 8.5;
-    pub const CHANNELS_TAB_ICON_X: f32 =
-        TAB_LABEL_X - CHANNELS_ICON_SCALE - CHANNELS_TAB_ICON_GAP;
-    pub const CONTACTS_TAB_ICON_X: f32 =
-        TAB_LABEL_X - CONTACTS_ICON_SCALE - CONTACTS_TAB_ICON_GAP;
+    pub const CHANNELS_TAB_ICON_X: f32 = TAB_LABEL_X - CHANNELS_ICON_SCALE - CHANNELS_TAB_ICON_GAP;
+    pub const CONTACTS_TAB_ICON_X: f32 = TAB_LABEL_X - CONTACTS_ICON_SCALE - CONTACTS_TAB_ICON_GAP;
 }
 
 #[cfg(target_os = "android")]
@@ -153,10 +150,8 @@ mod ui_consts {
     pub const TAB_LABEL_X: f32 = 45.;
     pub const CHANNELS_TAB_ICON_GAP: f32 = 6.;
     pub const CONTACTS_TAB_ICON_GAP: f32 = 4.25;
-    pub const CHANNELS_TAB_ICON_X: f32 =
-        TAB_LABEL_X - CHANNELS_ICON_SCALE - CHANNELS_TAB_ICON_GAP;
-    pub const CONTACTS_TAB_ICON_X: f32 =
-        TAB_LABEL_X - CONTACTS_ICON_SCALE - CONTACTS_TAB_ICON_GAP;
+    pub const CHANNELS_TAB_ICON_X: f32 = TAB_LABEL_X - CHANNELS_ICON_SCALE - CHANNELS_TAB_ICON_GAP;
+    pub const CONTACTS_TAB_ICON_X: f32 = TAB_LABEL_X - CONTACTS_ICON_SCALE - CONTACTS_TAB_ICON_GAP;
 }
 
 async fn unfocus_editors(content: &SceneNodePtr) {
@@ -640,7 +635,9 @@ pub async fn make(
     prop.set_f32(atom, Role::App, 3, CHANNELS_ICON_SCALE).unwrap();
     node.set_property_u32(atom, Role::App, "z_index", 2).unwrap();
     let shape = shape::create_channels_icon(COLOR_MINT).scaled(CHANNELS_ICON_SCALE);
-    let node = node.setup(|me| VectorArt::new(me, shape, app.renderer.clone(), app.redraw_trigger.clone())).await;
+    let node = node
+        .setup(|me| VectorArt::new(me, shape, app.renderer.clone(), app.redraw_trigger.clone()))
+        .await;
     content_area.link(node);
 
     let node = create_text("channels_tab_text");
@@ -732,7 +729,9 @@ pub async fn make(
     prop.set_f32(atom, Role::App, 3, CONTACTS_ICON_SCALE).unwrap();
     node.set_property_u32(atom, Role::App, "z_index", 2).unwrap();
     let shape = shape::create_contacts_icon(COLOR_INACTIVE).scaled(CONTACTS_ICON_SCALE);
-    let node = node.setup(|me| VectorArt::new(me, shape, app.renderer.clone(), app.redraw_trigger.clone())).await;
+    let node = node
+        .setup(|me| VectorArt::new(me, shape, app.renderer.clone(), app.redraw_trigger.clone()))
+        .await;
     content_area.link(node);
 
     let node = create_text("contacts_tab_text");
@@ -1385,7 +1384,8 @@ pub async fn make(
     node.set_property_bool(atom, Role::App, "is_visible", true).unwrap();
     node.set_property_u32(atom, Role::App, "z_index", 2).unwrap();
     node.set_property_u32(atom, Role::App, "priority", 1).unwrap();
-    let editlayer_node = node.setup(|me| Layer::new(me, app.renderer.clone(), app.redraw_trigger.clone())).await;
+    let editlayer_node =
+        node.setup(|me| Layer::new(me, app.renderer.clone(), app.redraw_trigger.clone())).await;
     content_area.link(editlayer_node.clone());
 
     let node = create_vector_art("gensecret_btns_bg");
@@ -1405,7 +1405,9 @@ pub async fn make(
         CONTENT_OUTLINE_SIZE,
         COLOR_CYAN,
     );
-    let node = node.setup(|me| VectorArt::new(me, shape, app.renderer.clone(), app.redraw_trigger.clone())).await;
+    let node = node
+        .setup(|me| VectorArt::new(me, shape, app.renderer.clone(), app.redraw_trigger.clone()))
+        .await;
     editlayer_node.link(node);
 
     let node = create_button("gensecret_btn");
@@ -1436,7 +1438,8 @@ pub async fn make(
     });
     app.tasks.lock().unwrap().push(listen_click);
 
-    let node = node.setup(|me| Button::new(me, app.renderer.clone(), app.redraw_trigger.clone())).await;
+    let node =
+        node.setup(|me| Button::new(me, app.renderer.clone(), app.redraw_trigger.clone())).await;
     editlayer_node.link(node);
 
     let node = create_text("gen_secret");

+ 10 - 10
bin/app/src/app/schema/menu/contact.rs

@@ -98,10 +98,8 @@ mod android_ui_consts {
     pub const TAB_LABEL_X: f32 = 90.;
     pub const CHANNELS_TAB_ICON_GAP: f32 = 12.;
     pub const CONTACTS_TAB_ICON_GAP: f32 = 8.5;
-    pub const CHANNELS_TAB_ICON_X: f32 =
-        TAB_LABEL_X - CHANNELS_ICON_SCALE - CHANNELS_TAB_ICON_GAP;
-    pub const CONTACTS_TAB_ICON_X: f32 =
-        TAB_LABEL_X - CONTACTS_ICON_SCALE - CONTACTS_TAB_ICON_GAP;
+    pub const CHANNELS_TAB_ICON_X: f32 = TAB_LABEL_X - CHANNELS_ICON_SCALE - CHANNELS_TAB_ICON_GAP;
+    pub const CONTACTS_TAB_ICON_X: f32 = TAB_LABEL_X - CONTACTS_ICON_SCALE - CONTACTS_TAB_ICON_GAP;
 }
 
 #[cfg(target_os = "android")]
@@ -152,10 +150,8 @@ mod ui_consts {
     pub const TAB_LABEL_X: f32 = 45.;
     pub const CHANNELS_TAB_ICON_GAP: f32 = 6.;
     pub const CONTACTS_TAB_ICON_GAP: f32 = 4.25;
-    pub const CHANNELS_TAB_ICON_X: f32 =
-        TAB_LABEL_X - CHANNELS_ICON_SCALE - CHANNELS_TAB_ICON_GAP;
-    pub const CONTACTS_TAB_ICON_X: f32 =
-        TAB_LABEL_X - CONTACTS_ICON_SCALE - CONTACTS_TAB_ICON_GAP;
+    pub const CHANNELS_TAB_ICON_X: f32 = TAB_LABEL_X - CHANNELS_ICON_SCALE - CHANNELS_TAB_ICON_GAP;
+    pub const CONTACTS_TAB_ICON_X: f32 = TAB_LABEL_X - CONTACTS_ICON_SCALE - CONTACTS_TAB_ICON_GAP;
 }
 
 async fn unfocus_editors(content: &SceneNodePtr) {
@@ -638,7 +634,9 @@ pub async fn make(
     prop.set_f32(atom, Role::App, 3, CONTACTS_ICON_SCALE).unwrap();
     node.set_property_u32(atom, Role::App, "z_index", 2).unwrap();
     let shape = shape::create_contacts_icon(COLOR_MINT).scaled(CONTACTS_ICON_SCALE);
-    let node = node.setup(|me| VectorArt::new(me, shape, app.renderer.clone(), app.redraw_trigger.clone())).await;
+    let node = node
+        .setup(|me| VectorArt::new(me, shape, app.renderer.clone(), app.redraw_trigger.clone()))
+        .await;
     content_area.link(node);
 
     let node = create_text("contacts_tab_text");
@@ -728,7 +726,9 @@ pub async fn make(
     prop.set_f32(atom, Role::App, 3, CHANNELS_ICON_SCALE).unwrap();
     node.set_property_u32(atom, Role::App, "z_index", 2).unwrap();
     let shape = shape::create_channels_icon(COLOR_INACTIVE).scaled(CHANNELS_ICON_SCALE);
-    let node = node.setup(|me| VectorArt::new(me, shape, app.renderer.clone(), app.redraw_trigger.clone())).await;
+    let node = node
+        .setup(|me| VectorArt::new(me, shape, app.renderer.clone(), app.redraw_trigger.clone()))
+        .await;
     content_area.link(node);
 
     let node = create_text("channels_tab_text");

+ 3 - 1
bin/app/src/app/schema/menu/mod.rs

@@ -139,7 +139,9 @@ pub async fn make(
     prop.set_expr(atom, Role::App, 3, expr::load_var("h")).unwrap();
     chat_layer.set_property_bool(atom, Role::App, "is_visible", true).unwrap();
     chat_layer.set_property_u32(atom, Role::App, "z_index", 1).unwrap();
-    let chat_layer = chat_layer.setup(|me| Layer::new(me, app.renderer.clone(), app.redraw_trigger.clone())).await;
+    let chat_layer = chat_layer
+        .setup(|me| Layer::new(me, app.renderer.clone(), app.redraw_trigger.clone()))
+        .await;
     content.link(chat_layer.clone());
 
     // Create contact screen

+ 7 - 2
bin/app/src/app/schema/wallet/main.rs

@@ -84,7 +84,11 @@ pub async fn make(
     prop.set_f32(atom, Role::App, 3, BACKARROW_SCALE).unwrap();
     node.set_property_u32(atom, Role::App, "z_index", 3).unwrap();
     let arrow_shape = shape::create_back_arrow().scaled(BACKARROW_SCALE);
-    let node = node.setup(|me| VectorArt::new(me, arrow_shape, app.renderer.clone(), app.redraw_trigger.clone())).await;
+    let node = node
+        .setup(|me| {
+            VectorArt::new(me, arrow_shape, app.renderer.clone(), app.redraw_trigger.clone())
+        })
+        .await;
     main_layer.link(node);
 
     // Back button
@@ -97,7 +101,8 @@ pub async fn make(
     prop.set_f32(atom, Role::App, 1, 0.).unwrap();
     prop.set_f32(atom, Role::App, 2, BACKARROW_BG_W).unwrap();
     prop.set_f32(atom, Role::App, 3, HEADER_HEIGHT).unwrap();
-    let node = node.setup(|me| Button::new(me, app.renderer.clone(), app.redraw_trigger.clone())).await;
+    let node =
+        node.setup(|me| Button::new(me, app.renderer.clone(), app.redraw_trigger.clone())).await;
     main_layer.link(node);
 
     create_chat_btn(app, atom, &cc, &main_layer).await;

+ 2 - 1
bin/app/src/plugin/drk.rs

@@ -42,7 +42,8 @@ use crate::{
 
 // TODO: should be configurable at runtime
 //const DARKFID_ENDPOINT: &str = "tcp://127.0.0.1:18345";
-const DARKFID_ENDPOINT: &str = "tcp+tls://node0.testnet.dark.fi:18345";
+const DARKFID_ENDPOINT: &str = "tcp://192.168.1.38:18345";
+//const DARKFID_ENDPOINT: &str = "tcp+tls://node0.testnet.dark.fi:18345";
 const DARKFID_RETRY_TIME: u64 = 20;
 
 #[cfg(target_os = "android")]

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
bin/app/src/shape/channels_icon.rs


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
bin/app/src/shape/contacts_icon.rs


+ 41 - 40
bin/app/src/shape/menu_icon.rs

@@ -308,46 +308,47 @@ pub fn create_menu_icon(color: Color) -> VectorShape {
             ShapeVertex::from_xy(0.645858, -0.570104, color),
         ],
         indices: vec![
-            38, 40, 39, 38, 41, 40, 37, 41, 38, 36, 41, 37, 35, 41, 36, 34, 41, 35, 33, 41,
-            34, 32, 41, 33, 31, 41, 32, 30, 41, 31, 29, 41, 30, 28, 41, 29, 27, 41, 28, 26,
-            165, 27, 165, 164, 27, 164, 41, 27, 164, 163, 41, 163, 162, 41, 162, 161, 41, 161, 160, 41,
-            160, 159, 41, 159, 158, 41, 158, 157, 41, 157, 156, 41, 156, 155, 41, 155, 154, 41, 154, 153,
-            41, 153, 152, 41, 152, 151, 41, 151, 42, 41, 26, 166, 165, 150, 42, 151, 26, 167, 166, 149,
-            42, 150, 26, 168, 167, 148, 42, 149, 25, 168, 26, 148, 43, 42, 25, 169, 168, 147, 43, 148,
-            25, 170, 169, 146, 43, 147, 24, 170, 25, 146, 44, 43, 24, 171, 170, 145, 44, 146, 23, 171,
-            24, 145, 45, 44, 23, 172, 171, 144, 45, 145, 23, 173, 172, 143, 45, 144, 22, 173, 23, 143,
-            46, 45, 22, 174, 173, 142, 46, 143, 21, 174, 22, 142, 47, 46, 21, 175, 174, 141, 47, 142,
-            20, 175, 21, 141, 48, 47, 20, 176, 175, 140, 48, 141, 19, 176, 20, 140, 49, 48, 19, 177,
-            176, 139, 49, 140, 19, 178, 177, 138, 49, 139, 18, 178, 19, 138, 50, 49, 18, 179, 178, 137,
-            50, 138, 18, 180, 179, 136, 50, 137, 279, 277, 278, 17, 180, 18, 136, 51, 50, 17, 181, 180,
-            135, 51, 136, 280, 277, 279, 280, 282, 277, 17, 182, 181, 134, 51, 135, 281, 282, 280, 17, 183,
-            182, 133, 51, 134, 16, 183, 17, 133, 52, 51, 16, 184, 183, 132, 52, 133, 16, 185, 184, 131,
-            52, 132, 15, 185, 16, 131, 53, 52, 15, 186, 185, 130, 53, 131, 15, 187, 186, 129, 53, 130,
-            15, 188, 187, 128, 53, 129, 14, 188, 15, 128, 54, 53, 14, 189, 188, 127, 54, 128, 14, 190,
-            189, 126, 54, 127, 13, 190, 14, 126, 55, 54, 13, 191, 190, 125, 55, 126, 13, 192, 191, 124,
-            55, 125, 12, 192, 13, 124, 56, 55, 12, 193, 192, 123, 56, 124, 12, 194, 193, 122, 56, 123,
-            237, 239, 240, 245, 243, 244, 12, 195, 194, 121, 56, 122, 11, 195, 12, 121, 57, 56, 238, 239,
-            237, 245, 242, 243, 11, 196, 195, 120, 57, 121, 265, 275, 264, 265, 274, 275, 11, 197, 196, 119,
-            57, 120, 10, 197, 11, 119, 58, 57, 10, 198, 197, 118, 58, 119, 10, 199, 198, 117, 58, 118,
-            9, 199, 10, 117, 59, 58, 9, 200, 199, 116, 59, 117, 9, 201, 200, 115, 59, 116, 8, 201,
-            9, 115, 60, 59, 114, 60, 115, 8, 202, 201, 7, 202, 8, 114, 61, 60, 113, 61, 114, 7,
-            203, 202, 6, 203, 7, 113, 62, 61, 112, 62, 113, 6, 204, 203, 266, 274, 265, 266, 273, 274,
-            5, 204, 6, 112, 63, 62, 267, 273, 266, 267, 272, 273, 111, 63, 112, 5, 205, 204, 268, 272,
-            267, 268, 271, 272, 4, 205, 5, 111, 64, 63, 268, 270, 271, 269, 270, 268, 110, 64, 111, 4,
-            206, 205, 3, 206, 4, 110, 65, 64, 109, 65, 110, 3, 207, 206, 2, 207, 3, 109, 66, 65,
-            109, 67, 66, 109, 68, 67, 109, 69, 68, 109, 70, 69, 109, 71, 70, 109, 72, 71, 109, 73,
-            72, 109, 74, 73, 109, 75, 74, 109, 76, 75, 109, 77, 76, 1, 212, 2, 212, 211, 2, 211,
-            210, 2, 210, 209, 2, 209, 208, 2, 208, 207, 2, 109, 78, 77, 108, 78, 109, 108, 107, 78,
-            107, 106, 78, 106, 105, 78, 105, 104, 78, 104, 0, 78, 247, 249, 250, 255, 253, 254, 248, 249,
-            247, 255, 252, 253, 1, 213, 212, 103, 0, 104, 102, 0, 103, 1, 214, 213, 101, 0, 102, 1,
-            215, 214, 100, 0, 101, 1, 216, 215, 99, 0, 100, 1, 217, 216, 98, 0, 99, 1, 218, 217,
-            262, 260, 261, 257, 260, 262, 257, 259, 260, 258, 259, 257, 97, 0, 98, 1, 219, 218, 96, 0,
-            97, 1, 220, 219, 95, 0, 96, 1, 221, 220, 94, 0, 95, 1, 222, 221, 93, 0, 94, 1,
-            223, 222, 92, 0, 93, 1, 224, 223, 1, 225, 224, 91, 0, 92, 1, 226, 225, 90, 0, 91,
-            1, 227, 226, 89, 0, 90, 1, 228, 227, 88, 0, 89, 1, 229, 228, 87, 0, 88, 1, 230,
-            229, 86, 0, 87, 1, 231, 230, 85, 0, 86, 1, 232, 231, 84, 0, 85, 1, 233, 232, 83,
-            0, 84, 1, 234, 233, 82, 0, 83, 81, 0, 82, 1, 235, 234, 80, 0, 81, 1, 79, 235,
-            1, 80, 79, 1, 0, 80,
+            38, 40, 39, 38, 41, 40, 37, 41, 38, 36, 41, 37, 35, 41, 36, 34, 41, 35, 33, 41, 34, 32,
+            41, 33, 31, 41, 32, 30, 41, 31, 29, 41, 30, 28, 41, 29, 27, 41, 28, 26, 165, 27, 165,
+            164, 27, 164, 41, 27, 164, 163, 41, 163, 162, 41, 162, 161, 41, 161, 160, 41, 160, 159,
+            41, 159, 158, 41, 158, 157, 41, 157, 156, 41, 156, 155, 41, 155, 154, 41, 154, 153, 41,
+            153, 152, 41, 152, 151, 41, 151, 42, 41, 26, 166, 165, 150, 42, 151, 26, 167, 166, 149,
+            42, 150, 26, 168, 167, 148, 42, 149, 25, 168, 26, 148, 43, 42, 25, 169, 168, 147, 43,
+            148, 25, 170, 169, 146, 43, 147, 24, 170, 25, 146, 44, 43, 24, 171, 170, 145, 44, 146,
+            23, 171, 24, 145, 45, 44, 23, 172, 171, 144, 45, 145, 23, 173, 172, 143, 45, 144, 22,
+            173, 23, 143, 46, 45, 22, 174, 173, 142, 46, 143, 21, 174, 22, 142, 47, 46, 21, 175,
+            174, 141, 47, 142, 20, 175, 21, 141, 48, 47, 20, 176, 175, 140, 48, 141, 19, 176, 20,
+            140, 49, 48, 19, 177, 176, 139, 49, 140, 19, 178, 177, 138, 49, 139, 18, 178, 19, 138,
+            50, 49, 18, 179, 178, 137, 50, 138, 18, 180, 179, 136, 50, 137, 279, 277, 278, 17, 180,
+            18, 136, 51, 50, 17, 181, 180, 135, 51, 136, 280, 277, 279, 280, 282, 277, 17, 182,
+            181, 134, 51, 135, 281, 282, 280, 17, 183, 182, 133, 51, 134, 16, 183, 17, 133, 52, 51,
+            16, 184, 183, 132, 52, 133, 16, 185, 184, 131, 52, 132, 15, 185, 16, 131, 53, 52, 15,
+            186, 185, 130, 53, 131, 15, 187, 186, 129, 53, 130, 15, 188, 187, 128, 53, 129, 14,
+            188, 15, 128, 54, 53, 14, 189, 188, 127, 54, 128, 14, 190, 189, 126, 54, 127, 13, 190,
+            14, 126, 55, 54, 13, 191, 190, 125, 55, 126, 13, 192, 191, 124, 55, 125, 12, 192, 13,
+            124, 56, 55, 12, 193, 192, 123, 56, 124, 12, 194, 193, 122, 56, 123, 237, 239, 240,
+            245, 243, 244, 12, 195, 194, 121, 56, 122, 11, 195, 12, 121, 57, 56, 238, 239, 237,
+            245, 242, 243, 11, 196, 195, 120, 57, 121, 265, 275, 264, 265, 274, 275, 11, 197, 196,
+            119, 57, 120, 10, 197, 11, 119, 58, 57, 10, 198, 197, 118, 58, 119, 10, 199, 198, 117,
+            58, 118, 9, 199, 10, 117, 59, 58, 9, 200, 199, 116, 59, 117, 9, 201, 200, 115, 59, 116,
+            8, 201, 9, 115, 60, 59, 114, 60, 115, 8, 202, 201, 7, 202, 8, 114, 61, 60, 113, 61,
+            114, 7, 203, 202, 6, 203, 7, 113, 62, 61, 112, 62, 113, 6, 204, 203, 266, 274, 265,
+            266, 273, 274, 5, 204, 6, 112, 63, 62, 267, 273, 266, 267, 272, 273, 111, 63, 112, 5,
+            205, 204, 268, 272, 267, 268, 271, 272, 4, 205, 5, 111, 64, 63, 268, 270, 271, 269,
+            270, 268, 110, 64, 111, 4, 206, 205, 3, 206, 4, 110, 65, 64, 109, 65, 110, 3, 207, 206,
+            2, 207, 3, 109, 66, 65, 109, 67, 66, 109, 68, 67, 109, 69, 68, 109, 70, 69, 109, 71,
+            70, 109, 72, 71, 109, 73, 72, 109, 74, 73, 109, 75, 74, 109, 76, 75, 109, 77, 76, 1,
+            212, 2, 212, 211, 2, 211, 210, 2, 210, 209, 2, 209, 208, 2, 208, 207, 2, 109, 78, 77,
+            108, 78, 109, 108, 107, 78, 107, 106, 78, 106, 105, 78, 105, 104, 78, 104, 0, 78, 247,
+            249, 250, 255, 253, 254, 248, 249, 247, 255, 252, 253, 1, 213, 212, 103, 0, 104, 102,
+            0, 103, 1, 214, 213, 101, 0, 102, 1, 215, 214, 100, 0, 101, 1, 216, 215, 99, 0, 100, 1,
+            217, 216, 98, 0, 99, 1, 218, 217, 262, 260, 261, 257, 260, 262, 257, 259, 260, 258,
+            259, 257, 97, 0, 98, 1, 219, 218, 96, 0, 97, 1, 220, 219, 95, 0, 96, 1, 221, 220, 94,
+            0, 95, 1, 222, 221, 93, 0, 94, 1, 223, 222, 92, 0, 93, 1, 224, 223, 1, 225, 224, 91, 0,
+            92, 1, 226, 225, 90, 0, 91, 1, 227, 226, 89, 0, 90, 1, 228, 227, 88, 0, 89, 1, 229,
+            228, 87, 0, 88, 1, 230, 229, 86, 0, 87, 1, 231, 230, 85, 0, 86, 1, 232, 231, 84, 0, 85,
+            1, 233, 232, 83, 0, 84, 1, 234, 233, 82, 0, 83, 81, 0, 82, 1, 235, 234, 80, 0, 81, 1,
+            79, 235, 1, 80, 79, 1, 0, 80,
         ],
     }
 }

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.