mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 11:54:33 +03:00
ecb42a3680
refs TryGhost/Team#3052 <!-- Leave the line below if you'd like GitHub Copilot to generate a summary from your commit --> <!-- copilot:summary --> ### <samp>🤖 Generated by Copilot at 7173288</samp> This pull request adds new components and settings for the announcement bar feature, which allows the user to customize the content, background, and visibility of a banner that appears on the site.
27 lines
689 B
JavaScript
27 lines
689 B
JavaScript
import Component from '@glimmer/component';
|
|
import {action} from '@ember/object';
|
|
import {inject as service} from '@ember/service';
|
|
|
|
export default class AnnouncementSettingsBackgroundComponent extends Component {
|
|
@service settings;
|
|
|
|
get background() {
|
|
return this.settings.announcementBackground;
|
|
}
|
|
|
|
get options() {
|
|
return [
|
|
{value: 'accent', label: 'Accent'},
|
|
{value: 'dark', label: 'Dark'},
|
|
{value: 'light', label: 'Light'}
|
|
];
|
|
}
|
|
|
|
@action
|
|
setBackground(event) {
|
|
this.settings.announcementBackground = event.target.value;
|
|
this.settings.save();
|
|
this.args.onChange?.();
|
|
}
|
|
}
|