Removed old experiments settings and staff mode flag, added new StaffMode global that is set based on the webserver's staff bit
This commit is contained in:
parent
ca2e0256e1
commit
ea39983f78
40 changed files with 66 additions and 124 deletions
|
@ -1,4 +1,4 @@
|
|||
use crate::{parse_json_with_comments, Settings};
|
||||
use crate::parse_json_with_comments;
|
||||
use anyhow::{Context, Result};
|
||||
use assets::Assets;
|
||||
use collections::BTreeMap;
|
||||
|
@ -42,16 +42,7 @@ struct ActionWithData(Box<str>, Box<RawValue>);
|
|||
|
||||
impl KeymapFileContent {
|
||||
pub fn load_defaults(cx: &mut MutableAppContext) {
|
||||
let settings = cx.global::<Settings>();
|
||||
let mut paths = vec!["keymaps/default.json", "keymaps/vim.json"];
|
||||
|
||||
if settings.staff_mode {
|
||||
paths.push("keymaps/internal.json")
|
||||
}
|
||||
|
||||
paths.extend(settings.experiments.keymap_files());
|
||||
|
||||
for path in paths {
|
||||
for path in ["keymaps/default.json", "keymaps/vim.json"] {
|
||||
Self::load(path, cx).unwrap();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue