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() {
|
function sendFollowRequest() {
|
||||||
gameScene.connection?.emitFollowRequest();
|
gameScene.connection?.emitFollowRequest();
|
||||||
|
followRoleStore.set(followRoles.leader);
|
||||||
followStateStore.set(followStates.active);
|
followStateStore.set(followStates.active);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,11 +76,6 @@ vim: ft=typescript
|
|||||||
followUsersStore.stopFollowing();
|
followUsersStore.stopFollowing();
|
||||||
}
|
}
|
||||||
|
|
||||||
function request() {
|
|
||||||
followStateStore.set(followStates.requesting);
|
|
||||||
followRoleStore.set(followRoles.leader);
|
|
||||||
}
|
|
||||||
|
|
||||||
function onKeyDown(e: KeyboardEvent) {
|
function onKeyDown(e: KeyboardEvent) {
|
||||||
if (e.key === "Escape") {
|
if (e.key === "Escape") {
|
||||||
reset();
|
reset();
|
||||||
@ -106,12 +102,7 @@ vim: ft=typescript
|
|||||||
</section>
|
</section>
|
||||||
{:else if followRole === followRoles.leader}
|
{:else if followRole === followRoles.leader}
|
||||||
<section class="interact-menu-question">
|
<section class="interact-menu-question">
|
||||||
<p>Ask others to follow you?</p>
|
<p>Should never be displayed</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>
|
|
||||||
</section>
|
</section>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
@ -160,7 +151,7 @@ vim: ft=typescript
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="nes-btn is-primary follow-menu-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
|
title="Ask others to follow"><img class="background-img" src={followImg} alt="" /></button
|
||||||
>
|
>
|
||||||
{/if}
|
{/if}
|
||||||
|
Loading…
Reference in New Issue
Block a user