Update js/rus/rus.js
Browse files- js/rus/rus.js +106 -0
js/rus/rus.js
CHANGED
@@ -697,6 +697,112 @@ editor.Blocks.add('avp-look_1-settings-block-block', {
|
|
697 |
|
698 |
|
699 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
700 |
|
701 |
|
702 |
|
|
|
697 |
|
698 |
|
699 |
|
700 |
+
|
701 |
+
|
702 |
+
|
703 |
+
|
704 |
+
|
705 |
+
|
706 |
+
|
707 |
+
|
708 |
+
|
709 |
+
|
710 |
+
|
711 |
+
|
712 |
+
|
713 |
+
// Создаем новый тип компонента для настройки
|
714 |
+
editor.Components.addType('avp-look_vk-settings-block', {
|
715 |
+
model: {
|
716 |
+
defaults: {
|
717 |
+
// HTML-код пустого блока с постоянным идентификатором
|
718 |
+
content: '<div id="set_avp-look_vk"></div>',
|
719 |
+
// Скрипт для обработки блока (если нужно)
|
720 |
+
script: function(props) {
|
721 |
+
window.avp = props.avp;
|
722 |
+
window.grup = props.grup;
|
723 |
+
window.hook = props.hook; // Теперь это будет булево значение (true/false)
|
724 |
+
const initBlock = () => {
|
725 |
+
console.log('Menu settings block initialized with props:', { avp, grup, hook });
|
726 |
+
};
|
727 |
+
const loadScript = (src, callback) => {
|
728 |
+
const script = document.createElement('script');
|
729 |
+
script.src = src;
|
730 |
+
script.onload = callback;
|
731 |
+
document.body.appendChild(script);
|
732 |
+
};
|
733 |
+
// Загружаем необходимые скрипты динамически
|
734 |
+
if (typeof vkBridge === 'undefined') {
|
735 |
+
loadScript('https://unpkg.com/@vkontakte/vk-bridge/dist/browser.min.js', () => {
|
736 |
+
console.log('VK Bridge loaded!');
|
737 |
+
initBlock();
|
738 |
+
});
|
739 |
+
} else {
|
740 |
+
initBlock();
|
741 |
+
}
|
742 |
+
|
743 |
+
if (typeof VK === 'undefined') {
|
744 |
+
loadScript('https://vk.com/js/api/openapi.js?169', () => {
|
745 |
+
console.log('VK Open API loaded!');
|
746 |
+
});
|
747 |
+
}
|
748 |
+
|
749 |
+
loadScript('https://huggingface.co/spaces/DMTuit/psy_vk/resolve/main/js/avp_look_v1.js?', () => {
|
750 |
+
console.log('Custom script loaded!');
|
751 |
+
});
|
752 |
+
},
|
753 |
+
// Свойства, которые будут передаваться в скрипт
|
754 |
+
'script-props': ['avp', 'grup', 'hook'],
|
755 |
+
// Настройки для изменения URL отправки
|
756 |
+
traits: [
|
757 |
+
{
|
758 |
+
type: 'text',
|
759 |
+
name: 'avp',
|
760 |
+
label: 'AVP',
|
761 |
+
changeProp: true
|
762 |
+
},
|
763 |
+
{
|
764 |
+
type: 'text',
|
765 |
+
name: 'grup',
|
766 |
+
label: 'GRUP',
|
767 |
+
changeProp: true
|
768 |
+
},
|
769 |
+
{
|
770 |
+
type: 'checkbox', // Изменено на checkbox
|
771 |
+
name: 'hook',
|
772 |
+
label: 'HOOK',
|
773 |
+
changeProp: true
|
774 |
+
}
|
775 |
+
]
|
776 |
+
}
|
777 |
+
}
|
778 |
+
});
|
779 |
+
editor.Blocks.add('avp-look_vk-settings-block-block', {
|
780 |
+
label: `
|
781 |
+
<!-- icon666.com - MILLIONS vector ICONS FREE --><svg id="Layer_1" enable-background="new 0 0 152 152" viewBox="0 0 152 152" xmlns="http://www.w3.org/2000/svg" width="36" height="36"><path id="Icon" clip-rule="evenodd" d="m74.5 112.8h7.8c1.3-.2 2.6-.8 3.6-1.6.6-1 1.1-2.1 1.1-3.4 0 0-.2-10.4 4.7-12s10.9 10.1 17.4 14.6c4.9 3.4 8.6 2.6 8.6 2.6l17.4-.3s9.1-.5 4.7-7.6c-.3-.6-2.6-5.2-13-14.9-10.9-10.1-9.4-8.4 3.7-26 8-10.6 11.2-17.1 10.2-20s-6.8-1.9-6.8-1.9l-19.5.2c-.8-.2-1.8 0-2.6.5s-1.3 1.3-1.8 2.1c-1.9 5.2-4.4 10.4-7.1 15.3-8.8 14.8-12.2 15.6-13.6 14.6-3.2-2.1-2.4-8.6-2.4-13.2 0-14.3 2.1-20.3-4.2-21.8-2.9-.6-6-1-9.1-1-7 0-12.8 0-16.2 1.6-2.4 1-4 3.4-3 3.4 2.3.2 4.2 1.3 5.8 2.9 1.9 2.8 1.9 8.8 1.9 8.8s1.1 16.9-2.8 19c-2.6 1.5-6.2-1.5-14-14.9-2.6-4.7-5-9.4-7-14.5-.3-.8-1-1.6-1.6-2.1-.3-.2-.6-.5-1-.5-1-.5-2.1-.6-3.2-.6l-17.4.2s-2.8 0-3.7 1.3c-1 1.3 0 3.2 0 3.2s14.6 34.1 31 51.2c15.1 15.9 32.1 14.8 32.1 14.8z" fill-rule="evenodd" fill="#000000" style="fill: rgb(255, 255, 255);"></path></svg>
|
782 |
+
avp_look_vk`,
|
783 |
+
content: { type: 'avp-look_vk-settings-block' },
|
784 |
+
category: 'Автопилот - ВК', // Добавляем категорию "Автопилот - ВК"
|
785 |
+
});
|
786 |
+
|
787 |
+
|
788 |
+
|
789 |
+
|
790 |
+
|
791 |
+
|
792 |
+
|
793 |
+
|
794 |
+
|
795 |
+
|
796 |
+
|
797 |
+
|
798 |
+
|
799 |
+
|
800 |
+
|
801 |
+
|
802 |
+
|
803 |
+
|
804 |
+
|
805 |
+
|
806 |
|
807 |
|
808 |
|