Skip to content

Commit

Permalink
Mobile Updates (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
smashedr authored Jul 11, 2024
1 parent f98ed3d commit 10956e0
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 19 deletions.
4 changes: 2 additions & 2 deletions src/html/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
---

<div class="container-fluid">
<h1 class="animate__animated animate__lightSpeedInRight"><i class="fa-regular fa-file-lines"></i> {{ page.title }}</h1>
<h1 class="animate__animated animate__zoomIn"><i class="fa-regular fa-file-lines"></i> {{ page.title }}</h1>

<p class="lead">
<a href="#configure" class="link-default">Configure</a> &bull;
Expand All @@ -15,7 +15,7 @@ <h1 class="animate__animated animate__lightSpeedInRight"><i class="fa-regular fa
<a href="#links" class="link-default">Link Results</a>
</p>

<div id="feedback" class="alert alert-success alert-dismissible animate__animated animate__bounceIn d-none" role="alert">
<div id="feedback" class="alert alert-success alert-dismissible d-none animate__animated animate__zoomInDown" role="alert">
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
<p>
<i class="fa-regular fa-thumbs-up me-2"></i> Thank you for providing feedback. If you provided details we will look into them.
Expand Down
2 changes: 1 addition & 1 deletion src/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
---

<div class="container-fluid">
<h1 class="animate__animated animate__lightSpeedInRight"><i class="fa-solid fa-link"></i> {{ site.site_name }}</h1>
<h1 class="animate__animated animate__zoomIn"><i class="fa-solid fa-link"></i> {{ site.site_name }}</h1>

<div class="mb-2" style="min-height: 20px;">
<a href="{{ site.chrome_url }}" title="Google" target="_blank" rel="noopener">
Expand Down
2 changes: 1 addition & 1 deletion src/html/uninstall.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h1 class="align-middle mb-0">{{ site.site_name }}</h1>
<input class="form-check-input" type="checkbox" role="switch" id="not-working">
<label class="form-check-label text-danger-emphasis" for="not-working">Not Working or Broken</label>
</div>
<div id="not-working-extra" class="alert alert-warning text-center p-2 mt-2 mb-0 d-none animate__animated animate__pulse">
<div id="not-working-alert" class="alert alert-warning text-center p-2 mt-2 mb-0 d-none animate__animated animate__pulse">
Please provide a <strong class="">link to the site</strong> that is not functioning.
</div>
<div class="my-2">
Expand Down
35 changes: 20 additions & 15 deletions src/js/uninstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const uninstallResponse = document.getElementById('uninstall-response')
const inputCount = document.getElementById('input-count')
const submitBtn = document.getElementById('submit-btn')
const errorAlert = document.getElementById('error-alert')
const notWorkingExtra = document.getElementById('not-working-extra')
const notWorkingAlert = document.getElementById('not-working-alert')
const bugReport = document.getElementById('bug-report')

uninstallForm.addEventListener('change', formChange)
Expand Down Expand Up @@ -62,9 +62,9 @@ function formChange(event) {
// console.debug('formChange:', event)
if (event.target.id === 'not-working') {
if (event.target.checked) {
notWorkingExtra.classList.remove('d-none')
notWorkingAlert.classList.remove('d-none')
} else {
notWorkingExtra.classList.add('d-none')
notWorkingAlert.classList.add('d-none')
}
}
}
Expand Down Expand Up @@ -98,20 +98,25 @@ async function formSubmit(event) {
lines.push(`\`\`\`\n${feedbackText}\n\`\`\``)
}
// console.debug('lines:', lines)

const response = await sendDiscord(url, lines.join('\n'))
// console.debug('response:', response)
submitBtn.classList.remove('disabled')
if (response.status >= 200 && response.status <= 299) {
document
.querySelector('#content-wrapper')
.classList.add('animate__animated', 'animate__backOutUp')
window.location = redirect
} else {
console.warn(`Error ${response.status}`, response)
errorAlert.textContent = `Error ${response.status}: ${response.statusText}`
try {
const response = await sendDiscord(url, lines.join('\n'))
// console.debug('response:', response)
if (response.status >= 200 && response.status <= 299) {
document
.querySelector('#content-wrapper')
.classList.add('animate__animated', 'animate__backOutUp')
window.location = redirect
} else {
console.warn(`Error ${response.status}`, response)
errorAlert.textContent = `Error ${response.status}: ${response.statusText}`
errorAlert.style.display = 'block'
}
} catch (e) {
console.error(e)
errorAlert.textContent = `Error: ${e.message}`
errorAlert.style.display = 'block'
}
submitBtn.classList.remove('disabled')
}

async function sendDiscord(url, content) {
Expand Down

0 comments on commit 10956e0

Please sign in to comment.