mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 09:52:06 +03:00
c019ef5cb0
refs https://github.com/TryGhost/Team/issues/931 - prototype button has served it's purpose in answering questions and is no longer being used - groundwork is left in place for future component-based atoms
23 lines
573 B
JavaScript
23 lines
573 B
JavaScript
import Service from '@ember/service';
|
|
import {tracked} from '@glimmer/tracking';
|
|
|
|
export default class KoenigUiService extends Service {
|
|
@tracked captionHasFocus = false;
|
|
@tracked inputHasFocus = false;
|
|
@tracked isDragging = false;
|
|
|
|
#focusedCaption = null;
|
|
|
|
captionGainedFocus(caption) {
|
|
this.captionHasFocus = true;
|
|
this.#focusedCaption = caption;
|
|
}
|
|
|
|
captionLostFocus(caption) {
|
|
if (this.#focusedCaption === caption) {
|
|
this.captionHasFocus = false;
|
|
this.#focusedCaption = null;
|
|
}
|
|
}
|
|
}
|