Store picker in topbar, redesign cabinet, rename to WBfeed.ru
- index.html: store dropdown in topbar (switch without leaving page) - cabinet.html: store-cards with Активировать/Проверить, edit hidden in <details> - Removed 'Используется' button, active shown as green card + label - next=index param to return to main page after store switch - Brand name changed to WBfeed.ru across all templates Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1202,6 +1202,8 @@ def cabinet():
|
||||
token_row = db.get_token(int(token_id))
|
||||
if token_row and (user["is_admin"] or token_row["user_id"] == user["id"]):
|
||||
session["token_id"] = int(token_id)
|
||||
if request.form.get("next") == "index":
|
||||
return redirect(url_for("index"))
|
||||
return redirect(url_for("cabinet", status="selected"))
|
||||
error_message = "Не удалось выбрать токен."
|
||||
elif action == "check":
|
||||
@@ -1243,6 +1245,9 @@ def index():
|
||||
status = request.args.get("status")
|
||||
api_cooldown_seconds_left = _get_api_cooldown_seconds_left()
|
||||
_, active_token_name = _get_active_token()
|
||||
active_token_id = session.get("token_id")
|
||||
raw_tokens = db.fetch_tokens_for_user(g.user["id"], bool(g.user["is_admin"]))
|
||||
tokens = [{"id": r["id"], "name": r["name"]} for r in raw_tokens]
|
||||
error_message: Optional[str] = None
|
||||
success_message: Optional[str] = None
|
||||
if status == "reply_sent":
|
||||
@@ -1261,6 +1266,8 @@ def index():
|
||||
error_message=error_message,
|
||||
success_message=success_message,
|
||||
active_token_name=active_token_name,
|
||||
active_token_id=active_token_id,
|
||||
tokens=tokens,
|
||||
auto_reply_enabled=is_auto_reply_enabled(),
|
||||
api_cooldown_seconds_left=api_cooldown_seconds_left,
|
||||
next_fetch_seconds_left=_next_fetch_seconds_left(),
|
||||
|
||||
Reference in New Issue
Block a user