From 4f6bef1850bc8bc5a4cd26e306a11c0f06576e1c Mon Sep 17 00:00:00 2001 From: mauro-balades Date: Mon, 30 Sep 2024 16:58:46 +0200 Subject: [PATCH] Fix formatting in status.json and themes-search.tsx --- public/status.json | 2 +- public/uma.js | 173 +++++++++++++++++++++++++++++- src/app/layout.tsx | 15 ++- src/components/create-theme.tsx | 6 +- src/components/download.tsx | 4 +- src/components/footer.tsx | 39 +++++-- src/components/marketplace.tsx | 26 ++--- src/components/theme-card.tsx | 2 +- src/components/themes-search.tsx | 2 +- src/lib/release-notes.ts | 177 +++++++++++++++++-------------- 10 files changed, 335 insertions(+), 111 deletions(-) diff --git a/public/status.json b/public/status.json index 7e14ac1..ab589af 100644 --- a/public/status.json +++ b/public/status.json @@ -1 +1 @@ -{ "ZenBot":200 } +{ "ZenBot": 200 } diff --git a/public/uma.js b/public/uma.js index 68b2b83..b774b96 100644 --- a/public/uma.js +++ b/public/uma.js @@ -1 +1,172 @@ -!function(){"use strict";(t=>{const{screen:{width:e,height:a},navigator:{language:r},location:n,localStorage:i,document:c,history:o}=t,{hostname:s,href:u}=n,{currentScript:l,referrer:d}=c;if(!l)return;const f="data-",m=l.getAttribute.bind(l),h=m(f+"website-id"),p=m(f+"host-url"),g=m(f+"tag"),y="false"!==m(f+"auto-track"),b="true"===m(f+"exclude-search"),v=m(f+"domains")||"",S=v.split(",").map((t=>t.trim())),w=`${(p||""||l.src.split("/").slice(0,-1).join("/")).replace(/\/$/,"")}/api/send`,N=`${e}x${a}`,T=/data-umami-event-([\w-_]+)/,A=f+"umami-event",x=300,O=t=>{if(t){try{const e=decodeURI(t);if(e!==t)return e}catch(e){return t}return encodeURI(t)}},U=t=>{try{const{pathname:e,search:a}=new URL(t);t=e+a}catch(t){}return b?t.split("?")[0]:t},j=()=>({website:h,hostname:s,screen:N,language:r,title:O(q),url:O(D),referrer:O(_),tag:g||void 0}),k=(t,e,a)=>{a&&(_=D,D=U(a.toString()),D!==_&&setTimeout(I,x))},E=()=>!h||i&&i.getItem("umami.disabled")||v&&!S.includes(s),L=async(t,e="event")=>{if(E())return;const a={"Content-Type":"application/json"};void 0!==R&&(a["x-umami-cache"]=R);try{const r=await fetch(w,{method:"POST",body:JSON.stringify({type:e,payload:t}),headers:a}),n=await r.text();return R=n}catch(t){}},$=()=>{B||(I(),(()=>{const t=(t,e,a)=>{const r=t[e];return(...e)=>(a.apply(null,e),r.apply(t,e))};o.pushState=t(o,"pushState",k),o.replaceState=t(o,"replaceState",k)})(),(()=>{const t=new MutationObserver((([t])=>{q=t&&t.target?t.target.text:void 0})),e=c.querySelector("head > title");e&&t.observe(e,{subtree:!0,characterData:!0,childList:!0})})(),c.addEventListener("click",(async t=>{const e=t=>["BUTTON","A"].includes(t),a=async t=>{const e=t.getAttribute.bind(t),a=e(A);if(a){const r={};return t.getAttributeNames().forEach((t=>{const a=t.match(T);a&&(r[a[1]]=e(t))})),I(a,r)}},r=t.target,i=e(r.tagName)?r:((t,a)=>{let r=t;for(let t=0;t{o||(n.href=e)}))}else if("BUTTON"===i.tagName)return a(i)}}),!0),B=!0)},I=(t,e)=>L("string"==typeof t?{...j(),name:t,data:"object"==typeof e?e:void 0}:"object"==typeof t?t:"function"==typeof t?t(j()):j()),K=t=>L({...j(),data:t},"identify");t.umami||(t.umami={track:I,identify:K});let R,B,D=U(u),_=d!==s?d:"",q=c.title;y&&!E()&&("complete"===c.readyState?$():c.addEventListener("readystatechange",$,!0))})(window)}(); +!(function () { + "use strict"; + ((t) => { + const { + screen: { width: e, height: a }, + navigator: { language: r }, + location: n, + localStorage: i, + document: c, + history: o, + } = t, + { hostname: s, href: u } = n, + { currentScript: l, referrer: d } = c; + if (!l) return; + const f = "data-", + m = l.getAttribute.bind(l), + h = m(f + "website-id"), + p = m(f + "host-url"), + g = m(f + "tag"), + y = "false" !== m(f + "auto-track"), + b = "true" === m(f + "exclude-search"), + v = m(f + "domains") || "", + S = v.split(",").map((t) => t.trim()), + w = `${(p || "" || l.src.split("/").slice(0, -1).join("/")).replace(/\/$/, "")}/api/send`, + N = `${e}x${a}`, + T = /data-umami-event-([\w-_]+)/, + A = f + "umami-event", + x = 300, + O = (t) => { + if (t) { + try { + const e = decodeURI(t); + if (e !== t) return e; + } catch (e) { + return t; + } + return encodeURI(t); + } + }, + U = (t) => { + try { + const { pathname: e, search: a } = new URL(t); + t = e + a; + } catch (t) {} + return b ? t.split("?")[0] : t; + }, + j = () => ({ + website: h, + hostname: s, + screen: N, + language: r, + title: O(q), + url: O(D), + referrer: O(_), + tag: g || void 0, + }), + k = (t, e, a) => { + a && ((_ = D), (D = U(a.toString())), D !== _ && setTimeout(I, x)); + }, + E = () => + !h || (i && i.getItem("umami.disabled")) || (v && !S.includes(s)), + L = async (t, e = "event") => { + if (E()) return; + const a = { "Content-Type": "application/json" }; + void 0 !== R && (a["x-umami-cache"] = R); + try { + const r = await fetch(w, { + method: "POST", + body: JSON.stringify({ type: e, payload: t }), + headers: a, + }), + n = await r.text(); + return (R = n); + } catch (t) {} + }, + $ = () => { + B || + (I(), + (() => { + const t = (t, e, a) => { + const r = t[e]; + return (...e) => (a.apply(null, e), r.apply(t, e)); + }; + (o.pushState = t(o, "pushState", k)), + (o.replaceState = t(o, "replaceState", k)); + })(), + (() => { + const t = new MutationObserver(([t]) => { + q = t && t.target ? t.target.text : void 0; + }), + e = c.querySelector("head > title"); + e && + t.observe(e, { subtree: !0, characterData: !0, childList: !0 }); + })(), + c.addEventListener( + "click", + async (t) => { + const e = (t) => ["BUTTON", "A"].includes(t), + a = async (t) => { + const e = t.getAttribute.bind(t), + a = e(A); + if (a) { + const r = {}; + return ( + t.getAttributeNames().forEach((t) => { + const a = t.match(T); + a && (r[a[1]] = e(t)); + }), + I(a, r) + ); + } + }, + r = t.target, + i = e(r.tagName) + ? r + : ((t, a) => { + let r = t; + for (let t = 0; t < a; t++) { + if (e(r.tagName)) return r; + if (((r = r.parentElement), !r)) return null; + } + })(r, 10); + if (!i) return a(r); + { + const { href: e, target: r } = i, + c = i.getAttribute(A); + if (c) + if ("A" === i.tagName) { + const o = + "_blank" === r || + t.ctrlKey || + t.shiftKey || + t.metaKey || + (t.button && 1 === t.button); + if (c && e) + return ( + o || t.preventDefault(), + a(i).then(() => { + o || (n.href = e); + }) + ); + } else if ("BUTTON" === i.tagName) return a(i); + } + }, + !0, + ), + (B = !0)); + }, + I = (t, e) => + L( + "string" == typeof t + ? { ...j(), name: t, data: "object" == typeof e ? e : void 0 } + : "object" == typeof t + ? t + : "function" == typeof t + ? t(j()) + : j(), + ), + K = (t) => L({ ...j(), data: t }, "identify"); + t.umami || (t.umami = { track: I, identify: K }); + let R, + B, + D = U(u), + _ = d !== s ? d : "", + q = c.title; + y && + !E() && + ("complete" === c.readyState + ? $() + : c.addEventListener("readystatechange", $, !0)); + })(window); +})(); diff --git a/src/app/layout.tsx b/src/app/layout.tsx index f3cb761..f99d295 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -25,9 +25,20 @@ export default async function RootLayout({ {/* Analitics */} - + {/* End */} - + diff --git a/src/components/create-theme.tsx b/src/components/create-theme.tsx index 2d264fb..c1eb8fd 100644 --- a/src/components/create-theme.tsx +++ b/src/components/create-theme.tsx @@ -291,9 +291,9 @@ export default function CreateThemePage() {
- Right now, we aren't taking more color Mods for the browser, - until we find a way to make it more accessible for everyone. - However, you can still create your own theme and share it with the + Right now, we aren't taking more color Mods for the browser, until + we find a way to make it more accessible for everyone. However, + you can still create your own theme and share it with the community.
diff --git a/src/components/download.tsx b/src/components/download.tsx index fd7d314..159b004 100644 --- a/src/components/download.tsx +++ b/src/components/download.tsx @@ -190,7 +190,7 @@ export default function DownloadPage() { }; const linuxAppimageBashScript = - 'bash <(curl https://updates.zen-browser.app/appimage.sh)'; + "bash <(curl https://updates.zen-browser.app/appimage.sh)"; return ( <> @@ -533,7 +533,7 @@ export default function DownloadPage() { "mb-2 ml-5 flex h-full w-full cursor-pointer select-none flex-col items-center rounded-lg border bg-background p-5", selectedLinuxDownloadType === "flatpak" ? "border-blue-400" - : "" + : "", )} >

diff --git a/src/components/footer.tsx b/src/components/footer.tsx index f16ef3b..b585101 100644 --- a/src/components/footer.tsx +++ b/src/components/footer.tsx @@ -13,9 +13,16 @@ export default function Footer() {

Zen Browser

- - @@ -93,10 +108,20 @@ export default function Footer() {

Support Us

diff --git a/src/components/marketplace.tsx b/src/components/marketplace.tsx index 074aba0..a6b6d43 100644 --- a/src/components/marketplace.tsx +++ b/src/components/marketplace.tsx @@ -11,25 +11,25 @@ export default function MarketplacePage({ themes }: { themes: ZenTheme[] }) { const [tags, setTags] = React.useState(["all"]); return ( -
-
+
+
-

Mods Store

-

- Discover and install Mods for Zen Browser. -

- +

Mods Store

+

+ Discover and install Mods for Zen Browser. +

+
-
+
{getThemesFromSearch(themes, searchInput, tags).map((theme) => ( ))} diff --git a/src/components/theme-card.tsx b/src/components/theme-card.tsx index 3c78444..04c9446 100644 --- a/src/components/theme-card.tsx +++ b/src/components/theme-card.tsx @@ -38,7 +38,7 @@ export default function ThemeCard({ {theme.name}

{theme.name.substring(0, maxNameLen).trim() + diff --git a/src/components/themes-search.tsx b/src/components/themes-search.tsx index 7724d06..b96cee7 100644 --- a/src/components/themes-search.tsx +++ b/src/components/themes-search.tsx @@ -52,7 +52,7 @@ export default function ThemesSearch({ key={tag} onClick={() => setTags([tag])} className={ny( - `!rounded-full px-5 !min-w-24 !py-2 !h-fit ${tags.includes(tag) ? "bg-black text-white dark:bg-white dark:text-black" : ""}`, + `!h-fit !min-w-24 !rounded-full !py-2 px-5 ${tags.includes(tag) ? "bg-black text-white dark:bg-white dark:text-black" : ""}`, )} > {tag.replace(/-/g, " ")} diff --git a/src/lib/release-notes.ts b/src/lib/release-notes.ts index e85f038..95a5a48 100644 --- a/src/lib/release-notes.ts +++ b/src/lib/release-notes.ts @@ -985,12 +985,11 @@ export const releaseNotes: ReleaseNote[] = [ { version: "1.0.1-a.4", date: "23/09/2024", - image: true, + image: true, workflowId: 11000317603, - extra: "This update addresses some significant issues with the previous release.\n\nWe appreciate your patience and support!", - features: [ - "Added a new system for handling keyboard shortcuts", - ], + extra: + "This update addresses some significant issues with the previous release.\n\nWe appreciate your patience and support!", + features: ["Added a new system for handling keyboard shortcuts"], fixes: [ { description: "The New Tab button is not visible", @@ -1005,88 +1004,106 @@ export const releaseNotes: ReleaseNote[] = [ issue: 1636, }, { - description: "Expand-on-hover doesn't work properly when compact mode is enabled", + description: + "Expand-on-hover doesn't work properly when compact mode is enabled", + }, + { + description: "Fixed an issue with reordering tabs", }, - { - description: "Fixed an issue with reordering tabs", - } ], }, - { - version: "1.0.1-a.5", - date: "24/09/2024", - image: false, + { + version: "1.0.1-a.5", + date: "24/09/2024", + image: false, workflowId: 11020784612, - extra: "This update is a small patch to fix some issues that weren't addressed in the previous release!", + extra: + "This update is a small patch to fix some issues that weren't addressed in the previous release!", features: [ - "Moved application menu button to the right", - "Added new shortcuts", - "Collapsed tab sidebar is now smaller" - ], - fixes: [ - { - description: "Fixed issue with hovering over window control buttons (macOS)", - }, - { - description: "(Hopefully) resolved all issues with keyboard shortcuts", - issue: 1629 - }, - - ], - }, - { - version: "1.0.1-a.6", - date: "29/09/2024", - image: true, + "Moved application menu button to the right", + "Added new shortcuts", + "Collapsed tab sidebar is now smaller", + ], + fixes: [ + { + description: + "Fixed issue with hovering over window control buttons (macOS)", + }, + { + description: "(Hopefully) resolved all issues with keyboard shortcuts", + issue: 1629, + }, + ], + }, + { + version: "1.0.1-a.6", + date: "29/09/2024", + image: true, workflowId: 11095257662, - extra: "This release fixes a few critical bugs and introduces Tab Unloading! Unused tabs will free up memory with this new feature", + extra: + "This release fixes a few critical bugs and introduces Tab Unloading! Unused tabs will free up memory with this new feature", features: [ - "Added Paste and Go button", - "Added Tab Unloading", - "Sidebar Web Panel can now be moved freely", - "Added warning when shortcut setting changes are unsaved", - "Enabled container tabs by default", - "Improved Expand Tabs on Hover layout" - ], - themeChanges: [ - "Toggle inputs will not use the themed tertiary color", - ], - breakingChanges: [ - "The keyboard shortcuts will be overriden by the defaults ones in this update.", - ], - fixes: [ - { - description: "Fixed Firefox add-ons not updating", - issue: 1173 - }, - { - description: "Fixed expand-on-hover shifting web page", - issue: 1718 - }, - { - description: "Fixed cycling between workspaces with shortcuts", - }, - { - description: "Removed duplicate shortcut options in the settings", - issue: 1784 - }, - { - description: "Restored missing keyboard shortcuts", - issue: 1706 - }, - { - description: "Fixed keyboard shortcuts not saving", - issue: 1715 - }, - { - description: "Fixed workspace names that start with an emoji", - issue: 1732 - }, - { - description: "Fixed shortcut keys incorrectly displayed on macOS" - } - ] - } + "Added Paste and Go button", + "Added Tab Unloading", + "Sidebar Web Panel can now be moved freely", + "Added warning when shortcut setting changes are unsaved", + "Enabled container tabs by default", + "Improved Expand Tabs on Hover layout", + ], + themeChanges: ["Toggle inputs will not use the themed tertiary color"], + breakingChanges: [ + "The keyboard shortcuts will be overriden by the defaults ones in this update.", + ], + fixes: [ + { + description: "Fixed Firefox add-ons not updating", + issue: 1173, + }, + { + description: "Fixed expand-on-hover shifting web page", + issue: 1718, + }, + { + description: "Fixed cycling between workspaces with shortcuts", + }, + { + description: "Removed duplicate shortcut options in the settings", + issue: 1784, + }, + { + description: "Restored missing keyboard shortcuts", + issue: 1706, + }, + { + description: "Fixed keyboard shortcuts not saving", + issue: 1715, + }, + { + description: "Fixed workspace names that start with an emoji", + issue: 1732, + }, + { + description: "Fixed shortcut keys incorrectly displayed on macOS", + }, + ], + }, + { + version: "1.0.1-a.7", + date: "01/10/2024", + image: false, + workflowId: 11108707060, + extra: + "This release is a really small release to fix a very important bug that was introduced in the previous release.", + fixes: [ + { + description: + "Fixed a critical issue with the sidebar being 1 pixel small", + }, + { + description: "Fixed tabs separation always showing", + }, + ], + }, ].reverse(); export function releaseNoteIsAlpha(note: ReleaseNote) {