2023-07-06 11:49:55 -04:00
|
|
|
import Guide from '../../components/guide/guide';
|
2019-11-06 13:43:39 +03:00
|
|
|
|
2020-08-04 08:55:54 +01:00
|
|
|
export default function (view, params, tabContent) {
|
|
|
|
let guideInstance;
|
|
|
|
const self = this;
|
2019-11-06 13:43:39 +03:00
|
|
|
|
2020-08-04 08:55:54 +01:00
|
|
|
self.renderTab = function () {
|
|
|
|
if (!guideInstance) {
|
2023-07-06 11:49:55 -04:00
|
|
|
guideInstance = new Guide({
|
2020-08-04 08:55:54 +01:00
|
|
|
element: tabContent,
|
|
|
|
serverId: ApiClient.serverId()
|
|
|
|
});
|
|
|
|
}
|
|
|
|
};
|
2019-11-06 13:43:39 +03:00
|
|
|
|
2020-08-04 08:55:54 +01:00
|
|
|
self.onShow = function () {
|
|
|
|
if (guideInstance) {
|
|
|
|
guideInstance.resume();
|
|
|
|
}
|
|
|
|
};
|
2019-11-06 13:43:39 +03:00
|
|
|
|
2020-08-04 08:55:54 +01:00
|
|
|
self.onHide = function () {
|
|
|
|
if (guideInstance) {
|
|
|
|
guideInstance.pause();
|
|
|
|
}
|
2019-11-06 13:43:39 +03:00
|
|
|
};
|
2020-08-04 09:03:02 +01:00
|
|
|
}
|