Add actions for requesting features and filing bug reports
This commit is contained in:
parent
46152c6249
commit
41bff3947c
4 changed files with 39 additions and 5 deletions
|
@ -343,10 +343,12 @@ pub fn menus() -> Vec<Menu<'static>> {
|
|||
action: Box::new(crate::CopySystemSpecsIntoClipboard),
|
||||
},
|
||||
MenuItem::Action {
|
||||
name: "Give Feedback",
|
||||
action: Box::new(crate::OpenBrowser {
|
||||
url: super::feedback::NEW_ISSUE_URL.into(),
|
||||
}),
|
||||
name: "File Bug Report",
|
||||
action: Box::new(crate::FileBugReport),
|
||||
},
|
||||
MenuItem::Action {
|
||||
name: "Request Feature",
|
||||
action: Box::new(crate::RequestFeature),
|
||||
},
|
||||
MenuItem::Separator,
|
||||
MenuItem::Action {
|
||||
|
|
|
@ -69,7 +69,9 @@ actions!(
|
|||
ResetBufferFontSize,
|
||||
InstallCommandLineInterface,
|
||||
ResetDatabase,
|
||||
CopySystemSpecsIntoClipboard
|
||||
CopySystemSpecsIntoClipboard,
|
||||
RequestFeature,
|
||||
FileBugReport
|
||||
]
|
||||
);
|
||||
|
||||
|
@ -261,6 +263,28 @@ pub fn init(app_state: &Arc<AppState>, cx: &mut gpui::MutableAppContext) {
|
|||
},
|
||||
);
|
||||
|
||||
cx.add_action(
|
||||
|_: &mut Workspace, _: &RequestFeature, cx: &mut ViewContext<Workspace>| {
|
||||
let url = "https://github.com/zed-industries/feedback/issues/new?assignees=&labels=enhancement%2Ctriage&template=0_feature_request.yml";
|
||||
cx.dispatch_action(OpenBrowser {
|
||||
url: url.into(),
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
cx.add_action(
|
||||
|_: &mut Workspace, _: &FileBugReport, cx: &mut ViewContext<Workspace>| {
|
||||
let system_specs_text = SystemSpecs::new(cx).to_string();
|
||||
let url = format!(
|
||||
"https://github.com/zed-industries/feedback/issues/new?assignees=&labels=defect%2Ctriage&template=2_bug_report.yml&environment={}",
|
||||
urlencoding::encode(&system_specs_text)
|
||||
);
|
||||
cx.dispatch_action(OpenBrowser {
|
||||
url: url.into(),
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
activity_indicator::init(cx);
|
||||
call::init(app_state.client.clone(), app_state.user_store.clone(), cx);
|
||||
settings::KeymapFileContent::load_defaults(cx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue