Skip to content

Commit

Permalink
🚧 Oauth redirect esnasında dili koru
Browse files Browse the repository at this point in the history
  • Loading branch information
KimlikDAO-bot committed Jan 31, 2024
1 parent fbd14be commit d8ec63e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 15 deletions.
22 changes: 17 additions & 5 deletions al/tanışma/birim.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,26 @@ const açıkTcktAlVe = (adres, sonra) => {
const nkoDüğmesi = dom.adla("tab");
/** @const {Element} */
const kutu = dom.adla("ta");
/** @const {string} */
const eDevletDüğmesiMetni = eDevletDüğmesi.innerText;

if (Cüzdan.() == ChainId.MinaBerkeley) {
eDevletDüğmesi.innerText = "Proceed with test data (Berkeley)";
eDevletDüğmesi.onclick = () =>
window.location.href = "//mock-edevlet-kapisi.kimlikdao.net/auth?" +
/**
* @param {string} yeniAğ
*/
const testVeriDüğmesiGüncelle = (yeniAğ) => {
const testVeri = yeniAğ == ChainId.MinaBerkeley;
eDevletDüğmesi.innerText = testVeri
? dom.TR ? "Deneme veri ile ilerle" : "Proceed with test data (Berkeley)"
: eDevletDüğmesiMetni;
eDevletDüğmesi.onclick = testVeri
? () =>
window.location.href = "//mock-edevlet-kapisi.kimlikdao.net/auth?" +
"response_type=code&client_id=F5CAA82F-E2CF-4F21-A745-471ABE3CE7F8&" +
"redirect_uri=https://kimlikdao.org/mint"
`redirect_uri=https://kimlikdao.org/${dom.TR ? "al" : "mint"}`
: null;
}
Cüzdan.ağDeğişince(testVeriDüğmesiGüncelle);
testVeriDüğmesiGüncelle(Cüzdan.());

kutu.classList.remove("disabled");

Expand Down
20 changes: 10 additions & 10 deletions ana/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ build/ana/sayfa-%.js: ana/sayfa.js \
lib/util/dom.js lib/util/çevir.js
mkdir -p $(dir $@)
bun google-closure-compiler -W VERBOSE -O ADVANCED --charset UTF-8 \
--define "TR\$$\$$module\$$lib\$$util\$$dom=$(Lang-$*)" \
--define "KonumTR\$$\$$module\$$birim\$$dil\$$birim=$(ana-tr)" \
--define "KonumEN\$$\$$module\$$birim\$$dil\$$birim=$(ana-en)" \
--emit_use_strict \
--module_resolution NODE \
--assume_function_wrapper \
--dependency_mode PRUNE \
--entry_point $< \
--js $^ \
--js_output_file $@
--define "TR\$$\$$module\$$lib\$$util\$$dom=$(Lang-$*)" \
--define "KonumTR\$$\$$module\$$birim\$$dil\$$birim=$(ana-tr)" \
--define "KonumEN\$$\$$module\$$birim\$$dil\$$birim=$(ana-en)" \
--emit_use_strict \
--module_resolution NODE \
--assume_function_wrapper \
--dependency_mode PRUNE \
--entry_point $< \
--js $^ \
--js_output_file $@
bun uglifyjs $@ -m -c toplevel,unsafe -o $@

build/ana/sayfa-%.css: \
Expand Down

0 comments on commit d8ec63e

Please sign in to comment.