-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add first steps to show progress of scan for movies
commit-id:966766a2
- Loading branch information
Showing
16 changed files
with
156 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
.bg-process { | ||
--bs-toast-bg: rgba(var(--bs-body-bg-rgb), 0.85); | ||
--bs-toast-border-color: var(--bs-border-color-translucent); | ||
--bs-toast-border-radius: var(--bs-border-radius); | ||
--bs-toast-border-width: var(--bs-border-width); | ||
--bs-toast-box-shadow: var(--bs-box-shadow); | ||
--bs-toast-color: ; | ||
--bs-toast-font-size: 0.875rem; | ||
--bs-toast-header-bg: rgba(var(--bs-body-bg-rgb), 0.85); | ||
--bs-toast-header-border-color: var(--bs-border-color-translucent); | ||
--bs-toast-header-color: var(--bs-secondary-color); | ||
--bs-toast-max-width: 350px; | ||
--bs-toast-padding-x: 0.75rem; | ||
--bs-toast-padding-y: 0.5rem; | ||
--bs-toast-spacing: 1.5rem; | ||
--bs-toast-zindex: 1090; | ||
background-clip: padding-box; | ||
background-color: $dark-black; | ||
border-radius: var(--bs-toast-border-radius); | ||
border: var(--bs-toast-border-width) solid var(--bs-toast-border-color); | ||
bottom: 0; | ||
box-shadow: var(--bs-toast-box-shadow); | ||
color: var(--bs-toast-color); | ||
font-size: var(--bs-toast-font-size); | ||
margin: 2em; | ||
max-width: 100%; | ||
pointer-events: auto; | ||
position: fixed; | ||
right: 0; | ||
width: var(--bs-toast-max-width); | ||
z-index: 4; | ||
|
||
.header { | ||
display: flex; | ||
align-items: center; | ||
padding: var(--bs-toast-padding-y) var(--bs-toast-padding-x); | ||
color: var(--bs-toast-header-color); | ||
background-clip: padding-box; | ||
border-bottom: var(--bs-toast-border-width) solid var(--bs-toast-header-border-color); | ||
border-top-left-radius: calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width)); | ||
border-top-right-radius: calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width)); | ||
} | ||
|
||
.body { | ||
padding: var(--bs-toast-padding-x); | ||
word-wrap: break-word; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<div class="bg-process" id="<%= dom_id %>"> | ||
<div class="header"><%= title %></div> | ||
<div class="body"><%= body %></div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
class ProcessComponent < ViewComponent::Base | ||
extend Dry::Initializer | ||
option :worker, Types.Interface(:name) | ||
renders_one :body | ||
|
||
def dom_id | ||
"#{worker.name.underscore.dasherize}-process" | ||
end | ||
|
||
def title | ||
default = worker.name.demodulize.titleize | ||
I18n.t("processes.#{worker.name.underscore.dasherize}.title", default:) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,7 @@ | ||
# frozen_string_literal: true | ||
|
||
class LoadDiskWorker < ApplicationWorker | ||
option :disk_id, Types::Integer | ||
|
||
def perform | ||
CreateDisksService.call | ||
end | ||
|
||
private | ||
|
||
def disk | ||
@disk ||= Disk.find(disk_id) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'rails_helper' | ||
|
||
RSpec.describe ProcessComponent, type: :component do | ||
pending "add some examples to (or delete) #{__FILE__}" | ||
|
||
# it "renders something useful" do | ||
# expect( | ||
# render_inline(described_class.new(attr: "value")) { "Hello, components!" }.css("p").to_html | ||
# ).to include( | ||
# "Hello, components!" | ||
# ) | ||
# end | ||
end |