about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2022-10-28 20:39:38 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2022-10-28 20:39:38 +0200
commit600a44f9aec5cf39ef50173ec226be7faee5211e (patch)
tree19bd92969d21c6e1b1762b9572abe6c31cec63e4
parentFrontend: Show result website's title and description (diff)
downloadOSSE-600a44f9aec5cf39ef50173ec226be7faee5211e.tar.gz
OSSE-600a44f9aec5cf39ef50173ec226be7faee5211e.tar.bz2
OSSE-600a44f9aec5cf39ef50173ec226be7faee5211e.zip
Frontend: Show results in reverse order with priority
-rw-r--r--frontend/src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/frontend/src/main.rs b/frontend/src/main.rs
index 46b9232..38879f9 100644
--- a/frontend/src/main.rs
+++ b/frontend/src/main.rs
@@ -35,7 +35,7 @@ impl PartialOrd for CrawledResource {
 
 impl Ord for CrawledResource {
     fn cmp(&self, other: &Self) -> Ordering {
-        self.priority.cmp(&other.priority)
+        self.priority.cmp(&other.priority).reverse()
     }
 }
 
@@ -74,7 +74,7 @@ fn osse() -> Html {
                     html! {
                         <div key={r.url.to_owned()}>
                         //Show page title and description
-                            <a href={r.url.to_owned()}>{r.url.to_owned()}{"--"}{r.title.to_owned()}{"----"}{r.description.to_owned()}</a>
+                            <a href={r.url.to_owned()}>{r.url.to_owned()}{"--"}{r.title.to_owned()}{"----"}{r.description.to_owned()}{format!("PRIO: {}", r.priority)}</a>
                         </div>
                     }
                 })