Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for profiles #50

Merged
merged 12 commits into from
Dec 31, 2022
9 changes: 9 additions & 0 deletions lib/enums/export_orientations.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
enum ExportOrientation {
portrait('Portrait', 'portrait'),
landscape('Landscape', 'landscape');

final String label;
final String localizationLabel;

const ExportOrientation(this.label, this.localizationLabel);
}
15 changes: 15 additions & 0 deletions lib/lang/de.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,19 @@ const Map<String, String> de = {
'subtitles': 'Untertitel',
'addVideo': 'Video hinzufügen',
'calendar': 'Kalender',
'orientation': 'Orientierung',
'portrait': 'Porträt',
'landscape': 'Landschaft',
'profiles': 'Profils',
'tapToSwitch': 'Tippen Sie auf ein Profil, um zu wechseln',
'createNewProfile': 'Neues Profil erstellen',
'newProfile': 'Neues Profil',
'deleteProfile': 'Profil löschen',
'enterProfileName': 'Profilname eingeben',
'newProfileTooltip':
'Erstellen eines neuen Profils wird ein separates Verzeichnis für Videos eingerichtet, die erstellt wurden, während dieses Profil ausgewählt ist',
'deleteProfileTooltip':
'Alle mit diesem Profil verknüpften Videos werden ebenfalls dauerhaft gelöscht.Bist du sicher weiter? ',
'profileNameCannotBeEmpty': 'Profilname kann nicht leer sein',
'reservedProfileName': 'Dies ist ein reservierter Profilname',
};
27 changes: 19 additions & 8 deletions lib/lang/en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,14 @@ const Map<String, String> en = {
'movieCreatedTitle': 'Movie created!',
'movieCreatedDesc': 'Movie saved to storage inside OSD-Movies folder',
'movieError': 'Error saving the movie!',
'tryAgainMsg':
'Please try again. If the problem persists, contact the developer.',
'tryAgainMsg': 'Please try again. If the problem persists, contact the developer.',
'create': 'Create',
'days': 'days',
'day': 'day',
'totalRecordedTitle': 'You have recorded:',
'tapBelowToGenerate':
'Tap the button below to generate\na single video file:',
'tapBelowToGenerate': 'Tap the button below to generate\na single video file:',
'editQuestionTitle': 'Edit video?',
'editQuestion':
'Your previous recording will be deleted, do you want to continue?',
'editQuestion': 'Your previous recording will be deleted, do you want to continue?',
'yes': 'Yes',
'no': 'No',
'edit': 'Edit',
Expand All @@ -50,8 +47,7 @@ const Map<String, String> en = {
'introTitle2': 'Create the movie of your life',
'introDesc2': 'Generate a compilation of all your recorded videos.',
'introTitle3': 'No ads and totally free',
'introDesc3':
'If you like the app, consider supporting the development with a donation.',
'introDesc3': 'If you like the app, consider supporting the development with a donation.',
'skip': 'Skip',
'done': 'Done',
'futureUpdates': 'Future Updates',
Expand Down Expand Up @@ -99,4 +95,19 @@ const Map<String, String> en = {
'subtitles': 'Subtitles',
'addVideo': 'Add video',
'calendar': 'Calendar',
'orientation': 'Orientation',
'portrait': 'Portrait',
'landscape': 'Landscape',
'profiles': 'Profiles',
'tapToSwitch': 'Tap on a profile to switch',
'createNewProfile': 'Create New Profile',
'newProfile': 'New profile',
'deleteProfile': 'Delete profile',
'enterProfileName': 'Enter profile name',
'newProfileTooltip':
'Creating a new profile will set up a seperate directory for videos created while that profile is selected',
'deleteProfileTooltip':
'All videos associated with this profile will also be permanently deleted. Are you sure to continue?',
'profileNameCannotBeEmpty': 'Profile name cannot be empty',
'reservedProfileName': 'This is a reserved profile name',
};
15 changes: 15 additions & 0 deletions lib/lang/es.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,19 @@ const Map<String, String> es = {
'subtitles': 'Subtítulos',
'addVideo': 'Agregar video',
'calendar': 'Calendario',
'orientation': 'Orientación',
'portrait': 'Retrato',
'landscape': 'Paisaje',
'profiles': 'Perfiles',
'tapToSwitch': 'Toque un perfil para cambiar',
'createNewProfile': 'Crear nuevo perfil',
'newProfile': 'Nuevo perfil',
'deleteProfile': 'Borrar perfil',
'enterProfileName': 'Ingrese el nombre del perfil',
'newProfileTooltip':
'Crear un nuevo perfil configurará un directorio separado para videos creados mientras se selecciona ese perfil',
'deleteProfileTooltip':
'Todos los videos asociados con este perfil también se eliminarán permanentemente.¿Estás seguro de continuar?',
'profileNameCannotBeEmpty': 'El nombre del perfil no puede estar vacío',
'reservedProfileName': 'Este es un nombre de perfil reservado',
};
15 changes: 15 additions & 0 deletions lib/lang/fr.dart
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,19 @@ const Map<String, String> fr = {
'subtitles': 'Sous-titres',
'addVideo': 'Ajouter une vidéo',
'calendar': 'Calendrier',
'orientation': 'Orientation',
'portrait': 'Portraiturer',
'landscape': 'Paysage',
'profiles': 'Profils',
'tapToSwitch': 'Appuyez sur un profil pour changer',
'createNewProfile': 'Créer un nouveau profil',
'newProfile': 'Nouveau profile',
'deleteProfile': 'Supprimer le profil',
'enterProfileName': 'Entrez le nom du profil',
'newProfileTooltip':
'La création d\'un nouveau profil configurera un répertoire séparé pour les vidéos créées pendant que ce profil est sélectionné',
'deleteProfileTooltip':
'Toutes les vidéos associées à ce profil seront également supprimées en permanence. Êtes-vous sûr de continuer?',
'profileNameCannotBeEmpty': 'Le nom du profil ne peut pas être vide',
'reservedProfileName': 'Ceci est un nom de profil réservé',
};
15 changes: 15 additions & 0 deletions lib/lang/id.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,19 @@ const Map<String, String> id = {
'subtitles': 'Subjudul',
'addVideo': 'Tambah video',
'calendar': 'Kalender',
'orientation': 'Orientasi',
'portrait': 'Potret',
'landscape': 'Lanskap',
'profiles': 'Profil',
'tapToSwitch': 'Ketuk pada profil untuk beralih',
'createNewProfile': 'Buat profil baru',
'newProfile': 'Profil baru',
'deleteProfile': 'Hapus profil',
'enterProfileName': 'Masukkan nama profil',
'newProfileTooltip':
'Membuat profil baru akan mengatur direktori terpisah untuk video yang dibuat saat profil itu dipilih',
'deleteProfileTooltip':
'Semua video yang terkait dengan profil ini juga akan dihapus secara permanen.Apakah kamu pasti akan melanjutkan? ',
'profileNameCannotBeEmpty': 'Nama profil tidak bisa kosong',
'reservedProfileName': 'Ini adalah nama profil yang dipesan',
};
15 changes: 15 additions & 0 deletions lib/lang/pt.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,19 @@ const Map<String, String> pt = {
'subtitles': 'Legendas',
'addVideo': 'Adicionar vídeo',
'calendar': 'Calendário',
'orientation': 'Orientação',
'portrait': 'Retrato',
'landscape': 'Paisagem',
'profiles': 'Perfis',
'tapToSwitch': 'Toque em um perfil para mudar',
'createNewProfile': 'Crie novo perfil',
'newProfile': 'Novo perfil',
'deleteProfile': 'Excluir perfil',
'enterProfileName': 'Digite o nome do perfil',
'newProfileTooltip':
'Criar um novo perfil configurará um diretório separado para vídeos criados enquanto esse perfil é selecionado',
'deleteProfileTooltip':
'Todos os vídeos associados a este perfil também serão excluídos permanentemente. Você tem certeza de continuar?',
'profileNameCannotBeEmpty': 'O nome do perfil não pode estar vazio',
'reservedProfileName': 'Este é um nome de perfil reservado',
};
13 changes: 13 additions & 0 deletions lib/lang/zh.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,17 @@ const Map<String, String> zh = {
'subtitles': '字幕',
'addVideo': '添加视频',
'calendar': '日历',
'orientation': '方向',
'portrait': '肖像',
'landscape': '景观',
'profiles': '概况',
'tapToSwitch': '点击配置文件进行切换',
'createNewProfile': '创建新的个人资料',
'newProfile': '新的配置文件',
'deleteProfile': '删除配置文件',
'enterProfileName': '输入个人资料名称',
'newProfileTooltip': '创建一个新的配置文件将为选择该配置文件时创建的视频设置一个单独的目录',
'deleteProfileTooltip': '与此配置文件相关的所有视频也将被永久删除。你一定会继续吗?',
'profileNameCannotBeEmpty': '配置文件名称不能为空',
'reservedProfileName': '这是一个保留的个人资料名称',
};
12 changes: 12 additions & 0 deletions lib/models/profile.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import 'package:flutter/material.dart';

@immutable
class Profile {
const Profile({
required this.label,
this.isDefault = false,
});

final String label;
final bool isDefault;
}
2 changes: 1 addition & 1 deletion lib/pages/home/create_movie/create_movie_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class _CreateMovieOptionsButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SizedBox(
width: MediaQuery.of(context).size.width * 0.4,
width: MediaQuery.of(context).size.width * 0.45,
height: MediaQuery.of(context).size.height * 0.08,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
Expand Down
6 changes: 3 additions & 3 deletions lib/pages/home/create_movie/widgets/create_movie_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../../../../enums/export_date_range.dart';
import '../../../../routes/app_pages.dart';
// import '../../../../enums/export_orientations.dart';
import '../../../../routes/app_pages.dart';
import '../../../../utils/constants.dart';
import '../../../../utils/theme.dart';
import '../../../../utils/utils.dart';
Expand Down Expand Up @@ -141,7 +141,7 @@ class _CreateMovieOptionsState extends State<CreateMovieOptions> {
// bottom: MediaQuery.of(context).size.height * 0.01,
// ),
// child: Text(
// 'Orientation',
// 'orientation'.tr,
// style: TextStyle(
// fontSize: MediaQuery.of(context).size.height * 0.025,
// ),
Expand Down Expand Up @@ -182,7 +182,7 @@ class _CreateMovieOptionsState extends State<CreateMovieOptions> {
// (ExportOrientation value) {
// return DropdownMenuItem<ExportOrientation>(
// value: value,
// child: Text(value.label),
// child: Text(value.localizationLabel.tr),
// );
// },
// ).toList(),
Expand Down
Loading