Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions src/components/Record.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import Textfield from '@smui/textfield';
import Icon from 'src/components/Icon.svelte';

import { onMount } from 'svelte';
import type { RecordRepository } from '@metanames/sdk';
import { alertMessage, refresh, walletConnected } from '$lib/stores/main';
import { alertTransactionAndFetchResult, getRecordClassFrom, getValidator } from '$lib';
Expand All @@ -18,6 +19,11 @@

let recordValue = String(value);
let dialogOpen = false;
let dialogId = '';

onMount(() => {
dialogId = Math.random().toString(36).substring(2, 9);
});

$: label = klass.toString();
$: recordClass = getRecordClassFrom(klass);
Expand Down Expand Up @@ -55,11 +61,11 @@
<div class="record-container {editMode ? 'edit' : ''}">
<Dialog
bind:open={dialogOpen}
aria-labelledby="confirmation-title"
aria-describedby="confirmation-content"
aria-labelledby="confirmation-title-{dialogId}"
aria-describedby="confirmation-content-{dialogId}"
>
<Title id="simple-title">Confirm action</Title>
<Content id="simple-content">Do you really want to remove the record?</Content>
<Title id="confirmation-title-{dialogId}">Confirm action</Title>
<Content id="confirmation-content-{dialogId}">Do you really want to remove the record?</Content>
<Actions>
<Button>
<Label>No</Label>
Expand Down