Skip to content

Commit

Permalink
Merge pull request #1098 from cozy-labs/user-action-required-dialog
Browse files Browse the repository at this point in the history
User action required dialog improvements
  • Loading branch information
aenario authored Jul 19, 2018
2 parents 1bf0d23 + 5052596 commit e1662c0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
11 changes: 7 additions & 4 deletions gui/js/components/UserActionRequiredDialog.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
const { dialog } = require('electron')
const opn = require('opn')
const path = require('path')
const { translate } = require('../i18n')
const { logger } = require('../../../core/app')

const log = logger({
component: 'UserActionRequiredDialog'
})

const imgs = path.resolve(__dirname, '..', '..', 'images')

module.exports = {
show
}
Expand All @@ -18,13 +21,13 @@ function show (err) {
}

function options (err) {
const type = 'warning'
const icon = `${imgs}/icon.png`

// Same logic as gui/elm/UserActionRequiredPage.elm
if (err.code === 'tos-updated') {
return {
type,
title: translate('CGU Updated'),
icon,
title: translate('UserActionRequiredDialog Title'),
message: translate('CGU Updated'),
detail: [
'CGU Updated Detail',
Expand All @@ -37,7 +40,7 @@ function options (err) {
}
} else {
return {
type,
icon,
title: err.title,
message: err.message,
detail: err.detail,
Expand Down
1 change: 1 addition & 0 deletions gui/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
"Unlinked If you want to register it again, you can restart Cozy Drive.": "If you want to register it again, you can restart Cozy Drive.",
"Unlinked Else, you can just close Cozy Drive.": "Else, you can just close Cozy Drive.",
"Unlinked Restart Cozy Drive": "Restart Cozy Drive",
"UserActionRequiredDialog Title": "Action required to keep using your Cozy",
"Warning Ok": "Ok",
"Warning Read": "Read now",
"Welcome Your own private cloud": "Welcome to Cozy Drive for Desktop !",
Expand Down
3 changes: 2 additions & 1 deletion gui/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"Bar GoToFolder": "Ouvrir le dossier",
"CGU Updated": "Cozy met à jour ses CGU",
"CGU GDPR Link": "https://fr.wikipedia.org/wiki/R%C3%A8glement_g%C3%A9n%C3%A9ral_sur_la_protection_des_donn%C3%A9es",
"CGU Updated Detail": "Dans le cadre de la GDPR, Cozy met à jour ses Conditions Générales d'Utilisation",
"CGU Updated Detail": "Dans le cadre du RGPD, Cozy met à jour ses Conditions Générales d'Utilisation",
"CGU Updated Required strong": "Leur acceptation est requise",
"CGU Updated Required rest": "pour continuer à utiliser votre Cozy.",
"CGU Updated See": "Voir les nouvelles CGU",
Expand Down Expand Up @@ -146,6 +146,7 @@
"Updater Error EPERM": "Une erreur de permission empêche le téléchargement de la mise à jour.",
"Updater Error ENOSPC": "Votre disque est plein, la mise à jour ne peut pas être téléchargée.",
"Updater Error Other": "Une erreur inconnue empêche la mise à jour. Veuillez contacter le support.",
"UserActionRequiredDialog Title": "Action requise pour continuer à utiliser votre Cozy",
"Tray Your cozy is up to date": "Votre Cozy est à jour",
"Tray Syncing": "En cours de synchronisation",
"Tray Offline": "Déconnecté",
Expand Down

0 comments on commit e1662c0

Please sign in to comment.