diff --git a/.gitignore b/.gitignore index 743b7fe..bfed244 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ core/admin2.js test getting_started.md demos/socio +demos/full-stack_framework/upload_files/* ### Database ### *.accdb diff --git a/demos/full-stack_framework/src/hooks.server.ts b/demos/full-stack_framework/src/hooks.server.ts index 8f3fa12..b635de9 100644 --- a/demos/full-stack_framework/src/hooks.server.ts +++ b/demos/full-stack_framework/src/hooks.server.ts @@ -32,8 +32,8 @@ try{ socserv.RegisterProp('num', 0); socserv.RegisterLifecycleHookHandler('file_upload', (client: SocioSession, files: SocioFiles) => { - // return SaveFilesToDiskPath(['.', 'upload_files'], files).result; - return 1; + return SaveFilesToDiskPath(['.', 'upload_files'], files).result; + // return 1; }); } catch (e:any) {soft_error(e)} diff --git a/demos/full-stack_framework/src/routes/+page.svelte b/demos/full-stack_framework/src/routes/+page.svelte index a3f40f4..5d7a105 100644 --- a/demos/full-stack_framework/src/routes/+page.svelte +++ b/demos/full-stack_framework/src/routes/+page.svelte @@ -17,7 +17,7 @@ //init SocioClient const sc = new SocioClient("ws://localhost:3000", { - logging:{verbose: false}, + logging:{verbose: true}, name: "Main", // persistent:true }); @@ -25,7 +25,7 @@ //setup toasts sc.lifecycle_hooks.msg = (name:string, client_id:string, kind:string, data:any) => { if(['UPD', 'PROP_UPD'].includes(kind)) - toast('An update came in from the Socio Server.', {style:'background: #0D0D0E; color: #fff;',position: "bottom-center", duration:500}); + toast('An update came in from the Socio Server.', {style:'background: #0D0D0E; color: #fff; padding:4px;',position: "bottom-center", duration:1000}); // else if(kind == 'ERR') // toast.error(`An error arrived for a query or prop. MSG ID:${data.id}`,{position: "bottom-center", duration:500}); } @@ -40,7 +40,7 @@ onMount(async () => { ready = await sc.ready(); - toast.success('Socio Client connected!', {icon:'🥳',position: "bottom-center", duration:1000}); + toast.success('Socio Client connected!', {icon:'🥳', style:'padding:4px;',position: "bottom-center", duration:1500}); sc.Subscribe({sql: socio`SELECT COUNT(*) AS RES FROM users WHERE name = :name;`,params: { name: "John" }}, (res) => { //@ts-ignore @@ -118,6 +118,10 @@
+
+ + +
-
- - -