Fixes #3960 - Enable migration button feature for account migration MS365/Google channel.

This commit is contained in:
Rolf Schmidt 2022-02-11 09:18:17 +01:00
parent 62b6e34647
commit 85315f88dc
2 changed files with 6 additions and 28 deletions

View file

@ -42,34 +42,16 @@
<% else: %> <% else: %>
<% for channel in @account_channels: %> <% for channel in @account_channels: %>
<div class="action <% if channel.active isnt true: %>is-inactive<% end %>" data-id="<%- channel.id %>"> <div class="action <% if channel.active isnt true: %>is-inactive<% end %>" data-id="<%- channel.id %>">
<!-- Google has postponed the authentication removal. No need to show the warning for now.
<% if channel.active is true && channel.options.inbound && channel.options.inbound.options && channel.options.inbound.options.host == 'imap.gmail.com' && channel.options.outbound && channel.options.outbound.options && channel.options.outbound.options.host == 'smtp.gmail.com': %> <% if channel.active is true && channel.options.inbound && channel.options.inbound.options && channel.options.inbound.options.host == 'imap.gmail.com' && channel.options.outbound && channel.options.outbound.options && channel.options.outbound.options.host == 'smtp.gmail.com': %>
<div class="action-alert alert alert--danger alert--square horizontal centered" role="alert"> <div class="action-alert alert alert--danger alert--square horizontal centered" role="alert">
<% date_migration_string = '2020-06-15' %> <%- @T('%s recommends using OAuth. %s announced it\'s going to drop Basic Authentication support in the future.', 'G Suite', 'Google') %> <div class="flex-spacer"></div><div class="double-spacer"></div><button class="btn js-migrateGoogleMail" type="button"><%- @T('Migrate now!') %></button>
<% date_migration_string_local = App.i18n.translateDate(date_migration_string, 0) %>
<% date_migration = new Date("#{date_migration_string}T00:00:00") %>
<% date_now = new Date() %>
<% if date_now > date_migration: %>
<%- @T('%s will only allow access via OAuth. Password-based access has not been supported since %s.', 'G Suite', date_migration_string_local) %> <div class="flex-spacer"></div><div class="double-spacer"></div><button class="btn js-migrateGoogleMail" type="button"><%- @T('Migrate now!') %></button>
<% else: %>
<%- @T('%s will only allow access via OAuth. Password-based access is no longer supported on %s.', 'G Suite', date_migration_string_local) %> <div class="flex-spacer"></div><div class="double-spacer"></div><button class="btn js-migrateGoogleMail" type="button"><%- @T('Migrate now!') %></button>
<% end %>
</div> </div>
<% end %> <% end %>
<% if channel.active is true && channel.options.inbound && channel.options.inbound.options && channel.options.inbound.options.host == 'outlook.office365.com' && channel.options.outbound && channel.options.outbound.options && channel.options.outbound.options.host == 'smtp.office365.com': %> <% if channel.active is true && channel.options.inbound && channel.options.inbound.options && channel.options.inbound.options.host == 'outlook.office365.com' && channel.options.outbound && channel.options.outbound.options && channel.options.outbound.options.host == 'smtp.office365.com': %>
<div class="action-alert alert alert--danger alert--square horizontal centered" role="alert"> <div class="action-alert alert alert--danger alert--square horizontal centered" role="alert">
<% date_migration_string = '2020-10-13' %> <%- @T('%s recommends using OAuth. %s announced it\'s going to drop Basic Authentication support in the future.', 'Microsoft 365', 'Microsoft') %> <div class="flex-spacer"></div><div class="double-spacer"></div><button class="btn js-migrateMicrosoft365Mail" type="button"><%- @T('Migrate now!') %></button>
<% date_migration_string_local = App.i18n.translateDate(date_migration_string, 0) %>
<% date_migration = new Date("#{date_migration_string}T00:00:00") %>
<% date_now = new Date() %>
<% if date_now > date_migration: %>
<%- @T('%s will only allow access via OAuth. Password-based access has not been supported since %s.', 'Microsoft 365', date_migration_string_local) %> <div class="flex-spacer"></div><div class="double-spacer"></div><button class="btn js-migrateMicrosoft365Mail" type="button"><%- @T('Migrate now!') %></button>
<% else: %>
<%- @T('%s will only allow access via OAuth. Password-based access is no longer supported on %s.', 'Microsoft 365', date_migration_string_local) %> <div class="flex-spacer"></div><div class="double-spacer"></div><button class="btn js-migrateMicrosoft365Mail" type="button"><%- @T('Migrate now!') %></button>
<% end %>
</div> </div>
<% end %> <% end %>
-->
<div class="action-flow" style="width: 100%;"> <div class="action-flow" style="width: 100%;">
<div class="action-block action-block--flex"> <div class="action-block action-block--flex">
<div class="horizontal"> <div class="horizontal">

View file

@ -176,6 +176,10 @@ msgstr ""
msgid "%s people" msgid "%s people"
msgstr "" msgstr ""
#: app/assets/javascripts/app/views/channel/email_account_overview.jst.eco
msgid "%s recommends using OAuth. %s announced it's going to drop Basic Authentication support in the future."
msgstr ""
#: app/assets/javascripts/app/controllers/agent_ticket_merge.coffee #: app/assets/javascripts/app/controllers/agent_ticket_merge.coffee
msgid "%s required!" msgid "%s required!"
msgstr "" msgstr ""
@ -228,14 +232,6 @@ msgstr ""
msgid "%s user to %s user" msgid "%s user to %s user"
msgstr "" msgstr ""
#: app/assets/javascripts/app/views/channel/email_account_overview.jst.eco
msgid "%s will only allow access via OAuth. Password-based access has not been supported since %s."
msgstr ""
#: app/assets/javascripts/app/views/channel/email_account_overview.jst.eco
msgid "%s will only allow access via OAuth. Password-based access is no longer supported on %s."
msgstr ""
#: app/assets/javascripts/app/views/dashboard/stats/ticket_in_process.jst.eco #: app/assets/javascripts/app/views/dashboard/stats/ticket_in_process.jst.eco
msgid "%s% are currently in process" msgid "%s% are currently in process"
msgstr "" msgstr ""