mirror of
https://github.com/CommonLoon102/NBloodServerSupervisor.git
synced 2024-12-23 03:02:51 +01:00
3af4c9dfc7
* add option to play custom maps on private servers * don't show every exception to the end-user * hash the IPs * add description about the purpose of the public custom map list * add punctuation to error messages
30 lines
924 B
C#
30 lines
924 B
C#
using Common;
|
|
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Linq;
|
|
|
|
namespace WebInterface
|
|
{
|
|
[RequestFormLimits(MultipartBodyLengthLimit = Constants.FileSizeLimit)]
|
|
[RequestSizeLimit(Constants.FileSizeLimit)]
|
|
public class PrivateViewModel
|
|
{
|
|
[Required]
|
|
[Display(Name = "Required players")]
|
|
public int Players { get; set; }
|
|
[Required]
|
|
[Display(Name = "Select mod")]
|
|
public string ModName { get; set; }
|
|
public List<SelectListItem> ModNames { get; } = Constants.SupportedMods
|
|
.Select(m => new SelectListItem(m.Value.FriendlyName, m.Value.Name))
|
|
.ToList();
|
|
|
|
[Display(Name = "Custom map (optional)")]
|
|
public IFormFile FormFile { get; set; }
|
|
}
|
|
}
|