mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 05:14:12 +03:00
eb2109499a
refs https://github.com/TryGhost/Team/issues/1277 - added `/members-activity` route with associated controller, template, and components behind labs flag - table component currently renders some dummy rows - added navigation item to main menu - will use the currently set `?filter` query param unless clicked whilst already on the `/members-activity` screen in which case it will reset the query - added link to dashboard members activity panel - added link to member details activity panel - sets the filter param to `?filter=member:{member.id}` in preparation for the feed to be filtered to the member's activity - updated the labs-flag test helper file to export both `enableLabsFlag()` and the new `disableLabsFlag()` so it's easier to test for flag-disabled functionality
36 lines
979 B
JavaScript
36 lines
979 B
JavaScript
export function enableLabsFlag(server, flag) {
|
|
if (!server.schema.configs.all().length) {
|
|
server.loadFixtures('configs');
|
|
}
|
|
|
|
if (!server.schema.settings.all().length) {
|
|
server.loadFixtures('settings');
|
|
}
|
|
|
|
const config = server.schema.configs.first();
|
|
config.update({enableDeveloperExperiments: true});
|
|
|
|
const labsSetting = {};
|
|
labsSetting[flag] = true;
|
|
|
|
server.db.settings.update({key: 'labs'}, {value: JSON.stringify(labsSetting)});
|
|
}
|
|
|
|
export function disableLabsFlag(server, flag) {
|
|
if (!server.schema.configs.all().length) {
|
|
server.loadFixtures('configs');
|
|
}
|
|
|
|
if (!server.schema.settings.all().length) {
|
|
server.loadFixtures('settings');
|
|
}
|
|
|
|
const config = server.schema.configs.first();
|
|
config.update({enableDeveloperExperiments: true});
|
|
|
|
const labsSetting = {};
|
|
labsSetting[flag] = false;
|
|
|
|
server.db.settings.update({key: 'labs'}, {value: JSON.stringify(labsSetting)});
|
|
}
|