Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/redesign UI #74

Merged
merged 31 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
90de6a8
latest progress
mikecarr Jan 25, 2025
c25be8b
fixed logic with dropdowns and building of downlaod url
mikecarr Jan 26, 2025
fcf800f
add unit tests
mikecarr Jan 26, 2025
a3cfa1b
fix unit tests
mikecarr Jan 26, 2025
4338982
adjust spacing
mikecarr Jan 27, 2025
c3d41a1
finish up firmware upgrade first phase
mikecarr Jan 28, 2025
49fb660
Add Majestic OnBoard Record
mikecarr Jan 28, 2025
d73c16b
Adjust size of combo box so that values fit
mikecarr Jan 28, 2025
d77c180
add radxa tab items
mikecarr Jan 28, 2025
18894cc
adjust layout
mikecarr Jan 28, 2025
7f2668d
display gs tab when in Radxa
mikecarr Jan 30, 2025
4de5742
add msposd tooltips
mikecarr Jan 30, 2025
d547f6e
add msposd changes to telemetry file
mikecarr Jan 30, 2025
55f770f
add msposd commands
mikecarr Jan 30, 2025
8d761c0
Update build_and_release_all.yml
mikecarr Jan 30, 2025
6a0e77a
Update build_and_release_all.yml
mikecarr Jan 30, 2025
ab07414
Update build_and_release_all.yml
mikecarr Jan 30, 2025
02413c4
Update build_and_release_all.yml
mikecarr Jan 30, 2025
cc75cfe
Update build_and_release_all.yml
mikecarr Jan 30, 2025
b94b93d
Update build_and_release_all.yml
mikecarr Jan 30, 2025
eb9af24
Create build-release-android.yml
mikecarr Jan 30, 2025
9c9ebb3
Update build-release-android.yml
mikecarr Jan 30, 2025
0af6f69
if Mobile apps default to tabs collapsed
mikecarr Jan 30, 2025
4308847
fix files
mikecarr Jan 31, 2025
197fb16
add initial presets design
mikecarr Feb 1, 2025
1442f90
Merge remote-tracking branch 'origin/feature/redesign-ui' into featur…
mikecarr Feb 1, 2025
b3a35b3
ui cleanup
mikecarr Feb 4, 2025
5575110
add icons to header
mikecarr Feb 5, 2025
e97236e
add drawer for tabs
mikecarr Feb 5, 2025
ba95a2f
enlarge bitrate range
mikecarr Feb 5, 2025
4c0b77f
Merge branch 'master' into feature/redesign-ui
mikecarr Feb 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build-release-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
arch: [x64, arm64]

