Modular logistics and supply chain operating system (LSOS)
JavaScript driver-appfleet-managementfreight-managementinfrastructureinventory-managementlast-mile-deliverylogisticsondemandopen-sourceorder-managementroute-optimizationsupply-chain-managementtracking-and-monitoringtransport-management-systemtransportationwarehouse-management
added translations for create/join organization and migrated to use Dockerfile
Ronald A. Richardsonaf4507cc875d
diff --git a/console/app/controllers/auth/two-fa.js b/console/app/controllers/auth/two-fa.jsindex 018604f5..ad6ed383 100644--- a/console/app/controllers/auth/two-fa.js+++ b/console/app/controllers/auth/two-fa.js@@ -2,6 +2,7 @@ import Controller from '@ember/controller';import { tracked } from '@glimmer/tracking';import { action } from '@ember/object';import { inject as service } from '@ember/service';+/*** Controller responsible for handling two-factor authentication.* @class AuthTwoFaController@@ -53,6 +54,8 @@ export default class AuthTwoFaController extends Controller {/*** The current 2FA identity in memory+ * @property {string} identity+ * @tracked*/@tracked identity;diff --git a/console/app/controllers/console.js b/console/app/controllers/console.jsindex 92e84b83..2e573aa6 100644--- a/console/app/controllers/console.js+++ b/console/app/controllers/console.js@@ -51,6 +51,13 @@ export default class ConsoleController extends Controller {*/@service router;+ /**+ * Inject the `intl` service.+ *+ * @var {Service}+ */+ @service intl;+/*** Inject the `universe` service.*@@ -205,8 +212,8 @@ export default class ConsoleController extends Controller {const country = this.currentUser.country;this.modalsManager.show('modals/create-or-join-org', {- title: 'Create or join a organization',- acceptButtonText: 'Confirm',+ title: this.intl.t('console.create-or-join-organization.modal-title'),+ acceptButtonText: this.intl.t('common.confirm'),acceptButtonIcon: 'check',acceptButtonIconPrefix: 'fas',action: 'join',@@ -226,13 +233,22 @@ export default class ConsoleController extends Controller {const { action, next, name, description, phone, currency, country, timezone } = modal.getOptions();if (action === 'join') {- return this.fetch.post('auth/join-organization', { next }).then(() => {- this.fetch.flushRequestCache('auth/organizations');- this.notifications.success('You have joined a new organization!');- setTimeout(() => {- window.location.reload();- }, 900);- });+ return this.fetch+ .post('auth/join-organization', { next })+ .then(() => {+ this.fetch.flushRequestCache('auth/organizations');+ this.notifications.success(this.intl.t('console.create-or-join-organization.join-success-notification'));+ later(+ this,+ () => {+ window.location.reload();+ },+ 900+ );+ })+ .catch((error) => {+ this.notifications.serverError(error);+ });}return this.fetch@@ -246,7 +262,7 @@ export default class ConsoleController extends Controller {}).then(() => {this.fetch.flushRequestCache('auth/organizations');- this.notifications.success('You have created a new organization!');+ this.notifications.success(this.intl.t('console.create-or-join-organization.create-success-notification'));later(this,() => {@@ -254,6 +270,9 @@ export default class ConsoleController extends Controller {},900);+ })+ .catch((error) => {+ this.notifications.serverError(error);});},});@@ -270,9 +289,9 @@ export default class ConsoleController extends Controller {}this.modalsManager.confirm({- title: `Are you sure you want to switch organization to ${organization.name}?`,- body: `By confirming your account will remain logged in, but your primary organization will be switched.`,- acceptButtonText: `Yes, I want to switch organization`,+ title: this.intl.t('console.switch-organization.modal-title', { organizationName: organization.name }),+ body: this.intl.t('console.switch-organization.modal-body'),+ acceptButtonText: this.intl.t('console.switch-organization.modal-accept-button-text'),acceptButtonScheme: 'primary',confirm: (modal) => {modal.startLoading();@@ -281,10 +300,14 @@ export default class ConsoleController extends Controller {.post('auth/switch-organization', { next: organization.uuid }).then(() => {this.fetch.flushRequestCache('auth/organizations');- this.notifications.success('You have switched organizations');- setTimeout(() => {- window.location.reload();- }, 900);+ this.notifications.success(this.intl.t('console.switch-organization.success-notification'));+ later(+ this,+ () => {+ window.location.reload();+ },+ 900+ );}).catch((error) => {this.notifications.serverError(error);@@ -295,8 +318,8 @@ export default class ConsoleController extends Controller {@action viewChangelog() {this.modalsManager.show('modals/changelog', {- title: 'Changelog',- acceptButtonText: 'OK',+ title: this.intl.t('common.changelog'),+ acceptButtonText: this.intl.t('common.ok'),hideDeclineButton: true,});}diff --git a/console/app/templates/auth/two-fa.hbs b/console/app/templates/auth/two-fa.hbsindex cbe51c69..c9261061 100644--- a/console/app/templates/auth/two-fa.hbs+++ b/console/app/templates/auth/two-fa.hbs@@ -10,8 +10,8 @@<FaIcon @icon="check-circle" @size="lg" class="text-green-900 mr-4" /></div><p class="flex-1 text-sm text-green-900 dark:text-green-900">- <strong>Check your {{this.selectedMethod}}</strong><br />- We've sent you a verification code. Enter the code below to complete the login process.+ <strong>{{t "auth.two-fa.verify-code.check-title"}}</strong><br />+ {{t "auth.two-fa.verify-code.check-subtitle"}}</p></div>@@ -26,22 +26,22 @@{{/if}}{{#if this.isCodeExpired}}<InfoBlock>- <div>Your 2FA authentication code has expired. You can request another code if you need more time.</div>- <Button @type="primary" @wrapperClass="mt-2" @text="Resend Code" @icon="arrow-rotate-right" @onClick={{this.resendCode}} />+ <div>{{t "auth.two-fa.verify-code.expired-help-text"}}</div>+ <Button @type="primary" @wrapperClass="mt-2" @text={{t "auth.two-fa.verify-code.resend-code"}} @icon="arrow-rotate-right" @onClick={{this.resendCode}} /></InfoBlock>{{/if}}</div><div class="mt-4">- <Button @buttonType="submit" @type="primary" @text="Verify Code" @icon="check-circle" @wrapperClass="btn-block" @isLoading={{this.isLoading}} />+ <Button @buttonType="submit" @type="primary" @text={{t "auth.two-fa.verify-code.verify-code"}} @icon="check-circle" @wrapperClass="btn-block" @isLoading={{this.isLoading}} /></div><div class="text-center flex flex-row items-center justify-center space-x-4 mt-3.5"><a href="#" class="text-sm text-blue-500 hover:underline inline-block" {{on "click" this.resendCode}}>- Resend Code+ {{t "auth.two-fa.verify-code.resend-code"}}</a><a href="#" class="text-sm text-danger hover:underline inline-block" {{on "click" this.cancelTwoFactor}}>- Cancel Two-Factor+ {{t "auth.two-fa.verify-code.cancel-two-factor"}}</a></div></form>\ No newline at end of filediff --git a/console/translations/en-us.yaml b/console/translations/en-us.yamlindex 4958ef3f..a054d12c 100644--- a/console/translations/en-us.yaml+++ b/console/translations/en-us.yaml@@ -13,6 +13,7 @@ terms:search: Searchsearch-input: Search Inputcommon:+ confirm: Confirmedit: Editsave: Savecancel: Cancel@@ -56,6 +57,8 @@ common:status: Statusclose-and-save: Close and Saveusers: Users+ changelog: Changelog+ ok: OKcomponent:file:dropdown-label: File actions@@ -124,6 +127,13 @@ auth:send-by-sms: Send by SMStwo-fa:verify-code:+ verification-code: Verification Code+ check-title: Check your email or phone+ check-subtitle: We've sent you a verification code. Enter the code below to complete the login process.+ expired-help-text: Your 2FA authentication code has expired. You can request another code if you need more time.+ resend-code: Resend Code+ verify-code: Verify Code+ cancel-two-factor: Cancel Two-Factorinvalid-session-error-notification: Invalid session. Please try again.verification-successful-notification: Verification successful!verification-code-expired-notification: Verification code has expired. Please request a new one.@@ -175,6 +185,15 @@ auth:submit-button: Reset Passwordback-button: Backconsole:+ create-or-join-organization:+ modal-title: Create or join a organization+ join-success-notification: You have joined a new organization!+ create-success-notification: You have created a new organization!+ switch-organization:+ modal-title: Are you sure you want to switch organization to {organizationName}?+ modal-body: By confirming your account will remain logged in, but your primary organization will be switched.+ modal-accept-button-text: Yes, I want to switch organization+ success-notification: You have switched organizationsaccount:index:upload-new: Upload newdiff --git a/docker/Dockerfile b/docker/Dockerfileindex 37686ada..4dd127c6 100644--- a/docker/Dockerfile+++ b/docker/Dockerfile@@ -1,9 +1,9 @@# syntax = docker/dockerfile:1.2# Base stage-FROM dunglas/frankenphp:sha-7454826-php8.2-alpine as base+FROM dunglas/frankenphp:1.1.0-php8.2-bookworm as base# Install packages-RUN apk update && apk add git openssh bind-tools mycli nodejs npm \+RUN apt-get update && apt-get install -y git bind9-utils mycli nodejs npm \&& mkdir -p /root/.ssh \&& ssh-keyscan github.com >> /root/.ssh/known_hosts