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