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:
Mikayla Maki 2023-01-23 14:31:10 -08:00
parent ca2e0256e1
commit ea39983f78
40 changed files with 66 additions and 124 deletions

View file

@ -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();
}
}