Smooth scroll to top if active screen selected in web UI (#175)
* Smooth scroll to top if active screen selected in web UI * Use fullname repo --------- Co-authored-by: agathanonymous <agatha@juggalol.com> Co-authored-by: Brahim Hadriche <brahim.hadriche@gmail.com>
This commit is contained in:
2 files changed
+7
No files matched your search
@@ -17,6 +17,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
|
||||
- name: Configure repo
|
||||
run: |
|
||||
|
||||
@@ -8,6 +8,12 @@
|
||||
|
||||
function setScreen(screen: AppState["screen"]) {
|
||||
appStateStore.update((state) => {
|
||||
if (state.screen === screen) {
|
||||
window.scrollTo({
|
||||
top: 0,
|
||||
behavior: "smooth",
|
||||
});
|
||||
}
|
||||
state.screen = screen;
|
||||
return state;
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user