Ghost/ghost/admin/app/controllers/settings/theme/install.js
Kevin Ansfield 5a8753fb8f Added ability to install free themes directly from GitHub (#1837)
refs https://github.com/TryGhost/Ghost/issues/12608
requires https://github.com/TryGhost/Ghost/pull/12635

- adds `/settings/themes/install` route with `source` and `ref` query params that match the API. Shows a confirmation modal when accessed asking to confirm installation and activation
  - does not allow Casper to be installed
  - warns if installing the theme will overwrite an existing one
  - follows similar process to zip uploads for error handling
- adds install/preview links for Massively in the free themes showcase

Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
2021-02-12 09:19:25 +00:00

19 lines
437 B
JavaScript

import Controller from '@ember/controller';
import {action} from '@ember/object';
import {inject as service} from '@ember/service';
import {tracked} from '@glimmer/tracking';
export default class InstallThemeController extends Controller {
@service router;
queryParams = ['source', 'ref'];
@tracked source = '';
@tracked ref = '';
@action
close() {
this.router.transitionTo('settings.theme');
}
}