From 9f13e19e60d0067e8bee2a46f3ee3488c4501f40 Mon Sep 17 00:00:00 2001 From: maiquocthinh Date: Fri, 30 Jun 2023 19:13:58 +0700 Subject: [PATCH] feat: done ui --- src/page/favicon.ico | Bin 0 -> 15406 bytes src/page/home.html | 117 +++++++++++++++++++++++++++++++++ src/page/script.js | 149 +++++++++++++++++++++++++++++++++++++++++++ src/page/style.css | 148 ++++++++++++++++++++++++++++++++++++++++++ src/routes/home.ts | 11 ++-- wrangler.toml | 3 + 6 files changed, 422 insertions(+), 6 deletions(-) create mode 100644 src/page/favicon.ico create mode 100644 src/page/home.html create mode 100644 src/page/script.js create mode 100644 src/page/style.css diff --git a/src/page/favicon.ico b/src/page/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..71db39577688436365d1a23791c769a84c71373f GIT binary patch literal 15406 zcmeHN3vgD&6~0LzfW`7qq&P(w1f)YnWXhvjc}WcXNfZ=prM5C7<)MH;%A+b3f(QXY z#(BDQyC=kDD- zuRVMA?Afzd)1tH(t!`b7-%Yh4)ikYxrfE%^`oCM%)3i6at!-Pqzon+_ZlGzc7=}?8 z!{5#?PfxELx;HVG(ztw?w4X{)P)8g3?1=Q+O|=+iF_*HWTq3K2KEME0rGxLJ9Lkb7 z-8P=0W|Q8dTZhc#GK=dgsN2T;08NHfX@I80Z9RK4Ma2&#EpAXyiRw9&TF=>P&;Sl( z(8nueZollHz`3noG7X%yjHYF7q^Vq@-sa+LObaa7cgpDv_7roKt_|1@2d!LMgsUqAiBB)aXlW2p8M6X@2VuTi5> zX`-P16K-qx_!t6=0mu&ad&!bfEiI(>GAU-YW(i z>S#ls3M*|xZEHAUp3u|1>DdM>>X;Aosj!frOPbmiCcdyq%!Q=kRes<|d*-@fKa!5y z8#vO2&Gzet3tLz17j*Cqnvly5AANu^<4QU3mNv<7VXa@4MmTl&nWkL2a)E!U=+h&Y z>ac#EU>&6M7;^btz~!o53iP&gzyP+Q{3O0_FSSg}p(V_xm`jkII(!!c2e^_>xNoL? z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 index 0000000..a34c8b2 --- /dev/null +++ b/src/page/home.html @@ -0,0 +1,117 @@ + + + + + + + + + Get Link + + +
+

Get Link Terabox

+
+ + +
+
+ +
+
+
+
+
+ + + + + + diff --git a/src/page/script.js b/src/page/script.js new file mode 100644 index 0000000..c673257 --- /dev/null +++ b/src/page/script.js @@ -0,0 +1,149 @@ +const TreeView = (function () { + function render(data, rootList) { + for (const item of data) { + if (item.isDir) { + // create
  • + const li = document.createElement("li") + li.className = "folder" + li.setAttribute("opened", "true") + + // create
    + const folderHeaderDiv = document.createElement("div") + folderHeaderDiv.className = "folder-header" + folderHeaderDiv.innerHTML = ` + + + + + + + + ${item.name}` + + // append
      to
    • + li.appendChild(folderHeaderDiv) + + // If the folder has children, recursively render them + if (item.children && item.children.length > 0) { + // create
        + const childrenUl = document.createElement("ul") + childrenUl.className = "children" + // recursively render + render(item.children, childrenUl) + // append
          to
        • + li.appendChild(childrenUl) + } + + // append to rootList + rootList.appendChild(li) + } else { + // create
        • + const li = document.createElement("li") + li.className = "file" + + li.innerHTML = ` + ${item.name} + ${item.size}` + + // create