From 217aee3d586b3c4fb31be26307011e837eaf4ad9 Mon Sep 17 00:00:00 2001 From: Eloc <42568538+elocremarc@users.noreply.github.com> Date: Thu, 22 Feb 2024 21:23:08 -0800 Subject: [PATCH 1/4] preview parent move above metadata --- templates/inscription.html | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/templates/inscription.html b/templates/inscription.html index 8294498cf2..102cd4e2c5 100644 --- a/templates/inscription.html +++ b/templates/inscription.html @@ -28,16 +28,20 @@

Inscription {{ self.inscription_number }}

%% }
id
{{ self.inscription_id }}
+%% if let Some(parent) = &self.parent { +
parent
+
+
+{{Iframe::thumbnail(*parent)}} +
+
+%% } %% if let Some(metadata) = self.inscription.metadata() {
metadata
{{ Trusted(MetadataHtml(&metadata)) }}
%% } -%% if let Some(parent) = &self.parent { -
parent
-
{{ parent }}
-%% } %% if self.charms != 0 {
charms
@@ -106,4 +110,4 @@

Inscription {{ self.inscription_number }}

rune
{{ rune }}
%% } - + \ No newline at end of file From 16bb5e94871dcd25238ec0b40184077cc27660db Mon Sep 17 00:00:00 2001 From: Eloc <42568538+elocremarc@users.noreply.github.com> Date: Thu, 22 Feb 2024 21:27:17 -0800 Subject: [PATCH 2/4] EOL --- templates/inscription.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/inscription.html b/templates/inscription.html index 102cd4e2c5..767004f293 100644 --- a/templates/inscription.html +++ b/templates/inscription.html @@ -110,4 +110,4 @@

Inscription {{ self.inscription_number }}

rune
{{ rune }}
%% } - \ No newline at end of file + From b04ca75ce2f21cb5e1424e6c8ee82a11000f8707 Mon Sep 17 00:00:00 2001 From: Eloc <42568538+elocremarc@users.noreply.github.com> Date: Thu, 22 Feb 2024 23:17:15 -0800 Subject: [PATCH 3/4] tests working --- src/subcommand/server.rs | 3 +-- src/templates/inscription.rs | 6 +++++- templates/inscription.html | 2 +- tests/wallet/inscribe.rs | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/subcommand/server.rs b/src/subcommand/server.rs index 0461c37bae..48a96595ef 100644 --- a/src/subcommand/server.rs +++ b/src/subcommand/server.rs @@ -4398,9 +4398,8 @@ next server.assert_response_regex( format!("/inscription/{inscription_id}"), StatusCode::OK, - format!(".*Inscription 1.*
parent
.*
{parent_inscription_id}
.*"), + format!(".*Inscription 1.*
parent
.*
.**.*"), ); - server.assert_response_regex( format!("/inscription/{parent_inscription_id}"), StatusCode::OK, diff --git a/src/templates/inscription.rs b/src/templates/inscription.rs index b23d5dd890..ed4493fb44 100644 --- a/src/templates/inscription.rs +++ b/src/templates/inscription.rs @@ -264,7 +264,11 @@ mod tests {
id
1{64}i1
parent
-
2{64}i2
+
+
+ +
+
preview
link
content
diff --git a/templates/inscription.html b/templates/inscription.html index 767004f293..295a69bd02 100644 --- a/templates/inscription.html +++ b/templates/inscription.html @@ -32,7 +32,7 @@

Inscription {{ self.inscription_number }}

parent
-{{Iframe::thumbnail(*parent)}} + {{Iframe::thumbnail(*parent)}}
%% } diff --git a/tests/wallet/inscribe.rs b/tests/wallet/inscribe.rs index e6e613e3d2..1d427fe6cd 100644 --- a/tests/wallet/inscribe.rs +++ b/tests/wallet/inscribe.rs @@ -643,7 +643,7 @@ fn inscribe_with_parent_inscription_and_fee_rate() { ord_rpc_server.assert_response_regex( format!("/inscription/{}", child_output.inscriptions[0].id), format!( - ".*
parent
.*.*", + ".*
parent
.*
.*", child_output.parent.unwrap() ), ); From 6c335d125d28389e65cd89f68723c1d3c665c6ab Mon Sep 17 00:00:00 2001 From: Eloc <42568538+elocremarc@users.noreply.github.com> Date: Sun, 25 Feb 2024 17:16:09 -0800 Subject: [PATCH 4/4] Merge fix --- templates/inscription.html | 6 ------ 1 file changed, 6 deletions(-) diff --git a/templates/inscription.html b/templates/inscription.html index a457b5ba60..373f11ccf2 100644 --- a/templates/inscription.html +++ b/templates/inscription.html @@ -36,12 +36,6 @@

Inscription {{ self.inscription_number }}

%% } -%% if let Some(metadata) = self.inscription.metadata() { -
metadata
-
- {{ Trusted(MetadataHtml(&metadata)) }} -
-%% } %% if self.charms != 0 {
charms