Skip to content

Commit

Permalink
attempt autorefresh after modal.close()
Browse files Browse the repository at this point in the history
  • Loading branch information
goranbs committed Jul 6, 2023
1 parent 67ebcb0 commit 53f3449
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend-dev/src/routes/secrets/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
<div class="p-5 table-container">
{#await credentialsPromise}
<p style="font-size:20px;">Loading credentials...</p>
{:then credentialsList}
{:then credentials}
<!-- Native Table Element -->
<!-- TODO: add margin/padding for table elements -->
<table class="w-half table table-interactive">
Expand All @@ -103,7 +103,7 @@
</tr>
</thead>
<tbody>
{#each credentialsList as secret}
{#each credentials as secret}
<tr id="clickable_row" class="table-row-checked">
<td>
<input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
import {cBase, cHeader, cForm} from '../../styles/styles.js';
import { graphQLClient } from '../../stores/stores.js';
import createCredentialMutation from '../../queries/create_credential.js';
import { credentialsList } from '../../stores/stores.js';
import allCredentialsQuery from '../../queries/get_all_credentials.js';
// Props
/** Exposes parent props to this component. */
Expand Down Expand Up @@ -44,6 +47,8 @@
};
const response = await get(graphQLClient).request(createCredentialMutation, variables);
modalStore.close();
const allCredentials = await get(graphQLClient).request(allCredentialsQuery);
credentialsList.set(allCredentials.dockerRegistryCredentials)
}
</script>
Expand Down

0 comments on commit 53f3449

Please sign in to comment.