diff --git a/share/wimi/CHANGELOG b/share/wimi/CHANGELOG index 4cb727b..96d38ea 100644 --- a/share/wimi/CHANGELOG +++ b/share/wimi/CHANGELOG @@ -2,8 +2,31 @@ ** vNEXT -**** Refresh flag icons -The flag icons have been improved +**** Replace ISP details with location details +We now show the location details associated with an IP - +usually a city and country + +**** Add ~src/fonts/kanit-regular.ttf~ +Add a custom font + +**** Center-align content +Align content to the center. +Both horizontal and vertical + +**** Apply minimum width +A minimum width is now applied +to ~browseraction.html~ via ~App.tsx~ + +**** Remove horizontal scrollbar +Remove a horizontal scrollbar that could appear +when the extension's browser action appeared for +the first time + +**** Change primary color +Change the primary / background color to ~#FFF~ + +**** Re-import flag icons +The flag icons have been re-imported ** v0.6.1 diff --git a/src/css/index.css b/src/css/index.css index 1372954..8f4a6ae 100644 --- a/src/css/index.css +++ b/src/css/index.css @@ -1,11 +1,17 @@ :root { /* Colors */ - --primary-color: #E3F2FD; + --primary-color: #FFF; --secondary-color: #333333; --accent-color: #007BFF; } -#root { +@font-face { + font-family: "Kanit Regular"; + src: url("/fonts/kanit-regular.ttf") format("truetype"); +} + +body { + font-family: "Kanit Regular"; background: var(--primary-color); color: var(--secondary-color); } diff --git a/src/fonts/kanit-regular.ttf b/src/fonts/kanit-regular.ttf new file mode 100644 index 0000000..3911320 Binary files /dev/null and b/src/fonts/kanit-regular.ttf differ diff --git a/src/html/browseraction.html b/src/html/browseraction.html index 7850299..20bf6c1 100644 --- a/src/html/browseraction.html +++ b/src/html/browseraction.html @@ -4,8 +4,8 @@ - -
+ +
diff --git a/src/js/components/App.tsx b/src/js/components/App.tsx index b2fdeba..472cd02 100644 --- a/src/js/components/App.tsx +++ b/src/js/components/App.tsx @@ -5,26 +5,31 @@ export function App() { const [response, error] = useWebService(); if (response) { return ( -
- -
- {response.IPAddress} - {response.ISP} +
+
+ +
+ {response.IPAddress} + {response.Location} +
); } else if (error) { return ( -
- - {t("error")} +
+
+ + {t("error")} +
); } else { return ( -
- - {t("loading")} +
+
+ +
); } diff --git a/src/js/index.tsx b/src/js/index.tsx index 2640e99..0aa5cf6 100644 --- a/src/js/index.tsx +++ b/src/js/index.tsx @@ -2,6 +2,6 @@ import { render } from "preact"; import { App } from "~/components/App"; document.addEventListener("DOMContentLoaded", () => { - const el: HTMLElement = document.getElementById("root")!; + const el: HTMLElement = document.querySelector("main")!; render(, el); }); diff --git a/src/js/lib/response.ts b/src/js/lib/response.ts index 8b9353f..7458793 100644 --- a/src/js/lib/response.ts +++ b/src/js/lib/response.ts @@ -3,8 +3,9 @@ export type TResponse = { ISP: string; City: string; Country: string; - countryCode: string; - isTorExitNode: boolean; + CountryCode: string; + Location: string; + IsTorExitNode: boolean; }; export type TServerResponse = { @@ -13,6 +14,7 @@ export type TServerResponse = { YourCity: string; YourCountry: string; YourCountryCode: string; + YourLocation: string; YourTorExit: boolean; }; @@ -23,8 +25,9 @@ export function Response(res: TServerResponse): TResponse { self.ISP = res.YourISP; self.City = res.YourCity; self.Country = res.YourCountry; - self.countryCode = res.YourCountryCode; - self.isTorExitNode = res.YourTorExit; + self.CountryCode = res.YourCountryCode; + self.Location = res.YourLocation; + self.IsTorExitNode = res.YourTorExit; return self; }