Skip to content

Commit

Permalink
👛 Make singleton member variables non-capitalized
Browse files Browse the repository at this point in the history
  • Loading branch information
KimlikDAO-bot committed Feb 3, 2025
1 parent eac3a8e commit 2895525
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 24 deletions.
10 changes: 5 additions & 5 deletions components/kpass/KPass.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ const Nav = () => {
*/
const KPass = ({ style, piggyback }) => {
/** @const {!HTMLDivElement} */
KPass.Root = dom.div(Css.Root);
KPass.root = dom.div(Css.Root);

return (
<KPass.Root style={style}>
<KPass.root style={style}>
<Css />
<Cover id={Css.CoverSide} bundleName="KPASS.svg" piggyback={piggyback} />
<div id={Css.InfoSide}>
Expand All @@ -86,7 +86,7 @@ const KPass = ({ style, piggyback }) => {
<Logo />
<Nav />
</div>
</KPass.Root>
</KPass.root>
);
}
/** @enum {string} */
Expand All @@ -99,11 +99,11 @@ KPass.LeftArrow = LeftArrow;
/**
* @param {boolean} infoSide
*/
KPass.showSide = (infoSide) => KPass.Root.classList.toggle(Css.InfoSide, infoSide);
KPass.showSide = (infoSide) => KPass.root.classList.toggle(Css.InfoSide, infoSide);

/**
* @return {boolean}
*/
KPass.flip = () => KPass.Root.classList.toggle(Css.InfoSide);
KPass.flip = () => KPass.root.classList.toggle(Css.InfoSide);

export default KPass;
35 changes: 18 additions & 17 deletions components/phone/Phone.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ const JointCss = css`

const WalletApp = () => {
/** @const {!HTMLDivElement} */
WalletApp.Root = dom.div(Css.WalletApp)
WalletApp.root = dom.div(Css.WalletApp)
return (
<WalletApp.Root>
<WalletApp.root>
<div id={Css.Balance}>$1523.74</div>
<div id={Css.Account}>KimlikDAO</div>
<div id={Css.Address}>0x1DA0...1DA0</div>
Expand All @@ -43,7 +43,7 @@ const WalletApp = () => {
<div id={Css.WalletAppGallery}>
<div class={Css.WalletAppNft} />
</div>
</WalletApp.Root>
</WalletApp.root>
);
}

Expand All @@ -52,23 +52,23 @@ const WalletApp = () => {
* @return {string}
*/
WalletApp.setAddress = (address = "0x1DA01DAO") => WalletApp
.Root
.root
.children[2]
.innerText = address.slice(0, 6) + "..." + address.slice(-4);


const InfoDialog = () => {
/** @const {!HTMLDivElement} */
InfoDialog.Root = dom.div(Css.InfoDialog);
InfoDialog.Root.style.opacity = "";
InfoDialog.root = dom.div(Css.InfoDialog);
InfoDialog.root.style.opacity = "";
return (
<InfoDialog.Root noshow>
<InfoDialog.root noshow>
<div id={Css.InfoDialogText} />
<div id={Css.InfoDialogButtons}>
<div id={Css.InfoDialogNo}>{{ en: "Cancel", tr: "Hayır" }}</div>
<div id={Css.InfoDialogYes}>{{ en: "Provide", tr: "Evet" }}</div>
</div>
</InfoDialog.Root>
</InfoDialog.root>
);
}

Expand All @@ -77,11 +77,12 @@ const InfoDialog = () => {
* @param {string=} buttonText
*/
InfoDialog.show = (prompt, buttonText) => {
if (buttonText) InfoDialog.Root.children[1].children[1].innerText = buttonText;
if (buttonText) InfoDialog.root.children[1].children[1].innerText = buttonText;
/** @const {boolean} */
const show = !!prompt;
if (show) InfoDialog.Root.children[0].innerText = prompt;
WalletApp.Root.classList.toggle(Css.Blurred, show);
InfoDialog.Root.classList.toggle(Css.Show, show);
if (show) InfoDialog.root.children[0].innerText = prompt;
WalletApp.root.classList.toggle(Css.Blurred, show);
InfoDialog.root.classList.toggle(Css.Show, show);
KPassDialog.classList.toggle(Css.Blurred, show);
}

Expand Down Expand Up @@ -121,19 +122,19 @@ Phone.showDialog = InfoDialog.show;
*/
Phone.showKPass = (showInDialog, infoSide) => {
/** @type {boolean} */
Phone.InfoSide = infoSide;
Phone.infoSide = infoSide;
const showSide = () => {
KPass.showSide(Phone.InfoSide);
KPassDialogButton.innerText = Phone.InfoSide
KPass.showSide(Phone.infoSide);
KPassDialogButton.innerText = Phone.infoSide
? dom.i18n({ tr: "Gizle", en: "Encrypt" })
: dom.i18n({ en: "Decrypt", tr: "Aç" });
}
showSide();
KPassDialogButton.onclick ||= () => {
Phone.InfoSide = !Phone.InfoSide;
Phone.infoSide = !Phone.infoSide;
showSide();
}
KPass.Root.classList.toggle(JointCss.ShowInWallet, !showInDialog);
KPass.root.classList.toggle(JointCss.ShowInWallet, !showInDialog);
KPassDialogButton.classList.toggle(Css.Hide, !showInDialog);
}

Expand Down
2 changes: 1 addition & 1 deletion components/wallet/Wallet.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @export */
#Cüzdan {
#Root {
display: flex;
align-items: center;
position: relative;
Expand Down
2 changes: 1 addition & 1 deletion components/wallet/Wallet.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ const Wallet = ({
dom.schedule(izinliyseBaÄŸla, 200);

return (
<div id={Css.Cüzdan}>
<div id={Css.Root}>
<Css />
<ChainButton controlsDropdown={Dropdown} class={OrtakCss.Düğme}>
<Image src={aÄŸResmi(defaultChain)} height={32} width={32} inline />
Expand Down

0 comments on commit 2895525

Please sign in to comment.