Skip to content

Commit

Permalink
feat: member can also invite by SSB-ID
Browse files Browse the repository at this point in the history
Closes ssbc#283
  • Loading branch information
decentral1se authored and staltz committed Aug 22, 2022
1 parent 227efa6 commit 18062a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions web/handlers/admin/members_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ func TestMembersAdd(t *testing.T) {
}
checkInputsAreDisabled(false)

// verify that inputs are disabled for RoleMember
// verify that inputs are enabled for RoleMember
ts.User = roomdb.Member{
ID: 7331,
Role: roomdb.RoleMember,
}
checkInputsAreDisabled(true)
checkInputsAreDisabled(false)
}

func TestMembersDontAddInvalid(t *testing.T) {
Expand Down
7 changes: 2 additions & 5 deletions web/templates/admin/member-list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,16 @@ SPDX-License-Identifier: CC-BY-4.0
<label class="block mt-6 mb-1 text-sm text-gray-500">{{ i18n "AdminAddNewMemberTitle" }}</label>
<div id="add-member-input-container" class="flex flex-row items-center justify-start mb-6">
<input
{{ if member_is_elevated }} {{ else }} disabled {{ end }}
type="text"
name="pub_key"
placeholder="{{i18n "PubKeyRefPlaceholder"}}"
class="w-8/12 self-stretch shadow rounded border border-transparent h-10 p-1 pl-4 font-mono truncate
class="w-8/12 self-stretch shadow rounded border border-transparent h-10 p-1 pl-4 font-mono truncate
text-purple-600 focus:outline-none focus:ring-2 focus:ring-purple-400 focus:border-transparent
{{ if member_is_elevated }} {{ else }} shadow ring-1 ring-gray-300 opacity-50 bg-gray-200 cursor-not-allowed {{ end }}
">
<button
{{ if member_is_elevated }} {{ else }} disabled {{ end }}
type="submit"
class="ml-4 h-10 shadow rounded px-6 text-purple-600 ring-1 bg-white focus:outline-none focus:ring-2 focus:ring-purple-400
{{ if member_is_elevated }} ring-purple-400 hover:bg-purple-600 hover:text-gray-100 {{ else }} opacity-50 ring-purple-300 bg-purple-200 cursor-not-allowed {{ end }}
ring-purple-400 hover:bg-purple-600 hover:text-gray-100
"
>{{i18n "AdminMembersAdd"}}</button>
</div>
Expand Down

0 comments on commit 18062a2

Please sign in to comment.