mirror of
https://github.com/immich-app/immich.git
synced 2025-01-09 13:26:47 +01:00
2b5cef156c
* Add i18n framework to mobile app and write simple translation generator * Replace all texts in login_form with i18n keys * Localization of sharing section * Localization of asset viewer section * Use JSON as base translation format * Add check for missing/unused translation keys * Add localizely * Remove i18n directory in favour of localizely * Backup Translation * More translations * Translate home page * Translation of search page * Translate new server version announcement * Reformat code * Fix typo in german translation * Update englisch translations * Change translation keys to match dart filenames * Add /api to translated endpoint_urls * Update localizely.yml * Add languages to ios plist * Remove unused keys * Added script to check outdated key in other translations * Add download key to localizely.yml Co-authored-by: Alex <alex.tran1502@gmail.com>
90 lines
3.1 KiB
Dart
90 lines
3.1 KiB
Dart
import 'package:auto_route/auto_route.dart';
|
|
import 'package:easy_localization/easy_localization.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:immich_mobile/routing/router.dart';
|
|
|
|
class SharingSliverAppBar extends StatelessWidget {
|
|
const SharingSliverAppBar({
|
|
Key? key,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SliverAppBar(
|
|
centerTitle: true,
|
|
floating: false,
|
|
pinned: true,
|
|
snap: false,
|
|
automaticallyImplyLeading: false,
|
|
// leading: Container(),
|
|
// elevation: 0,
|
|
title: Text(
|
|
'IMMICH',
|
|
style: TextStyle(
|
|
fontFamily: 'SnowburstOne',
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: 22,
|
|
color: Theme.of(context).primaryColor,
|
|
),
|
|
),
|
|
bottom: PreferredSize(
|
|
preferredSize: const Size.fromHeight(50.0),
|
|
child: Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 12.0),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Expanded(
|
|
child: Padding(
|
|
padding: const EdgeInsets.only(right: 4.0),
|
|
child: TextButton.icon(
|
|
style: ButtonStyle(
|
|
backgroundColor: MaterialStateProperty.all(
|
|
Theme.of(context).primaryColor.withAlpha(20)),
|
|
// foregroundColor: MaterialStateProperty.all(Colors.white),
|
|
),
|
|
onPressed: () {
|
|
AutoRouter.of(context)
|
|
.push(const CreateSharedAlbumRoute());
|
|
},
|
|
icon: const Icon(
|
|
Icons.photo_album_outlined,
|
|
size: 20,
|
|
),
|
|
label: const Text(
|
|
"sharing_silver_appbar_create_shared_album",
|
|
style:
|
|
TextStyle(fontWeight: FontWeight.bold, fontSize: 12),
|
|
).tr(),
|
|
),
|
|
),
|
|
),
|
|
Expanded(
|
|
child: Padding(
|
|
padding: const EdgeInsets.only(left: 4.0),
|
|
child: TextButton.icon(
|
|
style: ButtonStyle(
|
|
backgroundColor: MaterialStateProperty.all(
|
|
Theme.of(context).primaryColor.withAlpha(20)),
|
|
// foregroundColor: MaterialStateProperty.all(Colors.white),
|
|
),
|
|
onPressed: null,
|
|
icon: const Icon(
|
|
Icons.swap_horizontal_circle_outlined,
|
|
size: 20,
|
|
),
|
|
label: const Text(
|
|
"sharing_silver_appbar_share_partner",
|
|
style:
|
|
TextStyle(fontWeight: FontWeight.bold, fontSize: 12),
|
|
).tr(),
|
|
),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|