Skip to content

Commit

Permalink
details: fix back nav, return to home on delete
Browse files Browse the repository at this point in the history
  • Loading branch information
inciner8r committed Mar 26, 2023
1 parent 7ade960 commit 48bb65c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion popup/src/pages/my-passwords/pass-details/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const PassDetails = () => {
const [PassHidden, setPassHidden] = useState<boolean>(true);
const delRecord = (id: string): any => {
deleteRecord(id);
navigate("/my-passwords");
};

const editAll = () => {
Expand All @@ -59,7 +60,7 @@ const PassDetails = () => {
<div>
<div className="top flex flex-row bg-gray-200 align-middle mb-1 px-2 py-2">
<button
onClick={() => navigate("/ my-passwords")}
onClick={() => navigate("/my-passwords")}
className="back bg-blue-300 text-blue-700 mr-2 p-1 w-8 h-8 align-middle justify-center flex rounded-full font-semibold"
>
{" < "}
Expand Down
12 changes: 7 additions & 5 deletions src/content_scripts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const on_load = () => {
}
const passwords = res;
const list_str = passwords
.map((e) => `<p class="usernames" id="${e.password}"> ${e.username} </p>`)
.map((e) => `<p class="usernames" style="margin:-4px;" id="${e.password}"> ${e.username} </p>`)
.join(" ");

const drop_down_element = document.createElement("div");
Expand All @@ -139,10 +139,12 @@ const on_load = () => {
top:10%;
left:4%;
padding:16px;
cursor: pointer;
background-color:#cdd5dd;
z-index:9999;
">
cursor:pointer;
color:black;
background-color: #eeeeee;
z-index: 9999;
border-radius: 10px;
">
${list_str} </div>`;
if (!input_height) return;
const drop_down_btn_element = document.createElement("div");
Expand Down

0 comments on commit 48bb65c

Please sign in to comment.