Skip to content

Commit 9470d0c

Browse files
committed
ReadMe update and graphical fixes
1 parent ab2a7ed commit 9470d0c

File tree

6 files changed

+30
-11
lines changed

6 files changed

+30
-11
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ FreeGPT4-WEB-API is a python server that allows you to have a self-hosted GPT-4
2121
## GUI Preview:
2222

2323
<!-- round angles images -->
24-
<img src="./img/login.png" width="408" height="290" style="border-radius: 0.4rem;" />
25-
<img src="./img/settings.png" width="408" height="290" style="border-radius: 0.4rem;" />
24+
<img src="./img/login.png" style="width:100%; max-width:500px; min-width:200px; aspect-ratio: 4/3" />
25+
<img src="./img/settings.png" style="width:100%; max-width:500px; min-width:200px; aspect-ratio: 4/3" />
2626

2727
## Installation
2828
1. Clone the repository: `git clone https://github.com/aledipa/Free-GPT4-WEB-API.git`

img/login.png

458 KB
Loading

img/settings.png

837 KB
Loading

src/static/js/script.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@ function hideElement(idToHide) {
3636
element.hidden = true;
3737
}
3838

39+
// Hides a composed warning
40+
function hideWarning(idToHide) {
41+
document.getElementById(idToHide).classList.add("hidden");
42+
}
43+
44+
// Shows a composed warning
45+
function showWarning(idToShow) {
46+
document.getElementById(idToShow).classList.remove("hidden");
47+
}
48+
3949
// Copies the text in the given id to the clipboard
4050
function copyTextToClipboardFromName(name) {
4151
var copyText = document.getElementsByName(name)[0].value;

src/templates/login.html

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,19 @@
1414
</head>
1515
<body>
1616
{% block content %}
17-
<div class="m-7">
18-
<h1 class="title font-bold inter darkblue text-4xl">Free GPT 4</h1>
19-
<h2 class="title blue text-2xl">Login page</h2>
20-
</div>
17+
<!-- Logo on the left and title on the right -->
18+
<table class="w-50 m-7">
19+
<tr>
20+
<td class="m-7">
21+
<img src="{{ url_for('static', filename='img/favicon(Nicoladipa).png') }}" width="96" class="inline-block" alt="Logo">
22+
</td>
23+
<td class="m-7">
24+
<h1 class="title font-bold inter darkblue text-4xl">FreeGPT4</h1>
25+
<h2 class="title blue
26+
text-2xl">Server settings</h2>
27+
</td>
28+
</tr>
29+
</table>
2130

2231
<div class="flex justify-center w-screen h-96">
2332
<div class="flex items-center">

src/templates/settings.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,24 +93,24 @@ <h1 class="title font-bold inter darkblue text-4xl">FreeGPT4</h1>
9393
{% if data['token']|length > 0 %}
9494
<span id="warning_1" class="text-sm blue inline-block">
9595
{% else %}
96-
<span id="warning_1" class="text-sm blue inline-block hidden" hidden>
96+
<span id="warning_1" class="text-sm blue inline-block hidden">
9797
{% endif %}
9898
<b>Your Token: </b> <i id="token_text" onclick="copyTextToClipboardFromName('token');">{{ data['token'] }}</i>
9999
<img id="copy_icon" src="{{ url_for('static', filename='img/copy(Gregor_Cresnar).png') }}" width="16" class="inline-block" alt="Copy" onclick="copy('token', this.id, 'Copied!');"/>
100100
</span>
101101
</td>
102102
<td class="py-1 fond-bold inter darkblue text-lg">
103103
{% if data['token'] %}
104-
<input type="radio" id="off_rad_3" name="private_mode" value="false" hidden oninput="turnOff('on_3', 'off_3', 'set_3'); hideElement('warning_1'); showElement('warning_0');">
104+
<input type="radio" id="off_rad_3" name="private_mode" value="false" hidden oninput="turnOff('on_3', 'off_3', 'set_3'); hideWarning('warning_1'); showElement('warning_0');">
105105
<label for="off_rad_3" id="off_3" class="label_gray"><b>OFF</b></label>
106106
<p class="inline-block mx-1"> - </p>
107-
<input type="radio" id="on_rad_3" name="private_mode" value="true" hidden oninput="turnOn('on_3', 'off_3', 'set_3'); showElement('warning_1'); hideElement('warning_0'); createToken('token_text')" checked>
107+
<input type="radio" id="on_rad_3" name="private_mode" value="true" hidden oninput="turnOn('on_3', 'off_3', 'set_3'); showWarning('warning_1'); hideElement('warning_0'); createToken('token_text')" checked>
108108
<label for="on_rad_3" id="on_3" class="label_green"><b>ON</b></label>
109109
{% else %}
110-
<input type="radio" id="off_rad_3" name="private_mode" value="false" hidden oninput="turnOff('on_3', 'off_3', 'set_3'); hideElement('warning_1'); showElement('warning_0');" checked>
110+
<input type="radio" id="off_rad_3" name="private_mode" value="false" hidden oninput="turnOff('on_3', 'off_3', 'set_3'); hideWarning('warning_1'); showElement('warning_0');" checked>
111111
<label for="off_rad_3" id="off_3" class="label_red"><b>OFF</b></label>
112112
<p class="inline-block mx-1"> - </p>
113-
<input type="radio" id="on_rad_3" name="private_mode" value="true" hidden oninput="turnOn('on_3', 'off_3', 'set_3'); showElement('warning_1'); hideElement('warning_0'); createToken('token_text')">
113+
<input type="radio" id="on_rad_3" name="private_mode" value="true" hidden oninput="turnOn('on_3', 'off_3', 'set_3'); showWarning('warning_1'); hideElement('warning_0'); createToken('token_text')">
114114
<label for="on_rad_3" id="on_3" class="label_gray"><b>ON</b></label>
115115
{% endif %}
116116
</td>

0 commit comments

Comments
 (0)