Skip to content

Commit

Permalink
Merge pull request #140 from gary-kim/fix/139/high
Browse files Browse the repository at this point in the history
Match removal of settings upstream
  • Loading branch information
gary-kim authored Sep 3, 2020
2 parents 2fcf5ab + 6aeb85a commit e9ce1c8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 35 deletions.
6 changes: 3 additions & 3 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public function __construct(array $urlParams = []) {
}

public static function AvailableLabs() {
$developConfig = json_decode(file_get_contents(__DIR__ . '/../../3rdparty/riot/develop.config.json'), true);
$labs = $developConfig['features'];
return array_keys($labs);
// Element Web has removed the current Labs system. https://github.com/gary-kim/riotchat/issues/139
// TODO: Remove the labs feature fully
return [];
}
}
5 changes: 0 additions & 5 deletions lib/Controller/ConfigController.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ public function config() {
'branding' => [
'authHeaderLogoUrl' => $this->defaults->getLogo(),
],
'features' => [],
];

$jitsi_domain = $this->config->getAppValue(Application::APP_ID, 'jitsi_preferred_domain', Application::AvailableSettings['jitsi_preferred_domain']);
Expand All @@ -117,10 +116,6 @@ public function config() {
$config['integrations_widgets_urls'][0] = $integrations_widgets_urls;
}

foreach (Application::AvailableLabs() as $lab) {
$config['features'][$lab] = $this->config->getAppValue(Application::APP_ID, 'lab_' . $lab, 'disable');
}

return new JSONResponse($config);
}
}
27 changes: 0 additions & 27 deletions src/components/AdminSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,32 +130,6 @@
@change="updateSetting('integrations_widgets_urls')"
>
</SettingsSection>
<SettingsSection
:title="t('riotchat', 'Features')"
:description="t('riotchat', 'Configure experimental features in Element')"
>
<p v-html="featureDocumentation" />
<p>{{ t('riotchat', '"enable" enables the feature for all users. "disable" disables the feature for all users. "labs" adds the feature to the user\'s settings.') }}</p>
<br>
<div
v-for="(setting, key) in labs"
:key="key"
>
<select
:id="key"
v-model="labs[key]"
@change="updateLabSetting(key)"
>
<option>enable</option>
<option>labs</option>
<option>disable</option>
</select>
<label
:ref="key"
:for="key"
>{{ key.substring(4) }}</label>
</div>
</SettingsSection>
</template>
<SettingsSection
:title="t('riotchat', 'Custom Element config')"
Expand Down Expand Up @@ -207,7 +181,6 @@ export default {
"disable_custom_urls": loadState('riotchat', 'disable_custom_urls') === 'true',
"disable_login_language_selector": loadState('riotchat', 'disable_login_language_selector') === 'true',
"jitsi_preferred_domain": loadState('riotchat', 'jitsi_preferred_domain'),
"labs": JSON.parse(loadState('riotchat', 'labs')),
"custom_json": loadState('riotchat', 'custom_json'),
"integrations_ui_url": loadState('riotchat', 'integrations_ui_url'),
"integrations_rest_url": loadState('riotchat', 'integrations_rest_url'),
Expand Down

0 comments on commit e9ce1c8

Please sign in to comment.