mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-31 23:11:15 +00:00
46 lines
1.9 KiB
HTML
46 lines
1.9 KiB
HTML
|
|
<modals:>
|
||
|
|
<app:myModal modalId="party-modal">
|
||
|
|
{#if _user.party.current}
|
||
|
|
<h2>{_party.name}</h2>
|
||
|
|
<table class="table table-striped">
|
||
|
|
{#each _partyMembers as :member}
|
||
|
|
<tr><td>{username(:member.auth)}</td><td>({:member.id})</td></tr>
|
||
|
|
{/}
|
||
|
|
</table>
|
||
|
|
<form class=form-inline x-bind="submit: partyInvite">
|
||
|
|
{#if _view.partyError}
|
||
|
|
<div class='alert alert-danger'>{_view.partyError}</div>
|
||
|
|
{/}
|
||
|
|
<div class='control-group'>
|
||
|
|
<input type="text" class="input-medium" placeholder="User Id" value="{_newPartyMember}">
|
||
|
|
<input type="submit" class="btn" value="Invite" />
|
||
|
|
</div>
|
||
|
|
</form>
|
||
|
|
<a class='btn btn-danger' x-bind="click: partyLeave">Leave</a>
|
||
|
|
|
||
|
|
{else if _user.party.invitation}
|
||
|
|
<!-- TODO show by whom -->
|
||
|
|
<h2>You're Invited To {_party.name}</h2>
|
||
|
|
<a class='btn btn-success' x-bind="click: partyAccept">Accept</a>
|
||
|
|
<a class='btn btn-danger' x-bind="click: partyReject">Reject</a>
|
||
|
|
|
||
|
|
{else}
|
||
|
|
<h2>Create A Party</h2>
|
||
|
|
<!-- Not in a party , no invites - create a new one -->
|
||
|
|
<p>You are not in a party. You can either create one and invite friends, or if you want to join an existing party, have them enter:</p>
|
||
|
|
<pre class=prettyprint>{_user.id}</pre>
|
||
|
|
<form class=form-inline x-bind="submit: partyCreate">
|
||
|
|
{#if _view.partyError}
|
||
|
|
<div class='alert alert-danger'>{_view.partyError}</div>
|
||
|
|
{/}
|
||
|
|
<div class=control-group>
|
||
|
|
<input type="text" class="input-medium" placeholder="Party Name" value="{_newParty}" />
|
||
|
|
<input type="submit" class="btn" value="Create" />
|
||
|
|
</div>
|
||
|
|
</form>
|
||
|
|
|
||
|
|
{/}
|
||
|
|
<@footer>
|
||
|
|
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
|
||
|
|
</@footer>
|
||
|
|
</app:myModal>
|