Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Timer to Hide "You're Connected" Text #48

Merged
merged 2 commits into from
Dec 24, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"devDependencies": {
"@types/node": "^20.8.7",
"@types/react": "^18.2.43",
"@types/react": "^18.2.45",
"@types/react-dom": "^18.2.17",
"typescript": "^4.9.5"
},
Expand Down
11 changes: 11 additions & 0 deletions src/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,15 @@ connect().then(__ => {
if (_indicator != null) {
__ != undefined ? _indicator.style.backgroundColor = "green" : _indicator.style.backgroundColor = "red";
}
//agrim implemented - Upon connecting to the Pieces OS, there is a need to enhance the user experience by implementing a timer
//that automatically hides the "You're Connected" text and shrinks the button after a certain duration
let time = 3000;
setTimeout(() => {
if (_indicator != null) {
let indicatorText = document.getElementById("indicator_text");
indicatorText.innerText = "";
_indicator.style.transition = "all 0.3s ease";
_indicator.style.transform = "scale(0.8)";
}
}, time);
})