steps:
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/build_and_release_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
branch:
description: 'Branch to build'
required: false
default: 'master' # Fallback to a default branch if not specified
default: ''
push:
tags:
- 'release-v*' # Trigger for tags that start with 'v', e.g., v1.0.0, v2.1.3
Expand All @@ -37,16 +37,12 @@ jobs:
id: get_version
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
if [[ "${{ inputs.branch }}" == refs/heads/* ]]; then
VERSION="0.0.1"
else
VERSION="${{ inputs.branch }}"
fi
echo "** workflow_dispatch"
VERSION="0.0.1"
elif [[ "${{ github.ref_type }}" == "tag" ]]; then
echo "** tag"
VERSION=${GITHUB_REF#refs/tags/}
VERSION=${VERSION#release-v}
else
VERSION="0.0.1"
fi
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "v$VERSION" > OpenIPC_Config/VERSION
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Nullable>enable</Nullable>
<AvaloniaVersion>11.1.3</AvaloniaVersion>
<AvaloniaVersion>11.2.3</AvaloniaVersion>
</PropertyGroup>
</Project>
23 changes: 12 additions & 11 deletions OpenIPC_Config.Android/Helpers/AndroidFileHelper.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.IO;
using Android.App;
using Android.Content;
using Android.Content.Res;
using Android.Util;
Expand All @@ -11,8 +12,8 @@ public class AndroidFileHelper
public static string ReadAssetFile(string relativePath)
{
// var assets = Android.App.Application.Context.Assets;
var assets = global::Android.App.Application.Context.Assets;
var assets = Application.Context.Assets;

using (var stream = assets.Open(relativePath))
using (var reader = new StreamReader(stream))
{
Expand All @@ -22,14 +23,14 @@ public static string ReadAssetFile(string relativePath)

public static string[] ListAssetFiles(string folderPath)
{
var assets = global::Android.App.Application.Context.Assets;
var assets = Application.Context.Assets;
return assets.List(folderPath); // Lists all files in the folder
}

public static void CopyAssetsToInternalStorage(Context context)
{
AssetManager assets = context.Assets;
string internalStoragePath = context.FilesDir.AbsolutePath; // Internal storage path
var assets = context.Assets;
var internalStoragePath = context.FilesDir.AbsolutePath; // Internal storage path

// Start recursive copy from the root "binaries" folder
CopyFolder(assets, "binaries", internalStoragePath);
Expand All @@ -45,10 +46,10 @@ private static void CopyFolder(AssetManager assets, string sourceFolder, string
// List all items (files and folders) in the source folder
string[] items = assets.List(sourceFolder);

foreach (string item in items)
foreach (var item in items)
{
string sourcePath = string.IsNullOrEmpty(sourceFolder) ? item : $"{sourceFolder}/{item}";
string destinationPath = Path.Combine(destinationFolder, item);
var sourcePath = string.IsNullOrEmpty(sourceFolder) ? item : $"{sourceFolder}/{item}";
var destinationPath = Path.Combine(destinationFolder, item);

// Check if the item is a directory or file
if (assets.List(sourcePath).Length > 0)
Expand All @@ -59,8 +60,8 @@ private static void CopyFolder(AssetManager assets, string sourceFolder, string
else
{
// If it's a file, copy it
using (Stream input = assets.Open(sourcePath))
using (FileStream output = new FileStream(destinationPath, FileMode.Create))
using (var input = assets.Open(sourcePath))
using (var output = new FileStream(destinationPath, FileMode.Create))
{
input.CopyTo(output);
}
Expand Down
17 changes: 7 additions & 10 deletions OpenIPC_Config.Android/MainActivity.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
using System;
using Android.App;
using Android.App;
using Android.Content.PM;
using Android.OS;
using Android.Views;
using Avalonia;
using Avalonia.Android;
using Java.Lang;
using OpenIPC_Config.Android.Helpers;
using Application = Android.App.Application;

namespace OpenIPC_Config.Android;

Expand All @@ -18,24 +17,22 @@ namespace OpenIPC_Config.Android;
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.UiMode)]
public class MainActivity : AvaloniaMainActivity<App>
{

// Adjust the layout when the keyboard is shown
protected override void OnCreate(Bundle? savedInstanceState)
{
base.OnCreate(savedInstanceState);

// Hide the soft keyboard initially
Window.SetSoftInputMode(SoftInput.StateHidden);

// Optionally, adjust the layout when the keyboard is shown
Window.SetSoftInputMode(SoftInput.AdjustResize);
}

protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
{

AndroidFileHelper.CopyAssetsToInternalStorage(global::Android.App.Application.Context);

AndroidFileHelper.CopyAssetsToInternalStorage(Application.Context);

return base.CustomizeAppBuilder(builder)
.WithInterFont();
}
Expand Down
40 changes: 21 additions & 19 deletions OpenIPC_Config.Android/OpenIPC_Config.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,30 +29,32 @@
</AndroidAsset>
</ItemGroup>


<ItemGroup>
<PackageReference Include="Avalonia.Android" Version="$(AvaloniaVersion)"/>
<PackageReference Include="MessageBox.Avalonia" Version="3.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0-rc.2.24473.5" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0-rc.2.24473.5" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Prism.Core" Version="9.0.537" />
<PackageReference Include="ReactiveUI" Version="20.1.63" />
<PackageReference Include="Serilog" Version="4.1.1-dev-02318" />
<PackageReference Include="Serilog.Settings.AppSettings" Version="3.0.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.4" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageReference Include="Serilog.Sinks.Debug" Version="3.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
<PackageReference Include="Serilog.Sinks.RollingFile" Version="3.3.1-dev-00771" />
<PackageReference Include="Serilog.Sinks.TextWriter" Version="3.0.0" />
<PackageReference Include="SSH.NET" Version="2024.1.0" />
<PackageReference Include="Avalonia.Svg.Skia" Version="11.2.0.2"/>
<PackageReference Include="MessageBox.Avalonia" Version="3.2.0"/>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0-rc.2.24473.5"/>
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0-rc.2.24473.5"/>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0"/>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3"/>
<PackageReference Include="Prism.Core" Version="9.0.537"/>
<PackageReference Include="ReactiveUI" Version="20.1.63"/>
<PackageReference Include="Serilog" Version="4.1.1-dev-02318"/>
<PackageReference Include="Serilog.Settings.AppSettings" Version="3.0.0"/>
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.4"/>
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0"/>
<PackageReference Include="Serilog.Sinks.Debug" Version="3.0.0"/>
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0"/>
<PackageReference Include="Serilog.Sinks.RollingFile" Version="3.3.1-dev-00771"/>
<PackageReference Include="Serilog.Sinks.TextWriter" Version="3.0.0"/>
<PackageReference Include="SharpCompress" Version="0.39.0" />
<PackageReference Include="SSH.NET" Version="2024.1.0"/>
<PackageReference Include="Xamarin.AndroidX.Core.SplashScreen" Version="1.0.1.1"/>
<PackageReference Include="YamlDotNet" Version="16.1.3" />
<PackageReference Include="YamlDotNet" Version="16.1.3"/>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\OpenIPC_Config\OpenIPC_Config.csproj" />
<ProjectReference Include="..\OpenIPC_Config\OpenIPC_Config.csproj"/>
</ItemGroup>
</Project>
6 changes: 3 additions & 3 deletions OpenIPC_Config.Android/Properties/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application android:label="OpenIPC_Config" android:icon="@drawable/Icon" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application android:label="OpenIPC_Config" android:icon="@drawable/Icon"/>
</manifest>
126 changes: 63 additions & 63 deletions OpenIPC_Config.Android/Resources/drawable-night-v31/avalonia_anim.xml
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
<animated-vector
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt">
<aapt:attr name="android:drawable">
<vector
android:name="vector"
android:width="128dp"
android:height="128dp"
android:viewportWidth="128"
android:viewportHeight="128">
<group
android:name="wrapper"
android:translateX="21"
android:translateY="21">
<group android:name="group">
<path
android:name="path"
android:pathData="M 74.853 85.823 L 75.368 85.823 C 80.735 85.823 85.144 81.803 85.761 76.602 L 85.836 41.76 C 85.225 18.593 66.254 0 42.939 0 C 19.24 0 0.028 19.212 0.028 42.912 C 0.028 66.357 18.831 85.418 42.18 85.823 L 74.853 85.823 Z"
android:strokeWidth="1"/>
<path
android:name="path_1"
android:pathData="M 43.059 14.614 C 29.551 14.614 18.256 24.082 15.445 36.743 C 18.136 37.498 20.109 39.968 20.109 42.899 C 20.109 45.831 18.136 48.301 15.445 49.055 C 18.256 61.716 29.551 71.184 43.059 71.184 C 47.975 71.184 52.599 69.93 56.628 67.723 L 56.628 70.993 L 71.344 70.993 L 71.344 44.072 C 71.357 43.714 71.344 43.26 71.344 42.899 C 71.344 27.278 58.68 14.614 43.059 14.614 Z M 29.51 42.899 C 29.51 35.416 35.576 29.35 43.059 29.35 C 50.541 29.35 56.607 35.416 56.607 42.899 C 56.607 50.382 50.541 56.448 43.059 56.448 C 35.576 56.448 29.51 50.382 29.51 42.899 Z"
android:strokeWidth="1"
android:fillType="evenOdd"/>
<path
android:name="path_2"
android:pathData="M 18.105 42.88 C 18.105 45.38 16.078 47.407 13.579 47.407 C 11.079 47.407 9.052 45.38 9.052 42.88 C 9.052 40.381 11.079 38.354 13.579 38.354 C 16.078 38.354 18.105 40.381 18.105 42.88 Z"
android:strokeWidth="1"/>
</group>
</group>
</vector>
</aapt:attr>
<target android:name="path">
<aapt:attr name="android:animation">
<objectAnimator
android:propertyName="fillColor"
android:duration="1000"
android:valueFrom="#00ffffff"
android:valueTo="#161c2d"
android:valueType="colorType"
android:interpolator="@android:interpolator/fast_out_slow_in"/>
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt">
<aapt:attr name="android:drawable">
<vector
android:name="vector"
android:width="128dp"
android:height="128dp"
android:viewportWidth="128"
android:viewportHeight="128">
<group
android:name="wrapper"
android:translateX="21"
android:translateY="21">
<group android:name="group">
<path
android:name="path"
android:pathData="M 74.853 85.823 L 75.368 85.823 C 80.735 85.823 85.144 81.803 85.761 76.602 L 85.836 41.76 C 85.225 18.593 66.254 0 42.939 0 C 19.24 0 0.028 19.212 0.028 42.912 C 0.028 66.357 18.831 85.418 42.18 85.823 L 74.853 85.823 Z"
android:strokeWidth="1"/>
<path
android:name="path_1"
android:pathData="M 43.059 14.614 C 29.551 14.614 18.256 24.082 15.445 36.743 C 18.136 37.498 20.109 39.968 20.109 42.899 C 20.109 45.831 18.136 48.301 15.445 49.055 C 18.256 61.716 29.551 71.184 43.059 71.184 C 47.975 71.184 52.599 69.93 56.628 67.723 L 56.628 70.993 L 71.344 70.993 L 71.344 44.072 C 71.357 43.714 71.344 43.26 71.344 42.899 C 71.344 27.278 58.68 14.614 43.059 14.614 Z M 29.51 42.899 C 29.51 35.416 35.576 29.35 43.059 29.35 C 50.541 29.35 56.607 35.416 56.607 42.899 C 56.607 50.382 50.541 56.448 43.059 56.448 C 35.576 56.448 29.51 50.382 29.51 42.899 Z"
android:strokeWidth="1"
android:fillType="evenOdd"/>
<path
android:name="path_2"
android:pathData="M 18.105 42.88 C 18.105 45.38 16.078 47.407 13.579 47.407 C 11.079 47.407 9.052 45.38 9.052 42.88 C 9.052 40.381 11.079 38.354 13.579 38.354 C 16.078 38.354 18.105 40.381 18.105 42.88 Z"
android:strokeWidth="1"/>
</group>
</group>
</vector>
</aapt:attr>
</target>
<target android:name="path_1">
<aapt:attr name="android:animation">
<objectAnimator
android:propertyName="fillColor"
android:duration="1000"
android:valueFrom="#00ffffff"
android:valueTo="#f9f9fb"
android:valueType="colorType"
android:interpolator="@android:interpolator/fast_out_slow_in"/>
</aapt:attr>
</target>
<target android:name="path_2">
<aapt:attr name="android:animation">
<objectAnimator
android:propertyName="fillColor"
android:duration="1000"
android:valueFrom="#00ffffff"
android:valueTo="#f9f9fb"
android:valueType="colorType"
android:interpolator="@android:interpolator/fast_out_slow_in"/>
</aapt:attr>
</target>
<target android:name="path">
<aapt:attr name="android:animation">
<objectAnimator
android:propertyName="fillColor"
android:duration="1000"
android:valueFrom="#00ffffff"
android:valueTo="#161c2d"
android:valueType="colorType"
android:interpolator="@android:interpolator/fast_out_slow_in"/>
</aapt:attr>
</target>
<target android:name="path_1">
<aapt:attr name="android:animation">
<objectAnimator
android:propertyName="fillColor"
android:duration="1000"
android:valueFrom="#00ffffff"
android:valueTo="#f9f9fb"
android:valueType="colorType"
android:interpolator="@android:interpolator/fast_out_slow_in"/>
</aapt:attr>
</target>
<target android:name="path_2">
<aapt:attr name="android:animation">
<objectAnimator
android:propertyName="fillColor"
android:duration="1000"
android:valueFrom="#00ffffff"
android:valueTo="#f9f9fb"
android:valueType="colorType"
android:interpolator="@android:interpolator/fast_out_slow_in"/>
</aapt:attr>
</target>
</animated-vector>
Loading