feat: refresh button next to error in lists
This commit is contained in:
parent
50e7e9e200
commit
929987e995
@ -45,6 +45,7 @@
|
||||
|
||||
|
||||
async function fetchGroups() {
|
||||
err = "";
|
||||
listLoading = true;
|
||||
try {
|
||||
const res: Group[] = await api().systems(isPublic ? id : "@me").groups.get({ auth: !isPublic, query: { with_members: !isPublic } });
|
||||
@ -258,7 +259,14 @@
|
||||
<Spinner class="d-inline-block" />
|
||||
</div>
|
||||
{:else if err}
|
||||
<Row>
|
||||
<Col xs={12} lg={10}>
|
||||
<Alert color="danger">{err}</Alert>
|
||||
</Col>
|
||||
<Col xs={12} lg={2}>
|
||||
<Button class="w-100 mb-3" color="primary" on:click={fetchGroups}>Refresh</Button>
|
||||
</Col>
|
||||
</Row>
|
||||
{:else}
|
||||
|
||||
<Row>
|
||||
|
@ -44,6 +44,7 @@
|
||||
});
|
||||
|
||||
async function fetchMembers() {
|
||||
err = "";
|
||||
listLoading = true;
|
||||
try {
|
||||
const res: Member[] = await api().systems(isPublic ? id : "@me").members.get({ auth: !isPublic });
|
||||
@ -260,7 +261,14 @@
|
||||
<Spinner class="d-inline-block" />
|
||||
</div>
|
||||
{:else if err}
|
||||
<Row>
|
||||
<Col xs={12} lg={10}>
|
||||
<Alert color="danger">{err}</Alert>
|
||||
</Col>
|
||||
<Col xs={12} lg={2}>
|
||||
<Button class="w-100 mb-3" color="primary" on:click={fetchMembers}>Refresh</Button>
|
||||
</Col>
|
||||
</Row>
|
||||
{:else}
|
||||
|
||||
<Row>
|
||||
|
Loading…
Reference in New Issue
Block a user