Add profiles settings page
This commit is contained in:
@@ -4,7 +4,7 @@ mod plugins;
|
||||
mod render;
|
||||
|
||||
use ely_browser_core::{BrowserCore, InitialBrowserConfig};
|
||||
use ely_domain::{CommandIntent, SpaceId, TabId, UrlText};
|
||||
use ely_domain::{CommandIntent, ProfileId, SpaceId, TabId, UrlText};
|
||||
use gpui::{App, AppContext, Context, Entity, FocusHandle, Focusable, Subscription, Window};
|
||||
use gpui_component::input::{InputEvent, InputState, SelectAll};
|
||||
|
||||
@@ -166,6 +166,20 @@ impl ElyShell {
|
||||
}
|
||||
}
|
||||
|
||||
fn select_profile(
|
||||
&mut self,
|
||||
profile_id: &ProfileId,
|
||||
window: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
) {
|
||||
if let ShellState::Ready(core) = &mut self.state
|
||||
&& core.select_profile(profile_id).is_ok()
|
||||
{
|
||||
self.sync_address_input(window, cx);
|
||||
cx.notify();
|
||||
}
|
||||
}
|
||||
|
||||
fn select_next_tab(&mut self, window: &mut Window, cx: &mut Context<Self>) {
|
||||
if let ShellState::Ready(core) = &mut self.state
|
||||
&& core.select_next_tab().is_ok()
|
||||
|
||||
Reference in New Issue
Block a user