Ghost/ghost/admin/app/mirage/fixtures/settings.js

230 lines
6.1 KiB
JavaScript
Raw Normal View History

/* jscs:disable requireCamelCaseOrUpperCaseIdentifiers */
export default [
{
created_at: '2015-09-11T09:44:30.805Z',
created_by: 1,
id: 1,
key: 'title',
type: 'blog',
updated_at: '2015-10-04T16:26:05.195Z',
updated_by: 1,
uuid: '39e16daf-43fa-4bf0-87d4-44948ba8bf4c',
value: 'Test Blog'
},
{
created_at: '2015-09-11T09:44:30.806Z',
created_by: 1,
id: 2,
key: 'description',
type: 'blog',
updated_at: '2015-10-04T16:26:05.198Z',
updated_by: 1,
uuid: 'e6c8b636-6925-4c4a-a5d9-1dc0870fb8ea',
value: 'Thoughts, stories and ideas.'
},
{
id: 3,
uuid: '4339ce48-b485-418a-acc2-1d34cf17a5e3',
key: 'logo',
value: '/content/images/2013/Nov/logo.png',
type: 'blog',
created_at: '2013-11-25T14:48:11.000Z',
created_by: 1,
updated_at: '2015-10-27T17:39:58.273Z',
updated_by: 1
},
{
id: 4,
uuid: 'e41b6c2a-7f72-45ea-96d8-ee016f06d78b',
key: 'cover',
value: '/content/images/2014/Feb/cover.jpg',
type: 'blog',
created_at: '2013-11-25T14:48:11.000Z',
created_by: 1,
updated_at: '2015-10-27T17:39:58.276Z',
updated_by: 1
},
{
id: 5,
uuid: '4558457e-9f61-47a5-9d45-8b83829bf1cf',
key: 'defaultLang',
value: 'en_US',
type: 'blog',
created_at: '2013-11-25T14:48:11.000Z',
created_by: 1,
updated_at: '2015-10-27T17:39:58.278Z',
updated_by: 1
},
{
created_at: '2015-09-11T09:44:30.809Z',
created_by: 1,
id: 6,
key: 'postsPerPage',
type: 'blog',
updated_at: '2015-10-04T16:26:05.211Z',
updated_by: 1,
uuid: '775e6ca1-bcc3-4347-a53d-15d5d76c04a4',
value: '5'
},
{
id: 7,
uuid: '3c93b240-d22b-473f-9063-537023e06c2d',
key: 'forceI18n',
value: 'true',
type: 'blog',
created_at: '2013-11-25T14:48:11.000Z',
created_by: 1,
updated_at: '2015-10-27T17:39:58.280Z',
updated_by: 1
},
{
id: 8,
uuid: '4e58389f-f173-4387-b28c-0435623882ad',
key: 'activeTheme',
value: 'casper',
type: 'theme',
created_at: '2013-11-25T14:48:11.000Z',
created_by: 1,
updated_at: '2015-10-27T17:39:58.284Z',
updated_by: 1
},
{
id: 9,
uuid: '8052c2bf-9c19-4d6c-8944-7465321d00be',
key: 'permalinks',
value: '/:slug/',
type: 'blog',
created_at: '2014-01-14T12:01:51.000Z',
created_by: 1,
updated_at: '2015-10-27T17:39:58.282Z',
updated_by: 1
},
{
created_at: '2015-09-11T09:44:30.809Z',
created_by: 1,
id: 10,
key: 'ghost_head',
type: 'blog',
updated_at: '2015-09-23T13:32:49.858Z',
updated_by: 1,
uuid: 'df7f3151-bc08-4a77-be9d-dd315b630d51',
value: ''
},
{
created_at: '2015-09-11T09:44:30.809Z',
created_by: 1,
id: 11,
key: 'ghost_foot',
type: 'blog',
updated_at: '2015-09-23T13:32:49.858Z',
updated_by: 1,
uuid: '0649d45e-828b-4dd0-8381-3dff6d1d5ddb',
value: ''
},
{
id: 12,
uuid: 'd806f358-7996-4c74-b153-8876959c4b70',
key: 'labs',
Subscribers: Admin User Interface v1 Initial Subscribers screen - set up mocked api endpoints - basic subscribers screen with data loading, infinite scroll "Add Subscriber" screen - uses modal to display a new subscriber form - validates subscriber e-mail address - moves pagination from route into controller to use filtered/sorted CPs on top of a live-query so that new subscribers are added to the list and the total can be properly managed TODO: - there is currently a pretty serious performance issue where the whole table is re-rendered when the live-query is updated. `ember-light-table` doesn't allow for live-binding and has no options to easily manipulate it's rows using an external interface - it's possible to move the page loading into the component so we only render new rows but that leaves it difficult to react to new subscribers being added through the UI. I believe the number of components used within the table is also adding to the performance problems. - most likely solution is to drop `ember-light-table` in favour of rendering the table directly - glimmer should do a good job of fast updates even though the underlying array will be completely swapped out "Import subscribers" screen - uses modal to display an import subscribers CSV file upload form - displays upload progress - displays import stats and reloads subscribers table once import has completed - adds `gh-file-uploader` component (NB. pared down copy of `gh-image-uploader`, ripe for some refactoring) - fixes subscribers acceptance test failing because fixtures did not have the labs flag enabled Unfortunately this doesn't have 100% test coverage as we're limited in how we can simulate file uploads 😞 Fix performance issues with subscribers table - moves the table definition from the component up to the controller - switches back to manually manipulating table rows instead of using a live-query This is a quick-fix in that it allows us to continue using the `ember-light-table` component but it does mean that we lose some flexibility that the live-query gave us. For now it's not much of an issue and it allows us to defer deeper performance/flexibility work until we have a concrete need and requirements. Hook up Export CSV button - use a hidden iFrame to trigger the browser to hit the CSV export endpoint and download the file Re-order subscribers table by clicking column headers - displays currently sorted column and sort direction - clicking a column header re-fetches the data from the server with the appropriate query params Fix scroll triggers for infinite pagination + icon change - adds a debounce as well as the throttle so that we always get a final scroll trigger once scrolling has stopped - changes the subscribers icon from the temporary team icon to the mail icon
2016-04-15 17:45:50 +03:00
value: '{"codeInjectionUI":true,"subscribers":true}',
type: 'blog',
created_at: '2015-01-12T18:29:01.000Z',
created_by: 1,
updated_at: '2015-10-27T17:39:58.288Z',
updated_by: 1
},
{
created_at: '2015-09-11T09:44:30.810Z',
created_by: 1,
id: 13,
key: 'navigation',
type: 'blog',
updated_at: '2015-09-23T13:32:49.868Z',
updated_by: 1,
uuid: '4cc51d1c-fcbd-47e6-a71b-fdd1abb223fc',
value: JSON.stringify([
{label: 'Home', url: '/'},
{label: 'About', url: '/about'}
])
},
{
created_at: '2015-09-11T09:44:30.810Z',
created_by: 1,
id: 14,
key: 'isPrivate',
type: 'blog',
updated_at: '2015-09-23T13:32:49.868Z',
updated_by: 1,
uuid: 'e306ec3e-d079-11e5-ab30-625662870761',
value: false
},
{
created_at: '2015-09-11T09:44:30.810Z',
created_by: 1,
id: 15,
key: 'password',
type: 'blog',
updated_at: '2015-09-23T13:32:49.868Z',
updated_by: 1,
uuid: 'f8e8cbda-d079-11e5-ab30-625662870761',
value: ''
},
{
created_at: '2016-05-05T15:04:03.115Z',
created_by: 1,
id: 17,
key: 'slack',
type: 'blog',
updated_at: '2016-05-05T18:33:09.168Z',
updated_by: 1,
uuid: 'dd4ebaa8-dedb-40ff-a663-ec64a92d4111',
value: '[{"url":""}]'
},
{
created_at: '2016-05-05T15:40:12.133Z',
created_by: 1,
id: 23,
key: 'facebook',
type: 'blog',
updated_at: '2016-05-08T15:20:25.953Z',
updated_by: 1,
uuid: 'd4387e5c-3230-46dd-a89b-0d8a40365c35',
value: 'test'
},
{
created_at: '2016-05-05T15:40:12.134Z',
created_by: 1,
id: 24,
key: 'twitter',
type: 'blog',
updated_at: '2016-05-08T15:20:25.954Z',
updated_by: 1,
uuid: '5130441f-e4c7-4750-9692-a22d841ab049',
value: '@test'
},
Timezones: Always use the timezone of blog setting closes TryGhost/Ghost#6406 follow-up PR of #2 - adds a `timeZone` Service to provide the offset (=timezone reg. moment-timezone) of the users blog settings - `gh-datetime-input` will read the offset of the timezone now and adjust the `publishedAt` date with it. This is the date which will be shown in the PSM 'Publish Date' field. When the user writes a new date/time, the offset is considered and will be deducted again before saving it to the model. This way, we always work with a UTC publish date except for this input field. - gets `availableTimezones` from `configuration/timezones` API endpoint - adds a `moment-utc` transform on all date attr (`createdAt`, `updatedAt`, `publishedAt`, `unsubscribedAt` and `lastLogin`) to only work with UTC times on serverside - when switching the timezone in the select box, the user will be shown the local time of the selected timezone - `createdAt`-property in `gh-user-invited` returns now `moment(createdAt).fromNow()` as `createdAt` is a moment date already - added clock service to show actual time ticking below select box - default timezone is '(GMT) Greenwich Mean Time : Dublin, Edinburgh, London' - if no timezone is saved in the settings yet, the default value will be used - shows the local time in 'Publish Date' in PSM by default, until user overwrites it - adds dependency `moment-timezone 0.5.4` to `bower.json` --------- **Tests:** - sets except for clock service in test env - adds fixtures to mirage - adds `service.ajax` and `service:ghostPaths` to navigation-test.js - adds unit test for `gh-format-timeago` helper - updates acceptance test `general-setting` - adds acceptance test for `editor` - adds integration tests for `services/config` and `services/time-zone` --------- **Todos:** - [ ] Integration tests: ~~`services/config`~~, ~~`services/time-zone`~~, `components/gh-datetime-input` - [x] Acceptance test: `editor` - [ ] Unit tests: `utils/date-formatting` - [ ] write issue for renaming date properties (e. g. `createdAt` to `createdAtUTC`) and translate those for server side with serializers
2016-02-02 10:04:40 +03:00
{
created_at: '2015-09-11T09:44:30.810Z',
created_by: 1,
id: 16,
key: 'activeTimezone',
type: 'blog',
updated_at: '2015-09-23T13:32:49.868Z',
updated_by: 1,
uuid: '310c9169-9613-48b0-8bc4-d1e1c9be85b8',
value: 'Europe/Dublin'
},
{
key: 'availableThemes',
value: [
{
name: 'casper',
package: {
name: 'Blog',
version: '1.0'
},
active: true
}
],
type: 'theme'
}
];