Skip to content

Commit eff322b

Browse files
authored
Refactor index.html to remove duplicates and fix boot screen
Removed duplicate HTML structure and fixed boot screen display issue.
1 parent 9b62dcd commit eff322b

File tree

1 file changed

+15
-20
lines changed

1 file changed

+15
-20
lines changed

index.html

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,15 @@
2323
padding: 20px;
2424
white-space: pre-wrap;
2525
font-size: 14px;
26-
animation: fadeOut 1s ease forwards;
27-
animation-delay: 4s;
28-
z-index: 999;
29-
}
30-
31-
@keyframes fadeOut {
32-
to { opacity: 0; visibility: hidden; }
26+
z-index: 9999;
3327
}
3428

3529
/* MAIN UI */
3630
#app {
3731
opacity: 0;
38-
animation: fadeIn 1s ease forwards;
39-
animation-delay: 4.2s;
4032
padding: 20px;
4133
}
4234

43-
@keyframes fadeIn {
44-
to { opacity: 1; }
45-
}
46-
4735
/* TABS */
4836
.tabs {
4937
display: flex;
@@ -57,6 +45,7 @@
5745
padding: 10px;
5846
border-right: 1px solid #0aff0a;
5947
cursor: pointer;
48+
-webkit-user-select: none;
6049
}
6150

6251
.tab:last-child {
@@ -115,7 +104,7 @@
115104
</style>
116105
</head>
117106

118-
<body>
107+
<body ontouchstart="">
119108

120109
<!-- TERMINAL BOOT ANIMATION -->
121110
<div id="boot">
@@ -132,9 +121,9 @@
132121

133122
<!-- TABS -->
134123
<div class="tabs">
135-
<div class="tab active" onclick="switchTab('accounts')">Accounts</div>
136-
<div class="tab" onclick="switchTab('add')">Add New</div>
137-
<div class="tab" onclick="switchTab('settings')">Settings</div>
124+
<div class="tab active" onclick="switchTab('accounts')" ontouchstart="">Accounts</div>
125+
<div class="tab" onclick="switchTab('add')" ontouchstart="">Add New</div>
126+
<div class="tab" onclick="switchTab('settings')" ontouchstart="">Settings</div>
138127
</div>
139128

140129
<!-- ACCOUNTS TAB -->
@@ -146,7 +135,7 @@
146135
<div id="addTab" class="hidden">
147136
<input id="label" placeholder="Label (e.g. Google)">
148137
<input id="secret" placeholder="Secret (Base32)">
149-
<button onclick="addAccount()">Add Account</button>
138+
<button type="button" onclick="addAccount()">Add Account</button>
150139
</div>
151140

152141
<!-- SETTINGS TAB -->
@@ -160,6 +149,12 @@
160149
<script>
161150
let accounts = JSON.parse(localStorage.getItem("accounts") || "[]");
162151

152+
/* FORCE REMOVE BOOT SCREEN (iOS 10 FIX) */
153+
setTimeout(() => {
154+
document.getElementById("boot").style.display = "none";
155+
document.getElementById("app").style.opacity = "1";
156+
}, 4500);
157+
163158
function save() {
164159
localStorage.setItem("accounts", JSON.stringify(accounts));
165160
}
@@ -218,7 +213,7 @@
218213
<h3>${acc.label}</h3>
219214
<div class="code" id="code-${i}">------</div>
220215
<div class="timer" id="timer-${i}"></div>
221-
<button class="delete" onclick="deleteAccount(${i})">Delete</button>
216+
<button type="button" class="delete" onclick="deleteAccount(${i})">Delete</button>
222217
`;
223218

224219
container.appendChild(div);
@@ -242,4 +237,4 @@ <h3>${acc.label}</h3>
242237
</script>
243238

244239
</body>
245-
</html>
240+
</html>

0 commit comments

Comments
 (0)