diff --git a/app/assets/stylesheets/settings/addons.scss b/app/assets/stylesheets/settings/addons.scss index b7ea05cd7..84731c79f 100644 --- a/app/assets/stylesheets/settings/addons.scss +++ b/app/assets/stylesheets/settings/addons.scss @@ -1,3 +1,6 @@ +// scss-lint:disable SelectorDepth SelectorFormat QualifyingElement +// scss-lint:disable NestingDepth ImportantRule + .user-account-addons { .content-pane { margin: 0; @@ -8,4 +11,43 @@ border-bottom: $border-tertiary; padding-bottom: 15px; } + + .printers-container { + .printer { + border: $border-default; + padding: 1em; + + .header { + align-items: center; + display: flex; + margin-bottom: .5em; + + .title { + font-weight: bold; + } + + .status { + border: $border-default; + color: $color-silver-chalice; + margin-left: .5em; + margin-right: auto; + padding: .25em; + + &[data-ready="true"] { + background: $brand-success; + border-color: $brand-success; + color: $color-white; + } + } + + .fas-check { + margin-left: .25em; + } + } + + .description { + margin-bottom: .5em; + } + } + } } diff --git a/app/assets/stylesheets/settings/label_printers.scss b/app/assets/stylesheets/settings/label_printers.scss new file mode 100644 index 000000000..e53c0e3e9 --- /dev/null +++ b/app/assets/stylesheets/settings/label_printers.scss @@ -0,0 +1,63 @@ +// scss-lint:disable SelectorDepth SelectorFormat QualifyingElement +// scss-lint:disable NestingDepth ImportantRule + +.label-printer-show { + .printer-title { + flex-grow: 0 !important; + margin-right: .5em !important; + } + + .status { + border: $border-default; + color: $color-silver-chalice; + margin-left: .5em; + margin-right: auto; + padding: .25em; + + &[data-ready="true"] { + background: $brand-success; + border-color: $brand-success; + color: $color-white; + } + } + + ul { + list-style-type: none; + padding-left: 0; + + li { + padding: .5em 0; + } + } + + .fa-caret-down { + cursor: pointer; + margin-right: .25em; + + &.collapsed { + @include rotate(-90deg); + } + } + + .collapse-row { + align-items: center; + display: flex; + } + + .collapse { + padding-left: 1.5em; + } + + .row-title { + @include font-h2; + margin-left: .5em; + } + + .api-key-container { + display: flex; + + .api-key-input { + margin-right: .5em; + } + } +} diff --git a/app/controllers/users/settings/account/addons_controller.rb b/app/controllers/users/settings/account/addons_controller.rb index aa4412a78..6a7204aea 100644 --- a/app/controllers/users/settings/account/addons_controller.rb +++ b/app/controllers/users/settings/account/addons_controller.rb @@ -3,6 +3,18 @@ module Users module Account class AddonsController < ApplicationController layout 'fluid' + + before_action :load_printers, only: :index + + def label_printer + @printer = { printer_type: :fluics, ready: true, api_key: 'ISVO42192IUDV168ATFI314UVYGU151USHYEV42' } + end + + private + + def load_printers + @fluics_printer = { ready: true, enabled: true } + end end end end diff --git a/app/views/users/settings/account/addons/index.html.erb b/app/views/users/settings/account/addons/index.html.erb index 2163760db..dccace77e 100644 --- a/app/views/users/settings/account/addons/index.html.erb +++ b/app/views/users/settings/account/addons/index.html.erb @@ -15,6 +15,39 @@ +