Files
LihonT-Store/src/lihonstore/app/LoginPage.java
cheb0chik e8277bb7e8 LihonT Store 0.1
A catalog app for the LihonT mod: avatar frames and chat bubbles made by members. Browse, add with the plus button, author profiles,
publishing with a check before anything is shown. Signs in through the TikTok that carries the mod, which hands over only the public
account data to an app signed with the same key.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 15:40:01 +03:00

44 lines
1.9 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package lihonstore.app;
import android.view.Gravity;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
/** The first screen: one button, which asks the TikTok with the LihonT mod for the signed-in account. */
final class LoginPage {
private final MainActivity host;
private final String problem;
LoginPage(MainActivity host, String problem) {
this.host = host;
this.problem = problem;
}
View view() {
Theme theme = host.theme();
LinearLayout page = theme.column(host);
page.setGravity(Gravity.CENTER);
page.setPadding(theme.dp(32), theme.dp(32), theme.dp(32), theme.dp(32));
TextView title = theme.text(host, "LihonT Store", 30f, theme.onSurface, true);
title.setGravity(Gravity.CENTER);
page.addView(title);
TextView about = theme.text(host, "Рамки для аватарок и картинки для пузырей чата от тех, кто пользуется LihonT. "
+ "Нажмите, и магазин попросит у TikTok только публичное: имя аккаунта и его номер. Пароль никому не передаётся.",
15f, theme.muted, false);
about.setGravity(Gravity.CENTER);
about.setPadding(0, theme.dp(16), 0, theme.dp(24));
page.addView(about);
if (problem != null) {
TextView warning = theme.text(host, problem, 14f, theme.danger, false);
warning.setGravity(Gravity.CENTER);
warning.setPadding(0, 0, 0, theme.dp(16));
page.addView(warning);
}
TextView login = theme.button(host, "Войти через TikTok", true);
login.setOnClickListener(v -> host.startLogin());
page.addView(login, new LinearLayout.LayoutParams(-2, -2));
return page;
}
}