fffiloni commited on
Commit
82da9f8
·
1 Parent(s): cecf018

Update public/apiCall.js

Browse files
Files changed (1) hide show
  1. public/apiCall.js +15 -14
public/apiCall.js CHANGED
@@ -3,6 +3,7 @@ class GRAPI {
3
  constructor(URI, token){
4
  this.URI_endpoint = URI;
5
  this.token = token;
 
6
  this.prompt_value = '';
7
  this.prompt_input = select('#prompt-inp')
8
  .attribute('placeholder', 'PROMPT')
@@ -13,24 +14,24 @@ class GRAPI {
13
  .attribute('placeholder', 'NEGATIVE PROMPT')
14
  .input(this.set_neg_prompt_value.bind(this));
15
 
16
- this.call_API_btn = createButton('<i class="fa-solid fa-wand-magic-sparkles"></i>');
17
- this.call_API_btn.mousePressed(this.call_API.bind(this));
18
- this.call_API_btn.id('api-btn');
19
- this.call_API_btn.parent('#inner-right')
20
 
21
- this.running_API_btn = createButton('<i class="fa-solid fa-spinner"></i>');
22
- this.running_API_btn.id('running-api-btn');
23
- this.running_API_btn.parent('#inner-right');
24
- this.running_API_btn.addClass('hide');
25
 
26
  this.show_diffused = false;
27
- this.showHide_diff_btn = createButton('<i class="fa-solid fa-eye-slash"></i>');
28
- this.showHide_diff_btn.mousePressed(this.showHide_diff.bind(this));
29
- this.showHide_diff_btn.id('show-hide-diff-btn');
30
- this.showHide_diff_btn.parent('#inner-left');
31
 
32
- this.API_log_txt = createDiv('logs')
33
- this.API_log_txt.id('api-logs')
34
 
35
  this.hiddenScribbleGraphics = createGraphics(width, height);
36
  this.diffusedGraphics = createGraphics(width, height);
 
3
  constructor(URI, token){
4
  this.URI_endpoint = URI;
5
  this.token = token;
6
+
7
  this.prompt_value = '';
8
  this.prompt_input = select('#prompt-inp')
9
  .attribute('placeholder', 'PROMPT')
 
14
  .attribute('placeholder', 'NEGATIVE PROMPT')
15
  .input(this.set_neg_prompt_value.bind(this));
16
 
17
+ this.call_API_btn = createButton('<i class="fa-solid fa-wand-magic-sparkles"></i>')
18
+ .mousePressed(this.call_API.bind(this))
19
+ .id('api-btn')
20
+ .parent('#inner-right');
21
 
22
+ this.running_API_btn = createButton('<i class="fa-solid fa-spinner"></i>')
23
+ .id('running-api-btn')
24
+ .parent('#inner-right')
25
+ .addClass('hide');
26
 
27
  this.show_diffused = false;
28
+ this.showHide_diff_btn = createButton('<i class="fa-solid fa-eye-slash"></i>')
29
+ .mousePressed(this.showHide_diff.bind(this))
30
+ .id('show-hide-diff-btn')
31
+ .parent('#inner-left');
32
 
33
+ //this.API_log_txt = createDiv('logs')
34
+ //this.API_log_txt.id('api-logs')
35
 
36
  this.hiddenScribbleGraphics = createGraphics(width, height);
37
  this.diffusedGraphics = createGraphics(width, height);