Jump to content
uniGUI Discussion Forums


uniGUI Subscriber
  • Content Count

  • Joined

  • Last visited

  • Days Won


CastleSoft last won the day on May 26

CastleSoft had the most liked content!

Community Reputation

40 Excellent

About CastleSoft

  • Rank
    Active Member

Profile Information

  • Gender

Recent Profile Visitors

426 profile views
  1. https://community.idera.com/developer-tools/b/blog/posts/announcing-fmx-linux-bundling-with-delphi-and-rad-studio Starting today, Delphi and RAD Studio customers, with active subscription to the Enterprise or Architect editions can download, install, and start using FmxLinux for building FireMonkey applications targeting the Linux 64-bit platform. uniGUI for Linux now has a possible Standalone GUI option :-)
  2. CastleSoft

    reCAPTCHA V3 support ?

    Would it be possible to add support for V3 (or make an additional) reCaptcha control ? V3 doesn't require the 'checkbox - I'm not a robot' question. It just displays a 'hovering' logo right bottom side of the page. No user interaction is required with v3, which is nice. The sample howto for php is below: The basic JS code <script src="https://www.google.com/recaptcha/api.js?render=your reCAPTCHA site key here"></script> <script> grecaptcha.ready(function() { // do request for recaptcha token // response is promise with passed token grecaptcha.execute('your reCAPTCHA site key here', {action:'validate_captcha'}) .then(function(token) { // add token value to form document.getElementById('g-recaptcha-response').value = token; }); }); </script> The basic HTML code <form id="form_id" method="post" action="your_action.php"> <input type="hidden" id="g-recaptcha-response" name="g-recaptcha-response"> <input type="hidden" name="action" value="validate_captcha"> .... your fields </form> The basic PHP code if(isset($_POST['g-recaptcha-response'])){ $captcha=$_POST['g-recaptcha-response']; } else $captcha = false; if(!$captcha){ //Do something with error } else{ $secret = 'Your secret key here'; $response=file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret= .$secret.&response=".$captcha."&remoteip=".$_SERVER['REMOTE_ADDR']); if($response.success==false) { //Do something with error } } ... The Captcha is valid you can continue with the rest of your code
  3. A repeater panel like on ASP.NET would be nice. Basically create the layout you want in a row, the row repeats. Image, HTML, Text, etc A flexible grid style..
  4. CastleSoft


    Code is now available via Github: https://github.com/CastleSoft/uiXtra Contains the latest source code (v1.07 - RIO release, uniGUI 1.5 (latest release) - Forum patches/updates in this thread ** Thank you all ** ) MIT lic.. Feel free to FORK / hack / etc. Sorry. I don't have much time these days to monitor the forums. Enjoy.. PS.. v1.06 is the original release for pre RIO / pre 1.5 / pre patches - if anyone needs it.
  5. I have a custom control based on TUniCustomHTMLFrame which works with a <canvas> element. I have a Javascript function called resizeCanv() which is as follows: function resizeCanv(){ var canvas = $( "canvas#'+JSName+'" )[0]; canvas.width = canvas.parentElement.clientWidth; canvas.height = canvas.parentElement.clientHeight; } In my TUniFAKECanvas controls .create the HTML.Text is set to <canvas id="'+JSName+'"></canvas> and the resizeCanv() is called. It all works great. I then added the Align to allow me to use 'client' for sizing. When the form is resized, the HTMLFrame resizes ok, but I need to call my resizeCanv() javascript function. Inside the custom control, what should I hook / trap and whats the recommended way inside a custom control to trap a forms align=client so the child controls can be resized/moved etc ? Thanks
  6. CastleSoft

    Multiple Mobile Layouts

    Thanks.. Looks good. I'll give it a try.
  7. CastleSoft

    Multiple Mobile Layouts

    Any plans for reactive or multi-layout mobile support in the gui ?
  8. CastleSoft


    A few minor tweaks and another another freebie. iTyped - https://github.com/luisvinicius167/ityped Simply add the uniTyped control (resize to your size). var s: TStrings; begin s := TStringList.Create; s.Add('Welcome to the jungle'); s.Add('Restarting soo...'); UniTyped1.text := s; UniTyped1.PlayTyped; s.Free; end; or Just set the properties in the control and do a UniTyped.PlayTyped. Source code and Example below (includes the sweetalert/jquerytoast/iTyped). https://goo.gl/bnU2Ab
  9. CastleSoft


    A few more fixes. - Z-Index for jToast fixed - buttonsStyling (typo / spelling incorrect in SweetAlert2) New css file added to jToast. (re-grab the files/jtoast and files/sweetalert folders in any code you use for the updated). Added 'custom' to jToast.. when 'Pos: custom' the Left and Top are used for positioning. *** If you are using an older version you may need to ignore the buttonStyling missing error and toggle the 'buttonsStyling' and save to fix. *** If you have Z-Index issues.. Clear your browser cache and try again. Enjoy. uniExtensions-V5.zip
  10. CastleSoft


    Updated SweetAlert2 control (REST) removed, fix Z-Order issue when the alert appears behind the form. Added TEST / DEMO Added a new control wrapper for jToast https://github.com/kamranahmedse/jquery-toast-plugin (uniJToast currently has properties, a simple ShowMessage and events for Before/After Show/Hide.) Enjoy. uniExtensions.zip
  11. CastleSoft


    To fix the Floating behind the Login form you could add the following to the ServerModule.CustomCSS .swal2-container { z-index:20000; } OR.. The next post has an updated version (new files/sweetalert with the extra css). + a new jQuery Toast control + DEMO / Test (c:\tmp was the original folder containing the files).
  12. CastleSoft


    Add RTTI To the uses clause.. Will fix the problem..
  13. CastleSoft


    Add RTTI To the uses clause.. Will fix the problem..
  14. CastleSoft


    RESTComponents can be removed. Originally I planned on using the TJSon.OjectToJson method.. But removed the code and went simple strings instead. So it shouldn't be needed.
  15. CastleSoft


    Attached is a simple wrapper for the SweetAlert2 library. (QUICK HACK.. No unit testing, no tidy up etc..) ** No warranty - Use at your own risk ** FREE for commercial use, etc.. (just don't remove the copyright header). 1) Compile the Package/Install 2) Make sure your path includes the control folder 3) Copy the files/sweetalert folder into your project 4) Drag/Drop the uniSweetAlert control onto your form. Simple usage like: procedure TMainForm.UniButton1Click(Sender: TObject); begin UniSweetAlert1.ShowMessage; // or like UniSweetAlert1.Error('Oops','Something went wrong'); // or like UniSweetAlert1.Error('Oops','Error again','FixMe',3000); // or like UniSweetAlert1.Question('Is this true','Please click one of the options below:','YES','NO',3000); // or like UniSweetAlert1.title := 'Hello'; UniSweetAlert1.text := 'Testing'; UniSweetAlert1.alertType := TAlertType.success; UniSweetAlert1.ShowMessage; end; // Events for Confirm or Cancel/Dismiss procedure TMainForm.UniSweetAlert1Dismiss(Sender: TObject); begin UniButton1.Caption := 'DIS'; uniMemo1.Lines.Add('Dis'); end; procedure TMainForm.UniSweetAlert1Success(Sender: TObject); begin UniButton1.Caption := 'CLICKED'; uniMemo1.Lines.Add('Clicked'); end; Either (1) set properties and call .ShowMessage; Or call the Error, Info, etc methods. Enjoy.. Regards Andrew 2017-07-29-uniSweetAlert V3.zip