Merge remote-tracking branch 'origin/master'

# Conflicts:
#	Frontend/Pages/_Host.cshtml
This commit is contained in:
jackfiled 2023-11-19 12:56:14 +08:00
commit 835127c7e2
7 changed files with 60 additions and 12 deletions

View File

@ -0,0 +1,14 @@
name: Build Frontend Docker Image
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: https://git.rrricardo.top/actions/checkout@v3
- run: dotnet publish ./Frontend/Frontend.csproj -c Release -o publish
- run: cp ./Frontend/Dockerfile .
- run: docker build . -t git.rrricardo.top/jackfiled/katheryne:latest

View File

@ -1,7 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="UserContentModel"> <component name="UserContentModel">
<attachedFolders /> <attachedFolders>
<Path>.gitea</Path>
</attachedFolders>
<explicitIncludes /> <explicitIncludes />
<explicitExcludes /> <explicitExcludes />
</component> </component>

View File

@ -57,6 +57,38 @@
</ul> </ul>
</Paragraph> </Paragraph>
<Paragraph>
在<Text Code>Stage</Text>类型的<Text Code>answer</Text>属性中支持两种特殊的语法:
<ul>
<li>
利用上文中设置的迁移正则表达式中提取用户的输入作为输出的一部分,使用<Text Code>$number</Text>
作为标识符指定提取到的信息应当插入在何处,<Text Code>number</Text>是匹配成功的列表索引。<br/>
例如,使用正则表达式<Text Code>(.*?)</Text>迁移到拥有如下
<Text Code>answer: 感谢冒险家完成了“$1”, 这是你的奖励。</Text>属性的阶段,
会将用户的输入完全替换到<Text Code>$1</Text>所在的位置。
</li>
<li>
调用系统中预先定义的API作为回答使用<Text Code>@@module/method</Text>调用。<br/>
例如:利用<Text Code>@@weather/text</Text>调用weather模块的text方法获得当前北京的天气信息。
</li>
</ul>
</Paragraph>
<Paragraph>
当前程序中提供的API模块有
<ul>
<li>
Weather: <br/>
text: 获得当前天气文本 <br/>
temp: 获得当前温度
</li>
</ul>
</Paragraph>
<Paragraph> <Paragraph>
在编译阶段编译器会执行如下检查: 在编译阶段编译器会执行如下检查:
@ -68,6 +100,10 @@
<li> <li>
<Text Code>beginStageName</Text> 指定的阶段是否定义。 <Text Code>beginStageName</Text> 指定的阶段是否定义。
</li> </li>
<li>
调用的模块和方法是否存在。
</li>
</ul> </ul>
</Paragraph> </Paragraph>
</div> </div>

4
Frontend/Dockerfile Normal file
View File

@ -0,0 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:7.0
WORKDIR /app
COPY ./publish/ .
ENTRYPOINT ["dotnet", "Frontend.dll"]

View File

View File

@ -1,10 +0,0 @@
{
"DetailedErrors": true,
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Katheryne": "Debug"
}
}
}

View File

@ -1,8 +1,10 @@
{ {
"DetailedErrors": true,
"Logging": { "Logging": {
"LogLevel": { "LogLevel": {
"Default": "Information", "Default": "Information",
"Microsoft.AspNetCore": "Warning" "Microsoft.AspNetCore": "Warning",
"Katheryne": "Debug"
} }
}, },
"AllowedHosts": "*" "AllowedHosts": "*"