2016-11-14 16:16:51 +03:00
|
|
|
/* eslint-disable camelcase */
|
2015-10-13 16:52:41 +03:00
|
|
|
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,
|
|
|
|
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,
|
|
|
|
value: 'Thoughts, stories and ideas.'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 3,
|
|
|
|
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
|
|
|
|
},
|
|
|
|
{
|
2016-02-11 15:06:29 +03:00
|
|
|
id: 4,
|
2015-10-13 16:52:41 +03:00
|
|
|
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
|
|
|
|
},
|
|
|
|
{
|
2016-02-11 15:06:29 +03:00
|
|
|
id: 5,
|
2015-10-13 16:52:41 +03:00
|
|
|
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,
|
2016-02-11 15:06:29 +03:00
|
|
|
id: 6,
|
2015-10-13 16:52:41 +03:00
|
|
|
key: 'postsPerPage',
|
|
|
|
type: 'blog',
|
|
|
|
updated_at: '2015-10-04T16:26:05.211Z',
|
|
|
|
updated_by: 1,
|
|
|
|
value: '5'
|
|
|
|
},
|
|
|
|
{
|
2016-02-11 15:06:29 +03:00
|
|
|
id: 7,
|
2015-10-13 16:52:41 +03:00
|
|
|
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
|
|
|
|
},
|
|
|
|
{
|
2016-02-11 15:06:29 +03:00
|
|
|
id: 8,
|
2015-10-13 16:52:41 +03:00
|
|
|
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
|
|
|
|
},
|
|
|
|
{
|
2016-02-11 15:06:29 +03:00
|
|
|
id: 9,
|
2015-10-13 16:52:41 +03:00
|
|
|
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,
|
2016-02-11 15:06:29 +03:00
|
|
|
id: 10,
|
2015-10-13 16:52:41 +03:00
|
|
|
key: 'ghost_head',
|
|
|
|
type: 'blog',
|
|
|
|
updated_at: '2015-09-23T13:32:49.858Z',
|
|
|
|
updated_by: 1,
|
|
|
|
value: ''
|
|
|
|
},
|
|
|
|
{
|
|
|
|
created_at: '2015-09-11T09:44:30.809Z',
|
|
|
|
created_by: 1,
|
2016-02-11 15:06:29 +03:00
|
|
|
id: 11,
|
2015-10-13 16:52:41 +03:00
|
|
|
key: 'ghost_foot',
|
|
|
|
type: 'blog',
|
|
|
|
updated_at: '2015-09-23T13:32:49.858Z',
|
|
|
|
updated_by: 1,
|
|
|
|
value: ''
|
|
|
|
},
|
|
|
|
{
|
2016-02-11 15:06:29 +03:00
|
|
|
id: 12,
|
2015-10-13 16:52:41 +03:00
|
|
|
key: 'labs',
|
2016-10-10 11:23:26 +03:00
|
|
|
value: '{"subscribers":true}',
|
2015-10-13 16:52:41 +03:00
|
|
|
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,
|
2016-02-11 15:06:29 +03:00
|
|
|
id: 13,
|
2015-10-13 16:52:41 +03:00
|
|
|
key: 'navigation',
|
|
|
|
type: 'blog',
|
|
|
|
updated_at: '2015-09-23T13:32:49.868Z',
|
|
|
|
updated_by: 1,
|
|
|
|
value: JSON.stringify([
|
|
|
|
{label: 'Home', url: '/'},
|
|
|
|
{label: 'About', url: '/about'}
|
|
|
|
])
|
|
|
|
},
|
2016-02-11 15:06:29 +03:00
|
|
|
{
|
|
|
|
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,
|
|
|
|
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,
|
|
|
|
value: ''
|
|
|
|
},
|
2016-03-29 11:40:44 +03:00
|
|
|
{
|
|
|
|
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,
|
|
|
|
value: '[{"url":""}]'
|
|
|
|
},
|
2016-03-03 11:52:27 +03:00
|
|
|
{
|
|
|
|
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,
|
2016-05-17 21:14:14 +03:00
|
|
|
value: 'test'
|
2016-03-03 11:52:27 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
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,
|
2016-05-17 21:14:14 +03:00
|
|
|
value: '@test'
|
2016-03-03 11:52:27 +03:00
|
|
|
},
|
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,
|
2016-06-10 16:28:11 +03:00
|
|
|
value: 'Etc/UTC'
|
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
|
|
|
},
|
2015-10-13 16:52:41 +03:00
|
|
|
{
|
|
|
|
key: 'availableThemes',
|
2016-08-17 18:01:46 +03:00
|
|
|
id: 18,
|
2015-10-13 16:52:41 +03:00
|
|
|
value: [
|
|
|
|
{
|
|
|
|
name: 'casper',
|
|
|
|
package: {
|
|
|
|
name: 'Blog',
|
|
|
|
version: '1.0'
|
|
|
|
},
|
|
|
|
active: true
|
2016-08-17 18:01:46 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'foo',
|
|
|
|
package: {
|
|
|
|
name: 'Foo',
|
|
|
|
version: '0.1'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'bar'
|
2015-10-13 16:52:41 +03:00
|
|
|
}
|
|
|
|
],
|
|
|
|
type: 'theme'
|
|
|
|
}
|
|
|
|
];
|