2023-09-10 17:55:53 +08:00
|
|
|
import { Component, Show } from 'solid-js'
|
2023-09-15 23:43:55 +08:00
|
|
|
import { MODAL } from '~/constants'
|
2023-09-10 17:55:53 +08:00
|
|
|
import { allConnections } from '~/signals'
|
|
|
|
|
|
|
|
export const ConnectionsTableDetailsModal: Component<{
|
|
|
|
selectedConnectionID?: string
|
|
|
|
}> = (props) => {
|
|
|
|
return (
|
2023-09-13 23:36:24 +08:00
|
|
|
<dialog
|
2023-09-15 23:43:55 +08:00
|
|
|
id={MODAL.CONNECTIONS_TABLE_DETAILS}
|
2023-09-13 23:36:24 +08:00
|
|
|
class="modal modal-bottom sm:modal-middle"
|
|
|
|
>
|
2023-09-10 17:55:53 +08:00
|
|
|
<div class="modal-box">
|
|
|
|
<Show when={props.selectedConnectionID}>
|
|
|
|
<pre>
|
|
|
|
<code>
|
|
|
|
{JSON.stringify(
|
|
|
|
allConnections.find(
|
|
|
|
({ id }) => id === props.selectedConnectionID,
|
|
|
|
),
|
|
|
|
null,
|
|
|
|
2,
|
|
|
|
)}
|
|
|
|
</code>
|
|
|
|
</pre>
|
|
|
|
</Show>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<form method="dialog" class="modal-backdrop">
|
|
|
|
<button />
|
|
|
|
</form>
|
|
|
|
</dialog>
|
|
|
|
)
|
|
|
|
}
|