feat(editor): Version control (WIP) (#6013)

* feat(editor): Version control settings (with feature flag)

* feat(editor): replace posthog feature flag with local storage key
This commit is contained in:
Csaba Tuncsik
2023-04-19 16:01:32 +02:00
committed by GitHub
parent c87262a312
commit 0e0a064fa7
5 changed files with 55 additions and 0 deletions

View File

@@ -74,6 +74,14 @@ export default mixins(userHelpers, pushConnection).extend({
available: this.canAccessApiSettings(),
activateOnRouteNames: [VIEWS.API_SETTINGS],
},
{
id: 'settings-version-control',
icon: 'code-branch',
label: this.$locale.baseText('settings.versionControl.title'),
position: 'top',
available: this.canAccessVersionControl(),
activateOnRouteNames: [VIEWS.VERSION_CONTROL],
},
{
id: 'settings-sso',
icon: 'user-lock',
@@ -151,6 +159,9 @@ export default mixins(userHelpers, pushConnection).extend({
canAccessUsageAndPlan(): boolean {
return this.canUserAccessRouteByName(VIEWS.USAGE);
},
canAccessVersionControl(): boolean {
return this.canUserAccessRouteByName(VIEWS.VERSION_CONTROL);
},
canAccessSso(): boolean {
return this.canUserAccessRouteByName(VIEWS.SSO_SETTINGS);
},
@@ -207,6 +218,11 @@ export default mixins(userHelpers, pushConnection).extend({
this.$router.push({ name: VIEWS.SSO_SETTINGS });
}
break;
case 'settings-version-control':
if (this.$router.currentRoute.name !== VIEWS.VERSION_CONTROL) {
this.$router.push({ name: VIEWS.VERSION_CONTROL });
}
break;
default:
break;
}