Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ecc2236937 | |||
| 3002db6534 |
@@ -6,7 +6,7 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
env:
|
env:
|
||||||
VERSION: 1.1.0
|
VERSION: 1.1.1
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# ЧАСТЬ 1: Собираем образы и кладем в Gitea (чтобы делиться с ребятами)
|
# ЧАСТЬ 1: Собираем образы и кладем в Gitea (чтобы делиться с ребятами)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>1.1.0</Version>
|
<Version>1.1.1</Version>
|
||||||
<TargetFramework>net10.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<LangVersion>preview</LangVersion>
|
<LangVersion>preview</LangVersion>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
|||||||
+2
-2
@@ -18,7 +18,7 @@ services:
|
|||||||
retries: 10
|
retries: 10
|
||||||
|
|
||||||
bot:
|
bot:
|
||||||
image: git.codeanddice.ru/toutsu/gmrelay-bot:1.1.0
|
image: git.codeanddice.ru/toutsu/gmrelay-bot:1.1.1
|
||||||
container_name: gmrelay_bot
|
container_name: gmrelay_bot
|
||||||
restart: always
|
restart: always
|
||||||
network_mode: host
|
network_mode: host
|
||||||
@@ -30,7 +30,7 @@ services:
|
|||||||
- "Telegram__BotToken=${TELEGRAM_BOT_TOKEN}"
|
- "Telegram__BotToken=${TELEGRAM_BOT_TOKEN}"
|
||||||
|
|
||||||
web:
|
web:
|
||||||
image: git.codeanddice.ru/toutsu/gmrelay-web:1.1.0
|
image: git.codeanddice.ru/toutsu/gmrelay-web:1.1.1
|
||||||
container_name: gmrelay_web
|
container_name: gmrelay_web
|
||||||
restart: always
|
restart: always
|
||||||
network_mode: host
|
network_mode: host
|
||||||
|
|||||||
@@ -22,6 +22,21 @@
|
|||||||
<Routes @rendermode="InteractiveServer" />
|
<Routes @rendermode="InteractiveServer" />
|
||||||
<ReconnectModal />
|
<ReconnectModal />
|
||||||
<script src="@Assets["_framework/blazor.web.js"]"></script>
|
<script src="@Assets["_framework/blazor.web.js"]"></script>
|
||||||
|
<script>
|
||||||
|
window.loadTelegramWidget = function (botUsername, authUrl) {
|
||||||
|
var container = document.getElementById('telegram-login-container');
|
||||||
|
if (!container) return;
|
||||||
|
container.innerHTML = '';
|
||||||
|
var script = document.createElement('script');
|
||||||
|
script.async = true;
|
||||||
|
script.src = 'https://telegram.org/js/telegram-widget.js?22';
|
||||||
|
script.setAttribute('data-telegram-login', botUsername);
|
||||||
|
script.setAttribute('data-size', 'large');
|
||||||
|
script.setAttribute('data-auth-url', authUrl);
|
||||||
|
script.setAttribute('data-request-access', 'write');
|
||||||
|
container.appendChild(script);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
@using Microsoft.AspNetCore.Components.Authorization
|
@using Microsoft.AspNetCore.Components.Authorization
|
||||||
@inject NavigationManager Navigation
|
@inject NavigationManager Navigation
|
||||||
@inject IConfiguration Configuration
|
@inject IConfiguration Configuration
|
||||||
|
@inject IJSRuntime JS
|
||||||
|
|
||||||
<PageTitle>Вход — GM-Relay</PageTitle>
|
<PageTitle>Вход — GM-Relay</PageTitle>
|
||||||
|
|
||||||
@@ -18,13 +19,7 @@
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
<div id="telegram-login-container">
|
<div id="telegram-login-container"></div>
|
||||||
<script async src="https://telegram.org/js/telegram-widget.js?22"
|
|
||||||
data-telegram-login="@BotUsername"
|
|
||||||
data-size="large"
|
|
||||||
data-auth-url="@AuthUrl"
|
|
||||||
data-request-access="write"></script>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -46,4 +41,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||||
|
{
|
||||||
|
if (firstRender)
|
||||||
|
{
|
||||||
|
await JS.InvokeVoidAsync("loadTelegramWidget", BotUsername, AuthUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user