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

@ -22,20 +22,13 @@ impl ThemeRegistry {
})
}
pub fn list(&self, internal: bool, experiments: bool) -> impl Iterator<Item = ThemeMeta> + '_ {
pub fn list(&self, staff: bool) -> impl Iterator<Item = ThemeMeta> + '_ {
let mut dirs = self.assets.list("themes/");
if !internal {
if !staff {
dirs = dirs
.into_iter()
.filter(|path| !path.starts_with("themes/Internal"))
.collect()
}
if !experiments {
dirs = dirs
.into_iter()
.filter(|path| !path.starts_with("themes/Experiments"))
.filter(|path| !path.starts_with("themes/staff"))
.collect()
}