Update js/rus/rus.js
Browse files- js/rus/rus.js +51 -26
js/rus/rus.js
CHANGED
@@ -867,6 +867,7 @@ editor.Blocks.add('menu-settings-block-block', {
|
|
867 |
|
868 |
|
869 |
|
|
|
870 |
// Доступ МЕНЮ
|
871 |
editor.Components.addType('menu-look-settings-block', {
|
872 |
model: {
|
@@ -883,32 +884,44 @@ editor.Components.addType('menu-look-settings-block', {
|
|
883 |
window.not_o_url = props.not_o_url;
|
884 |
window.home_url = props.home_url;
|
885 |
window.list_url = props.list_url;
|
886 |
-
const initBlock = () => {
|
887 |
-
// console.log('Menu settings block initialized with props:', { w_url, k_sys, vk_group, not_g_url, not_o_url, home_url, list_url });
|
888 |
-
};
|
889 |
-
const loadScript = (src, callback) => {
|
890 |
-
const script = document.createElement('script');
|
891 |
-
script.src = src;
|
892 |
-
script.onload = callback;
|
893 |
-
document.body.appendChild(script);
|
894 |
-
};
|
895 |
-
// Загружаем необходимые скрипты динамически
|
896 |
-
if (typeof vkBridge === 'undefined') {
|
897 |
-
loadScript('https://unpkg.com/@vkontakte/vk-bridge/dist/browser.min.js', () => {
|
898 |
-
console.log('VK Bridge loaded!');
|
899 |
-
initBlock();
|
900 |
-
});
|
901 |
-
} else {
|
902 |
-
initBlock();
|
903 |
-
}
|
904 |
|
905 |
-
|
906 |
-
|
907 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
908 |
});
|
909 |
-
}
|
910 |
-
loadScript('https://huggingface.co/spaces/DMTuit/psy_vk/resolve/main/js/menu_look_v1.js', () => {
|
911 |
-
console.log('Custom script loaded!');
|
912 |
});
|
913 |
},
|
914 |
// Свойства, которые будут передаваться в скрипт
|
@@ -967,13 +980,14 @@ editor.Components.addType('menu-look-settings-block', {
|
|
967 |
}
|
968 |
}
|
969 |
});
|
|
|
970 |
editor.Blocks.add('menu-look-settings-block-block', {
|
971 |
-
|
972 |
<div style="display: flex; flex-direction: column; align-items: center;">
|
973 |
<!-- icon666.com - MILLIONS vector ICONS FREE --><svg enable-background="new 0 0 152 152" xmlns="http://www.w3.org/2000/svg" width="36" height="36"><g id="Layer_2" data-name="Layer 2"><path d="m28 3h-16a3 3 0 0 0 0 6h16a3 3 0 0 0 0-6zm0 4h-16a1 1 0 0 1 0-2h16a1 1 0 0 1 0 2z" fill="#000000" style="fill: rgb(250, 250, 250);"></path><path d="m4 3a3 3 0 1 0 3 3 3 3 0 0 0 -3-3zm0 4a1 1 0 1 1 1-1 1 1 0 0 1 -1 1z" fill="#000000" style="fill: rgb(250, 250, 250);"></path><path d="m28 13h-16a3 3 0 0 0 0 6h16a3 3 0 0 0 0-6zm0 4h-16a1 1 0 0 1 0-2h16a1 1 0 0 1 0 2z" fill="#000000" style="fill: rgb(250, 250, 250);"></path><path d="m4 13a3 3 0 1 0 3 3 3 3 0 0 0 -3-3zm0 4a1 1 0 1 1 1-1 1 1 0 0 1 -1 1z" fill="#000000" style="fill: rgb(250, 250, 250);"></path><path d="m28 23h-16a3 3 0 0 0 0 6h16a3 3 0 0 0 0-6zm0 4h-16a1 1 0 0 1 0-2h16a1 1 0 0 1 0 2z" fill="#000000" style="fill: rgb(250, 250, 250);"></path><path d="m4 23a3 3 0 1 0 3 3 3 3 0 0 0 -3-3zm0 4a1 1 0 1 1 1-1 1 1 0 0 1 -1 1z" fill="#000000" style="fill: rgb(250, 250, 250);"></path></g></svg>
|
974 |
<span style="margin-top: 8px;">menu-look-set</span>
|
975 |
</div>`,
|
976 |
-
|
977 |
category: 'ВК - Доступы', // Добавляем категорию "Автопилот - ВК"
|
978 |
});
|
979 |
|
@@ -985,6 +999,17 @@ editor.Blocks.add('menu-look-settings-block-block', {
|
|
985 |
|
986 |
|
987 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
988 |
|
989 |
|
990 |
|
|
|
867 |
|
868 |
|
869 |
|
870 |
+
// Доступ МЕНЮ
|
871 |
// Доступ МЕНЮ
|
872 |
editor.Components.addType('menu-look-settings-block', {
|
873 |
model: {
|
|
|
884 |
window.not_o_url = props.not_o_url;
|
885 |
window.home_url = props.home_url;
|
886 |
window.list_url = props.list_url;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
887 |
|
888 |
+
document.addEventListener('DOMContentLoaded', function() {
|
889 |
+
const initBlock = () => {
|
890 |
+
const element = document.getElementById('menu_look_vk');
|
891 |
+
if (element) {
|
892 |
+
// Ваш код инициализации здесь
|
893 |
+
console.log('Menu settings block initialized with props:', { w_url, k_sys, vk_group, not_g_url, not_o_url, home_url, list_url });
|
894 |
+
} else {
|
895 |
+
console.error('Element with ID "menu_look_vk" not found');
|
896 |
+
}
|
897 |
+
};
|
898 |
+
|
899 |
+
const loadScript = (src, callback) => {
|
900 |
+
const script = document.createElement('script');
|
901 |
+
script.src = src;
|
902 |
+
script.onload = callback;
|
903 |
+
document.body.appendChild(script);
|
904 |
+
};
|
905 |
+
|
906 |
+
// Загружаем необходимые скрипты динамически
|
907 |
+
if (typeof vkBridge === 'undefined') {
|
908 |
+
loadScript('https://unpkg.com/@vkontakte/vk-bridge/dist/browser.min.js', () => {
|
909 |
+
console.log('VK Bridge loaded!');
|
910 |
+
initBlock();
|
911 |
+
});
|
912 |
+
} else {
|
913 |
+
initBlock();
|
914 |
+
}
|
915 |
+
|
916 |
+
if (typeof $ === 'undefined') {
|
917 |
+
loadScript('https://code.jquery.com/jquery-3.6.0.min.js', () => {
|
918 |
+
console.log('jquery loaded!');
|
919 |
+
});
|
920 |
+
}
|
921 |
+
|
922 |
+
loadScript('https://huggingface.co/spaces/DMTuit/psy_vk/resolve/main/js/menu_look_v1.js', () => {
|
923 |
+
console.log('Custom script loaded!');
|
924 |
});
|
|
|
|
|
|
|
925 |
});
|
926 |
},
|
927 |
// Свойства, которые будут передаваться в скрипт
|
|
|
980 |
}
|
981 |
}
|
982 |
});
|
983 |
+
|
984 |
editor.Blocks.add('menu-look-settings-block-block', {
|
985 |
+
label: `
|
986 |
<div style="display: flex; flex-direction: column; align-items: center;">
|
987 |
<!-- icon666.com - MILLIONS vector ICONS FREE --><svg enable-background="new 0 0 152 152" xmlns="http://www.w3.org/2000/svg" width="36" height="36"><g id="Layer_2" data-name="Layer 2"><path d="m28 3h-16a3 3 0 0 0 0 6h16a3 3 0 0 0 0-6zm0 4h-16a1 1 0 0 1 0-2h16a1 1 0 0 1 0 2z" fill="#000000" style="fill: rgb(250, 250, 250);"></path><path d="m4 3a3 3 0 1 0 3 3 3 3 0 0 0 -3-3zm0 4a1 1 0 1 1 1-1 1 1 0 0 1 -1 1z" fill="#000000" style="fill: rgb(250, 250, 250);"></path><path d="m28 13h-16a3 3 0 0 0 0 6h16a3 3 0 0 0 0-6zm0 4h-16a1 1 0 0 1 0-2h16a1 1 0 0 1 0 2z" fill="#000000" style="fill: rgb(250, 250, 250);"></path><path d="m4 13a3 3 0 1 0 3 3 3 3 0 0 0 -3-3zm0 4a1 1 0 1 1 1-1 1 1 0 0 1 -1 1z" fill="#000000" style="fill: rgb(250, 250, 250);"></path><path d="m28 23h-16a3 3 0 0 0 0 6h16a3 3 0 0 0 0-6zm0 4h-16a1 1 0 0 1 0-2h16a1 1 0 0 1 0 2z" fill="#000000" style="fill: rgb(250, 250, 250);"></path><path d="m4 23a3 3 0 1 0 3 3 3 3 0 0 0 -3-3zm0 4a1 1 0 1 1 1-1 1 1 0 0 1 -1 1z" fill="#000000" style="fill: rgb(250, 250, 250);"></path></g></svg>
|
988 |
<span style="margin-top: 8px;">menu-look-set</span>
|
989 |
</div>`,
|
990 |
+
content: { type: 'menu-look-settings-block' },
|
991 |
category: 'ВК - Доступы', // Добавляем категорию "Автопилот - ВК"
|
992 |
});
|
993 |
|
|
|
999 |
|
1000 |
|
1001 |
|
1002 |
+
|
1003 |
+
|
1004 |
+
|
1005 |
+
|
1006 |
+
|
1007 |
+
|
1008 |
+
|
1009 |
+
|
1010 |
+
|
1011 |
+
|
1012 |
+
|
1013 |
|
1014 |
|
1015 |
|