Skip to content

armgit / mwmbl

Public Imported from GitHub
0

An open source, non-profit web search engine

Reinstate save

Daoud Clarked8a3e29282fa
diff --git a/devdata/index-v2.tinysearch b/devdata/index-v2.tinysearch
index 1af5824..2447f39 100644
Binary files a/devdata/index-v2.tinysearch and b/devdata/index-v2.tinysearch differ
diff --git a/front-end/src/components/organisms/save.js b/front-end/src/components/organisms/save.js
index 38f2dbe..f2ec09e 100644
--- a/front-end/src/components/organisms/save.js
+++ b/front-end/src/components/organisms/save.js
@@ -75,8 +75,8 @@ export default define('save', class extends HTMLLIElement {
return;
}
- if (localStorage.length > 0) {
- const key = this.__getOldestCurationKey();
+ const key = this.__getOldestCurationKey();
+ if (key !== null) {
const value = JSON.parse(localStorage.getItem(key));
console.log("Value", value);
const url = CURATION_URL + value['type'];
diff --git a/mwmbl/templates/index.html b/mwmbl/templates/index.html
index 0afe5fa..2dbfe80 100644
--- a/mwmbl/templates/index.html
+++ b/mwmbl/templates/index.html
@@ -59,10 +59,10 @@
<!-- Javasript entrypoint -->
{#<script src="/static/src/index.js" type="module"></script>#}
<header class="search-menu compact">
-<!-- <ul>
- <li is="${save}"></li>
+ <ul>
+ <li is="mwmbl-save"></li>
</ul>
- <div><a href="/accounts/login/">Login</a> <a href="/accounts/signup/">Sign up</a> </div> -->
+ <div><a href="/accounts/login/">Login</a> <a href="/accounts/signup/">Sign up</a> </div>
<a href="/">
<div class="branding">
<img class="brand-icon" src="/static/images/logo.svg" width="40" height="40" alt="mwmbl logo">