Update public/apiCall.js
Browse files- 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 |
-
|
18 |
-
|
19 |
-
|
20 |
|
21 |
-
this.running_API_btn = createButton('<i class="fa-solid fa-spinner"></i>')
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
|
26 |
this.show_diffused = false;
|
27 |
-
this.showHide_diff_btn = createButton('<i class="fa-solid fa-eye-slash"></i>')
|
28 |
-
|
29 |
-
|
30 |
-
|
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);
|