This commit is contained in:
@@ -30,7 +30,7 @@ public:
|
|||||||
explicit client(rpc_host_info host_info);
|
explicit client(rpc_host_info host_info);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const rpc_host_info host_info_;
|
rpc_host_info host_info_;
|
||||||
std::atomic<std::uint32_t> request_id_{0U};
|
std::atomic<std::uint32_t> request_id_{0U};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@@ -3,22 +3,26 @@
|
|||||||
import 'package:flutter/material.dart' show GlobalKey, NavigatorState, Color;
|
import 'package:flutter/material.dart' show GlobalKey, NavigatorState, Color;
|
||||||
import 'package:sodium_libs/sodium_libs.dart';
|
import 'package:sodium_libs/sodium_libs.dart';
|
||||||
|
|
||||||
|
const accentBlue = Color(0xFF1050A0);
|
||||||
const addMountTitle = 'Add New Mount';
|
const addMountTitle = 'Add New Mount';
|
||||||
const appLogonTitle = 'Repertory Portal Login';
|
const appLogonTitle = 'Repertory Portal Login';
|
||||||
const appSettingsTitle = 'Portal Settings';
|
const appSettingsTitle = 'Portal Settings';
|
||||||
const appTitle = 'Repertory Management Portal';
|
const appTitle = 'Repertory Management Portal';
|
||||||
const logonWidth = 300.0;
|
const borderRadius = 16.0;
|
||||||
|
const borderRadiusSmall = 8.0;
|
||||||
const databaseTypeList = ['rocksdb', 'sqlite'];
|
const databaseTypeList = ['rocksdb', 'sqlite'];
|
||||||
const downloadTypeList = ['default', 'direct', 'ring_buffer'];
|
const downloadTypeList = ['default', 'direct', 'ring_buffer'];
|
||||||
const eventLevelList = ['critical', 'error', 'warn', 'info', 'debug', 'trace'];
|
const eventLevelList = ['critical', 'error', 'warn', 'info', 'debug', 'trace'];
|
||||||
|
const gradientColors = [Color(0xFF0A0F1F), Color(0xFF1B1C1F)];
|
||||||
|
const gradientColors2 = [Color(0x07FFFFFF), Color(0x00000000)];
|
||||||
|
const logonWidth = 300.0;
|
||||||
const padding = 16.0;
|
const padding = 16.0;
|
||||||
const paddingSmall = 8.0;
|
const paddingSmall = 8.0;
|
||||||
const borderRadius = 16.0;
|
|
||||||
const borderRadiusSmall = 8.0;
|
|
||||||
const protocolTypeList = ['http', 'https'];
|
const protocolTypeList = ['http', 'https'];
|
||||||
const providerTypeList = ['Encrypt', 'Remote', 'S3', 'Sia'];
|
const providerTypeList = ['Encrypt', 'Remote', 'S3', 'Sia'];
|
||||||
const ringBufferSizeList = ['128', '256', '512', '1024', '2048'];
|
const ringBufferSizeList = ['128', '256', '512', '1024', '2048'];
|
||||||
const gradientColors = [Color(0xFF0A0F1F), Color(0xFF1B1C1F)];
|
const surfaceContainerLowDark = Color(0xFF292A2D);
|
||||||
|
const surfaceDark = Color(0xFF202124);
|
||||||
|
|
||||||
final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
|
final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
|
||||||
|
|
||||||
|
@@ -43,10 +43,6 @@ class MyApp extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _MyAppState extends State<MyApp> {
|
class _MyAppState extends State<MyApp> {
|
||||||
static const Color accentBlue = Color(0xFF1050A0);
|
|
||||||
static const Color surfaceDark = Color(0xFF202124);
|
|
||||||
static const Color surfaceContainerLowDark = Color(0xFF292A2D);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(context) {
|
Widget build(context) {
|
||||||
final snackBarTheme = SnackBarThemeData(
|
final snackBarTheme = SnackBarThemeData(
|
||||||
@@ -62,12 +58,12 @@ class _MyAppState extends State<MyApp> {
|
|||||||
brightness: Brightness.dark,
|
brightness: Brightness.dark,
|
||||||
colorScheme: ColorScheme.fromSeed(
|
colorScheme: ColorScheme.fromSeed(
|
||||||
brightness: Brightness.dark,
|
brightness: Brightness.dark,
|
||||||
seedColor: accentBlue,
|
seedColor: constants.accentBlue,
|
||||||
onSurface: Colors.white70,
|
onSurface: Colors.white70,
|
||||||
surface: surfaceDark,
|
surface: constants.surfaceDark,
|
||||||
surfaceContainerLow: surfaceContainerLowDark,
|
surfaceContainerLow: constants.surfaceContainerLowDark,
|
||||||
),
|
),
|
||||||
scaffoldBackgroundColor: surfaceDark,
|
scaffoldBackgroundColor: constants.surfaceDark,
|
||||||
snackBarTheme: snackBarTheme,
|
snackBarTheme: snackBarTheme,
|
||||||
appBarTheme: const AppBarTheme(scrolledUnderElevation: 0),
|
appBarTheme: const AppBarTheme(scrolledUnderElevation: 0),
|
||||||
inputDecorationTheme: const InputDecorationTheme(
|
inputDecorationTheme: const InputDecorationTheme(
|
||||||
|
@@ -57,7 +57,7 @@ class _AddMountScreenState extends State<AddMountScreen> {
|
|||||||
gradient: const LinearGradient(
|
gradient: const LinearGradient(
|
||||||
begin: Alignment.topCenter,
|
begin: Alignment.topCenter,
|
||||||
end: Alignment.bottomCenter,
|
end: Alignment.bottomCenter,
|
||||||
colors: [Color(0x07FFFFFF), Color(0x00000000)],
|
colors: constants.gradientColors2,
|
||||||
),
|
),
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
@@ -81,7 +81,6 @@ class _AddMountScreenState extends State<AddMountScreen> {
|
|||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
// Background
|
|
||||||
Container(
|
Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
@@ -105,17 +104,13 @@ class _AddMountScreenState extends State<AddMountScreen> {
|
|||||||
child: Container(color: Colors.black.withValues(alpha: 0.06)),
|
child: Container(color: Colors.black.withValues(alpha: 0.06)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
// Content
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(constants.padding),
|
padding: const EdgeInsets.all(constants.padding),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
children: [
|
children: [
|
||||||
// Header: Back • Title • Logout
|
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
// Back tile
|
|
||||||
Material(
|
Material(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
@@ -165,10 +160,7 @@ class _AddMountScreenState extends State<AddMountScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
const SizedBox(width: constants.padding),
|
const SizedBox(width: constants.padding),
|
||||||
|
|
||||||
// Logout capsule (glassy)
|
|
||||||
ClipRRect(
|
ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(
|
borderRadius: BorderRadius.circular(
|
||||||
constants.borderRadius,
|
constants.borderRadius,
|
||||||
@@ -209,10 +201,7 @@ class _AddMountScreenState extends State<AddMountScreen> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
||||||
const SizedBox(height: constants.padding),
|
const SizedBox(height: constants.padding),
|
||||||
|
|
||||||
// Provider Type (glassy tile)
|
|
||||||
glassTile(
|
glassTile(
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
@@ -246,10 +235,8 @@ class _AddMountScreenState extends State<AddMountScreen> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
if (_mountType.isNotEmpty && _mountType != 'Remote') ...[
|
if (_mountType.isNotEmpty && _mountType != 'Remote') ...[
|
||||||
const SizedBox(height: constants.padding),
|
const SizedBox(height: constants.padding),
|
||||||
// Config Name (glassy tile)
|
|
||||||
glassTile(
|
glassTile(
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
@@ -292,10 +279,8 @@ class _AddMountScreenState extends State<AddMountScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
||||||
if (_mount != null) ...[
|
if (_mount != null) ...[
|
||||||
const SizedBox(height: constants.padding),
|
const SizedBox(height: constants.padding),
|
||||||
// Settings (large glass container)
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: glassTile(
|
child: glassTile(
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
@@ -311,11 +296,8 @@ class _AddMountScreenState extends State<AddMountScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: constants.padding),
|
const SizedBox(height: constants.padding),
|
||||||
|
|
||||||
// Action buttons row
|
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
// Test
|
|
||||||
ElevatedButton.icon(
|
ElevatedButton.icon(
|
||||||
label: const Text('Test'),
|
label: const Text('Test'),
|
||||||
icon: const Icon(Icons.check),
|
icon: const Icon(Icons.check),
|
||||||
@@ -340,8 +322,6 @@ class _AddMountScreenState extends State<AddMountScreen> {
|
|||||||
onPressed: _handleProviderTest,
|
onPressed: _handleProviderTest,
|
||||||
),
|
),
|
||||||
const SizedBox(width: constants.padding),
|
const SizedBox(width: constants.padding),
|
||||||
|
|
||||||
// Add
|
|
||||||
ElevatedButton.icon(
|
ElevatedButton.icon(
|
||||||
label: const Text('Add'),
|
label: const Text('Add'),
|
||||||
icon: const Icon(Icons.add),
|
icon: const Icon(Icons.add),
|
||||||
|
@@ -32,7 +32,6 @@ class _EditMountScreenState extends State<EditMountScreen> {
|
|||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
// Background gradient
|
|
||||||
Container(
|
Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
@@ -44,35 +43,28 @@ class _EditMountScreenState extends State<EditMountScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// Subtle aurora sweep
|
|
||||||
const AuroraSweep(
|
const AuroraSweep(
|
||||||
enabled: true,
|
enabled: true,
|
||||||
duration: Duration(seconds: 28),
|
duration: Duration(seconds: 28),
|
||||||
primaryAlphaA: 0.04,
|
primaryAlphaA: 0.04,
|
||||||
primaryAlphaB: 0.03,
|
primaryAlphaB: 0.03,
|
||||||
),
|
),
|
||||||
// Light blur + tint for glassiness
|
|
||||||
Positioned.fill(
|
Positioned.fill(
|
||||||
child: BackdropFilter(
|
child: BackdropFilter(
|
||||||
filter: ImageFilter.blur(sigmaX: 6, sigmaY: 6),
|
filter: ImageFilter.blur(sigmaX: 6, sigmaY: 6),
|
||||||
child: Container(color: Colors.black.withValues(alpha: 0.06)),
|
child: Container(color: Colors.black.withValues(alpha: 0.06)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
// Foreground content
|
|
||||||
Column(
|
Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(height: constants.padding),
|
const SizedBox(height: constants.padding),
|
||||||
|
|
||||||
// Header row: Back • Title • Advanced • Logout
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
horizontal: constants.padding,
|
horizontal: constants.padding,
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
// Back tile (glassy)
|
|
||||||
Material(
|
Material(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
@@ -108,10 +100,7 @@ class _EditMountScreenState extends State<EditMountScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
const SizedBox(width: constants.padding),
|
const SizedBox(width: constants.padding),
|
||||||
|
|
||||||
// Title
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
widget.title,
|
widget.title,
|
||||||
@@ -124,10 +113,7 @@ class _EditMountScreenState extends State<EditMountScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
const SizedBox(width: constants.padding),
|
const SizedBox(width: constants.padding),
|
||||||
|
|
||||||
// Advanced toggle capsule (glassy)
|
|
||||||
ClipRRect(
|
ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(
|
borderRadius: BorderRadius.circular(
|
||||||
constants.borderRadius,
|
constants.borderRadius,
|
||||||
@@ -189,10 +175,7 @@ class _EditMountScreenState extends State<EditMountScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
const SizedBox(width: constants.padding),
|
const SizedBox(width: constants.padding),
|
||||||
|
|
||||||
// Logout capsule (glassy)
|
|
||||||
ClipRRect(
|
ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(
|
borderRadius: BorderRadius.circular(
|
||||||
constants.borderRadius,
|
constants.borderRadius,
|
||||||
@@ -234,10 +217,7 @@ class _EditMountScreenState extends State<EditMountScreen> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
const SizedBox(height: constants.padding),
|
const SizedBox(height: constants.padding),
|
||||||
|
|
||||||
// Glass container hosting the settings list
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
@@ -260,7 +240,7 @@ class _EditMountScreenState extends State<EditMountScreen> {
|
|||||||
gradient: const LinearGradient(
|
gradient: const LinearGradient(
|
||||||
begin: Alignment.topCenter,
|
begin: Alignment.topCenter,
|
||||||
end: Alignment.bottomCenter,
|
end: Alignment.bottomCenter,
|
||||||
colors: [Color(0x07FFFFFF), Color(0x00000000)],
|
colors: constants.gradientColors2,
|
||||||
),
|
),
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
|
@@ -30,7 +30,6 @@ class _EditSettingsScreenState extends State<EditSettingsScreen> {
|
|||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
// Background
|
|
||||||
Container(
|
Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
@@ -54,21 +53,16 @@ class _EditSettingsScreenState extends State<EditSettingsScreen> {
|
|||||||
child: Container(color: Colors.black.withValues(alpha: 0.06)),
|
child: Container(color: Colors.black.withValues(alpha: 0.06)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
// Content
|
|
||||||
Column(
|
Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(height: constants.padding),
|
const SizedBox(height: constants.padding),
|
||||||
|
|
||||||
// Header row: Back + Title + Logout capsule
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
horizontal: constants.padding,
|
horizontal: constants.padding,
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
// Back button styled like our glass tiles
|
|
||||||
Material(
|
Material(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
@@ -105,8 +99,6 @@ class _EditSettingsScreenState extends State<EditSettingsScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: constants.padding),
|
const SizedBox(width: constants.padding),
|
||||||
|
|
||||||
// Title
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
widget.title,
|
widget.title,
|
||||||
@@ -119,10 +111,7 @@ class _EditSettingsScreenState extends State<EditSettingsScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
const SizedBox(width: constants.padding),
|
const SizedBox(width: constants.padding),
|
||||||
|
|
||||||
// Logout capsule (glassy)
|
|
||||||
ClipRRect(
|
ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(
|
borderRadius: BorderRadius.circular(
|
||||||
constants.borderRadius,
|
constants.borderRadius,
|
||||||
@@ -164,10 +153,7 @@ class _EditSettingsScreenState extends State<EditSettingsScreen> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
const SizedBox(height: constants.padding),
|
const SizedBox(height: constants.padding),
|
||||||
|
|
||||||
// Glass container holding the settings list
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
@@ -190,7 +176,7 @@ class _EditSettingsScreenState extends State<EditSettingsScreen> {
|
|||||||
gradient: const LinearGradient(
|
gradient: const LinearGradient(
|
||||||
begin: Alignment.topCenter,
|
begin: Alignment.topCenter,
|
||||||
end: Alignment.bottomCenter,
|
end: Alignment.bottomCenter,
|
||||||
colors: [Color(0x07FFFFFF), Color(0x00000000)],
|
colors: constants.gradientColors2,
|
||||||
),
|
),
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
|
@@ -160,24 +160,22 @@ class _HomeScreeState extends State<HomeScreen> {
|
|||||||
tag: 'add_mount_fab',
|
tag: 'add_mount_fab',
|
||||||
child: Material(
|
child: Material(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
elevation: 12, // match card depth
|
elevation: 12,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(constants.borderRadius),
|
borderRadius: BorderRadius.circular(constants.borderRadius),
|
||||||
),
|
),
|
||||||
child: Ink(
|
child: Ink(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
// glassy base like MountWidget Card (but a touch bluer)
|
|
||||||
color: scheme.primary.withValues(alpha: 0.10),
|
color: scheme.primary.withValues(alpha: 0.10),
|
||||||
borderRadius: BorderRadius.circular(constants.borderRadius),
|
borderRadius: BorderRadius.circular(constants.borderRadius),
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color: scheme.outlineVariant.withValues(alpha: 0.15),
|
color: scheme.outlineVariant.withValues(alpha: 0.15),
|
||||||
width: 1,
|
width: 1,
|
||||||
),
|
),
|
||||||
// subtle top highlight for crisp glass
|
|
||||||
gradient: const LinearGradient(
|
gradient: const LinearGradient(
|
||||||
begin: Alignment.topCenter,
|
begin: Alignment.topCenter,
|
||||||
end: Alignment.bottomCenter,
|
end: Alignment.bottomCenter,
|
||||||
colors: [Color(0x07FFFFFF), Color(0x00000000)],
|
colors: constants.gradientColors2,
|
||||||
),
|
),
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
// settings.dart
|
||||||
|
|
||||||
import 'package:collection/collection.dart';
|
import 'package:collection/collection.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
@@ -41,7 +41,7 @@ class _MountWidgetState extends State<MountWidget> {
|
|||||||
gradient: const LinearGradient(
|
gradient: const LinearGradient(
|
||||||
begin: Alignment.topCenter,
|
begin: Alignment.topCenter,
|
||||||
end: Alignment.bottomCenter,
|
end: Alignment.bottomCenter,
|
||||||
colors: [Color(0x07FFFFFF), Color(0x00000000)],
|
colors: constants.gradientColors2,
|
||||||
),
|
),
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
|
Reference in New Issue
Block a user