Skip to content

Commit

Permalink
Merge branch 'main' into send_link_button_change
Browse files Browse the repository at this point in the history
  • Loading branch information
ashilkn committed Jun 3, 2024
2 parents 0d99d3e + c9340ed commit 4f2dd7c
Show file tree
Hide file tree
Showing 172 changed files with 5,985 additions and 3,309 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auth-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- ".github/workflows/auth-lint.yml"

env:
FLUTTER_VERSION: "3.19.3"
FLUTTER_VERSION: "3.22.0"

jobs:
lint:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auth-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ on:
- "auth-v*"

env:
FLUTTER_VERSION: "3.19.3"
FLUTTER_VERSION: "3.22.0"

jobs:
build-ubuntu:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: "Deploy (staff)"

on:
# Run on every push to main that changes web/apps/staff/
# Run on every push to main that changes infra/staff/
push:
branches: [main]
paths:
- "web/apps/staff/**"
- ".github/workflows/web-deploy-staff.yml"
- "infra/staff/**"
- ".github/workflows/infra-deploy-staff.yml"
# Also allow manually running the workflow
workflow_dispatch:

Expand All @@ -16,7 +16,7 @@ jobs:

defaults:
run:
working-directory: web
working-directory: infra/staff

steps:
- name: Checkout code
Expand All @@ -29,17 +29,20 @@ jobs:
with:
node-version: 20
cache: "yarn"
cache-dependency-path: "web/yarn.lock"
cache-dependency-path: "infra/staff/yarn.lock"

- name: Install dependencies
run: yarn install

- name: Build staff
run: yarn build:staff
- name: Lint
run: yarn lint

- name: Publish staff
- name: Build
run: yarn build

- name: Publish
uses: cloudflare/wrangler-action@v3
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: pages deploy --project-name=ente --commit-dirty=true --branch=deploy/staff web/apps/staff/dist
command: pages deploy --project-name=ente --commit-dirty=true --branch=deploy/staff infra/staff/dist
2 changes: 1 addition & 1 deletion .github/workflows/mobile-internal-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch: # Allow manually running the action

env:
FLUTTER_VERSION: "3.19.4"
FLUTTER_VERSION: "3.22.0"

jobs:
build:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/mobile-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ on:
- ".github/workflows/mobile-lint.yml"

env:
FLUTTER_VERSION: "3.19.4"

FLUTTER_VERSION: "3.22.0"

jobs:
lint:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mobile-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- "photos-v*"

env:
FLUTTER_VERSION: "3.19.4"
FLUTTER_VERSION: "3.22.0"

jobs:
build:
Expand Down
14 changes: 9 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ There are many ways to contribute, and most of them don't require writing code.

## Spread the word

