Commit Graph

50 Commits

Author SHA1 Message Date
Kevin Ansfield 3da8815759 Renamed `activeTimezone` setting to `timezone`
refs https://github.com/TryGhost/Ghost/issues/10318

- API has been updated to still work with `active_timezone` for backwards compatibility but it makes sense for the client to match the underlying settings keys
2020-06-24 15:34:59 +01:00
Kevin Ansfield 9f9273fafc Renamed `defaultLocale` setting to `lang`
refs https://github.com/TryGhost/Ghost/issues/10318

- API has been updated to still work with `default_locale` for backwards compatibility but it makes sense for the client to match the underlying settings keys
2020-06-24 15:27:17 +01:00
Kevin Ansfield 90dc419249 Fixed settings not saving due to settings.brand
refs https://github.com/TryGhost/Ghost/issues/10318

- moves `settings.brand` as a JSON object to `settings.accentColor` as a string
2020-06-23 20:49:29 +01:00
Rishabh Garg 1902389757
Added new modal settings behind dev flag (#1615)
no issue

depends on 77e1ada6c6

- reverts commit c46fcec with modifications for naming
- Adds new portal settings UI in Labs -> Members setting
- Allows customization of new portal-* settings upstream
- Updates settings service to include portal group
- Updates settings modal to include new portal-* settings
2020-06-19 21:36:49 +05:30
Rish c46fcec5b2 Revert "Added new members modal settings behind dev flag (#1611)"
This reverts commit c86a01b675.
2020-06-18 19:05:06 +05:30
Rishabh Garg c86a01b675
Added new members modal settings behind dev flag (#1611)
no issue

- Adds new modal settings option in members settings
- Allows customization of modal settings for membersjs
- Uses new `memebrsjs_*` settings from core
2020-06-18 17:15:19 +05:30
Peter Zimon 41bf50e777
Stripe connect design (#1603)
no issues

Updated and refined Stripe Connect design in Labs/Members settings:
- refined visuals and UI logic
- updated copy
- added switch for test mode
- added error handling
2020-06-11 15:15:44 +02:00
Kevin Ansfield 4a53587f3b Switched per-user custom views to shared custom views
requires fdeb7daf40

- swapped to using settings model for storing custom views instead of user accessibility field
- added conditional that checks current user is an admin/owner when displaying the manage custom views button in the content filter (only admins/owners can edit settings model)
  - passed `session.user` into the `<GhContentFilter>` component as an argument so that the conditional getter doesn't need to handle async user access
- fixed no-shadow linting error in settings service
2020-06-04 21:30:06 +01:00
Fabien 'egg' O'Carroll c17612e3d1
Added Stripe Connect UI (#1586)
no-issue

- Rendering is conditional on `stripeDirect` config being false.
- CSS downloaded from https://stripe.com/newsroom/brand-assets
- `stripe_connect_integration_token` is the setting to _set_ the
  stripe_connect_integration setting
2020-06-02 13:58:43 +02:00
Kevin Ansfield 92107312a8 Upgraded `eslint-plugin-ghost` and fixed new linter errors
no issue

- update imports for `@ember-data` package (https://github.com/emberjs/rfcs/blob/master/text/0395-ember-data-packages.md)
- use `computed.reads` where applicable (https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/require-computed-macros.md)
- fix usage of `scheduleOnce` so that functions are only scheduled once (https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/no-incorrect-calls-with-inline-anonymous-functions.md)
2020-01-16 17:01:12 +00:00
Rishabh Garg 9298e30562
Added new brand color publication setting (#1409)
no issue

Reads new brand primary color setting and adds UI to modify/update it behind the dev flag
2019-12-17 16:37:34 +05:30
Hannah Wolfe 377055a7de Added Secondary Navigation (#1410)
refs: https://github.com/TryGhost/Ghost/pull/11409

- Added a new UI for a second set of navigation links
- This should support most concepts of nav, e.g. left and right, or header and footer
- This PR mostly updates the design and nav components to cope with a second set of nav
2019-12-04 11:14:45 +07:00
Rish 45bb968fd3 Added new top-level bulk email settings
no issue
2019-11-13 22:38:16 +05:30
Naz Gargol 6bbe7bb3d4
Content visibility configuration in labs (#1346)
no issue

- Changed members description to less verbose
- Added content visibility radio options to members configuration screen
- Moved setting of default visibility to server-side
- Default visibility setting when PSM is opened before making the first request to the server
2019-10-02 11:13:59 +02:00
Kevin Ansfield 296dc30aa1
Added global meta data and Twitter/Facebook card settings (#1287)
closes https://github.com/TryGhost/Ghost/issues/10921

- added new fields to settings model
- added "Site meta settings" section to general settings
2019-08-21 16:16:59 +01:00
Kevin Ansfield 78b67968a3 Removed unused `forceI18n` attribute from the settings model 2019-03-07 09:10:46 +00:00
Kevin Ansfield 850d56e60e
Renamed ghostHead/Foot settings to codeinjectionHead/Foot (#1107)
closes https://github.com/TryGhost/Ghost/issues/10560
- match changes in the API
2019-03-05 10:40:19 +00:00
Rish e6a6b097e2 Added members feature to labs
no issue

- Added new members settings/toggle to labs
2019-02-26 15:33:38 +07:00
Kevin Ansfield 05eb7db8e9 Removed dated permalinks setting
no issue
- permalink config is now handled through `routes.yaml`
2018-08-14 17:49:50 +01:00
Kevin Ansfield 68442c5676 Custom Post Templates UI (#878)
refs https://github.com/TryGhost/Ghost/issues/9060

- add `{{gh-psm-template-select}}` component
  - allows selection of a custom template for a post if the active theme has custom templates
  - loads themes on render, only hitting the server if not already in the store
  - disables select if post slug matches a `post-*.hbs` or `page-*.hbs` template
- adds `customTemplate` attr to `Post` model
- adds `templates` attr to `Theme` model with CPs to pull out custom vs post/page override templates
- add `.gh-select.disabled` styles to make disabled selects look visually disabled
2017-10-10 14:26:19 +02:00
Katharina Irrgang cb576b14d3 Display private RSS feed url in general settings (#888)
refs https://github.com/TryGhost/Ghost/issues/9001

- show private feed url if private blogging is enabled
- added a `.avoid-break-out` CSS utility class to prevent layout issues caused by non-breaking text such as long links
2017-10-05 10:59:14 +01:00
Kevin Ansfield c994022511 🐛 Fixed error when navigating to tag from admin search box (#881)
closes https://github.com/TryGhost/Ghost/issues/9074

- remove unused pagination route attrs that were interfering with routing service - these were a pre-1.0 hangover from when the tags screen had infinite scroll
- change `Posts` to `Stories` in the search dropdown for consistency
- add general fix for `adapter returned an array for the primary data of a 'queryRecord' response` deprecations by ensuring that `normalizeResponse` in our application serializer transforms the array we get from the server into a "single" JSON-API response
  - this deprecation was being triggered when loading a tag route directly
- fix `defaultValue` complex object deprecations raised from `Setting.unsplash` attr
2017-10-03 11:54:24 +07:00
Kevin Ansfield 92e43b7514 Fixed missing Unsplash icons when API doesn't return an unsplash setting (#865)
closes https://github.com/TryGhost/Ghost/issues/9031

- add a default value `unsplash` value to the `setting` model so that Unsplash is activated when the server doesn't return an `unsplash` setting
- update the `unsplash-settings` transform to always deserialize or serialize to `{isActive: true}` when the value is blank or not parsable
- add acceptance regression test covering API not returning an `unplash` setting
- add unit tests for the `unsplash-settings` transform
2017-09-21 11:13:31 +02:00
Kevin Ansfield 1e3191b811 Unsplash integration
closes https://github.com/TryGhost/Ghost/issues/8859, requires https://github.com/TryGhost/Ghost/pull/8895
- adds Unsplash app to app settings
  - enable/disable toggle
  - validation and testing of Unsplash App ID
  - Unsplash App ID field hidden if provided via Ghost config
  - adds `fetchPrivate` method to `config` service to pull config that requires authentication and updates authentication routines to fetch private config
- adds Unsplash buttons to editor toolbar and `{{gh-image-uploader}}`
  - only present when Unsplash app is enabled
  - opens Unsplash image selector when clicked
  - `{{gh-image-uploader}}` has a new `allowUnsplash` attribute to control display of the unsplash button on a per-uploader basis
- adds Unsplash image selector (`{{gh-unsplash}}`)
  - uses new `unsplash` service to handle API requests and maintain state
  - search
  - infinite scroll
  - zoom image
  - insert image
  - download image
- adds `{{gh-scroll-trigger}}` that will fire an event when the component is rendered into or enters the visible screen area via scrolling
- updates `ui` service
  - adds `isFullscreen` property and updates `gh-editor` so that it gets set/unset when toggling editor fullscreen mode
  - adds `hasSideNav` and `isSideNavHidden` properties
- updates `media-queries` service so that it fires an event each time a breakpoint is entered/exited
  - removes the need for observers in certain circumstances
2017-08-15 16:01:12 +01:00
Katharina Irrgang 9069318dba 🎨 rename language to locale and use `en` as default locale (#721)
refs https://github.com/TryGhost/Ghost/pull/8490
2017-05-31 16:01:46 +01:00
Kevin Ansfield 7eefbba69f 💄🐷 sort-imports eslint rule (#712)
no issue

- adds `eslint-plugin-sort-imports-es6-autofix` dependency
  - implements ESLint's base `sort-imports` rule but has a distinction in that `import {foo} from 'bar';` is considered `multiple` rather than `single`
  - fixes ESLint's autofix behaviour so `eslint --fix` will actually fix the sort order
- updates all unordered import rules by using `eslint --fix`

With the increased number of `import` statements since Ember+ecosystem started moving towards es6 modules I've found it frustrating at times trying to search through randomly ordered import statements. Recently I've been sorting imports manually when I've added new code or touched old code so I thought I'd add an ESLint rule to codify it.
2017-05-29 20:50:03 +02:00
Katharina Irrgang 37689059af 🎨 settings model inconsistency (#669)
requires https://github.com/TryGhost/Ghost/pull/8381
- all camelCase settings model attribute names received from the API are now underscore_case
- discussed here https://github.com/TryGhost/Ghost-Admin/pull/661#discussion_r112939982
2017-04-24 18:42:43 +01:00
Katharina Irrgang 7169a14568 🔥 Adapt image property changes (#661)
refs https://github.com/TryGhost/Ghost/issues/8348, requires https://github.com/TryGhost/Ghost/pull/8364
- rename all image properties
- e.g. author.image --> author.profile_image
- test all image functionality
2017-04-24 18:22:39 +01:00
Kevin Ansfield 0e16bd61b8 🔥 remove Posts per Page setting (#583)
refs ##8131

- "posts per page" is now a theme-level concern
- UI has already been removed, this finishes the cleanup by removing `settings.postsPerPage` and related validation/test support
2017-03-14 18:09:06 +01:00
Kevin Ansfield df3da411df 🎨 move theme activation to /themes endpoint
requires https://github.com/TryGhost/Ghost/pull/8093
- adds `theme.activate()` method and associated adapter method for activating themes rather than relying on `settings.activeTheme`
- minor refactors to the `modals/upload-theme` component to use a full theme model
2017-03-08 10:46:33 +00:00
Kevin Ansfield c43974c14b fetch themes from /themes endpoint (#542)
refs https://github.com/TryGhost/Ghost/pull/8022

- use `/themes` API endpoint to fetch list of themes instead of `settings[0].availableThemes`
2017-02-21 18:28:44 +00:00
Aileen Nowak 7af0f51b53 Blog icon uplod (#397)
refs TryGhost/Ghost#7688
- Adds new upload functionality for a blog icon in general settings.
- Icons will be uploaded to a new endpoint `uploads/icons` to trigger different validations.
2017-01-26 11:17:34 +00:00
Aileen Nowak b93fb0443e AMP app integration (#483)
refs TryGhost/Ghost#7769
- adds Google AMP to `apps` in order to disable and enable it on request.
2017-01-20 09:33:54 +00:00
Kevin Ansfield 4a604ce64f Update code to match eslint rules
no issue
- switch `jscs` and `jshint` inline config to `eslint` config
- fix eslint errors, predominantly in tests where the config now the main app config more closely
2016-11-14 13:26:00 +00:00
Aileen Nowak 31d14c35f2 Add UTC timezone as default in settings model
no issue

- Changes the default timezone from 'Europe/Dublin' to 'Etc/UTC' in setting model
- Updates acceptance test for settings general to expect more timezones in list and different default
- adds mirage fixtures values
2016-06-11 12:24:04 +02:00
Kevin Ansfield 604fda4348 Update package.json details, rename module to `ghost-admin`
no issue
- updates `package.json` details to better reflect the separation from the `Ghost` package
- update ember config and all import statements to reflect the new `ghost-admin` module name in `package.json`
2016-06-03 16:12:54 +01:00
Aileen Nowak be8b31ec85 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-06-03 16:23:39 +02:00
Aileen Nowak 7923641cb1 Fixes error in validation
closes #6826

- refactors the validation of facebook and twitter input field in `general.js` and `user.js` controller
	- Example validations for facebook:
		- `facebook.com/username` will be corrected to the full URL
		- `user` will show error `Your Page name is not a valid Facebook Page name' for `general.js` and `Your Username is not a valid Facebook Username` for `user.js` as the username in facebook has to be at least 5 characters long
		- `twitter.com/username` will be autocorrected to the valid facebook URL incl. the `username`
	- Example validations for twitter:
		- `twitter.com/user_` will be corrected to the full URL
                - `user:99` will show error `Your Username is not a valid Twitter Username`
                - `facebook.com/username` will be autocorrected to the valid twitter URL incl. the `username`
- updates both acceptance tests
- adds further validation for facebook pages in general settings and user. Submitting a url which incl. `/page/` or `/pages/` will now accept any username followed incl. further `/`.
- adds a custom transform `facebook-url-user` which will extract the username (if it's a facebook page, incl. `pages/`) to store only this in the backend
- uses the `twitter-url-user` transform now also for user
2016-05-17 17:44:23 +01:00
Aileen Nowak 0f9645f97d Structured Data 3.0
closes #6534
- new input fields in general settings incl. validation
- facebook and twitter as new models in settings.js
- adds values for facebook and twitter to default-settings.js
- adds blog helpers for facebook and twittter
- rather than saving the whole URL, the Twitter username incl. '@' will be extracted from URL and saved in the settings. The User will still input the full URL. After saving the blog setting, the stored Twitter username will be parsed again as the full URL and available in the input field. A custom transform is used for this.
- adding meta fields to be rendered in {{ghost_head}}:
	- '<meta property="article:publisher" content="https://www.facebook.com/page" />' and
	- '<meta name="twitter:site" content="@user"/>'
- adds facebook and twitter to unit test for structured data
- adds unit test for general settings
- adds acceptance test for new input fields in general settings
- adds a custom transform for twitter model to save only the username to the server
- adds unit test for transform
2016-05-08 17:43:59 +02:00
Aileen Nowak e99569b6f4 Slack integration
closes #6584
- Frontend Changes:
	- adds 'Apps' to Navigation Menu
	- adds 'Slack' as nested page to Apps
	- adds `apps.css`
	- adds `slack-integration` model and uses `slack-settings` custom transform to parse JSON file
	- adds validation for `slack` model
	- adds fixtures and `slack/test` API endpoint to Mirage
	- adds acceptance tests for `apps-test` and `slack-test`
	- adds unit tests for `slack-settings` and `slack-integration`
- Backend Changes:
	- adds API endpoint `slack/test` to send Test Notification
	- adds default-values for slack model
	- sends payload to slack:
		- text: the url of the blogpost / test message
		- icon_url: url to ghost logo
		- username: Ghost
	- adds `slack/index.js` to send webhook to slack if
		- a new post is published (if slack webhook url is saved in settings)
		- user clicks on 'Send Test Notification' in UI
	- adds `slack.init()` to `server.index.js` to add event listener
	- adds unit test for `slack/index`
2016-05-08 12:49:15 +02:00
Kevin Ansfield e2f5889600 Use a custom transform to simplify navigation settings
no issue
- moves the `NavItem` object from the navigation controller to an explicit `NavigationItem` model file
- adds a custom transform `navigation-settings` that transforms the navigation settings JSON string to/from an array of `NavigationItem` objects
- simplifies the `settings/navigation` controller as it no longer has to export it's own internal model and handle serialization and deserialization

This pattern should also help simplify the apps/slack integration code if implemented there.
2016-04-26 12:32:29 +01:00
Kevin Ansfield e30e178c4f deps: ember-data@2.3.2
no issue
- updates ember-data dependency and switches to direct es6 module import instead of destructuring assignment
- fixes issue with `authenticationFailed` action being called before transitions have finished
2016-01-19 14:36:39 +00:00
Kevin Ansfield 7ce3726589 Use es6 across client and add ember-suave to enforce rules
no issue
- add ember-suave dependency
- upgrade grunt-jscs dependency
- add a new .jscsrc for the client's tests directory that extends from client's base .jscsrc
- separate client tests in Gruntfile jscs task so they pick up the test's .jscsrc
- standardize es6 usage across client
2015-11-30 10:41:01 +00:00
Kevin Ansfield d127d79019 Standardize on var-less `export default` across ember app
no issue
- drops the `var Foo = Ember.Thing.extend({}); export default Foo;` syntax in favour of exporting directly, eg: `export default Ember.Thing.extend({})`
- discussion on this change [here](https://github.com/TryGhost/Ghost/pull/5340#issuecomment-105828423) and [here](https://github.com/TryGhost/Ghost/pull/5694#discussion-diff-37511606)
2015-10-06 10:59:50 +01:00
Hannah Wolfe 4e5f2c834b Merge pull request #5306 from acburdine/remove-email
Removes "email" from settings
2015-06-02 09:44:21 +01:00
cobbspur a64b4d43fc Nuke nprogress
closes #5328

- removes all references to nprogress and loading indicator
2015-05-26 19:24:32 +01:00
Austin Burdine e4041f438c remove settings email
closes #5299
- removes settings/general email field from both client and server side
- fixes tests to reflect removal of email
2015-05-22 15:23:31 -06:00
Austin Burdine 8913d36864 added password protection
closes #4993
- brings password protection to the frontend of blogs
- adds testing for password protection
- upgrades bcrypt-js to 2.1.0
2015-04-30 23:44:43 -05:00
Matt Enlow 55472b143f Ember init, bower deps, es6 modules 2015-03-11 12:37:41 -06:00
Matt Enlow 6bbc62d3c2 The great migration (EAK -> ember-cli) 2015-03-11 12:37:41 -06:00
Renamed from models/setting.js (Browse further)