Exemple #1
0
 public IActionResult OnPost(Remotely_Shared.Models.RemotelyUserOptions options)
 {
     if (!ModelState.IsValid)
     {
         return(Page());
     }
     if (!options.CommandModeShortcutBash.StartsWith("/"))
     {
         options.CommandModeShortcutBash = "/" + options.CommandModeShortcutBash;
     }
     if (!options.CommandModeShortcutCMD.StartsWith("/"))
     {
         options.CommandModeShortcutCMD = "/" + options.CommandModeShortcutCMD;
     }
     if (!options.CommandModeShortcutPSCore.StartsWith("/"))
     {
         options.CommandModeShortcutPSCore = "/" + options.CommandModeShortcutPSCore;
     }
     if (!options.CommandModeShortcutWeb.StartsWith("/"))
     {
         options.CommandModeShortcutWeb = "/" + options.CommandModeShortcutWeb;
     }
     if (!options.CommandModeShortcutWinPS.StartsWith("/"))
     {
         options.CommandModeShortcutWinPS = "/" + options.CommandModeShortcutWinPS;
     }
     DataService.UpdateUserOptions(User.Identity.Name, options);
     Message = "Saved successfully.";
     return(RedirectToPage());
 }
Exemple #2
0
 public RemotelyUser()
 {
     UserOptions  = new RemotelyUserOptions();
     Organization = new Organization();
 }