소스 검색

feat: config menu logo

Sv443 10 달 전
부모
커밋
1c58fcf56d
1개의 변경된 파일14개의 추가작업 그리고 1개의 파일을 삭제
  1. 14 1
      src/menu/menu_old.ts

+ 14 - 1
src/menu/menu_old.ts

@@ -65,11 +65,22 @@ async function mountCfgMenu() {
   const headerElem = document.createElement("div");
   headerElem.classList.add("bytm-menu-header");
 
+  const titleLogoHeaderCont = document.createElement("div");
+  titleLogoHeaderCont.classList.add("bytm-menu-title-logo-header-cont");
+
   const titleCont = document.createElement("div");
   titleCont.classList.add("bytm-menu-titlecont");
   titleCont.role = "heading";
   titleCont.ariaLevel = "1";
 
+  const titleLogoElem = document.createElement("img");
+  const logoSrc = await getResourceUrl(`img-logo${mode === "development" ? "_dev" : ""}`);
+  titleLogoElem.classList.add("bytm-cfg-menu-logo", "bytm-no-select");
+  if(logoSrc)
+    titleLogoElem.src = logoSrc;
+
+  titleLogoHeaderCont.appendChild(titleLogoElem);
+
   const titleElem = document.createElement("h2");
   titleElem.classList.add("bytm-menu-title");
 
@@ -143,7 +154,9 @@ async function mountCfgMenu() {
   titleCont.appendChild(titleElem);
   titleCont.appendChild(linksCont);
 
-  headerElem.appendChild(titleCont);
+  titleLogoHeaderCont.appendChild(titleCont);
+
+  headerElem.appendChild(titleLogoHeaderCont);
   headerElem.appendChild(closeElem);
 
   //#region footer