457a8e2955
closes https://github.com/TryGhost/Ghost/issues/10995 - when first loading the site preview, if private mode is enabled submit the login form in the background to get the cookie before loading the iframe - refactors post-authentication preloading to ensure it occurs before post-authentication route hooks are called - adds `showSuccess` attribute to `<GhTaskButton>` so that when set to `false` it can stay in the running state after "success" to avoid state change flashes whilst waiting for a transition
14 lines
296 B
JavaScript
14 lines
296 B
JavaScript
import {isEmpty} from '@ember/utils';
|
|
|
|
export default function mockConfig(server) {
|
|
server.get('/config/', function ({db}) {
|
|
if (isEmpty(db.configs)) {
|
|
server.loadFixtures('configs');
|
|
}
|
|
|
|
return {
|
|
config: db.configs.find(1)
|
|
};
|
|
});
|
|
}
|