chore: update deps
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use std::collections::BTreeSet;
|
||||
use std::{cmp::Reverse, collections::HashMap};
|
||||
use std::cmp::Reverse;
|
||||
use std::collections::{BTreeSet, HashMap};
|
||||
|
||||
use anyhow::Error;
|
||||
use common::room_hash;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use global::{constants::KEYRING_URL, shared_state};
|
||||
use global::constants::KEYRING_URL;
|
||||
use global::shared_state;
|
||||
use gpui::{App, AppContext, Context, Entity, Global, Subscription, Window};
|
||||
use nostr_sdk::prelude::*;
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
|
||||
@@ -3,9 +3,7 @@ use nostr::hashes::sha256::Hash as Sha256Hash;
|
||||
use nostr::hashes::Hash;
|
||||
use nostr::prelude::*;
|
||||
use nostr_sdk::prelude::*;
|
||||
use reqwest::multipart;
|
||||
use reqwest::Client as ReqClient;
|
||||
use reqwest::Response;
|
||||
use reqwest::{multipart, Client as ReqClient, Response};
|
||||
|
||||
pub(crate) fn make_multipart_form(
|
||||
file_data: Vec<u8>,
|
||||
|
||||
@@ -46,10 +46,14 @@ fn main() {
|
||||
// Register the `quit` function
|
||||
cx.on_action(quit);
|
||||
|
||||
// Register the `quit` function with CMD+Q (macOS only)
|
||||
// Register the `quit` function with CMD+Q (macOS)
|
||||
#[cfg(target_os = "macos")]
|
||||
cx.bind_keys([KeyBinding::new("cmd-q", Quit, None)]);
|
||||
|
||||
// Register the `quit` function with Super+Q (others)
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
cx.bind_keys([KeyBinding::new("super-q", Quit, None)]);
|
||||
|
||||
// Set menu items
|
||||
cx.set_menus(vec![Menu {
|
||||
name: "Coop".into(),
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
use common::profile::RenderProfile;
|
||||
use global::constants::{DEFAULT_MODAL_WIDTH, NIP96_SERVER};
|
||||
use gpui::http_client::Url;
|
||||
use gpui::prelude::FluentBuilder;
|
||||
use gpui::{
|
||||
div, http_client::Url, prelude::FluentBuilder, px, relative, rems, App, AppContext, Context,
|
||||
Entity, FocusHandle, InteractiveElement, IntoElement, ParentElement, Render,
|
||||
StatefulInteractiveElement, Styled, Window,
|
||||
div, px, relative, rems, App, AppContext, Context, Entity, FocusHandle, InteractiveElement,
|
||||
IntoElement, ParentElement, Render, StatefulInteractiveElement, Styled, Window,
|
||||
};
|
||||
use identity::Identity;
|
||||
use settings::AppSettings;
|
||||
use theme::ActiveTheme;
|
||||
use ui::{
|
||||
avatar::Avatar,
|
||||
button::{Button, ButtonVariants},
|
||||
input::{InputState, TextInput},
|
||||
switch::Switch,
|
||||
ContextModal, IconName, Sizable, Size, StyledExt,
|
||||
};
|
||||
use ui::avatar::Avatar;
|
||||
use ui::button::{Button, ButtonVariants};
|
||||
use ui::input::{InputState, TextInput};
|
||||
use ui::switch::Switch;
|
||||
use ui::{ContextModal, IconName, Sizable, Size, StyledExt};
|
||||
|
||||
use crate::views::{profile, relays};
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ pub fn shared_state() -> &'static Globals {
|
||||
.ok();
|
||||
|
||||
let first_run = is_first_run().unwrap_or(true);
|
||||
let opts = Options::new().gossip(true);
|
||||
let opts = ClientOptions::new().gossip(true);
|
||||
let lmdb = NostrLMDB::open(nostr_file()).expect("Database is NOT initialized");
|
||||
|
||||
let (global_sender, global_receiver) =
|
||||
|
||||
@@ -3,23 +3,20 @@ use std::time::Duration;
|
||||
use anyhow::{anyhow, Error};
|
||||
use client_keys::ClientKeys;
|
||||
use common::handle_auth::CoopAuthUrlHandler;
|
||||
use global::{
|
||||
constants::{ACCOUNT_D, NIP17_RELAYS, NIP65_RELAYS, NOSTR_CONNECT_TIMEOUT},
|
||||
shared_state,
|
||||
};
|
||||
use global::constants::{ACCOUNT_D, NIP17_RELAYS, NIP65_RELAYS, NOSTR_CONNECT_TIMEOUT};
|
||||
use global::shared_state;
|
||||
use gpui::prelude::FluentBuilder;
|
||||
use gpui::{
|
||||
div, prelude::FluentBuilder, red, App, AppContext, Context, Entity, Global, ParentElement,
|
||||
SharedString, Styled, Subscription, Task, WeakEntity, Window,
|
||||
div, red, App, AppContext, Context, Entity, Global, ParentElement, SharedString, Styled,
|
||||
Subscription, Task, WeakEntity, Window,
|
||||
};
|
||||
use nostr_connect::prelude::*;
|
||||
use nostr_sdk::prelude::*;
|
||||
use settings::AppSettings;
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
use ui::{
|
||||
input::{InputState, TextInput},
|
||||
notification::Notification,
|
||||
ContextModal, Sizable,
|
||||
};
|
||||
use ui::input::{InputState, TextInput};
|
||||
use ui::notification::Notification;
|
||||
use ui::{ContextModal, Sizable};
|
||||
|
||||
pub fn init(window: &mut Window, cx: &mut App) {
|
||||
Identity::set_global(cx.new(|cx| Identity::new(window, cx)), cx);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use anyhow::anyhow;
|
||||
use global::{constants::SETTINGS_D, shared_state};
|
||||
use global::constants::SETTINGS_D;
|
||||
use global::shared_state;
|
||||
use gpui::{App, AppContext, Context, Entity, Global, Subscription, Task};
|
||||
use nostr_sdk::prelude::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
@@ -4,9 +4,9 @@ use std::rc::Rc;
|
||||
use gpui::prelude::FluentBuilder;
|
||||
use gpui::{
|
||||
anchored, deferred, div, px, relative, AnyElement, App, Context, Corner, DismissEvent,
|
||||
DispatchPhase, Element, ElementId, Entity, Focusable, FocusableWrapper, GlobalElementId,
|
||||
InteractiveElement, IntoElement, MouseButton, MouseDownEvent, ParentElement, Pixels, Point,
|
||||
Position, Size, Stateful, Style, Window,
|
||||
DispatchPhase, Element, ElementId, Entity, Focusable, GlobalElementId, InteractiveElement,
|
||||
IntoElement, MouseButton, MouseDownEvent, ParentElement, Pixels, Point, Position, Size,
|
||||
Stateful, Style, Window,
|
||||
};
|
||||
|
||||
use crate::popup_menu::PopupMenu;
|
||||
@@ -21,7 +21,6 @@ pub trait ContextMenuExt: ParentElement + Sized {
|
||||
}
|
||||
|
||||
impl<E> ContextMenuExt for Stateful<E> where E: ParentElement {}
|
||||
impl<E> ContextMenuExt for FocusableWrapper<E> where E: ParentElement {}
|
||||
|
||||
type Menu =
|
||||
Option<Box<dyn Fn(PopupMenu, &mut Window, &mut Context<PopupMenu>) -> PopupMenu + 'static>>;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use gpui::{App, ClickEvent, FocusableWrapper, InteractiveElement, Stateful, Window};
|
||||
use gpui::{App, ClickEvent, InteractiveElement, Stateful, Window};
|
||||
|
||||
pub trait InteractiveElementExt: InteractiveElement {
|
||||
/// Set the listener for a double click event.
|
||||
@@ -18,5 +18,4 @@ pub trait InteractiveElementExt: InteractiveElement {
|
||||
}
|
||||
}
|
||||
|
||||
impl<E: InteractiveElement> InteractiveElementExt for FocusableWrapper<E> {}
|
||||
impl<E: InteractiveElement> InteractiveElementExt for Stateful<E> {}
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
use std::{rc::Rc, time::Duration};
|
||||
use std::rc::Rc;
|
||||
use std::time::Duration;
|
||||
|
||||
use gpui::prelude::FluentBuilder;
|
||||
use gpui::{
|
||||
anchored, div, point, prelude::FluentBuilder, px, relative, Animation, AnimationExt as _,
|
||||
AnyElement, App, Bounds, ClickEvent, Div, FocusHandle, InteractiveElement, IntoElement,
|
||||
KeyBinding, MouseButton, ParentElement, Pixels, Point, RenderOnce, SharedString, Styled,
|
||||
Window,
|
||||
anchored, div, point, px, relative, Animation, AnimationExt as _, AnyElement, App, Bounds,
|
||||
ClickEvent, Div, FocusHandle, InteractiveElement, IntoElement, KeyBinding, MouseButton,
|
||||
ParentElement, Pixels, Point, RenderOnce, SharedString, Styled, Window,
|
||||
};
|
||||
use theme::ActiveTheme;
|
||||
|
||||
use crate::{
|
||||
actions::{Cancel, Confirm},
|
||||
animation::cubic_bezier,
|
||||
button::{Button, ButtonCustomVariant, ButtonVariant, ButtonVariants as _},
|
||||
h_flex, v_flex, ContextModal, IconName, Root, Sizable, StyledExt,
|
||||
};
|
||||
use crate::actions::{Cancel, Confirm};
|
||||
use crate::animation::cubic_bezier;
|
||||
use crate::button::{Button, ButtonCustomVariant, ButtonVariant, ButtonVariants as _};
|
||||
use crate::{h_flex, v_flex, ContextModal, IconName, Root, Sizable, StyledExt};
|
||||
|
||||
const CONTEXT: &str = "Modal";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user