mirror of
https://github.com/jagandeepbrar/lunasea.git
synced 2026-08-31 04:32:32 +00:00
NEW - [Networking] Strict TLS/SSL validation is now disabled globally - [Routing] Hold the AppBar back button to pop back to the home page of the module - [Settings/Sonarr] Toggle to enable Sonarr v3 features - [Sonarr] Complete rewrite of Sonarr - [Sonarr] State is now held across module switches - [Sonarr/Overview] View tags applied to series - [Sonarr/Catalogue] (v3 only) Ability to set and update language profile - [Sonarr/Catalogue] Ability to view all, only monitored, or only unmonitored series - [Sonarr/Releases] (v3 only) Ability to interactively search for season packs - [Sonarr/Releases] Ability to view all, only approved, or only rejected releases TWEAKS - [Settings] Removed all toggles for strict TLS - [Sonarr] Many tweaks to Sonarr's design - [Sonarr/Add] (v3 only) Tapping an already-added series will take you to the series page - [Sonarr/Add] Automatically navigate to newly added series - [Sonarr/Series] Toggling monitored state of series has now been moved to the edit prompt FIXES - [Images] Images will now load for invalid/self-signed certificates - [Tautulli/Activity] Fix grey screen for music activity - [TextField] Fix TextField actions (cut, copy, paste, etc.) not showing - [Timestamps] Fix 12:xx AM being shown as 00:xx AM - Additional small bug fixes
70 lines
2.7 KiB
Dart
70 lines
2.7 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:lunasea/core.dart';
|
|
|
|
class LSDescriptionBlock extends StatefulWidget {
|
|
final String description;
|
|
final String title;
|
|
final String uri;
|
|
final String fallbackImage;
|
|
final bool squareImage;
|
|
final Map headers;
|
|
|
|
LSDescriptionBlock({
|
|
@required this.description,
|
|
@required this.title,
|
|
@required this.uri,
|
|
@required this.fallbackImage,
|
|
@required this.headers,
|
|
this.squareImage = false,
|
|
});
|
|
|
|
@override
|
|
State<StatefulWidget> createState() => _State();
|
|
}
|
|
|
|
class _State extends State<LSDescriptionBlock> {
|
|
final double _imageDimension = 105.0;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return LSCard(
|
|
child: InkWell(
|
|
child: Row(
|
|
children: <Widget>[
|
|
widget.uri != null
|
|
? LSNetworkImage(
|
|
height: _imageDimension,
|
|
width: widget.squareImage ? _imageDimension : _imageDimension/1.5,
|
|
url: widget.uri,
|
|
placeholder: widget.fallbackImage,
|
|
headers: ((Database.currentProfileObject.getLidarr()['headers'] ?? {}) as Map).cast<String, String>(),
|
|
)
|
|
: Container(),
|
|
Expanded(
|
|
child: Container(
|
|
height: _imageDimension,
|
|
child: Padding(
|
|
child: Text(
|
|
widget.description ?? 'No summary is available.',
|
|
overflow: TextOverflow.ellipsis,
|
|
maxLines: 5,
|
|
style: TextStyle(
|
|
color: Colors.white,
|
|
fontSize: Constants.UI_FONT_SIZE_SUBTITLE,
|
|
),
|
|
textAlign: TextAlign.start,
|
|
),
|
|
padding: EdgeInsets.all(12.0),
|
|
),
|
|
alignment: Alignment.center,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
borderRadius: BorderRadius.circular(Constants.UI_BORDER_RADIUS),
|
|
onTap: () => LunaDialogs.textPreview(context, widget.title, widget.description.trim() ?? 'No summary is available.'),
|
|
),
|
|
);
|
|
}
|
|
}
|