feat: update app icons and enhance message limit configuration in server setup

This commit is contained in:
Sarto
2026-04-01 21:01:23 +03:30
parent 568c926449
commit 2450993c44
16 changed files with 60 additions and 8 deletions
+2 -2
View File
@@ -8,9 +8,9 @@
<application
android:allowBackup="true"
android:icon="@android:drawable/sym_def_app_icon"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@android:drawable/sym_def_app_icon"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:usesCleartextTraffic="true"
android:networkSecurityConfig="@xml/network_security_config"
@@ -127,8 +127,8 @@ class MainActivity : ComponentActivity() {
}
companion object {
private const val MAX_RETRIES = 15
private const val MAX_RETRIES = 25
private const val RETRY_DELAY_MS = 2000L
private const val INITIAL_DELAY_MS = 1500L
private const val INITIAL_DELAY_MS = 5000L
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

+7
View File
@@ -64,6 +64,13 @@ func main() {
if !*allowManage && os.Getenv("THEFEED_ALLOW_MANAGE") == "1" {
*allowManage = true
}
if *msgLimit == 15 {
if v := os.Getenv("THEFEED_MSG_LIMIT"); v != "" {
if n, err := strconv.Atoi(v); err == nil && n > 0 {
*msgLimit = n
}
}
}
if *apiID == "" {
*apiID = os.Getenv("TELEGRAM_API_ID")
}
+41 -2
View File
@@ -272,11 +272,29 @@
}
.progress-fill.send { background: var(--send-color); }
.log-panel-wrapper {
border-top: 1px solid var(--border);
display: flex;
flex-direction: column;
}
.log-panel-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 4px 12px;
background: rgba(14, 20, 38, 0.98);
cursor: pointer;
user-select: none;
font-size: 11px;
color: var(--text-dim);
letter-spacing: 0.5px;
}
.log-panel-header:hover { color: var(--text); }
.log-toggle-icon { font-size: 10px; }
.log-panel {
height: 150px;
min-height: 100px;
background: rgba(14, 20, 38, 0.95);
border-top: 1px solid var(--border);
overflow-y: auto;
font-size: 12px;
font-family: monospace;
@@ -285,6 +303,7 @@
text-align: left;
color: var(--text-dim);
}
.log-panel.hidden { display: none; }
.log-line {
padding: 2px 0;
line-height: 1.3;
@@ -517,7 +536,13 @@
<button class="send-btn" onclick="sendMessage()">Send</button>
</div>
<div class="progress-panel" id="progressPanel"></div>
<div class="log-panel" id="logPanel"></div>
<div class="log-panel-wrapper">
<div class="log-panel-header" onclick="toggleLog()">
<span>LOG</span>
<span class="log-toggle-icon" id="logToggleIcon"></span>
</div>
<div class="log-panel" id="logPanel"></div>
</div>
</div>
</div>
<div class="sidebar-overlay" onclick="toggleSidebar(true)"></div>
@@ -595,6 +620,7 @@
var eventSource = null;
var autoRefreshTimer = null;
var telegramLoggedIn = false;
var logVisible = true;
var serverNextFetch = 0;
var nextFetchInterval = null;
@@ -1160,6 +1186,19 @@
}
}
function toggleLog() {
logVisible = !logVisible;
var panel = document.getElementById('logPanel');
var icon = document.getElementById('logToggleIcon');
if (logVisible) {
panel.classList.remove('hidden');
icon.textContent = '▼';
} else {
panel.classList.add('hidden');
icon.textContent = '▶';
}
}
document.addEventListener('keydown', function(e) {
if (e.key === 'Enter' && document.activeElement === document.getElementById('sendInput')) {
e.preventDefault();
-1
View File
@@ -588,7 +588,6 @@ func (s *Server) refreshChannel(channelNum int) {
s.refreshMu.Lock()
if s.channelFetching[channelNum] {
s.refreshMu.Unlock()
s.addLog(fmt.Sprintf("Channel %d is already being fetched, skipping", channelNum))
return
}
if s.refreshCancel != nil {
+8 -1
View File
@@ -142,6 +142,10 @@ setup_config() {
echo -e "${red}Passphrase cannot be empty${plain}"
done
local msg_limit=""
read -rp "Max messages per channel [15]: " msg_limit
msg_limit="${msg_limit:-15}"
echo ""
echo -e "${yellow}Allow remote management (send messages, add/remove channels)?${plain}"
echo -e " If enabled, anyone with the passphrase can manage channels."
@@ -176,6 +180,7 @@ setup_config() {
THEFEED_DOMAIN=${domain}
THEFEED_KEY=${passkey}
THEFEED_ALLOW_MANAGE=$([ "$allow_manage" = "y" ] || [ "$allow_manage" = "Y" ] && echo "1" || echo "0")
THEFEED_MSG_LIMIT=${msg_limit}
TELEGRAM_API_ID=${api_id}
TELEGRAM_API_HASH=${api_hash}
TELEGRAM_PHONE=${phone}
@@ -215,6 +220,7 @@ ENVEOF
THEFEED_DOMAIN=${domain}
THEFEED_KEY=${passkey}
THEFEED_ALLOW_MANAGE=$([ "$allow_manage" = "y" ] || [ "$allow_manage" = "Y" ] && echo "1" || echo "0")
THEFEED_MSG_LIMIT=${msg_limit}
TELEGRAM_API_ID=${api_id}
TELEGRAM_API_HASH=${api_hash}
TELEGRAM_PHONE=${phone}
@@ -292,7 +298,8 @@ ExecStart=${INSTALL_DIR}/thefeed-server \\
--api-id \${TELEGRAM_API_ID} \\
--api-hash \${TELEGRAM_API_HASH} \\
--phone \${TELEGRAM_PHONE} \\
--listen \${THEFEED_LISTEN} ${extra_flags}
--listen \${THEFEED_LISTEN} \\
--msg-limit \${THEFEED_MSG_LIMIT} ${extra_flags}
Restart=on-failure
RestartSec=10