Skip to content

Commit d1dd4dd

Browse files
authored
Extended settings modal, credits modal, new banner, bug fixes
2 parents 3bc5501 + 5891416 commit d1dd4dd

File tree

5 files changed

+59
-11
lines changed

5 files changed

+59
-11
lines changed

README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ Next generation clicking: fixed, upgraded, and cloud hosted ☁️🚀
1313
- Class Make-up Modes
1414
- Many More Features
1515

16-
![Wakatime](https://wakatime.com/badge/user/074621a8-639e-4f3e-b6d9-f23b6bb481a9/project/db7c4936-fbf0-463d-a191-cbc2481a5402.svg)
17-
![Github Issues](https://img.shields.io/github/issues/faisalnjs/virtual-clicker?style=flat&logo=github&label=GitHub%20Issues&color=mediumseagreen)
18-
![License](https://img.shields.io/github/license/faisalnjs/virtual-clicker?label=License)
16+
[![Wakatime](https://wakatime.com/badge/user/074621a8-639e-4f3e-b6d9-f23b6bb481a9/project/db7c4936-fbf0-463d-a191-cbc2481a5402.svg)](https://faisaln.com/portfolio/virtual-clicker)
17+
[![Github Issues](https://img.shields.io/github/issues/faisalnjs/virtual-clicker?style=flat&logo=github&label=GitHub%20Issues&color=mediumseagreen)](https://wakatime.com/@faisalnjs/projects/jsltfbfvue)
18+
[![License](https://img.shields.io/github/license/faisalnjs/virtual-clicker?label=License)](https://github.com/faisalnjs/Virtual-Clicker/blob/main/LICENSE)
1919

2020
## Development
2121

@@ -24,28 +24,31 @@ Next generation clicking: fixed, upgraded, and cloud hosted ☁️🚀
2424

2525
Vite will start a development server at `localhost:5173`
2626

27-
### Credits
28-
29-
- [khui0](https://github.com/khui0) - Commits before 5/21/2024
30-
3127
## Build
3228

3329
`npm run build`
3430

3531
Serve the files that are generated in `/dist`
3632

37-
![Build](https://img.shields.io/github/actions/workflow/status/faisalnjs/virtual-clicker/deploy.yml?logo=github&label=Build&color=mediumseagreen)
33+
[![Build](https://img.shields.io/github/actions/workflow/status/faisalnjs/virtual-clicker/deploy.yml?logo=github&label=Build&color=mediumseagreen)](https://github.com/faisalnjs/Virtual-Clicker/actions/workflows/deploy.yml)
3834

3935
## Beta
4036

41-
A beta version of this project is hosted on [Dango Web Solutions](https://dangoweb.com/?from=virtual-clicker) cloud hosting - free web hosting for Education. The beta version is updated with the latest changes from the [`beta`](https://github.com/faisalnjs/Virtual-Clicker/tree/beta) branch. The beta version is used for testing new features and bug fixes before they are deployed to production. The beta version is not guaranteed to be stable and may contain bugs or unfinished features.
37+
A beta version of this project is hosted on [Dango Web Solutions](https://dangoweb.com/?from=virtual-clicker) cloud hosting. The beta version is updated with the latest changes from the [`beta`](https://github.com/faisalnjs/Virtual-Clicker/tree/beta) branch, and is used for testing new features and bug fixes before they are deployed to production. The beta version is not guaranteed to be stable and may contain bugs or unfinished features.
4238

4339
Files are transferred to the host using the GitHub Action automation workflow at [.github\workflows\deploy-beta.yml](https://github.com/faisalnjs/Virtual-Clicker/tree/main/.github/workflows/deploy-beta.yml).
4440

41+
[![GitHub Actions - Deploy to Dango Web Solutions (Beta)](https://img.shields.io/github/actions/workflow/status/faisalnjs/virtual-clicker/deploy-beta.yml?logo=github&label=GitHub%20Actions%20-%20Deploy%20to%20Dango%20Web%20Solutions%20(Beta)&color=mediumseagreen)](https://github.com/faisalnjs/Virtual-Clicker/actions/workflows/deploy-beta.yml)
42+
4543
## Production
4644

4745
This project is hosted on [Dango Web Solutions](https://dangoweb.com/?from=virtual-clicker) cloud hosting - free web hosting for Education.
4846

4947
Files are transferred to the host using the GitHub Action automation workflow at [.github\workflows\deploy.yml](https://github.com/faisalnjs/Virtual-Clicker/tree/main/.github/workflows/deploy.yml).
5048

51-
![GitHub Actions](https://img.shields.io/github/actions/workflow/status/faisalnjs/virtual-clicker/deploy.yml?logo=github&label=GitHub%20Actions&color=mediumseagreen)
49+
[![GitHub Actions - Deploy to Dango Web Solutions](https://img.shields.io/github/actions/workflow/status/faisalnjs/virtual-clicker/deploy.yml?logo=github&label=GitHub%20Actions%20-%20Deploy%20to%20Dango%20Web%20Solutions&color=mediumseagreen)](https://github.com/faisalnjs/Virtual-Clicker/actions/workflows/deploy.yml)
50+
51+
## Credits
52+
53+
- [khui0](https://github.com/khui0) - Commits before 5/21/2024 including original design and development, logo image
54+
- [faisalnjs](https://github.com/faisalnjs) - Commits after 5/21/2024 including set and FRQ input modes, make-up mode, banner image

banner.png

5.13 MB
Loading

index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,14 @@ <h2 id="history-date"></h2>
202202
</dialog>
203203
<!-- Settings -->
204204
<dialog data-modal-page="settings" data-page-title="Settings">
205+
<img src="banner.png" alt="Virtual Clicker Banner">
205206
<p id="version-string"><span class="version"></span></p>
206207
<button data-modal-view="settings/code">Seat Code</button>
207208
<button data-modal-view="settings/theme">Theme</button>
208209
<button data-modal-view="settings/keybinds">Keyboard Shortcuts</button>
209210
<button data-modal-view="settings/makeup">Make Up Clicks Mode On/Off</button>
210211
<button data-modal-view="settings/reset">Reset</button>
212+
<button data-modal-view="settings/credits">Credits</button>
211213
<div class="row center">
212214
<a href="https://github.com/faisalnjs/virtual-clicker" class="icon"><i class="bi bi-github"></i></a>
213215
<a href="https://dangoweb.com/?from=virtual-clicker" class="icon"><i class="bi bi-cloud-fill"></i></a>
@@ -331,6 +333,10 @@ <h1 class="text-placeholder">000</h1>
331333
<button id="makeup-click-button">Make Up Clicks</button>
332334
</div>
333335
</div>
336+
<div data-modal-page="credits" data-page-title="Credits">
337+
<p><a href="https://github.com/khui0">khui0</a> - Commits before 5/21/2024 including original design and development, logo image</p>
338+
<p><a href="https://github.com/faisalnjs">faisalnjs</a> - Commits after 5/21/2024 including set and FRQ input modes, make-up mode, banner image</p>
339+
</div>
334340
</dialog>
335341
<dialog data-modal-page="clear-data-fix" data-page-title="Settings May Not Save">
336342
<p>

src/clicker/clicker.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { convertLatexToAsciiMath, convertLatexToMarkup, renderMathInElement } fr
88
``;
99

1010
try {
11+
var period = document.getElementById("period-input").value;
1112
const questionInput = document.getElementById("question-input");
1213
const answerInput = document.getElementById("answer-input");
1314
const mf = document.getElementById("math-input");
@@ -56,7 +57,7 @@ try {
5657
// Populate seat code finder grid
5758
for (let col = 1; col <= 5; col++) {
5859
for (let row = 6; row > 0; row--) {
59-
const period = document.getElementById("period-input").value;
60+
period = document.getElementById("period-input").value;
6061
const code = period + row.toString() + col.toString();
6162
const button = new ui.Element("button", "", {
6263
click: () => {
@@ -68,6 +69,23 @@ try {
6869
ui.addTooltip(button, code);
6970
}
7071
}
72+
document.getElementById("period-input").addEventListener("change", (e) => {
73+
document.getElementById("seat-grid").innerHTML = "";
74+
for (let col = 1; col <= 5; col++) {
75+
for (let row = 6; row > 0; row--) {
76+
period = document.getElementById("period-input").value;
77+
const code = period + row.toString() + col.toString();
78+
const button = new ui.Element("button", "", {
79+
click: () => {
80+
document.getElementById("code-input").value = code;
81+
ui.view("settings/code");
82+
},
83+
}).element;
84+
document.getElementById("seat-grid").append(button);
85+
ui.addTooltip(button, code);
86+
}
87+
}
88+
});
7189
// Update history feed
7290
updateHistory();
7391
// Focus answer input

src/modules/ui.css

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,27 @@ dialog:modal {
2121
max-height: calc(100vh - 2rem);
2222
}
2323

24+
dialog img {
25+
border-radius: 0.5rem;
26+
}
27+
28+
dialog #version-string {
29+
margin-top: -37px;
30+
margin-bottom: 9px;
31+
margin-left: 5px;
32+
padding: 3px 10px 1px 10px;
33+
background-color: var(--text-color);
34+
backdrop-filter: blur(5px);
35+
width: fit-content;
36+
color: var(--background-color);
37+
border-radius: 0.25rem;
38+
z-index: 1;
39+
}
40+
41+
dialog #version-string span {
42+
background: transparent;
43+
}
44+
2445
div[data-modal-page] {
2546
display: flex;
2647
flex-direction: column;

0 commit comments

Comments
 (0)