Merge branch 'vnext' of https://github.com/pazof/yavsc into vnext
* 'vnext' of https://github.com/pazof/yavsc: (38 commits) fixe le premier démarrage Corrige le mot de passe perdu d'un utilisateur au nom contenant des espaces traductions fixe la reccupération du mot de passe refabrique: MEP index blogs Specialized the book query notification Updated the Licence validity cleaned up log warnings label event date cleans the code Adds support for SIREN exceptions to validation from the external provider layout trads refactoring refactoring Google maps: a map image implements an AccessDenied page A better layout ... # Conflicts: # Yavsc.Api/project.lock.json # Yavsc.Client/Yavsc.Client.csproj # Yavsc.Client/packages.config # sendmsg/Program.cs
This commit is contained in:
commit
e3a73e8146
190 changed files with 6664 additions and 763 deletions
|
|
@ -35,7 +35,7 @@
|
|||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AndroidUseSharedRuntime>True</AndroidUseSharedRuntime>
|
||||
<AndroidLinkMode>None</AndroidLinkMode>
|
||||
<AndroidLinkMode>Full</AndroidLinkMode>
|
||||
<EmbedAssembliesIntoApk>False</EmbedAssembliesIntoApk>
|
||||
<BundleAssemblies>False</BundleAssemblies>
|
||||
<AndroidCreatePackagePerAbi>False</AndroidCreatePackagePerAbi>
|
||||
|
|
@ -76,6 +76,10 @@
|
|||
<HintPath>..\..\packages\Xamarin.Forms.2.3.0.107\lib\MonoAndroid10\FormsViewGroup.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="MarkdownDeep, Version=1.5.2.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\MarkdownDeep-av.NET.1.5.2\lib\MonoAndroid10\MarkdownDeep.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Media.Plugin, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Xam.Plugin.Media.1.0.1\lib\MonoAndroid10\Media.Plugin.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
|
|
@ -100,10 +104,12 @@
|
|||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Drawing.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Json" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Xamarin.Android.Support.Animated.Vector.Drawable, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Animated.Vector.Drawable.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
|
|
@ -264,7 +270,7 @@
|
|||
<AndroidResource Include="Resources\drawable\ic_corp_icon.png" />
|
||||
<AndroidResource Include="Resources\drawable\nfqrcode.png" />
|
||||
<AndroidResource Include="Resources\drawable\visuel_sexion.jpg" />
|
||||
<Content Include="Resources\values\values-21\styles.xml" />
|
||||
<AndroidResource Include="Resources\values\values-21\styles.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Resources\drawable-hdpi\" />
|
||||
|
|
|
|||
|
|
@ -3,4 +3,7 @@
|
|||
<PropertyGroup>
|
||||
<AndroidDesignerPreferredDevice>Nexus 4</AndroidDesignerPreferredDevice>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ReferencePath>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v6.0\</ReferencePath>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
@ -22,6 +22,7 @@ using BookAStar.Model.Auth.Account;
|
|||
using BookAStar.Droid.OAuth;
|
||||
using Yavsc.Helpers;
|
||||
using Yavsc.Models.Identity;
|
||||
using static Android.Content.Res.Resources;
|
||||
|
||||
namespace BookAStar.Droid
|
||||
{
|
||||
|
|
@ -37,8 +38,11 @@ namespace BookAStar.Droid
|
|||
global::Xamarin.Forms.Forms.Init(this, bundle);
|
||||
global::Xamarin.FormsMaps.Init(this, bundle);
|
||||
LoadApplication(new App(this));
|
||||
/* var x = typeof(Themes.DarkThemeResources);
|
||||
x = typeof(Themes.LightThemeResources);
|
||||
x = typeof(Themes.Android.UnderlineEffect); */
|
||||
}
|
||||
|
||||
|
||||
|
||||
public bool EnablePushNotifications(bool enable)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,12 +31,12 @@
|
|||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<permission android:name="fr.pschneider.bas.permission.MAPS_RECEIVE" android:protectionLevel="signature" />
|
||||
<uses-permission android:name="fr.pschneider.bas.permission.MAPS_RECEIVE" />
|
||||
<permission android:name="fr.pschneider.bas.permission.C2D_MESSAGE" android:protectionLevel="signature" />
|
||||
<permission android:name="fr.pschneider.bas.permission.C2D_MESSAGE" android:protectionLevel="signature" />
|
||||
<uses-permission android:name="fr.pschneider.bas.permission.C2D_MESSAGE" />
|
||||
<uses-permission android:name="com.google.android.c2dm.intent.RECEIVE" />
|
||||
<uses-permission android:name="com.google.android.c2dm.intent.REGISTRATION" />
|
||||
<uses-permission android:name="com.google.android.c2dm.intent.RETRY" />
|
||||
<uses-permission android:name="android.permission.ACCOUNT_MANAGER" />
|
||||
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
|
||||
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
|
||||
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
|
||||
</manifest>
|
||||
|
|
@ -48,10 +48,13 @@ namespace BookAStar.Droid
|
|||
var instanceID = InstanceID.GetInstance(this);
|
||||
|
||||
#if DEBUG
|
||||
// When debugging, and application data/cache is preserved,
|
||||
// a previous instance comes from another application installation
|
||||
// and the old registration against GCM fails,
|
||||
// until one delete it.
|
||||
try
|
||||
{
|
||||
instanceID.DeleteInstanceID();
|
||||
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
|
|
@ -97,7 +100,11 @@ namespace BookAStar.Droid
|
|||
{
|
||||
var pubSub = GcmPubSub.GetInstance(this);
|
||||
pubSub.Subscribe(token, "/topics/global", null);
|
||||
pubSub.Subscribe (token, "/topics/jobs", null);
|
||||
|
||||
// TODO if a Activity is specified,
|
||||
// and general annonces in this activity are accepted:
|
||||
//
|
||||
// pubSub.Subscribe(token, "/topics/jobs/"+ActivityCode, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="MarkdownDeep-av.NET" version="1.5.2" targetFramework="monoandroid60" />
|
||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="monoandroid60" />
|
||||
<package id="Xam.Plugin.Connectivity" version="1.0.1" targetFramework="monoandroid60" />
|
||||
<package id="Xam.Plugin.DeviceInfo" version="1.0.0.2" targetFramework="monoandroid60" />
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ namespace BookAStar
|
|||
else deviceInfoPage.Focus();
|
||||
}
|
||||
|
||||
public async Task PostDeviceInfo()
|
||||
public void PostDeviceInfo()
|
||||
{
|
||||
var res = PlateformSpecificInstance.InvokeApi(
|
||||
"gcm/register",
|
||||
|
|
|
|||
|
|
@ -78,9 +78,7 @@ namespace BookAStar
|
|||
// Inform the server of it.
|
||||
if (oldregid != value)
|
||||
{
|
||||
Task.Run( async () => {
|
||||
await App.CurrentApp.PostDeviceInfo();
|
||||
});
|
||||
App.CurrentApp.PostDeviceInfo();
|
||||
}
|
||||
}
|
||||
get { return AppSettings.GetValueOrDefault<string>(GoogleRegIdKey); }
|
||||
|
|
@ -109,8 +107,7 @@ namespace BookAStar
|
|||
return accountList;
|
||||
}
|
||||
}
|
||||
|
||||
private static User currentUser = null;
|
||||
|
||||
public static User CurrentUser { get
|
||||
{
|
||||
var uname = UserName;
|
||||
|
|
@ -121,8 +118,7 @@ namespace BookAStar
|
|||
}
|
||||
set
|
||||
{
|
||||
var olduserid = currentUser?.Id;
|
||||
currentUser = value;
|
||||
var olduserid = CurrentUser?.Id;
|
||||
AppSettings.AddOrUpdateValue<string>(userNameKey, value?.UserName);
|
||||
// TODO if it changes, for a valid
|
||||
// ident, and we've got a GoogleRedId, inform the server
|
||||
|
|
@ -131,11 +127,10 @@ namespace BookAStar
|
|||
{
|
||||
if (olduserid != value.Id)
|
||||
{
|
||||
Task.Run(async () => {
|
||||
await App.CurrentApp.PostDeviceInfo();
|
||||
});
|
||||
App.CurrentApp.PostDeviceInfo();
|
||||
}
|
||||
}
|
||||
// TODO else Unregister the device
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:local="clr-namespace:BookAStar.Views;assembly=BookAStar"
|
||||
xmlns:local="clr-namespace:BookAStar;assembly=BookAStar"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="BookAStar.SettingsPage"
|
||||
Title="Paramètres Booking star">
|
||||
Title="Paramètres Booking star"
|
||||
BindingContext="." >
|
||||
<ContentPage.Resources>
|
||||
<ResourceDictionary>
|
||||
<Style TargetType="Label">
|
||||
<Setter Property="FontSize" Value="Large"/>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
</ContentPage.Resources>
|
||||
|
||||
<StackLayout>
|
||||
<Label Text="Compte utilisateur" />
|
||||
<Label x:Name="UserNameLabel" Text="{Binding ActiveUserName}" />
|
||||
<Label Text="Compte utilisateur" StyleClass="Header"/>
|
||||
|
||||
<ListView x:Name="AccountListView"
|
||||
SeparatorVisibility="Default"
|
||||
|
|
@ -44,57 +42,17 @@ Title="Paramètres Booking star">
|
|||
|
||||
</ListView>
|
||||
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<Label Text="Status" VerticalOptions="Start"
|
||||
XAlign="Center" IsVisible="true"
|
||||
FontSize="Large" FontAttributes="Bold" TextColor="Yellow" />
|
||||
<Label Text="Recevoir les notifications push"/>
|
||||
<StackLayout Orientation="Horizontal" VerticalOptions="Start">
|
||||
<Label Text="Recevoir les notifications push" StyleClass="Header"/>
|
||||
<Switch x:Name="pushstatus" />
|
||||
</StackLayout>
|
||||
|
||||
<StackLayout Orientation="Horizontal" VerticalOptions="Start">
|
||||
<Label Text="Recevoir les demandes de devis de la part de professionnels uniquement"
|
||||
StyleClass="Header"/>
|
||||
<Switch x:Name="restrictToPro" />
|
||||
</StackLayout>
|
||||
|
||||
<Label Text="Genres Musicaux"/>
|
||||
|
||||
<ListView VerticalOptions="Start" x:Name="MusicalListView"
|
||||
ItemsSource="{Binding Musical}"
|
||||
>
|
||||
<ListView.Header><StackLayout></StackLayout></ListView.Header>
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ViewCell>
|
||||
<ViewCell.View>
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<Label Text="{Binding Key}" TextColor="Silver" FontAttributes="Italic"></Label>
|
||||
<Slider Value="{Binding Value}" HorizontalOptions="FillAndExpand" ></Slider>
|
||||
</StackLayout>
|
||||
</ViewCell.View>
|
||||
</ViewCell>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
<ListView.Footer><StackLayout></StackLayout></ListView.Footer>
|
||||
</ListView>
|
||||
|
||||
<Label Text="Lieux de prédileciton" />
|
||||
<ListView x:Name="EnvironListView"
|
||||
ItemsSource="{Binding Environ}" >
|
||||
<ListView.Header>
|
||||
<StackLayout></StackLayout>
|
||||
</ListView.Header>
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ViewCell>
|
||||
<ViewCell.View>
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<Label Text="{Binding Key}" TextColor="Silver" FontAttributes="Italic"></Label>
|
||||
<Slider Value="{Binding Value}" HorizontalOptions="FillAndExpand" ></Slider>
|
||||
</StackLayout>
|
||||
</ViewCell.View>
|
||||
</ViewCell>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
<ListView.Footer>
|
||||
<StackLayout></StackLayout>
|
||||
</ListView.Footer>
|
||||
</ListView>
|
||||
<Button x:Name="BtnViewDeviceInfo" Text="Device info"></Button>
|
||||
<Button x:Name="BtnViewDeviceInfo" Text="Device info" StyleClass="Info"></Button>
|
||||
</StackLayout>
|
||||
</ContentPage>
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ namespace BookAStar
|
|||
|
||||
this.Musical = MainSettings.Musical;
|
||||
this.Environ = MainSettings.Environ;
|
||||
this.BindingContext = this;
|
||||
|
||||
AddAccountBtn.Clicked += AddAccountBtn_Clicked;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue