mirror of
https://github.com/dualshock-tools/dualshock-tools.github.io.git
synced 2026-03-01 11:19:54 +03:00
Add Repeat button to the Speaker test
This commit is contained in:
committed by
dualshock-tools
parent
5efa1b5be4
commit
889ecf6b29
@@ -307,6 +307,7 @@ export class QuickTestModal {
|
||||
case 'speaker':
|
||||
const speakerTestDesc = l('This test will play a tone through the controller\'s built-in speaker.');
|
||||
const speakerInstructions = l('Listen for a tone from the controller speaker.');
|
||||
const repeat = l('Repeat');
|
||||
return `
|
||||
<p>${speakerTestDesc}</p>
|
||||
<p><strong>${instructions}:</strong> ${speakerInstructions}</p>
|
||||
@@ -317,6 +318,9 @@ export class QuickTestModal {
|
||||
<button type="button" class="btn btn-danger" id="speaker-fail-btn" onclick="markTestResult('speaker', false)">
|
||||
<i class="fas fa-times me-1"></i><span>${fail}</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-outline-primary" id="speaker-replay-btn" onclick="replaySpeakerTest()">
|
||||
<i class="fas fa-redo me-1"></i><span>${repeat}</span>
|
||||
</button>
|
||||
</div>
|
||||
`;
|
||||
case 'microphone':
|
||||
@@ -1614,10 +1618,17 @@ function testHeadphoneAudio() {
|
||||
}
|
||||
}
|
||||
|
||||
function replaySpeakerTest() {
|
||||
if (currentQuickTestInstance) {
|
||||
currentQuickTestInstance._startSpeakerTest();
|
||||
}
|
||||
}
|
||||
|
||||
// Legacy compatibility - expose functions to window for HTML onclick handlers
|
||||
window.markTestResult = markTestResult;
|
||||
window.resetAllTests = resetAllTests;
|
||||
window.resetButtonsTest = resetButtonsTest;
|
||||
window.skipTest = skipTest;
|
||||
window.addTestBack = addTestBack;
|
||||
window.testHeadphoneAudio = testHeadphoneAudio;
|
||||
window.testHeadphoneAudio = testHeadphoneAudio;
|
||||
window.replaySpeakerTest = replaySpeakerTest;
|
||||
Reference in New Issue
Block a user