From 7235ad0d00d533a715eb67b4dc5facda6f886765 Mon Sep 17 00:00:00 2001 From: Ivan Reshetnikov Date: Sat, 31 Aug 2024 13:42:27 +0500 Subject: [PATCH] feat: add a warning for unapproved accounts --- assets/css/home.css | 6 ++++++ lib/comfycamp_web/controllers/home_html.ex | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/assets/css/home.css b/assets/css/home.css index f2b68f7..b42eba0 100644 --- a/assets/css/home.css +++ b/assets/css/home.css @@ -14,3 +14,9 @@ width: 16px; height: 16px; } + +.home .warning { + background-color: #aa4526; + padding: 8px; + border-radius: 8px; +} diff --git a/lib/comfycamp_web/controllers/home_html.ex b/lib/comfycamp_web/controllers/home_html.ex index d5d0943..2e43d94 100644 --- a/lib/comfycamp_web/controllers/home_html.ex +++ b/lib/comfycamp_web/controllers/home_html.ex @@ -10,6 +10,13 @@ defmodule ComfycampWeb.HomeHTML do

Уютный домик

+ <%= if assigns[:current_user] != nil and @current_user.is_approved == false do %> +

+ Ваш аккаунт ещё не был одобрен, вы не сможете использовать другие сервисы. + Подождите немного. +

+ <% end %> +

У меня есть несколько проектов, запущенных на домашнем сервере. Я буду рад, если они будут полезны другим людям.