This commit is contained in:
a-ill 2023-07-20 00:23:40 +03:00
parent a8008dee88
commit 7a2df1080a
3 changed files with 23 additions and 26 deletions

View File

@ -212,6 +212,7 @@ function political_compass()
end end
function groups_add_post() function groups_add_post()
@info rawpayload()
data = collect(JSON3.read(rawpayload())) data = collect(JSON3.read(rawpayload()))
push!(data,1) push!(data,1)
dict = Dict(zip(["country","state","town","latitude","longitude","contact","members"],data)) dict = Dict(zip(["country","state","town","latitude","longitude","contact","members"],data))

View File

@ -92,7 +92,6 @@
if (addressVec!=undefined) { if (addressVec!=undefined) {
let data = [...addressVec,userPinLat,userPinLng,contactInput.value] let data = [...addressVec,userPinLat,userPinLng,contactInput.value]
let url = "/" + locale + "/groups-add-post/" let url = "/" + locale + "/groups-add-post/"
console.log(data)
sendData(url,data) sendData(url,data)
} }

View File

@ -1,6 +1,6 @@
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document); (function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, s as safe_not_equal, d as dispatch_dev, v as validate_slots, c as validate_store, e as component_subscribe, o as onMount, g as globals, f as empty, n as noop, h as detach_dev, C as binding_callbacks, k as element, l as space, m as add_location, p as attr_dev, q as src_url_equal, r as set_custom_element_data, u as append_dev, y as listen_dev } from './index-d19aafba.js'; import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, s as safe_not_equal, d as dispatch_dev, v as validate_slots, c as validate_store, e as component_subscribe, o as onMount, f as empty, n as noop, h as detach_dev, C as binding_callbacks, k as element, l as space, m as add_location, p as attr_dev, q as src_url_equal, r as set_custom_element_data, u as append_dev, y as listen_dev } from './index-d19aafba.js';
import { w as writable } from './index-4664ced0.js'; import { w as writable } from './index-4664ced0.js';
import { groupsByCountry, addMarkersGroups } from '../../../../../../../../../js/groups.js'; import { groupsByCountry, addMarkersGroups } from '../../../../../../../../../js/groups.js';
import { loadLocaleContent, getData, sendData } from '../../../../../../../../../js/libraries/serverTools.js'; import { loadLocaleContent, getData, sendData } from '../../../../../../../../../js/libraries/serverTools.js';
@ -8,11 +8,9 @@ import '../../../../../../../../../js/components/map-component.js';
/* src\groups-add-component.svelte generated by Svelte v3.52.0 */ /* src\groups-add-component.svelte generated by Svelte v3.52.0 */
const { console: console_1 } = globals;
const file = "src\\groups-add-component.svelte"; const file = "src\\groups-add-component.svelte";
// (108:4) {#if $loaded==2} // (107:4) {#if $loaded==2}
function create_if_block(ctx) { function create_if_block(ctx) {
let div1; let div1;
let div0; let div0;
@ -79,38 +77,38 @@ function create_if_block(ctx) {
button.textContent = "Submit"; button.textContent = "Submit";
t16 = space(); t16 = space();
map_component = element("map-component"); map_component = element("map-component");
add_location(h1, file, 111, 16, 3533); add_location(h1, file, 110, 16, 3502);
attr_dev(img, "id", "groups-img"); attr_dev(img, "id", "groups-img");
if (!src_url_equal(img.src, img_src_value = "/img/common/groups.svg")) attr_dev(img, "src", img_src_value); if (!src_url_equal(img.src, img_src_value = "/img/common/groups.svg")) attr_dev(img, "src", img_src_value);
attr_dev(img, "alt", "groups"); attr_dev(img, "alt", "groups");
add_location(img, file, 112, 16, 3571); add_location(img, file, 111, 16, 3540);
attr_dev(p, "class", "description"); attr_dev(p, "class", "description");
add_location(p, file, 113, 16, 3652); add_location(p, file, 112, 16, 3621);
add_location(li0, file, 115, 20, 3790); add_location(li0, file, 114, 20, 3759);
add_location(li1, file, 116, 20, 3871); add_location(li1, file, 115, 20, 3840);
add_location(li2, file, 117, 20, 3979); add_location(li2, file, 116, 20, 3948);
add_location(ol, file, 114, 16, 3764); add_location(ol, file, 113, 16, 3733);
attr_dev(label0, "for", "address-input"); attr_dev(label0, "for", "address-input");
add_location(label0, file, 119, 16, 4070); add_location(label0, file, 118, 16, 4039);
attr_dev(input0, "id", "address-input"); attr_dev(input0, "id", "address-input");
attr_dev(input0, "type", "text"); attr_dev(input0, "type", "text");
input0.readOnly = true; input0.readOnly = true;
add_location(input0, file, 119, 61, 4115); add_location(input0, file, 118, 61, 4084);
add_location(br, file, 119, 133, 4187); add_location(br, file, 118, 133, 4156);
attr_dev(label1, "for", "contact-input"); attr_dev(label1, "for", "contact-input");
add_location(label1, file, 120, 16, 4209); add_location(label1, file, 119, 16, 4178);
attr_dev(input1, "id", "contact-input"); attr_dev(input1, "id", "contact-input");
attr_dev(input1, "type", "text"); attr_dev(input1, "type", "text");
add_location(input1, file, 120, 60, 4253); add_location(input1, file, 119, 60, 4222);
attr_dev(button, "id", "submit-button"); attr_dev(button, "id", "submit-button");
add_location(button, file, 121, 16, 4334); add_location(button, file, 120, 16, 4303);
set_custom_element_data(map_component, "id", "map"); set_custom_element_data(map_component, "id", "map");
set_custom_element_data(map_component, "callback", map_component_callback_value = /*func*/ ctx[10]); set_custom_element_data(map_component, "callback", map_component_callback_value = /*func*/ ctx[10]);
add_location(map_component, file, 122, 16, 4420); add_location(map_component, file, 121, 16, 4389);
attr_dev(div0, "id", "text-container"); attr_dev(div0, "id", "text-container");
add_location(div0, file, 110, 12, 3490); add_location(div0, file, 109, 12, 3459);
attr_dev(div1, "id", "container"); attr_dev(div1, "id", "container");
add_location(div1, file, 108, 8, 3387); add_location(div1, file, 107, 8, 3356);
}, },
m: function mount(target, anchor) { m: function mount(target, anchor) {
insert_dev(target, div1, anchor); insert_dev(target, div1, anchor);
@ -164,14 +162,14 @@ function create_if_block(ctx) {
block, block,
id: create_if_block.name, id: create_if_block.name,
type: "if", type: "if",
source: "(108:4) {#if $loaded==2}", source: "(107:4) {#if $loaded==2}",
ctx ctx
}); });
return block; return block;
} }
// (107:0) {#key $loaded} // (106:0) {#key $loaded}
function create_key_block(ctx) { function create_key_block(ctx) {
let if_block_anchor; let if_block_anchor;
let if_block = /*$loaded*/ ctx[2] == 2 && create_if_block(ctx); let if_block = /*$loaded*/ ctx[2] == 2 && create_if_block(ctx);
@ -209,7 +207,7 @@ function create_key_block(ctx) {
block, block,
id: create_key_block.name, id: create_key_block.name,
type: "key", type: "key",
source: "(107:0) {#key $loaded}", source: "(106:0) {#key $loaded}",
ctx ctx
}); });
@ -356,7 +354,6 @@ function instance($$self, $$props, $$invalidate) {
if (addressVec != undefined) { if (addressVec != undefined) {
let data = [...addressVec, userPinLat, userPinLng, contactInput.value]; let data = [...addressVec, userPinLat, userPinLng, contactInput.value];
let url = "/" + locale + "/groups-add-post/"; let url = "/" + locale + "/groups-add-post/";
console.log(data);
sendData(url, data); sendData(url, data);
} }
} }
@ -368,7 +365,7 @@ function instance($$self, $$props, $$invalidate) {
const writable_props = []; const writable_props = [];
Object.keys($$props).forEach(key => { Object.keys($$props).forEach(key => {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1.warn(`<groups-add-component> was created with unknown prop '${key}'`); if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<groups-add-component> was created with unknown prop '${key}'`);
}); });
function input0_binding($$value) { function input0_binding($$value) {