Skip to content

Commit

Permalink
👛 Cüzdan iyileştir
Browse files Browse the repository at this point in the history
  • Loading branch information
KimlikDAO-bot committed Jan 13, 2025
1 parent 5d244f0 commit ce2392a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
10 changes: 9 additions & 1 deletion birim/cüzdan/birim.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@

/**
* Bağlantı listesi
* @name {BağlantıListesi}
* @export {BağlantıListesi}
*/
.cuf {
cursor: pointer;
Expand Down Expand Up @@ -200,6 +200,10 @@ li.on>.cust {
background: green;
}

/**
* Cüzdan ışığı
* @name {CüzdanIşığı}
*/
.cust {
width: 6px;
height: 6px;
Expand Down Expand Up @@ -232,6 +236,10 @@ li.on>.cust {
margin-top: 20px;
}

/**
* Cüzdan indir düğmesi
* @export {Cüzdanİndir}
*/
.cui {
position: absolute;
right: 7px;
Expand Down
13 changes: 7 additions & 6 deletions birim/cüzdan/birim.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
import { CoreBağlantısı, MetaMaskBağlantısı, RabbyBağlantısı } from "./evmBağlantısı";
import { AuroConnection as AuroBağlantısı } from "./minaBağlantısı";
import { AğBilgileri } from "/birim/ağlar/birim";
import { HostUrl } from "/crate";
import { ChainGroup, ChainGroups, ChainId } from "/lib/crosschain/chains";
import { Provider } from "/lib/crosschain/provider";
import "/lib/ethereum/ERC721Unlockable.d";
Expand Down Expand Up @@ -305,7 +306,7 @@ const bağlantıSeçildi = (bağlantıAdı, bağlantı) => {
Bağlı = bağlantı;
bağlantı.connect(, ağDeğişti, adresDeğişti)
.then(() => {
document.cookie = `cu=${bağlantıAdı};domain=.kimlikdao.org;SameSite=Strict;max-age=` + 1e6;
document.cookie = `cu=${bağlantıAdı};domain=.${HostUrl.slice(8)};SameSite=Strict;max-age=` + 1e6;
eskiBağlantı.disconnect();
for (const f of BağlantıDeğişince) f(bağlantı);
})
Expand All @@ -317,17 +318,17 @@ const bağlantıSeçildi = (bağlantıAdı, bağlantı) => {

const bağlantıSeçiciGizle = () => {
for (const grup of ChainGroups)
dom.adlaGizle("cuf" + grup);
dom.adlaGizle(Css.BağlantıListesi + grup);
}

const bağlantıSeçiciGöster = () => {
/** @const {ChainGroup} */
const ağGrubu = /** @type {ChainGroup} */(.slice(0, 2));
for (const grup of ChainGroups)
dom.adlaGösterGizle("cuf" + grup, grup == ağGrubu)
dom.adlaGösterGizle(Css.BağlantıListesi + grup, grup == ağGrubu)

/** @const {!Element} */
const seçici = dom.adla("cuf" + ağGrubu);
const seçici = dom.adla(Css.BağlantıListesi + ağGrubu);

/** @const {!NodeList<!Element>} */
const satırlar = seçici.children;
Expand All @@ -345,7 +346,7 @@ const bağlantıSeçiciGöster = () => {
/** @const {string} */
const indirURLi = varMı ? "" : bağlantı.downloadURL();
/** @const {boolean} */
const düğmeGöster = indirURLi != "" && düğmeMi.classList.contains("cui");
const düğmeGöster = indirURLi != "" && düğmeMi.classList.contains(Css.Cüzdanİndir);
dom.gösterGizle(düğmeMi, düğmeGöster);
düğmeMi.onclick = düğmeGöster
? () => window.open(indirURLi, "_blank").focus()
Expand Down Expand Up @@ -391,7 +392,7 @@ const kur = () => {
}

CüzdanAdresi.onclick = () => navigator.clipboard.writeText(/** @type {string} */(Adres));
dom.adla("cuex").onclick = () => {
dom.span(Css.ExplorerLinki).onclick = () => {
const adresEki = .startsWith("mi") ? "wallet" : "address";
const url = `//${AğBilgileri[].izleyici}/${adresEki}/${Adres}`;
window.open(url, "_blank");
Expand Down
5 changes: 4 additions & 1 deletion birim/cüzdan/birim.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ const bağlantıResmi = (ad) => `birim/cüzdan/img/${ad.split(" ")[0].toLowerCas
const Bağlantı = ({ idx, name }) => (
<li id={Css.Kök + idx}>
<Image src={bağlantıResmi(name)} width={32} height={32} />
<div class="cust"></div>{name}<span class="cui" style="display:none" data-en="GET">İNDİR</span>
<div class={Css.CüzdanIşığı}></div>{name}<span class={Css.Cüzdanİndir} style="display:none">{{
en: "GET",
tr: "İNDİR"
}}</span>
</li>
);

Expand Down

0 comments on commit ce2392a

Please sign in to comment.