This is perhaps the most impactful contribution you can make. Spread the word.
Online on your favorite social media channels. Offline to your friends and
family who are looking for a privacy-friendly alternative to big tech.
This is perhaps the most impactful contribution you can make. [Spread the
word](https://help.ente.io/photos/features/referral-program/). Online on your
favorite social media channels. Offline to your friends and family who are
looking for a privacy-friendly alternative to big tech.

## Engage with the community

Expand Down Expand Up @@ -76,7 +77,10 @@ us](https://github.com/ente-io/ente/discussions). Discussing your idea with us
first ensures that everyone is on the same page before you start working on your
change.

## Star
## Leave a review or star

If you haven't already done so, consider [starring this
repository](https://github.com/ente-io/ente/stargazers).
repository](https://github.com/ente-io/ente/stargazers) or leaving a review on
[PlayStore](https://play.google.com/store/apps/details?id=io.ente.auth),
[AppStore](https://apps.apple.com/us/app/ente-authenticator/id6444121398) or
[AlternativeTo](https://alternativeto.net/software/ente-authenticator/).
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ Our labour of love. Two years ago, while building Ente Photos, we realized that
there was no open source end-to-end encrypted authenticator app. We already had
the building blocks, so we built one.

Ente Auth is currently free. If in the future we convert this to a paid service,
existing users will be grandfathered in.
Ente Auth is free, and will remain free forever. If you like the service and
want to give back, please check out Ente Photos or spread the word.

<br />

Expand Down
9 changes: 3 additions & 6 deletions auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,10 @@ more, see [docs/adding-icons](docs/adding-icons.md).

## 💚 Contribute

For more ways to contribute, see [../CONTRIBUTING.md](../CONTRIBUTING.md).
The best way to support this project is by checking out [Ente
Photos](../mobile/README.md) or spreading the word.

You can also support us by giving this project a ⭐ star on GitHub or by leaving
a review on
[PlayStore](https://play.google.com/store/apps/details?id=io.ente.auth),
[AppStore](https://apps.apple.com/us/app/ente-authenticator/id6444121398) or
[AlternativeTo](https://alternativeto.net/software/ente-authenticator/).
For more ways to contribute, see [../CONTRIBUTING.md](../CONTRIBUTING.md).

## ⭐️ About

Expand Down
29 changes: 26 additions & 3 deletions auth/assets/custom-icons/_data/custom-icons.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@
},
{
"title": "Bloom Host",
"slug": "bloom_host"
"slug": "bloom_host",
"altNames": [
"Bloom Host Billing"
]
},
{
"title": "BorgBase",
Expand Down Expand Up @@ -83,6 +86,9 @@
{
"title": "Discourse"
},
{
"title": "Doppler"
},
{
"title": "dus.net",
"slug": "dusnet"
Expand Down Expand Up @@ -190,6 +196,15 @@
{
"title": "Letterboxd"
},
{
"title": "Local",
"slug": "local_wp",
"altNames": [
"LocalWP",
"Local WP",
"Local Wordpress"
]
},
{
"title": "Mastodon",
"altNames": [
Expand All @@ -203,7 +218,12 @@
},
{
"title": "Mercado Livre",
"slug": "mercado_livre"
"slug": "mercado_livre",
"altNames": [
"Mercado Libre",
"MercadoLibre",
"MercadoLivre"
]
},
{
"title": "Murena",
Expand Down Expand Up @@ -345,7 +365,10 @@
"hex": "FFFFFF"
},
{
"title": "Techlore"
"title": "Techlore",
"altNames": [
"Techlore Courses"
]
},
{
"title": "Termius",
Expand Down
6 changes: 3 additions & 3 deletions auth/assets/custom-icons/icons/configcat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions auth/assets/custom-icons/icons/doppler.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions auth/assets/custom-icons/icons/habbo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions auth/assets/custom-icons/icons/local_wp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 6 additions & 5 deletions auth/assets/custom-icons/icons/mercado_livre.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions auth/assets/custom-icons/icons/sendgrid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 13 additions & 13 deletions auth/lib/l10n/arb/app_pt.arb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"description": "Text shown in the AppBar of the Counter Page"
},
"onBoardingBody": "Proteja seus códigos 2FA",
"onBoardingGetStarted": "Vamos Começar",
"onBoardingGetStarted": "Introdução",
"setupFirstAccount": "Configure sua primeira conta",
"importScanQrCode": "Escanear QR code",
"qrCode": "QR Code",
Expand All @@ -32,12 +32,12 @@
"counterBasedKeyType": "Baseado em um contador (HOTP)",
"saveAction": "Salvar",
"nextTotpTitle": "avançar",
"deleteCodeTitle": "Excluir código?",
"deleteCodeTitle": "Apagar código?",
"deleteCodeMessage": "Tem certeza de que deseja excluir este código? Esta ação é irreversível.",
"viewLogsAction": "Ver logs",
"sendLogsDescription": "Isto irá compartilhar seus logs para nos ajudar a depurar seu problema. Embora tomemos precauções para garantir que informações sensíveis não sejam enviadas, encorajamos você a ver esses logs antes de compartilhá-los.",
"preparingLogsTitle": "Preparando logs...",
"emailLogsTitle": "Logs por e-mail",
"emailLogsTitle": "Logs (e-mail)",
"emailLogsMessage": "Por favor, envie os logs para {email}",
"@emailLogsMessage": {
"placeholders": {
Expand All @@ -48,9 +48,9 @@
},
"copyEmailAction": "Copiar e-mail",
"exportLogsAction": "Exportar logs",
"reportABug": "Reportar um problema",
"reportABug": "Informar um problema",
"crashAndErrorReporting": "Reporte de erros e falhas",
"reportBug": "Reportar problema",
"reportBug": "Informar problema",
"emailUsMessage": "Por favor, envie um e-mail para {email}",
"@emailUsMessage": {
"placeholders": {
Expand Down Expand Up @@ -112,7 +112,7 @@
"email": "E-mail",
"support": "Suporte",
"general": "Geral",
"settings": "Configurações",
"settings": "Ajustes",
"copied": "Copiado",
"pleaseTryAgain": "Por favor, tente novamente",
"existingUser": "Usuário Existente",
Expand All @@ -139,7 +139,7 @@
"inFamilyPlanMessage": "Você está em um plano familiar!",
"swipeHint": "Deslize para a esquerda para editar ou remover os códigos",
"scan": "Escanear",
"scanACode": "Escanear um código",
"scanACode": "Escanear código",
"verify": "Verificar",
"verifyEmail": "Verificar e-mail",
"enterCodeHint": "Digite o código de 6 dígitos de\nseu aplicativo autenticador",
Expand Down Expand Up @@ -185,7 +185,7 @@
"lockScreenEnablePreSteps": "Para ativar o bloqueio de tela, por favor ative um método de autenticação nas configurações do sistema do seu dispositivo.",
"viewActiveSessions": "Ver sessões ativas",
"authToViewYourActiveSessions": "Por favor, autentique-se para ver as sessões ativas",
"searchHint": "Pesquisar...",
"searchHint": "Buscar...",
"search": "Pesquisar",
"sorryUnableToGenCode": "Desculpe, não foi possível gerar um código para {issuerName}",
"noResult": "Nenhum resultado",
Expand Down Expand Up @@ -242,7 +242,7 @@
"logInLabel": "Entrar",
"logout": "Sair",
"areYouSureYouWantToLogout": "Você tem certeza que deseja encerrar a sessão?",
"yesLogout": "Sim, encerrar sessão",
"yesLogout": "Sim, sair",
"exit": "Sair",
"verifyingRecoveryKey": "Verificando chave de recuperação...",
"recoveryKeyVerified": "Chave de recuperação verificada",
Expand Down Expand Up @@ -317,7 +317,7 @@
"thisWillLogYouOutOfTheFollowingDevice": "Isso fará com que você saia do seguinte dispositivo:",
"terminateSession": "Encerrar sessão?",
"terminate": "Encerrar",
"thisDevice": "Este dispositivo",
"thisDevice": "Esse dispositivo",
"toResetVerifyEmail": "Para redefinir a sua senha, por favor verifique o seu email primeiro.",
"thisEmailIsAlreadyInUse": "Este e-mail já está em uso",
"verificationFailedPleaseTryAgain": "Falha na verificação. Por favor, tente novamente",
Expand All @@ -339,7 +339,7 @@
"export": "Exportar",
"useOffline": "Usar sem backups",
"signInToBackup": "Entre para fazer backup de seus códigos",
"singIn": "Iniciar sessão",
"singIn": "Entrar",
"sigInBackupReminder": "Por favor, exporte seus códigos para garantir que você tenha um backup do qual você possa restaurar.",
"offlineModeWarning": "Você escolheu prosseguir sem backups. Por favor, faça backups manuais para ter certeza de que seus códigos estão seguros.",
"showLargeIcons": "Mostrar ícones grandes",
Expand All @@ -361,7 +361,7 @@
"@androidBiometricNotRecognized": {
"description": "Message to let the user know that authentication was failed. It is used on Android side. Maximum 60 characters."
},
"androidBiometricSuccess": "Bem-sucedido",
"androidBiometricSuccess": "Êxito",
"@androidBiometricSuccess": {
"description": "Message to let the user know that authentication was successful. It is used on Android side. Maximum 60 characters."
},
Expand Down Expand Up @@ -433,7 +433,7 @@
"tag": "Etiqueta",
"create": "Criar",
"editTag": "Editar etiqueta",
"deleteTagTitle": "Excluir etiqueta?",
"deleteTagTitle": "Apagar etiqueta?",
"deleteTagMessage": "Tem certeza de que deseja excluir esta etiqueta? Essa ação é irreversível.",
"somethingWentWrongParsingCode": "Não foi possível analisar os códigos {x}.",
"updateNotAvailable": "Atualização não está disponível"
Expand Down
29 changes: 24 additions & 5 deletions auth/lib/ui/settings/data/import/aegis_import.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'dart:typed_data';
import 'package:convert/convert.dart';
import 'package:ente_auth/l10n/l10n.dart';
import 'package:ente_auth/models/code.dart';
import 'package:ente_auth/models/code_display.dart';
import 'package:ente_auth/services/authenticator_service.dart';
import 'package:ente_auth/store/code_store.dart';
import 'package:ente_auth/ui/common/progress_dialog.dart';
Expand Down Expand Up @@ -76,7 +77,7 @@ Future<void> _pickAegisJsonFile(BuildContext context) async {
await showErrorDialog(
context,
context.l10n.sorry,
context.l10n.importFailureDesc,
"${context.l10n.importFailureDesc}\n Error: ${e.toString()}",
);
}
}
Expand Down Expand Up @@ -126,8 +127,19 @@ Future<int?> _processAegisExportFile(
} else {
aegisDB = decodedJson['db'];
}
final Map<String, String> groupIDToName = {};
try {
for (var item in aegisDB?['groups']) {
groupIDToName[item['uuid']] = item['name'];
}
} catch (e) {
Logger("AegisImport").warning("Failed to parse groups", e);
}

final parsedCodes = [];
for (var item in aegisDB?['entries']) {
bool isFavorite = item['favorite'] ?? false;
List<String> tags = [];
var kind = item['type'];
var account = item['name'];
var issuer = item['issuer'];
Expand All @@ -137,20 +149,27 @@ Future<int?> _processAegisExportFile(
var digits = item['info']['digits'];

var counter = item['info']['counter'];

for (var group in item['groups']) {
if (groupIDToName.containsKey(group)) {
tags.add(groupIDToName[group]!);
}
}
// Build the OTP URL
String otpUrl;

if (kind.toLowerCase() == 'totp') {
if (kind.toLowerCase() == 'totp' || kind.toLowerCase() == 'steam') {
otpUrl =
'otpauth://$kind/$issuer:$account?secret=$secret&issuer=$issuer&algorithm=$algorithm&digits=$digits&period=$timer';
} else if (kind.toLowerCase() == 'hotp') {
otpUrl =
'otpauth://$kind/$issuer:$account?secret=$secret&issuer=$issuer&algorithm=$algorithm&digits=$digits&counter=$counter';
} else {
throw Exception('Invalid OTP type');
throw Exception('Invalid OTP type: $kind');
}
parsedCodes.add(Code.fromOTPAuthUrl(otpUrl));

Code code = Code.fromOTPAuthUrl(otpUrl);
code = code.copyWith(display: CodeDisplay(pinned: isFavorite, tags: tags));
parsedCodes.add(code);
}

for (final code in parsedCodes) {
Expand Down
Loading

0 comments on commit 4f2dd7c

Please sign in to comment.