Add version information to the webhook
This commit is contained in:
parent
ec1f894809
commit
98b1d0c9e4
5 changed files with 16 additions and 3 deletions
|
@ -2,6 +2,7 @@ import 'dart:io';
|
||||||
|
|
||||||
import 'package:libac_dart/packets/packets.dart';
|
import 'package:libac_dart/packets/packets.dart';
|
||||||
import 'package:libac_dart/utils/IOTools.dart';
|
import 'package:libac_dart/utils/IOTools.dart';
|
||||||
|
import 'package:servermanager/consts.dart';
|
||||||
import 'package:servermanager/game.dart';
|
import 'package:servermanager/game.dart';
|
||||||
import 'package:servermanager/packets/ClientPackets.dart';
|
import 'package:servermanager/packets/ClientPackets.dart';
|
||||||
import 'package:servermanager/structs/SessionData.dart';
|
import 'package:servermanager/structs/SessionData.dart';
|
||||||
|
@ -96,6 +97,10 @@ void main() async {
|
||||||
|
|
||||||
print("Starting up server manager server wrapper");
|
print("Starting up server manager server wrapper");
|
||||||
|
|
||||||
|
print("=".padLeft(20, "="));
|
||||||
|
print("Conan Exiles Mod Manager\nVersion ${Consts.VERSION}");
|
||||||
|
print("=".padLeft(20, "="));
|
||||||
|
|
||||||
while (!SessionData.shutdownPending) {
|
while (!SessionData.shutdownPending) {
|
||||||
try {
|
try {
|
||||||
await PacketServer.start(
|
await PacketServer.start(
|
||||||
|
|
3
lib/consts.dart
Normal file
3
lib/consts.dart
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
class Consts {
|
||||||
|
static const VERSION = "1.1.112324.1248";
|
||||||
|
}
|
|
@ -7,6 +7,8 @@ import 'package:servermanager/pages/Constants.dart';
|
||||||
import 'package:servermanager/structs/credentials.dart';
|
import 'package:servermanager/structs/credentials.dart';
|
||||||
import 'package:servermanager/structs/settings.dart';
|
import 'package:servermanager/structs/settings.dart';
|
||||||
|
|
||||||
|
import '../consts.dart';
|
||||||
|
|
||||||
class HomePage extends StatefulWidget {
|
class HomePage extends StatefulWidget {
|
||||||
Settings settings;
|
Settings settings;
|
||||||
HomePage({super.key, required this.settings});
|
HomePage({super.key, required this.settings});
|
||||||
|
@ -34,7 +36,8 @@ class HomePageState extends State<HomePage> {
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.computer),
|
Icon(Icons.computer),
|
||||||
Text("Conan Exiles Server Manager")
|
Text("Conan Exiles Mod Manager"),
|
||||||
|
Text("Version ${Consts.VERSION}")
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
Column(
|
Column(
|
||||||
|
|
|
@ -4,6 +4,7 @@ import 'package:dio/dio.dart';
|
||||||
import 'package:libac_dart/nbt/NbtUtils.dart';
|
import 'package:libac_dart/nbt/NbtUtils.dart';
|
||||||
import 'package:libac_dart/nbt/impl/CompoundTag.dart';
|
import 'package:libac_dart/nbt/impl/CompoundTag.dart';
|
||||||
import 'package:libac_dart/nbt/impl/StringTag.dart';
|
import 'package:libac_dart/nbt/impl/StringTag.dart';
|
||||||
|
import 'package:servermanager/consts.dart';
|
||||||
|
|
||||||
class DiscordHookHelper {
|
class DiscordHookHelper {
|
||||||
static Future<void> sendWebHook(DiscordHookProps props, int colorCode,
|
static Future<void> sendWebHook(DiscordHookProps props, int colorCode,
|
||||||
|
@ -16,7 +17,8 @@ class DiscordHookHelper {
|
||||||
"title": title,
|
"title": title,
|
||||||
"description": content,
|
"description": content,
|
||||||
"color": colorCode,
|
"color": colorCode,
|
||||||
"author": {"name": props.serverName}
|
"author": {"name": props.serverName},
|
||||||
|
"footer": "CEMM Version ${Consts.VERSION}"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"attachments": []
|
"attachments": []
|
||||||
|
|
|
@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
# In Windows, build-name is used as the major, minor, and patch parts
|
# In Windows, build-name is used as the major, minor, and patch parts
|
||||||
# of the product and file versions while build-number is used as the build suffix.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
version: 1.1.0+48
|
version: 1.1.112324+1248
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=3.1.4 <4.0.0"
|
sdk: ">=3.1.4 <4.0.0"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue