Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix popup #72

Merged
merged 3 commits into from
Aug 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"manifest_version": 2,
"name": "IC naming extensions",
"description": "Extensions to help you visit icnaming from you browser",
"version": "2.0.3",
"options_page": "options.html",
"browser_action": {
"default_icon": "icon.png"
"version": "2.0.4",
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
},
"background": {
"page": "background.html",
Expand Down
15 changes: 0 additions & 15 deletions src/public/options.html

This file was deleted.

8 changes: 5 additions & 3 deletions src/public/popup.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<!doctype html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>ICNAMING</title>
<script src="js/vendor.js"></script>
<link href="/icon.png" rel="apple-touch-icon" sizes="180x180">
<link href="/icon.png" rel="icon" sizes="32x32" type="image/png">
<link href="/icon.png" rel="icon" sizes="16x16" type="image/png">
</head>

<body>
<div id="root"></div>
<script src="js/popup.js"></script>
</body>
</html>

12 changes: 6 additions & 6 deletions src/src/options.tsx → src/src/popup.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from "react";
import ReactDOM from "react-dom";

const Options = () => {
const Popup = () => {
const wrapStyle = {
width:"425px",
BoxSizing: "border-box",
BoxSizing: "border-box",
margin:"0 auto",
padding: "1rem"
}
Expand All @@ -25,17 +25,17 @@ const Options = () => {
<strong>The gate of decentralized web</strong>
<div style={fontStyle}>This extension opens websites on the blockchain</div>
<div style={{textAlign: "right",marginTop: "1rem"}}>
<a style={fontStyle} href="https://app.icnaming.com/">Register a decentralized name of your own</a>
<a style={fontStyle} href="https://app.icnaming.com/" target="_blank">Register a decentralized name of your own</a>
</div>
</div>
</div>
</div>
);
};

ReactDOM.render(
<React.StrictMode>
<Options/>
<Popup/>
</React.StrictMode>,
document.getElementById("root")
document.getElementById("root"),
);

2 changes: 1 addition & 1 deletion src/webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {
entry: {
// popup: path.join(srcDir, 'popup.tsx'),
redirect: path.join(srcDir, 'redirect.tsx'),
options: path.join(srcDir, 'options.tsx'),
popup: path.join(srcDir, 'popup.tsx'),
background: path.join(srcDir, 'background.ts'),
content_script: path.join(srcDir, 'content_script.tsx'),
},
Expand Down