1
0
mirror of https://github.com/XFox111/GUTSchedule.git synced 2026-04-22 06:58:01 +03:00

Anonymous schedule export is temporarly disabled

This commit is contained in:
Michael Gordeev
2021-02-07 23:55:01 +03:00
parent e3d2ffec48
commit e8a4ad5c98
10 changed files with 16 additions and 15 deletions
@@ -61,7 +61,7 @@ namespace GUTSchedule.Droid.Activities
AssignVariables(); AssignVariables();
faculty.SetList(this, Faculties.Select(i => i.name)); /*faculty.SetList(this, Faculties.Select(i => i.name));
int s = Faculties.FindIndex(i => i.id == prefs.GetString("Faculty", "-123")); int s = Faculties.FindIndex(i => i.id == prefs.GetString("Faculty", "-123"));
faculty.SetSelection(s == -1 ? 0 : s); faculty.SetSelection(s == -1 ? 0 : s);
@@ -70,7 +70,7 @@ namespace GUTSchedule.Droid.Activities
// P.S. Fuck Android // P.S. Fuck Android
await Task.Delay(100); await Task.Delay(100);
UpdateGroupsList(); UpdateGroupsList(); */ // TODO: Temp
AddEvents(); AddEvents();
@@ -85,14 +85,14 @@ namespace GUTSchedule.Droid.Activities
reminder.SetSelection(prefs.GetInt("Reminder", 0)); reminder.SetSelection(prefs.GetInt("Reminder", 0));
calendar.SetList(this, Calendar.Calendars.Select(i => i.Name)); calendar.SetList(this, Calendar.Calendars.Select(i => i.Name));
s = Calendar.Calendars.FindIndex(i => i.Id == prefs.GetString("Calendar", "-123")); int s = Calendar.Calendars.FindIndex(i => i.Id == prefs.GetString("Calendar", "-123"));
calendar.SetSelection(s == -1 ? 0 : s); calendar.SetSelection(s == -1 ? 0 : s);
end.Text = endDate.ToShortDateString(); end.Text = endDate.ToShortDateString();
start.Text = startDate.ToShortDateString(); start.Text = startDate.ToShortDateString();
groupTitle.Checked = prefs.GetBoolean("AddGroupToHeader", false); groupTitle.Checked = prefs.GetBoolean("AddGroupToHeader", false);
authorize.Checked = prefs.GetBoolean("Authorize", true); authorize.Checked = true;// prefs.GetBoolean("Authorize", true); // TODO: Temp
email.Text = prefs.GetString("email", ""); email.Text = prefs.GetString("email", "");
password.Text = prefs.GetString("password", ""); password.Text = prefs.GetString("password", "");
@@ -59,7 +59,7 @@ namespace GUT.Schedule.Droid.Activities
} }
status.Text = Resources.GetText(Resource.String.facultiesLoadingStatus); status.Text = Resources.GetText(Resource.String.facultiesLoadingStatus);
MainActivity.Faculties = await Parser.GetFaculties(); //MainActivity.Faculties = await Parser.GetFaculties(); // TODO: Temp
} }
catch (HttpRequestException e) catch (HttpRequestException e)
{ {
@@ -32,6 +32,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:checked="true" android:checked="true"
android:enabled="false"
android:text="@string/authorizeCheckbox"/> android:text="@string/authorizeCheckbox"/>
<LinearLayout <LinearLayout
@@ -65,7 +65,7 @@
<TextBlock x:Uid="scheduleParametersTitle" Style="{StaticResource SubtitleTextBlockStyle}" Text="Schedule parameters"/> <TextBlock x:Uid="scheduleParametersTitle" Style="{StaticResource SubtitleTextBlockStyle}" Text="Schedule parameters"/>
<CheckBox x:Uid="authorizeCheckbox" Content="Authorize via personal cabinet" Checked="ChangeAuthorizationMethod" Unchecked="ChangeAuthorizationMethod" IsChecked="True" x:Name="authorize"/> <CheckBox x:Uid="authorizeCheckbox" Content="Authorize via personal cabinet" Checked="ChangeAuthorizationMethod" Unchecked="ChangeAuthorizationMethod" IsChecked="True" IsEnabled="False" x:Name="authorize"/>
<StackPanel x:Name="credentialMethod" Visibility="Visible"> <StackPanel x:Name="credentialMethod" Visibility="Visible">
<TextBox x:Uid="email" PlaceholderText="E-mail" x:Name="email" IsSpellCheckEnabled="False"/> <TextBox x:Uid="email" PlaceholderText="E-mail" x:Name="email" IsSpellCheckEnabled="False"/>
<PasswordBox x:Uid="password" PlaceholderText="Password" x:Name="password"/> <PasswordBox x:Uid="password" PlaceholderText="Password" x:Name="password"/>
@@ -45,7 +45,7 @@ namespace GUTSchedule.UWP.Pages
PackageVersion ver = Package.Current.Id.Version; PackageVersion ver = Package.Current.Id.Version;
version.Text = $"v{ver.Major}.{ver.Minor}.{ver.Build}.{ver.Revision}"; version.Text = $"v{ver.Major}.{ver.Minor}.{ver.Build}.{ver.Revision}";
authorize.IsChecked = (bool?)settings.Values["Authorize"] ?? true; authorize.IsChecked = true;//(bool?)settings.Values["Authorize"] ?? true; // TODO: Temp
if (vault.RetrieveAll() is IReadOnlyList<PasswordCredential> credentials && credentials.Count > 0) if (vault.RetrieveAll() is IReadOnlyList<PasswordCredential> credentials && credentials.Count > 0)
{ {
email.Text = credentials.First().UserName; email.Text = credentials.First().UserName;
@@ -54,7 +54,7 @@ namespace GUTSchedule.UWP.Pages
} }
rememberCredential.IsChecked = (bool?)settings.Values["RememberCredential"] ?? true; rememberCredential.IsChecked = (bool?)settings.Values["RememberCredential"] ?? true;
faculty.ItemsSource = (await Parser.GetFaculties()).Select(i => new ComboBoxItem /*faculty.ItemsSource = (await Parser.GetFaculties()).Select(i => new ComboBoxItem // TODO: Temp
{ {
Content = i.name, Content = i.name,
Tag = i.id, Tag = i.id,
@@ -63,7 +63,7 @@ namespace GUTSchedule.UWP.Pages
faculty.SelectedIndex = (faculty.ItemsSource as List<ComboBoxItem>).FindIndex(i => i.IsSelected); faculty.SelectedIndex = (faculty.ItemsSource as List<ComboBoxItem>).FindIndex(i => i.IsSelected);
if (faculty.SelectedIndex < 0) if (faculty.SelectedIndex < 0)
faculty.SelectedIndex = 0; faculty.SelectedIndex = 0;
course.SelectedIndex = (int?)settings.Values["Course"] ?? 0; course.SelectedIndex = (int?)settings.Values["Course"] ?? 0;*/
startDate.Date = DateTime.Today; startDate.Date = DateTime.Today;
endDate.Date = startDate.Date.Value.AddDays(6); endDate.Date = startDate.Date.Value.AddDays(6);
@@ -1 +1 @@
- Fixed application crashes when there is no public schedule available - Anonymous schedule export is temporarly disabled
@@ -1 +1 @@
- Исправлены вылеты, когда нет публичного расписания - Анонимный экспорт расписания временно отключен
+2 -2
View File
@@ -1,2 +1,2 @@
## Android ## Core
- Fixed application crashes when there is no public schedule available - Anonymous schedule export is temporarly disabled
@@ -1 +1 @@
- Updated schedule parser - Anonymous schedule export is temporarly disabled
@@ -1 +1 @@
- Обновлен парсер расписания - Анонимный экспорт расписания временно отключен