mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-22 17:18:41 +00:00
opt dyn post
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -284,63 +284,60 @@ class _CreateDynPanelState extends CommonRichTextPubPageState<CreateDynPanel> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
PreferredSizeWidget _buildAppBar(ThemeData theme) => PreferredSize(
|
Widget _buildAppBar(ThemeData theme) => Container(
|
||||||
preferredSize: const Size.fromHeight(66),
|
height: 66,
|
||||||
child: Padding(
|
padding: const EdgeInsets.all(16),
|
||||||
padding: const EdgeInsets.all(16),
|
child: Stack(
|
||||||
child: Stack(
|
clipBehavior: Clip.none,
|
||||||
clipBehavior: Clip.none,
|
children: [
|
||||||
alignment: Alignment.center,
|
Align(
|
||||||
children: [
|
alignment: Alignment.centerLeft,
|
||||||
Align(
|
child: SizedBox(
|
||||||
alignment: Alignment.centerLeft,
|
width: 34,
|
||||||
child: SizedBox(
|
height: 34,
|
||||||
width: 34,
|
child: IconButton(
|
||||||
height: 34,
|
tooltip: '返回',
|
||||||
child: IconButton(
|
style: ButtonStyle(
|
||||||
tooltip: '返回',
|
padding: WidgetStateProperty.all(EdgeInsets.zero),
|
||||||
style: ButtonStyle(
|
backgroundColor: WidgetStateProperty.resolveWith(
|
||||||
padding: WidgetStateProperty.all(EdgeInsets.zero),
|
(states) {
|
||||||
backgroundColor: WidgetStateProperty.resolveWith(
|
return theme.colorScheme.secondaryContainer;
|
||||||
(states) {
|
},
|
||||||
return theme.colorScheme.secondaryContainer;
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
onPressed: Get.back,
|
|
||||||
icon: Icon(
|
|
||||||
Icons.arrow_back_outlined,
|
|
||||||
size: 18,
|
|
||||||
color: theme.colorScheme.onSecondaryContainer,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
onPressed: Get.back,
|
||||||
|
icon: Icon(
|
||||||
|
Icons.arrow_back_outlined,
|
||||||
|
size: 18,
|
||||||
|
color: theme.colorScheme.onSecondaryContainer,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Center(
|
),
|
||||||
child: Text(
|
const Center(
|
||||||
'发布动态',
|
child: Text(
|
||||||
style: TextStyle(fontSize: 15, fontWeight: FontWeight.bold),
|
'发布动态',
|
||||||
),
|
style: TextStyle(fontSize: 15, fontWeight: FontWeight.bold),
|
||||||
),
|
),
|
||||||
Align(
|
),
|
||||||
alignment: Alignment.centerRight,
|
Align(
|
||||||
child: Obx(
|
alignment: Alignment.centerRight,
|
||||||
() => FilledButton.tonal(
|
child: Obx(
|
||||||
onPressed: enablePublish.value ? onPublish : null,
|
() => FilledButton.tonal(
|
||||||
style: FilledButton.styleFrom(
|
onPressed: enablePublish.value ? onPublish : null,
|
||||||
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
style: FilledButton.styleFrom(
|
||||||
padding: const EdgeInsets.symmetric(
|
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||||
horizontal: 20,
|
padding: const EdgeInsets.symmetric(
|
||||||
vertical: 10,
|
horizontal: 20,
|
||||||
),
|
vertical: 10,
|
||||||
visualDensity: VisualDensity.compact,
|
|
||||||
),
|
),
|
||||||
child: Text(_publishTime.value == null ? '发布' : '定时发布'),
|
visualDensity: VisualDensity.compact,
|
||||||
),
|
),
|
||||||
|
child: Text(_publishTime.value == null ? '发布' : '定时发布'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ class _RepostPanelState extends CommonRichTextPubPageState<RepostPanel> {
|
|||||||
mainAxisSize: _isMax ? MainAxisSize.max : MainAxisSize.min,
|
mainAxisSize: _isMax ? MainAxisSize.max : MainAxisSize.min,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
_isMax ? const SizedBox(height: 16) : const SizedBox(height: 10),
|
if (!_isMax) const SizedBox(height: 10),
|
||||||
_buildAppBar(theme),
|
_buildAppBar(theme),
|
||||||
if (_isMax) ...[
|
if (_isMax) ...[
|
||||||
Expanded(
|
Expanded(
|
||||||
@@ -237,7 +237,7 @@ class _RepostPanelState extends CommonRichTextPubPageState<RepostPanel> {
|
|||||||
borderSide: BorderSide.none,
|
borderSide: BorderSide.none,
|
||||||
gapPadding: 0,
|
gapPadding: 0,
|
||||||
),
|
),
|
||||||
contentPadding: const EdgeInsets.symmetric(vertical: 10),
|
contentPadding: EdgeInsets.zero,
|
||||||
),
|
),
|
||||||
// inputFormatters: [LengthLimitingTextInputFormatter(1000)],
|
// inputFormatters: [LengthLimitingTextInputFormatter(1000)],
|
||||||
),
|
),
|
||||||
@@ -267,11 +267,10 @@ class _RepostPanelState extends CommonRichTextPubPageState<RepostPanel> {
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
: Container(
|
: Container(
|
||||||
height: 34,
|
height: 66,
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
padding: const EdgeInsets.all(16),
|
||||||
child: Stack(
|
child: Stack(
|
||||||
clipBehavior: Clip.none,
|
clipBehavior: Clip.none,
|
||||||
alignment: Alignment.center,
|
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
@@ -367,15 +366,15 @@ class _RepostPanelState extends CommonRichTextPubPageState<RepostPanel> {
|
|||||||
{"raw_text": ":", "type": 1, "biz_id": ""},
|
{"raw_text": ":", "type": 1, "biz_id": ""},
|
||||||
...item.modules.moduleDynamic!.desc!.richTextNodes!.map(
|
...item.modules.moduleDynamic!.desc!.richTextNodes!.map(
|
||||||
(e) {
|
(e) {
|
||||||
int? type;
|
int type;
|
||||||
String? bizId;
|
String bizId;
|
||||||
switch (e.type) {
|
switch (e.type) {
|
||||||
case 'RICH_TEXT_NODE_TYPE_EMOJI':
|
case 'RICH_TEXT_NODE_TYPE_EMOJI':
|
||||||
type = 9;
|
type = 9;
|
||||||
bizId = '';
|
bizId = '';
|
||||||
case 'RICH_TEXT_NODE_TYPE_AT':
|
case 'RICH_TEXT_NODE_TYPE_AT':
|
||||||
type = 2;
|
type = 2;
|
||||||
bizId = e.rid;
|
bizId = e.rid ?? '';
|
||||||
case 'RICH_TEXT_NODE_TYPE_TEXT':
|
case 'RICH_TEXT_NODE_TYPE_TEXT':
|
||||||
default:
|
default:
|
||||||
type = 1;
|
type = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user