File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
lib/fileonchain_web/live/chunks_live Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -17,4 +17,7 @@ defmodule FileonchainWeb.ChunkLive.Show do
17
17
end
18
18
19
19
defp page_title ( :show ) , do: "Show Chunk"
20
+
21
+ # Import render_chunk_preview and format_chunk_size functions from Index
22
+ import FileonchainWeb.ChunkLive.Index , only: [ render_chunk_preview: 1 , format_chunk_size: 1 ]
20
23
end
Original file line number Diff line number Diff line change 4
4
</ . header >
5
5
6
6
< . list >
7
- <: item title = "Chunk " > <%= @ chunk . chunk %> </: item >
8
- <: item title = "Data " > <%= @ chunk . data %> </: item >
7
+ <: item title = "Hash " > <%= @ chunk . hash %> </: item >
8
+ <: item title = "Cid " > <%= @ chunk . cid %> </: item >
9
+ <: item title = "Preview " >
10
+ <%= raw ( render_chunk_preview ( @ chunk ) ) %>
11
+ </: item >
12
+ <: item title = "Size " >
13
+ <%= format_chunk_size ( @ chunk . data ) %>
14
+ </: item >
15
+ <: item title = "Data " >
16
+ < . textarea value = { @ chunk . data } readonly />
17
+ </: item >
9
18
</ . list >
10
19
11
20
< . back navigate = { ~p" /chunks" } > Back to chunks</ . back >
You can’t perform that action at this time.
0 commit comments