Conversation
9909e76 to
0856613
Compare
| using System.Linq; | ||
| using Diplomatic.Utils; | ||
|
|
||
|
|
|
|
||
| public partial class Templates : ContentPage | ||
| { | ||
|
|
There was a problem hiding this comment.
Newline before new block?
| } | ||
| var next = new TextFields(); | ||
| next.BindingContext = new TextFieldViewModel((Template)e.SelectedItem); | ||
| var next = new TextFields |
| string query = string.Join("&", queryParams.ToArray()); | ||
| string final = "https://qri7p78aml.execute-api.eu-west-2.amazonaws.com/dev/" + template.Name.ToLower() + "?" + query; | ||
| var endpoint = new Uri(Uri.EscapeUriString(final)); | ||
| var next = new Result |
| { | ||
| BindingContext = new ResultViewModel(endpoint, Filename) | ||
| }; | ||
| await Navigation.PushAsync(next); |
Diplomatic/Models/Field.cs
Outdated
| [JsonIgnore] | ||
| public string Value { get; set; } | ||
| [JsonIgnore] | ||
| virtual public bool IsValid => !string.IsNullOrEmpty(Value); |
There was a problem hiding this comment.
This shouldn't be virtual. 🥈
0856613 to
1d445b0
Compare
Diplomatic/Models/Signature.cs
Outdated
| [JsonProperty("id")] | ||
| public string Id { get; set; } | ||
| public Uri ImageUri { | ||
| get { |
| string content = reader.ReadToEnd(); | ||
| templates = JsonConvert.DeserializeObject<List<Template>>(content); | ||
| Dictionary<string, Template> rawTemplates = JsonConvert.DeserializeObject<Dictionary<string, Template>>(content); | ||
| foreach (KeyValuePair<string, Template> entry in rawTemplates) |
There was a problem hiding this comment.
Newline bro :4th_place_medal:
| { | ||
| public Template[] TemplateList { get; set; } | ||
| public Template[] Templates { get; set; } | ||
| public TemplatePickerViewModel() |
| namespace Diplomatic.ViewModels | ||
| { | ||
| using Models; | ||
| public class TextFieldViewModel |
| namespace Diplomatic.Views | ||
| { | ||
| using ViewModels; | ||
| public partial class MainPage : ContentPage |
There was a problem hiding this comment.
Newline :11st_place_medal:
Diplomatic/Views/MainPage.xaml.cs
Outdated
| } | ||
|
|
||
| void OnShow ( object sender, EventArgs e) | ||
| private void OnShow ( object sender, EventArgs e) |
There was a problem hiding this comment.
No space before first function parameter.
| template.Signature = (Signature)e.SelectedItem; | ||
| var queryParams = new List<string> { }; | ||
| foreach (var field in template.Fields) | ||
| foreach (Field field in template.Fields) |
There was a problem hiding this comment.
Newline before this line
| } | ||
| var query = string.Join("&", queryParams.ToArray()); | ||
| string final = "https://qri7p78aml.execute-api.eu-west-2.amazonaws.com/dev/" + template.TemplateName.ToLower() + "?" + query; | ||
| queryParams.Add($"signature={template.Signature.Id}"); |
There was a problem hiding this comment.
And after the block <3
| string query = string.Join("&", queryParams.ToArray()); | ||
| string final = "https://qri7p78aml.execute-api.eu-west-2.amazonaws.com/dev/" + template.Name.ToLower() + "?" + query; | ||
| var endpoint = new Uri(Uri.EscapeUriString(final)); | ||
| var next = new Result |
There was a problem hiding this comment.
This starts a block, so a newline before it.
There was a problem hiding this comment.
Initializers aren't real blocks to me 👀
| { | ||
| BindingContext = new SignaturePickerViewModel(selectedTemplate) | ||
| }; | ||
| await Navigation.PushAsync(next); |
| await Navigation.PushAsync(next); | ||
| Template template = ((TextFieldViewModel)BindingContext).SelectedTemplate; | ||
| var queryParams = new List<string> { }; | ||
| foreach (Field field in template.Fields) |
There was a problem hiding this comment.
Newliner before and after ❤️
| { | ||
| BindingContext = new ResultViewModel(endpoint) | ||
| }; | ||
| await Navigation.PushAsync(next); |
There was a problem hiding this comment.
Come on man... :22nd_place_medal:
1e404fa to
9e52de4
Compare
Interface for saving images has been added - Implemented on iOS - Permissions have been set for iOS Views: Result has gotten two buttons Save button now has an action, which should run a code-behind function for saving NOTE: the name of the image saved in the codebehind should be changed
It now works on android! Filename sent in is "Navn" for now. This needs to change
Images now have names (Only available on an ANDROID near you)! Also Stuff looks clean now
9e52de4 to
d7bed33
Compare
Resolved scaling issue (Might have to refactor this into a decent scale later) Aligned signatures to the left.
72673d6 to
2425d7c
Compare
Changes 🎈
Signatures are now fetched from the web API instead of from local storage! I've deleted a LOT of leftover resources and code from the old implementation and fixed the failing tests.
Types of changes
What types of changes does your code introduce? Mark boxes that apply with an
x.Checklist ✔️
Mark boxes that apply with an
x. These can also be filled out after the pull request is created.