diff --git a/SmartPanel.xaml b/SmartPanel.xaml index 21387c0821fd00078f052614fd5ebdacf654f27c..d4bb6fe073955a72a668ba7c9e78fde78883e26f 100644 --- a/SmartPanel.xaml +++ b/SmartPanel.xaml @@ -915,34 +915,57 @@ <RowDefinition Height="*"/> <RowDefinition Height="30"/> </Grid.RowDefinitions> + <ScrollViewer x:Name="_scrollViewerDevicesMenu_" + Grid.Row="0" + MaxHeight="400"> <Grid Background="#FFE4F1F9"> <Grid.RowDefinitions> + <RowDefinition Height="auto"/> <RowDefinition Height="auto"/> <RowDefinition Height="auto"/> <RowDefinition Height="*"/> <RowDefinition Height="auto"/> <RowDefinition Height="auto"/> </Grid.RowDefinitions> - <TextBlock Text="Device ID:" - Margin="10" - Grid.Row="0" - HorizontalAlignment="Center"/> + <!-- about this device --> + <StackPanel Orientation="Horizontal" + Grid.Row="0" + Margin="10,20"> + <TextBlock Style="{StaticResource TextSegoeStyle-20pt-black}" + Margin="0,0,10,0" + Text=""/> + <TextBlock Text="Your device ID"/> + </StackPanel> <TextBlock x:Name="_deviceId_" Margin="10" Text="[TEXT_MISSING]" TextTrimming="CharacterEllipsis" + FontSize="12" Grid.Row="1" IsTextSelectionEnabled="True" HorizontalAlignment="Center"/> - <TextBlock x:Name="_waitingDevicesList_" + <!-- about linked devices --> + <StackPanel Orientation="Horizontal" + Grid.Row="2" + Margin="10,20"> + <TextBlock Style="{StaticResource TextSegoeStyle-20pt-black}" + Margin="0,0,10,0" + Text=""/> + <TextBlock Text="other linked devices"/> + </StackPanel> + <TextBlock x:Name="_waitingDevicesList_" Text="waiting for devices list..." - Grid.Row="2" + Grid.Row="3" IsTextSelectionEnabled="True" HorizontalAlignment="Center"/> <ListBox x:Name="_devicesIdList_" Visibility="Collapsed" - Grid.Row="2"/> + Padding="10,0" + Background="#FFE4F1F9" + Grid.Row="3"/> </Grid> + </ScrollViewer> + <!-- button to add device. --> <Button x:Name="_addDevice_" Grid.Row="1" VerticalAlignment="Center" diff --git a/SmartPanel.xaml.cpp b/SmartPanel.xaml.cpp index 6543735cfdaa4df566c544eb220874cf899a14c8..4ca7e9ce7d1efd5189fe97b9787e85ad57abfecf 100644 --- a/SmartPanel.xaml.cpp +++ b/SmartPanel.xaml.cpp @@ -826,8 +826,15 @@ void RingClientUWP::Views::SmartPanel::_devicesMenuButton__Checked(Platform::Obj _waitingDevicesList_->Visibility = Windows::UI::Xaml::Visibility::Visible; _devicesIdList_->Visibility = Windows::UI::Xaml::Visibility::Collapsed; - auto accountId = AccountListItemsViewModel::instance->_selectedItem->_account->accountID_; - RingD::instance->askToRefreshKnownDevices(accountId); + auto account = AccountListItemsViewModel::instance->_selectedItem->_account; + + _deviceId_->Text = account->_deviceId; + if (_deviceId_->Text->IsEmpty()) { + _deviceId_->Text = "No device id found!"; + ERR_("device Id not found for account " + Utils::toString(account->_deviceId)); + } + + RingD::instance->askToRefreshKnownDevices(account->accountID_); _shareMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed; _accountsMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;