mirror of
https://github.com/modrinth/code.git
synced 2026-07-31 21:26:40 +00:00
remove servers in app feature flag
This commit is contained in:
@@ -1023,7 +1023,6 @@ provideAppUpdateDownloadProgress(appUpdateDownload)
|
||||
<LibraryIcon />
|
||||
</NavButton>
|
||||
<NavButton
|
||||
v-if="themeStore.featureFlags.servers_in_app"
|
||||
v-tooltip.right="'Servers'"
|
||||
to="/hosting/manage"
|
||||
:is-primary="(r) => r.path === '/hosting/manage' || r.path === '/hosting/manage/'"
|
||||
|
||||
@@ -5,7 +5,6 @@ export const DEFAULT_FEATURE_FLAGS = {
|
||||
page_path: false,
|
||||
worlds_tab: false,
|
||||
worlds_in_home: true,
|
||||
servers_in_app: false,
|
||||
server_project_qa: false,
|
||||
i18n_debug: false,
|
||||
}
|
||||
|
||||
@@ -55,7 +55,6 @@ pub enum FeatureFlag {
|
||||
ProjectBackground,
|
||||
WorldsTab,
|
||||
WorldsInHome,
|
||||
ServersInApp,
|
||||
ServerProjectQa,
|
||||
I18nDebug,
|
||||
}
|
||||
@@ -131,7 +130,22 @@ impl Settings {
|
||||
feature_flags: res
|
||||
.feature_flags
|
||||
.as_ref()
|
||||
.and_then(|x| serde_json::from_str(x).ok())
|
||||
.and_then(|x| {
|
||||
// to not make deseralization fail from stale feature flags settings
|
||||
let raw: HashMap<String, bool> =
|
||||
serde_json::from_str(x).ok()?;
|
||||
Some(
|
||||
raw.into_iter()
|
||||
.filter_map(|(key, value)| {
|
||||
serde_json::from_value(
|
||||
serde_json::Value::String(key),
|
||||
)
|
||||
.ok()
|
||||
.map(|feature_flag| (feature_flag, value))
|
||||
})
|
||||
.collect(),
|
||||
)
|
||||
})
|
||||
.unwrap_or_default(),
|
||||
skipped_update: res.skipped_update,
|
||||
pending_update_toast_for_version: res
|
||||
|
||||
Reference in New Issue
Block a user