2021-10-11 19:14:18 +03:00
|
|
|
import Controller from '@ember/controller';
|
2021-10-12 12:18:55 +03:00
|
|
|
import {action} from '@ember/object';
|
2021-10-11 21:30:58 +03:00
|
|
|
import {inject as service} from '@ember/service';
|
2021-10-12 12:18:55 +03:00
|
|
|
import {tracked} from '@glimmer/tracking';
|
2021-10-11 19:14:18 +03:00
|
|
|
|
|
|
|
export default class ChangeThemeController extends Controller {
|
2021-10-12 12:18:55 +03:00
|
|
|
@service store;
|
2021-10-11 21:30:58 +03:00
|
|
|
@service themeManagement;
|
|
|
|
|
2021-10-12 12:18:55 +03:00
|
|
|
@tracked showAdvanced = false;
|
2021-10-12 15:50:57 +03:00
|
|
|
@tracked themes = this.store.peekAll('theme');
|
2021-10-12 12:18:55 +03:00
|
|
|
|
2021-10-11 19:14:18 +03:00
|
|
|
marketplaceThemes = [{
|
|
|
|
name: 'Edition',
|
|
|
|
category: 'Newsletter',
|
|
|
|
url: 'https://github.com/TryGhost/Edition',
|
2021-10-12 16:27:51 +03:00
|
|
|
previewUrl: 'https://edition.ghost.io/',
|
2021-10-11 19:14:18 +03:00
|
|
|
ref: 'TryGhost/Edition',
|
|
|
|
image: 'assets/img/themes/Edition.jpg',
|
|
|
|
shortImage: 'assets/img/themes/Edition-cut.jpg'
|
|
|
|
}, {
|
|
|
|
name: 'Alto',
|
|
|
|
category: 'Blog',
|
|
|
|
url: 'https://github.com/TryGhost/Alto',
|
2021-10-12 16:27:51 +03:00
|
|
|
previewUrl: 'https://alto.ghost.io',
|
2021-10-11 19:14:18 +03:00
|
|
|
ref: 'TryGhost/Alto',
|
|
|
|
image: 'assets/img/themes/Alto.jpg',
|
|
|
|
shortImage: 'assets/img/themes/Alto-cut.jpg'
|
|
|
|
}, {
|
|
|
|
name: 'London',
|
|
|
|
category: 'Photography',
|
|
|
|
url: 'https://github.com/TryGhost/London',
|
2021-10-12 16:27:51 +03:00
|
|
|
previewUrl: 'https://london.ghost.io',
|
2021-10-11 19:14:18 +03:00
|
|
|
ref: 'TryGhost/London',
|
|
|
|
image: 'assets/img/themes/London.jpg',
|
|
|
|
shortImage: 'assets/img/themes/London-cut.jpg'
|
|
|
|
}, {
|
|
|
|
name: 'Ease',
|
|
|
|
category: 'Documentation',
|
|
|
|
url: 'https://github.com/TryGhost/Ease',
|
2021-10-12 16:27:51 +03:00
|
|
|
previewUrl: 'https://ease.ghost.io',
|
2021-10-11 19:14:18 +03:00
|
|
|
ref: 'TryGhost/Ease',
|
|
|
|
image: 'assets/img/themes/Ease.jpg',
|
|
|
|
shortImage: 'assets/img/themes/Ease-cut.jpg'
|
|
|
|
}]
|
2021-10-12 12:18:55 +03:00
|
|
|
|
|
|
|
@action
|
|
|
|
toggleAdvanced() {
|
|
|
|
this.showAdvanced = !this.showAdvanced;
|
|
|
|
}
|
2021-10-11 19:14:18 +03:00
|
|
|
}
|