viewer: restored info action in menu

This commit is contained in:
Thibault Deckers 2022-06-11 17:51:50 +09:00
parent c6a5316570
commit 5317750506
15 changed files with 22 additions and 0 deletions

View file

@ -50,6 +50,7 @@
"entryActionDelete": "Löschen",
"entryActionConvert": "Konvertieren",
"entryActionExport": "Exportieren",
"entryActionInfo": "Info",
"entryActionRename": "Umbenennen",
"entryActionRestore": "Wiederherstellen",
"entryActionRotateCCW": "Drehen gegen den Uhrzeigersinn",

View file

@ -78,6 +78,7 @@
"entryActionDelete": "Delete",
"entryActionConvert": "Convert",
"entryActionExport": "Export",
"entryActionInfo": "Info",
"entryActionRename": "Rename",
"entryActionRestore": "Restore",
"entryActionRotateCCW": "Rotate counterclockwise",

View file

@ -50,6 +50,7 @@
"entryActionDelete": "Borrar",
"entryActionConvert": "Convertir",
"entryActionExport": "Exportar",
"entryActionInfo": "Información",
"entryActionRename": "Renombrar",
"entryActionRestore": "Restaurar",
"entryActionRotateCCW": "Rotar en sentido antihorario",

View file

@ -50,6 +50,7 @@
"entryActionDelete": "Supprimer",
"entryActionConvert": "Convertir",
"entryActionExport": "Exporter",
"entryActionInfo": "Détails",
"entryActionRename": "Renommer",
"entryActionRestore": "Restaurer",
"entryActionRotateCCW": "Pivoter à gauche",

View file

@ -50,6 +50,7 @@
"entryActionDelete": "Hapus",
"entryActionConvert": "Ubah",
"entryActionExport": "Ekspor",
"entryActionInfo": "Info",
"entryActionRename": "Ganti nama",
"entryActionRestore": "Pulihkan",
"entryActionRotateCCW": "Putar berlawanan arah jarum jam",

View file

@ -50,6 +50,7 @@
"entryActionDelete": "Elimina",
"entryActionConvert": "Converti",
"entryActionExport": "Esportazione",
"entryActionInfo": "Info",
"entryActionRename": "Rinomina",
"entryActionRestore": "Ripristina",
"entryActionRotateCCW": "Ruota in senso antiorario",

View file

@ -50,6 +50,7 @@
"entryActionDelete": "削除",
"entryActionConvert": "変換",
"entryActionExport": "エクスポート",
"entryActionInfo": "情報",
"entryActionRename": "名前を変更",
"entryActionRestore": "元に戻す",
"entryActionRotateCCW": "反時計回りに回転",

View file

@ -50,6 +50,7 @@
"entryActionDelete": "삭제",
"entryActionConvert": "변환",
"entryActionExport": "내보내기",
"entryActionInfo": "상세정보",
"entryActionRename": "이름 변경",
"entryActionRestore": "복원",
"entryActionRotateCCW": "좌회전",

View file

@ -49,6 +49,7 @@
"entryActionCopyToClipboard": "Copiar para área de transferência",
"entryActionDelete": "Excluir",
"entryActionExport": "Exportar",
"entryActionInfo": "Informações",
"entryActionConvert": "Converter",
"entryActionRename": "Renomear",
"entryActionRestore": "Restaurar",

View file

@ -50,6 +50,7 @@
"entryActionDelete": "Удалить",
"entryActionConvert": "Конвертировать",
"entryActionExport": "Экспорт",
"entryActionInfo": "Информация",
"entryActionRename": "Переименовать",
"entryActionRestore": "Восстановить",
"entryActionRotateCCW": "Повернуть против часовой стрелки",

View file

@ -50,6 +50,7 @@
"entryActionDelete": "Sil",
"entryActionConvert": "Dönüştür",
"entryActionExport": "Dışa aktar",
"entryActionInfo": "Bilgi",
"entryActionRename": "Yeniden adlandır",
"entryActionRestore": "Dışa aktar",
"entryActionRotateCCW": "Saat yönünün tersine döndür",

View file

@ -50,6 +50,7 @@
"entryActionDelete": "删除",
"entryActionConvert": "转换",
"entryActionExport": "导出",
"entryActionInfo": "信息",
"entryActionRename": "重命名",
"entryActionRestore": "恢复",
"entryActionRotateCCW": "逆时针旋转",

View file

@ -4,6 +4,7 @@ import 'package:aves/widgets/common/extensions/build_context.dart';
import 'package:flutter/widgets.dart';
enum EntryAction {
info,
addShortcut,
copyToClipboard,
delete,
@ -43,6 +44,7 @@ enum EntryAction {
class EntryActions {
static const topLevel = [
EntryAction.info,
EntryAction.share,
EntryAction.edit,
EntryAction.rename,
@ -102,6 +104,8 @@ class EntryActions {
extension ExtraEntryAction on EntryAction {
String getText(BuildContext context) {
switch (this) {
case EntryAction.info:
return context.l10n.entryActionInfo;
case EntryAction.addShortcut:
return context.l10n.collectionActionAddShortcut;
case EntryAction.copyToClipboard:
@ -188,6 +192,8 @@ extension ExtraEntryAction on EntryAction {
IconData getIconData() {
switch (this) {
case EntryAction.info:
return AIcons.info;
case EntryAction.addShortcut:
return AIcons.addShortcut;
case EntryAction.copyToClipboard:

View file

@ -50,6 +50,9 @@ class EntryActionDelegate with FeedbackMixin, PermissionAwareMixin, SizeAwareMix
void onActionSelected(BuildContext context, EntryAction action) {
switch (action) {
case EntryAction.info:
ShowInfoNotification().dispatch(context);
break;
case EntryAction.addShortcut:
_addShortcut(context);
break;

View file

@ -92,6 +92,7 @@ class ViewerButtonRow extends StatelessWidget {
return settings.isRotationLocked;
case EntryAction.addShortcut:
return device.canPinShortcut;
case EntryAction.info:
case EntryAction.copyToClipboard:
case EntryAction.edit:
case EntryAction.open: