mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 07:09:48 +03:00
24e71ffdaa
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
32 lines
879 B
JSON
32 lines
879 B
JSON
{
|
|
"name": "ghost",
|
|
"dependencies": {
|
|
"blueimp-md5": "2.3.0",
|
|
"codemirror": "5.15.2",
|
|
"devicejs": "0.2.7",
|
|
"ember": "2.5.1",
|
|
"ember-cli-shims": "0.1.1",
|
|
"ember-cli-test-loader": "0.2.2",
|
|
"ember-mocha": "0.8.11",
|
|
"Faker": "3.1.0",
|
|
"fastclick": "1.0.6",
|
|
"google-caja": "6005.0.0",
|
|
"jquery-deparam": "0.5.1",
|
|
"jquery-file-upload": "9.12.3",
|
|
"jquery-ui": "1.11.4",
|
|
"jqueryui-touch-punch": "furf/jquery-ui-touch-punch#4bc009145202d9c7483ba85f3a236a8f3470354d",
|
|
"jquery.simulate.drag-sortable": "0.1.0",
|
|
"keymaster": "1.6.3",
|
|
"lodash": "3.7.0",
|
|
"moment": "2.13.0",
|
|
"moment-timezone": "0.5.4",
|
|
"normalize.css": "3.0.3",
|
|
"password-generator": "2.0.2",
|
|
"pretender": "1.1.0",
|
|
"rangyinputs": "1.2.0",
|
|
"selectize": "~0.12.1",
|
|
"showdown-ghost": "0.3.6",
|
|
"validator-js": "3.39.0"
|
|
}
|
|
}
|