diff --git a/js/templates/instance/filter-users.html b/js/templates/instance/filter-users.html index b725a90..b1e4087 100644 --- a/js/templates/instance/filter-users.html +++ b/js/templates/instance/filter-users.html @@ -170,6 +170,10 @@
{mastodon:fields}
{note}
+
+ +
diff --git a/views/instance.php b/views/instance.php index 48ab46b..fd36f0a 100644 --- a/views/instance.php +++ b/views/instance.php @@ -19,6 +19,16 @@ window.view.instance = { window.location.hash = window.location.hash.replace('#instance/','#instance_config/'); }, do: { + users: { + suspend: function(_id) { + if (!confirm('Are you sure you want to suspend this user?')) return; + const hargs = get_hash_arguments(); + http.get(`api/v1/http/mastodon/accounts/suspend?instance=${hargs.instance}&id=${_id}`, + {}, function(js) { + toast.info('User has been successfully suspended'); + }); + }, + }, new_accounts: { approve: function(_id) { window.view.instance.do.new_accounts._perform('approve', _id); @@ -194,6 +204,7 @@ window.view.instance = { var tpl = TPL; const it = js['data'][i]; tpl = tpl.replaceAll('{software}', hargs.software); + tpl = tpl.replaceAll('{id}', it.id); tpl = tpl.replaceAll('{name}', html2text(it.name)); tpl = tpl.replaceAll('{acct}', html2text(it.acct)); if (it.avatar === null)