Enable access to "SciNote File Editor" app installers via the SciNote web app [SCI-9625]

This commit is contained in:
Giga Chubinidze 2023-11-08 12:22:34 +04:00
parent 55308f6a81
commit 39ce9c1781
3 changed files with 59 additions and 1 deletions

View file

@ -9,6 +9,7 @@ module Users
def index
@label_printer_any = LabelPrinter.any?
@user_agent = request.user_agent
end
private

View file

@ -7,7 +7,58 @@
<div>
<h1 class="addons-title"><%= t('users.settings.account.addons.title') %></h1>
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<div class="col-xs-8 col-sm-9 col-md-9 col-lg-9">
<p class="manuscript-title"><%= t('users.settings.account.addons.desktop_app.title') %></p>
<p class="manuscript-description">
<span><%= t('users.settings.account.addons..desktop_app.description') %></span>
</p><br/>
<div class="buttons">
<% if @user_agent =~ /Windows/ %>
<%= link_to '#',
class: 'btn btn-primary new-project-btn',
title: t('users.settings.account.addons.desktop_app.windows_button'),
remote: true do %>
<span class="hidden-xs"><%= t('users.settings.account.addons.desktop_app.windows_button') %></span>
<% end %>
<p class="text-xs mt-1" style="color: var(--sn-sleepy-grey);"><%= t('users.settings.account.addons.desktop_app.version') %> 5.16.5 (24419)</p>
<% elsif @user_agent =~ /Mac OS/ %>
<%= link_to '#',
class: 'btn btn-primary new-project-btn',
title: t('users.settings.account.addons.desktop_app.macos_button'),
remote: true do %>
<span class="hidden-xs"><%= t('users.settings.account.addons.desktop_app.macos_button') %></span>
<% end %>
<p class="text-xs mt-1" style="color: var(--sn-sleepy-grey);"><%= t('users.settings.account.addons.desktop_app.version') %> 5.16.5 (24419)</p>
<% else %>
<div class="flex">
<div>
<%= link_to '#',
class: 'btn btn-primary new-project-btn',
title: t('users.settings.account.addons.desktop_app.macos_button'),
remote: true do %>
<span class="hidden-xs"><%= t('users.settings.account.addons.desktop_app.macos_button') %></span>
<% end %>
<p class="text-xs mt-1" style="color: var(--sn-sleepy-grey);"><%= t('users.settings.account.addons.desktop_app.version') %> 5.16.5 (24419)</p>
</div>
<div class="ml-2">
<%= link_to '#',
class: 'btn btn-primary new-project-btn ml-2',
title: t('users.settings.account.addons.desktop_app.windows_button'),
remote: true do %>
<span class="hidden-xs"><%= t('users.settings.account.addons.desktop_app.windows_button') %></span>
<% end %>
<p class="text-xs mt-1 ml-2" style="color: var(--sn-sleepy-grey);"><%= t('users.settings.account.addons.desktop_app.version') %> 5.16.5 (24419)</p>
</div>
</div>
<% end %>
</div>
</div>
</div>
</div>
</div>
<div>
<h2 class="addons-subtitle" ><%= t('users.settings.account.addons.scinote_addons') %></h2>
<div data-hook="settings-addons-container">

View file

@ -2719,6 +2719,12 @@ en:
title: 'Zebra label printers'
description: 'Print labels of custom styles and sizes in seconds flat from your PC or Mac via your Zebra printer connected via USB, Internet or LAN.'
details: 'Details'
desktop_app:
title: 'SciNote File Editor desktop app'
description: 'Download the SciNote File Editor desktop app to automatically edit files using locally installed software'
macos_button: 'Download for macOS'
windows_button: 'Download for Windows'
version: 'Version'
label_printer:
fluics_printer: "FLUICS Print: Label printers"
zebra_printer: 'Zebra label printers'