feat(instance-info): show- egistration status
This commit is contained in:
parent
56835b4f2d
commit
4ff5136652
|
@ -286,25 +286,35 @@ public class InstanceInfoFragment extends LoaderFragment {
|
||||||
|
|
||||||
if (instance.contactAccount != null) {
|
if (instance.contactAccount != null) {
|
||||||
AccountField admin = new AccountField();
|
AccountField admin = new AccountField();
|
||||||
admin.parsedName=admin.name= "Administered by";
|
admin.parsedName=admin.name=getContext().getString(R.string.mo_instance_admin);
|
||||||
admin.parsedValue=buildLinkText(instance.contactAccount.url, instance.contactAccount.getDisplayUsername() + "@" + instance.uri);
|
admin.parsedValue=buildLinkText(instance.contactAccount.url, instance.contactAccount.getDisplayUsername() + "@" + instance.uri);
|
||||||
fields.add(admin);
|
fields.add(admin);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (instance.email != null) {
|
if (instance.email != null) {
|
||||||
AccountField contact = new AccountField();
|
AccountField contact = new AccountField();
|
||||||
contact.parsedName = contact.name = "Contact";
|
contact.parsedName=getContext().getString(R.string.mo_instance_contact);
|
||||||
contact.parsedValue=buildLinkText("mailto:" + instance.email, instance.email);
|
contact.parsedValue=buildLinkText("mailto:" + instance.email, instance.email);
|
||||||
fields.add(contact);
|
fields.add(contact);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (instance.stats != null) {
|
if (instance.stats != null) {
|
||||||
AccountField activeUsers = new AccountField();
|
AccountField activeUsers = new AccountField();
|
||||||
activeUsers.parsedName = activeUsers.name = "users";
|
activeUsers.parsedName=getContext().getString(R.string.mo_instance_users);
|
||||||
activeUsers.parsedValue= NumberFormat.getInstance().format(instance.stats.userCount);
|
activeUsers.parsedValue= NumberFormat.getInstance().format(instance.stats.userCount);
|
||||||
fields.add(activeUsers);
|
fields.add(activeUsers);
|
||||||
|
|
||||||
|
AccountField statusCount = new AccountField();
|
||||||
|
statusCount.parsedName=getContext().getString(R.string.mo_instance_status);
|
||||||
|
statusCount.parsedValue= NumberFormat.getInstance().format(instance.stats.statusCount);
|
||||||
|
fields.add(statusCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AccountField registration = new AccountField();
|
||||||
|
registration.parsedName=getContext().getString(R.string.mo_instance_registration);
|
||||||
|
registration.parsedValue=getContext().getString(instance.registrations ? instance.approvalRequired ? R.string.mo_instance_registration_approval : R.string.mo_instance_registration_open : R.string.instance_signup_closed);
|
||||||
|
fields.add(registration);
|
||||||
|
|
||||||
|
|
||||||
setFields(fields);
|
setFields(fields);
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,6 +58,14 @@
|
||||||
<string name="mo_confirm_unfollow_title">Unfollow Account</string>
|
<string name="mo_confirm_unfollow_title">Unfollow Account</string>
|
||||||
<string name="mo_confirm_unfollow">Confirm to unfollow %s</string>
|
<string name="mo_confirm_unfollow">Confirm to unfollow %s</string>
|
||||||
|
|
||||||
|
<string name="mo_instance_admin">Administered by</string>
|
||||||
|
<string name="mo_instance_contact">Contact</string>
|
||||||
|
<string name="mo_instance_users">Users</string>
|
||||||
|
<string name="mo_instance_status">Status</string>
|
||||||
|
<string name="mo_instance_registration">Registration</string>
|
||||||
|
<string name="mo_instance_registration_open">Open</string>
|
||||||
|
<string name="mo_instance_registration_approval">Approval required</string>
|
||||||
|
<string name="mo_instance_registration_closed">Closed</string>
|
||||||
<string name="mo_instance_info_open_timeline">Local timeline</string>
|
<string name="mo_instance_info_open_timeline">Local timeline</string>
|
||||||
<string name="mo_instance_info_moderated_servers">Moderated servers</string>
|
<string name="mo_instance_info_moderated_servers">Moderated servers</string>
|
||||||
<string name="mo_severity_silence">Silenced</string>
|
<string name="mo_severity_silence">Silenced</string>
|
||||||
|
|
Loading…
Reference in New Issue