From 8225969e37551225fa4909abf7b0622277d4fe90 Mon Sep 17 00:00:00 2001 From: Arsen Mirzaev Tatyano-Muradovich Date: Sun, 11 Jan 2026 01:48:55 +0500 Subject: [PATCH] settings and last update line --- author/project/system/localizations/english.php | 1 + author/project/system/localizations/russian.php | 3 ++- author/project/system/models/telegram/commands.php | 8 ++++++-- author/project/system/settings/system.php.sample | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/author/project/system/localizations/english.php b/author/project/system/localizations/english.php index cc96c97..7b3a1cb 100644 --- a/author/project/system/localizations/english.php +++ b/author/project/system/localizations/english.php @@ -9,6 +9,7 @@ return [ // Main menu 'menu_title' => 'Main menu', + 'menu_update' => 'Last update', // Account 'account_title' => 'Account', diff --git a/author/project/system/localizations/russian.php b/author/project/system/localizations/russian.php index ca1553f..04c79ed 100644 --- a/author/project/system/localizations/russian.php +++ b/author/project/system/localizations/russian.php @@ -9,7 +9,8 @@ return [ // Главное меню 'menu_title' => 'Главное меню', - + 'menu_update' => 'Последнее обновление', + // Аккаунт 'account_title' => 'Аккаунт', 'account_authorized_system' => 'Доступ к системе', diff --git a/author/project/system/models/telegram/commands.php b/author/project/system/models/telegram/commands.php index aa253d2..b7c4b89 100644 --- a/author/project/system/models/telegram/commands.php +++ b/author/project/system/models/telegram/commands.php @@ -74,13 +74,17 @@ final class commands extends core if ($$localization) { // Initialized localization - // Initializing the title + // Initializing the message title $$title = '📋 *' . $$localization['menu_title'] . '*'; + + // Initializing the message last update text + exec(command: 'git log --oneline $$(git describe --tags --abbrev=0 @^ --always)..@ -1 --format="%at" | xargs -I{} date -d @{} "+%Y.%m.%d %H:%M"', output: $$git); + $$update = empty($$git[0]) ? '' : "\n\n🔏 *" . $$localization['menu_update'] . ':* ' . unmarkdown($$git[0]); // Sending the message $$context->sendMessage( << [ diff --git a/author/project/system/settings/system.php.sample b/author/project/system/settings/system.php.sample index 77b0dcb..0a94fea 100644 --- a/author/project/system/settings/system.php.sample +++ b/author/project/system/settings/system.php.sample @@ -9,7 +9,7 @@ require ROOT . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php'; define('PROJECT_NAME', ''); define('PROJECT_DOMAIN', ''); -defing('LANGUAGE_DEFAULT', language::en); +define('LANGUAGE_DEFAULT', language::en); // Initializing default theme for the views templater define('THEME', 'default');