Normalize theme values.

This commit is contained in:
Jared Goodwin 2019-12-12 21:17:04 -08:00
parent eb72c5142c
commit 5db01941fa
5 changed files with 3 additions and 10 deletions

View File

@ -160,10 +160,6 @@ namespace Remotely.Desktop.Unix.ViewModels
prompt.Owner = App.Current?.MainWindow;
await prompt.ShowDialog(App.Current?.MainWindow);
var result = HostNamePromptViewModel.Current.Host.TrimEnd("/".ToCharArray());
if (!result.StartsWith("https://") && !result.StartsWith("http://"))
{
result = $"https://{result}";
}
if (result != Host)
{
Host = result;

View File

@ -177,10 +177,6 @@ namespace Remotely.Desktop.Win.ViewModels
prompt.Owner = App.Current?.MainWindow;
prompt.ShowDialog();
var result = HostNamePromptViewModel.Current.Host.TrimEnd("/".ToCharArray());
if (!result.StartsWith("https://") && !result.StartsWith("http://"))
{
result = $"https://{result}";
}
if (result != Host)
{
Host = result;

View File

@ -110,6 +110,7 @@ Note: To retain your settings between upgrades, copy your settings to appsetting
* TrustedCorsOrigins: For cross-origin API requests via JavaScript. The websites listed in this array with be allowed to make requests to the API. This does not grant authentication, which is still required on most endpoints.
* KnownProxies: If your Nginx server is on a different machine and is forwarding requests to the Remotely server, you will need to add the IP of the Nginx server to this array.
* Smpt*: SMTP settings for auto-generated system emails (such as registration and password reset).
* Theme: The color theme to use for the site. Values are "Light" or "Dark".
## API and Integrations
Remotely has a basic API, which can be browsed at https://tryremotely.lucency.co/swagger (or your own server instance). Most endpoints require authentication via the /api/Login, which in turn requires the AllowApiLogin option to be set to true in appsettings.json. If you're not familiar with how CORS works, I recommend reading up on it before proceeding.

View File

@ -18,7 +18,7 @@
<link href="~/manifest-rc.json" rel="manifest" />
<meta name="description" content="Remote access tools designed to get things done quickly." />
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
@if (AppConfig.Theme == "Light")
@if (AppConfig.Theme.ToLower() == "light")
{
<link href="~/css/remote-control-light.css" rel="stylesheet" asp-append-version="true" />
}

View File

@ -14,7 +14,7 @@
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
<link href="~/lib/fontawesome/css/all.min.css" rel="stylesheet" />
@if (AppConfig.Theme == "Light")
@if (AppConfig.Theme.ToLower() == "light")
{
<link rel="stylesheet" href="~/css/Themes/yeti.min.css" />
<link rel="stylesheet" href="~/css/Themes/yeti.custom.css" asp-append-version="true" />