kingkont 0.10.6 → 0.10.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/renderer/cloudProjects.js +25 -0
package/package.json
CHANGED
|
@@ -644,6 +644,31 @@
|
|
|
644
644
|
$('newCloudProject')?.addEventListener('click', createNewCloudProject);
|
|
645
645
|
$('openCloudProjects')?.addEventListener('click', openCloudProjectsModal);
|
|
646
646
|
$('saveProjectCloud')?.addEventListener('click', saveCloudProject);
|
|
647
|
+
// ПКМ на «☁ Сохранить на сервер» — расширенное меню: «Сохранить как
|
|
648
|
+
// шаблон» (доступно ВСЕМ типам проектов, включая cloud — реализация
|
|
649
|
+
// в templates.js работает через filmHandle, cloudFs-shim тоже подходит).
|
|
650
|
+
$('saveProjectCloud')?.addEventListener('contextmenu', e => {
|
|
651
|
+
e.preventDefault();
|
|
652
|
+
e.stopPropagation();
|
|
653
|
+
const menu = document.getElementById('nodeMenu');
|
|
654
|
+
if (!menu) return;
|
|
655
|
+
menu.innerHTML = '';
|
|
656
|
+
const add = (label, fn) => {
|
|
657
|
+
const b = document.createElement('button');
|
|
658
|
+
b.textContent = label;
|
|
659
|
+
b.addEventListener('click', () => { menu.classList.add('hidden'); fn(); });
|
|
660
|
+
menu.appendChild(b);
|
|
661
|
+
};
|
|
662
|
+
add('☁ Сохранить на сервер', saveCloudProject);
|
|
663
|
+
add('💾 Сохранить как шаблон…', () => {
|
|
664
|
+
if (typeof saveCurrentProjectAsTemplate === 'function') saveCurrentProjectAsTemplate();
|
|
665
|
+
else alert('saveCurrentProjectAsTemplate недоступен');
|
|
666
|
+
});
|
|
667
|
+
if (typeof positionFloatingMenu === 'function') {
|
|
668
|
+
positionFloatingMenu(menu, e.clientX, e.clientY);
|
|
669
|
+
}
|
|
670
|
+
setTimeout(() => document.addEventListener('mousedown', () => menu.classList.add('hidden'), { once: true }), 0);
|
|
671
|
+
});
|
|
647
672
|
setCloudButtonsVisibility();
|
|
648
673
|
// Переинициализируем видимость кнопок раз в 5 сек — для случая когда юзер
|
|
649
674
|
// login/logout в Chatium через настройки (нет других сигналов).
|