Removing the "Ask others to follow you?" popup
No need to ask twice, the user just pressed the "follow" button.
This commit is contained in:
parent
05bedf0c22
commit
fefe7c8aa5
@ -58,6 +58,7 @@ vim: ft=typescript
|
||||
|
||||
function sendFollowRequest() {
|
||||
gameScene.connection?.emitFollowRequest();
|
||||
followRoleStore.set(followRoles.leader);
|
||||
followStateStore.set(followStates.active);
|
||||
}
|
||||
|
||||
@ -75,11 +76,6 @@ vim: ft=typescript
|
||||
followUsersStore.stopFollowing();
|
||||
}
|
||||
|
||||
function request() {
|
||||
followStateStore.set(followStates.requesting);
|
||||
followRoleStore.set(followRoles.leader);
|
||||
}
|
||||
|
||||
function onKeyDown(e: KeyboardEvent) {
|
||||
if (e.key === "Escape") {
|
||||
reset();
|
||||
@ -106,12 +102,7 @@ vim: ft=typescript
|
||||
</section>
|
||||
{:else if followRole === followRoles.leader}
|
||||
<section class="interact-menu-question">
|
||||
<p>Ask others to follow you?</p>
|
||||
</section>
|
||||
<section class="interact-menu-action">
|
||||
<button type="button" class="nes-btn is-success" on:click|preventDefault={sendFollowRequest}>Yes</button
|
||||
>
|
||||
<button type="button" class="nes-btn is-error" on:click|preventDefault={reset}>No</button>
|
||||
<p>Should never be displayed</p>
|
||||
</section>
|
||||
{/if}
|
||||
</div>
|
||||
@ -160,7 +151,7 @@ vim: ft=typescript
|
||||
<button
|
||||
type="button"
|
||||
class="nes-btn is-primary follow-menu-button"
|
||||
on:click|preventDefault={request}
|
||||
on:click|preventDefault={sendFollowRequest}
|
||||
title="Ask others to follow"><img class="background-img" src={followImg} alt="" /></button
|
||||
>
|
||||
{/if}
|
||||
|
Loading…
Reference in New Issue
Block a user