@danhachuel/thunderbolt 0.5.59 → 0.5.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/main.py +10 -2
- package/package.json +1 -1
package/app/main.py
CHANGED
|
@@ -6729,7 +6729,11 @@ def render_google_accounts(*, include_innertube: bool = True):
|
|
|
6729
6729
|
|
|
6730
6730
|
st.divider()
|
|
6731
6731
|
add_account = False
|
|
6732
|
-
|
|
6732
|
+
add_form_open = bool(st.session_state.get("add_batch_account_form_open", False))
|
|
6733
|
+
if not add_form_open and st.button("Adicionar conta Google/YouTube", type="primary", use_container_width=True, key="open_add_batch_account_form"):
|
|
6734
|
+
st.session_state["add_batch_account_form_open"] = True
|
|
6735
|
+
st.rerun()
|
|
6736
|
+
if add_form_open:
|
|
6733
6737
|
st.markdown("### Nova conta Gmail")
|
|
6734
6738
|
st.caption("Este formulário fica fora dos cartões das contas existentes. A associação de canais não depende da completude deste documento; ela apenas ficará pendente para Upload directo até os campos serem preenchidos.")
|
|
6735
6739
|
with st.form("add_batch_account_form"):
|
|
@@ -6742,7 +6746,10 @@ def render_google_accounts(*, include_innertube: bool = True):
|
|
|
6742
6746
|
new_account_client_secret = st.text_input("OAuth Client Secret", type="password", key="new_batch_account_client_secret")
|
|
6743
6747
|
new_account_session_info = st.text_input("sessionInfo token desta conta Google", type="password", key="new_batch_account_session_info", help="Token sessionInfo desta conta. Os cookies e delegated_session_ids ficam no documento; a INNERTUBE_API_KEY é configurada no bloco próprio acima.")
|
|
6744
6748
|
new_account_document = st.file_uploader("Documento de cookies/credenciais opcional", type=["json"], key="new_batch_account_credentials_document", help="Pode subir agora um JSON completo ou apenas o documento de cookies. Se não subir, será criado um credentials.json padrão vazio.")
|
|
6745
|
-
add_account = st.form_submit_button("
|
|
6749
|
+
add_account = st.form_submit_button("Guardar conta Google/YouTube", type="primary", use_container_width=True)
|
|
6750
|
+
if st.button("Cancelar", key="cancel_add_batch_account_form"):
|
|
6751
|
+
st.session_state["add_batch_account_form_open"] = False
|
|
6752
|
+
st.rerun()
|
|
6746
6753
|
if add_account:
|
|
6747
6754
|
document_error = ""
|
|
6748
6755
|
if "@" not in new_account_email.strip():
|
|
@@ -6772,6 +6779,7 @@ def render_google_accounts(*, include_innertube: bool = True):
|
|
|
6772
6779
|
st.success(f"Conta {new_account['email']} adicionada e documento incorporado.")
|
|
6773
6780
|
else:
|
|
6774
6781
|
st.warning(f"Conta {new_account['email']} adicionada. Foi criado um credentials.json padrão; suba o documento de cookies nesta conta quando estiver pronto.")
|
|
6782
|
+
st.session_state["add_batch_account_form_open"] = False
|
|
6775
6783
|
st.rerun()
|
|
6776
6784
|
|
|
6777
6785
|
st.divider()
|
package/package.json
CHANGED