-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9d580a9
commit 8bc7600
Showing
15 changed files
with
230 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
BTCPayServer/Models/ServerViewModels/CreateDictionaryViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace BTCPayServer.Models.ServerViewModels; | ||
public class CreateDictionaryViewModel | ||
{ | ||
public string Name { get; set; } | ||
public string Fallback { get; set; } | ||
} |
16 changes: 16 additions & 0 deletions
16
BTCPayServer/Models/ServerViewModels/EditDictionaryViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using BTCPayServer.Services; | ||
|
||
namespace BTCPayServer.Models.ServerViewModels; | ||
|
||
public class EditDictionaryViewModel | ||
{ | ||
public string Translations { get; set; } | ||
public int Lines { get; set; } | ||
|
||
internal EditDictionaryViewModel SetTranslations(Translations translations) | ||
{ | ||
Translations = translations.ToTextFormat(); | ||
Lines = translations.Records.Count; | ||
return this; | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
BTCPayServer/Models/ServerViewModels/ListDictionariesViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using BTCPayServer.Services; | ||
|
||
namespace BTCPayServer.Models.ServerViewModels | ||
{ | ||
public class ListDictionariesViewModel | ||
{ | ||
public class DictionaryViewModel | ||
{ | ||
public string DictionaryName { get; set; } | ||
public string Fallback { get; set; } | ||
public string Source { get; set; } | ||
public bool Editable { get; set; } | ||
} | ||
|
||
public List<DictionaryViewModel> Dictionaries = new List<DictionaryViewModel>(); | ||
} | ||
} |
18 changes: 0 additions & 18 deletions
18
BTCPayServer/Models/ServerViewModels/ServerTranslationsViewModel.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
@using BTCPayServer.Abstractions.Models | ||
@model CreateDictionaryViewModel | ||
@{ | ||
ViewData.SetActivePage(ServerNavPages.Translations); | ||
} | ||
|
||
<div class="row"> | ||
<div class="col-xl-8 col-xxl-constrain"> | ||
<form method="post" class="d-flex flex-column"> | ||
<div class="form-group"> | ||
<label asp-for="Name" class="form-label"></label> | ||
<input asp-for="Name" class="form-control" /> | ||
<span asp-validation-for="Name" class="text-danger"></span> | ||
</div> | ||
<input asp-for="Fallback" type="hidden" /> | ||
<button id="SaveButton" type="submit" class="btn btn-primary" name="command" value="Save">Create new dictionary</button> | ||
</form> | ||
</div> | ||
</div> |
2 changes: 1 addition & 1 deletion
2
.../Views/UIServer/ServerTranslations.cshtml → ...rver/Views/UIServer/EditDictionary.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.