Advertisement
BLOCKLY18

Store.js

Sep 11th, 2020
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.13 KB | None | 0 0
  1. function download(){
  2. $prompt({
  3. title: "Windows 93 Store",
  4. icon: "/c/sys/skins/w93/store.png",
  5. img: "/c/sys/skins/w93/store.png",
  6. help: "<h4>Windows 93 Store β€” Made by Blockly &#92; FAQ</h4>\n<b>I can't find the app I just installed.</b>\nYou probably didn't enter the name correctly. If you did, it's probably on your desktop.\n\n<b>How do I know what the exe for an app is?</b>\nThere are 2 ways you can find out:\n1. When you click Start then go in the 'Programs' dropdown menu, it shows the names of all exes (The black text is the exe).\n2. Entering 'help' into the terminal will show all exes/commands.\n\n<b>It says 'Having trouble getting apps' when I open the store?</b>\nTry connecting to internet, <s>dumbass</s>.\n\n<i>Any other questions?</i>\n<textarea placeholder='Whatever you type in here wont be sent to anyone therefore no one can answer your question'></textarea>",
  7. btnOk: "Install",
  8. btnCancel: "Leave Store",
  9. msg: "Welcome to the Windows 93 Store. Here, you\ncan install new apps, or reinstall deleted apps.\nClick the ? button for help.\n\nEnter the exe that you want to download."
  10. }, '', function(ok, text){
  11. if (ok) {
  12. var e = $alert.progress("Installing " + text + ".exe...");var num=0;setInterval(function(){e.update(++num);},100);setTimeout(function(){$store.set('desktop/New app.lnk42', '{"exe":"' + text + '"}'); $alert({title: "Installation Complete", icon: "/c/sys/skins/w93/store.png", img: "/c/sys/skins/w93/apps/lab.gif", msg: text + ".exe has been installed.\n<b>It should now appear on your desktop.</b>", sound: "alert", btnOk: "Thanks !"});$explorer.refresh();$notif('Installation Complete','<img src="/c/sys/skins/w93/install.png" width="30"> New app.lnk42 has been installed')}, 12250);
  13. }
  14. });
  15. };
  16. function create(){
  17. $prompt({
  18. icon: "/c/sys/skins/w93/store.png",
  19. img: "/c/sys/skins/w93/store.png",
  20. title: "Create App",
  21. btnOk: "Next",
  22. msg: "App exe name:"
  23. }, function(ok, text){
  24. if (ok){
  25. var exe = text;
  26. $prompt({
  27. title: "Create App",
  28. btnOk: "Next",
  29. img: "/c/sys/skins/w93/store.png",
  30. icon: "/c/sys/skins/w93/store.png",
  31. msg: "App Icon:",
  32. prompt: "/c/"
  33. }, function(ok, text){
  34. if (ok){
  35. var icon = text;
  36. $prompt({
  37. icon: "/c/sys/skins/w93/store.png",
  38. img: "/c/sys/skins/w93/store.png",
  39. title: "Create App",
  40. btnOk: "Next",
  41. msg: "App title:"
  42. }, function(ok, text){
  43. if (ok){
  44. var title = text;
  45. $prompt({
  46. img: "/c/sys/skins/w93/store.png",
  47. icon: "/c/sys/skins/w93/store.png",
  48. title: "Create App",
  49. btnOk: "Next",
  50. msg: "Paste app Javascript here (do not include 'function(){' at the beginning, that's automatically included):"
  51. }, function(ok, text){
  52. if (ok){
  53. var exec = "function(){" + text + "}";
  54. $confirm({
  55. msg: "App info:\n\nEXE: " + exe + "\nTitle: " + title + "\nicon: " + icon + "\nJavascript: Click on the ? button on the top of the window to view js",
  56. help:exec
  57. }, function(ok){
  58. if (ok){
  59. $file.save('/a/boot/_' + exe + '.js','le._apps.' + exe + ' = {\n name: "' + title + '",\n icon: "' + icon + '",\n exec: ' + exec + '\n};');
  60. setTimeout(function(){
  61. $exe('/a/boot/_' + exe + '.js');
  62. $alert.info('App successfully created.');
  63. }, 700);
  64. }
  65. });
  66. }
  67. })
  68. }
  69. });
  70. };
  71. });
  72. };
  73. });
  74. };
  75. //
  76. $confirm({
  77. title: "Windows 93 Store",
  78. icon: "/c/sys/skins/w93/store.png",
  79. img: "/c/sys/skins/w93/store.png",
  80. btnOk: "Create App",
  81. btnCancel: "Add App",
  82. msg: "Welcome to the Windows 93 Store. What would you like to do?"
  83. }, function(ok){
  84. if (ok){
  85. create();
  86. } else {
  87. download();
  88. };
  89. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement