1use gpui::AppContext;
2
3pub mod deploy_feedback_button;
4pub mod feedback_editor;
5pub mod feedback_info_text;
6pub mod feedback_modal;
7pub mod submit_feedback_button;
8
9mod system_specs;
10
11pub fn init(cx: &mut AppContext) {
12 cx.observe_new_views(feedback_modal::FeedbackModal::register)
13 .detach();
14}
15
16// actions!(
17// zed,
18// [
19// CopySystemSpecsIntoClipboard,
20// FileBugReport,
21// RequestFeature,
22// OpenZedCommunityRepo
23// ]
24// );
25
26// pub fn init(cx: &mut AppContext) {
27// feedback_editor::init(cx);
28
29// cx.add_action(
30// move |_: &mut Workspace,
31// _: &CopySystemSpecsIntoClipboard,
32// cx: &mut ViewContext<Workspace>| {
33// let specs = SystemSpecs::new(&cx).to_string();
34// cx.prompt(
35// PromptLevel::Info,
36// &format!("Copied into clipboard:\n\n{specs}"),
37// &["OK"],
38// );
39// let item = ClipboardItem::new(specs.clone());
40// cx.write_to_clipboard(item);
41// },
42// );
43
44// cx.add_action(
45// |_: &mut Workspace, _: &RequestFeature, cx: &mut ViewContext<Workspace>| {
46// let url = "https://github.com/zed-industries/community/issues/new?assignees=&labels=enhancement%2Ctriage&template=0_feature_request.yml";
47// cx.platform().open_url(url);
48// },
49// );
50
51// cx.add_action(
52// move |_: &mut Workspace, _: &FileBugReport, cx: &mut ViewContext<Workspace>| {
53// let url = format!(
54// "https://github.com/zed-industries/community/issues/new?assignees=&labels=defect%2Ctriage&template=2_bug_report.yml&environment={}",
55// urlencoding::encode(&SystemSpecs::new(&cx).to_string())
56// );
57// cx.platform().open_url(&url);
58// },
59// );
60
61// cx.add_global_action(open_zed_community_repo);
62// }
63
64// pub fn open_zed_community_repo(_: &OpenZedCommunityRepo, cx: &mut AppContext) {
65// let url = "https://github.com/zed-industries/community";
66// cx.platform().open_url(&url);
67// }