@danhachuel/thunderbolt 0.5.58 → 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 +23 -13
- package/package.json +1 -1
package/app/main.py
CHANGED
|
@@ -6728,19 +6728,28 @@ def render_google_accounts(*, include_innertube: bool = True):
|
|
|
6728
6728
|
st.rerun()
|
|
6729
6729
|
|
|
6730
6730
|
st.divider()
|
|
6731
|
-
|
|
6732
|
-
st.
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
with
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
|
|
6731
|
+
add_account = False
|
|
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:
|
|
6737
|
+
st.markdown("### Nova conta Gmail")
|
|
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.")
|
|
6739
|
+
with st.form("add_batch_account_form"):
|
|
6740
|
+
add_cols = st.columns(2)
|
|
6741
|
+
with add_cols[0]:
|
|
6742
|
+
new_account_label = st.text_input("Nome da nova conta", value="Canais YouTube", key="new_batch_account_label")
|
|
6743
|
+
new_account_email = st.text_input("E-mail/Gmail", key="new_batch_account_email")
|
|
6744
|
+
new_account_client_id = st.text_input("OAuth Client ID", key="new_batch_account_client_id")
|
|
6745
|
+
with add_cols[1]:
|
|
6746
|
+
new_account_client_secret = st.text_input("OAuth Client Secret", type="password", key="new_batch_account_client_secret")
|
|
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.")
|
|
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.")
|
|
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()
|
|
6744
6753
|
if add_account:
|
|
6745
6754
|
document_error = ""
|
|
6746
6755
|
if "@" not in new_account_email.strip():
|
|
@@ -6770,6 +6779,7 @@ def render_google_accounts(*, include_innertube: bool = True):
|
|
|
6770
6779
|
st.success(f"Conta {new_account['email']} adicionada e documento incorporado.")
|
|
6771
6780
|
else:
|
|
6772
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
|
|
6773
6783
|
st.rerun()
|
|
6774
6784
|
|
|
6775
6785
|
st.divider()
|
package/package.json
CHANGED