mirror of
https://github.com/mirego/accent.git
synced 2024-08-17 06:50:31 +03:00
Fix container storage HTTP request commented out
This commit is contained in:
parent
88789980fc
commit
a8f8e34cb4
@ -62,14 +62,14 @@ defmodule Accent.IntegrationManager.Execute.AzureStorageContainer do
|
||||
|
||||
path =
|
||||
Path.join([
|
||||
uri.path,
|
||||
uri.path || "/",
|
||||
version_tag,
|
||||
upload.language.slug,
|
||||
document_name
|
||||
])
|
||||
|
||||
url = URI.to_string(%{uri | path: path})
|
||||
# HTTPoison.put(url, {:file, file}, [{"x-ms-blob-type", "BlockBlob"}])
|
||||
HTTPoison.put(url, {:file, file}, [{"x-ms-blob-type", "BlockBlob"}])
|
||||
|
||||
%{name: document_name, url: url}
|
||||
end
|
||||
|
@ -10,7 +10,7 @@ defmodule Accent.Hook.Outbounds.Discord do
|
||||
|
||||
deftemplate(:new_conflicts, """
|
||||
**<%= @user %>** just added *<%= @new_conflicts_count %> strings* to review.
|
||||
The project is currently **<%= Float.round(@reviewed_count / @translations_count * 100, 2) %>** reviewed (<%= @reviewed_count %>/<%= @translations_count %>)
|
||||
The project is currently **<%= Float.round(@reviewed_count / @translations_count * 100, 2) %>%** reviewed (<%= @reviewed_count %>/<%= @translations_count %>)
|
||||
""")
|
||||
|
||||
deftemplate(:sync, """
|
||||
|
@ -10,7 +10,7 @@ defmodule Accent.Hook.Outbounds.Slack do
|
||||
|
||||
deftemplate(:new_conflicts, """
|
||||
*<%= @user %>* just added _<%= @new_conflicts_count %> strings_ to review.
|
||||
The project is currently *<%= Float.round(@reviewed_count / @translations_count * 100, 2) %>* reviewed (<%= @reviewed_count %>/<%= @translations_count %>)
|
||||
The project is currently *<%= Float.round(@reviewed_count / @translations_count * 100, 2) %>%* reviewed (<%= @reviewed_count %>/<%= @translations_count %>)
|
||||
""")
|
||||
|
||||
deftemplate(:sync, """
|
||||
|
@ -1,6 +1,6 @@
|
||||
defmodule Movement.Context do
|
||||
@moduledoc false
|
||||
defstruct entries: [], operations: [], assigns: %{options: []}, render: ""
|
||||
defstruct entries: [], operations: [], assigns: %{batch_operation: nil, options: []}, render: ""
|
||||
|
||||
@type t :: %__MODULE__{}
|
||||
|
||||
|
@ -17,7 +17,8 @@ defmodule Movement.Persisters.Base do
|
||||
@spec execute(Movement.Context.t()) :: {Movement.Context.t(), [Operation.t()]}
|
||||
def execute(%Movement.Context{operations: []} = context), do: {context, []}
|
||||
|
||||
def execute(%Movement.Context{assigns: %{batch_action: action} = assigns} = context) when is_binary(action) do
|
||||
def execute(%Movement.Context{assigns: %{batch_action: action, batch_operation: nil} = assigns} = context)
|
||||
when is_binary(action) do
|
||||
stats = StatMapper.map(context.operations)
|
||||
|
||||
batch_operation =
|
||||
@ -34,7 +35,6 @@ defmodule Movement.Persisters.Base do
|
||||
|
||||
context
|
||||
|> Movement.Context.assign(:batch_operation, batch_operation)
|
||||
|> Movement.Context.assign(:batch_action, nil)
|
||||
|> execute()
|
||||
end
|
||||
|
||||
|
@ -72,6 +72,7 @@ defmodule Movement.Persisters.ProjectHookWorker do
|
||||
revision: get_record(Accent.Revision, args["revision_id"]),
|
||||
version: get_record(Accent.Version, args["version_id"]),
|
||||
batch_operation: get_record(Accent.Operation, args["batch_operation_id"]),
|
||||
operations_count: args["operations_count"],
|
||||
batch_action: args["batch_action"],
|
||||
user: get_record(Accent.User, args["user_id"])
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ defmodule Accent.Plugs.MovementContextParser do
|
||||
end
|
||||
|
||||
def assign_movement_context(conn, _) do
|
||||
assign(conn, :movement_context, %Context{assigns: %{options: [], project: conn.assigns[:project]}})
|
||||
assign(conn, :movement_context, Context.assign(%Context{}, :project, conn.assigns[:project]))
|
||||
end
|
||||
|
||||
def assign_movement_version(%{assigns: %{version: version, movement_context: context}} = conn, _opts) do
|
||||
|
@ -9,6 +9,9 @@ export default gql`
|
||||
mainColor
|
||||
logo
|
||||
isFileOperationsLocked
|
||||
integrations {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -151,6 +151,7 @@
|
||||
.stats-title-links {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 5px;
|
||||
|
||||
.button {
|
||||
margin-left: 10px;
|
||||
|
@ -41,10 +41,10 @@
|
||||
|
||||
.colorInput {
|
||||
@extend %textInput;
|
||||
width: 48px;
|
||||
margin-right: 5px;
|
||||
width: 48px;
|
||||
height: 40px;
|
||||
padding: 10px 14px;
|
||||
padding: 5px 11px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,6 @@
|
||||
@extend %textInput;
|
||||
max-width: 350px;
|
||||
width: 100%;
|
||||
margin-right: 5px;
|
||||
flex-grow: 0;
|
||||
flex-shrink: 1;
|
||||
padding: 10px;
|
||||
@ -16,15 +15,15 @@
|
||||
|
||||
.colorInput {
|
||||
@extend %textInput;
|
||||
margin-right: 5px;
|
||||
width: 48px;
|
||||
height: 40px;
|
||||
padding: 10px 14px;
|
||||
padding: 5px 11px;
|
||||
}
|
||||
|
||||
.field {
|
||||
display: flex;
|
||||
margin-bottom: 15px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.lock {
|
||||
|
@ -34,9 +34,10 @@
|
||||
p {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 10px 20px;
|
||||
padding: 10px 20px 10px 19px;
|
||||
margin-top: 10px;
|
||||
font-size: 11px;
|
||||
font-weight: 400;
|
||||
border-top: 1px solid var(--content-background-border);
|
||||
color: var(--color-grey);
|
||||
background: var(--background-light);
|
||||
@ -61,6 +62,10 @@
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.link-check-text {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.link-check {
|
||||
position: absolute;
|
||||
top: 7px;
|
||||
@ -76,12 +81,12 @@
|
||||
}
|
||||
|
||||
.link-icon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
margin: 20px 20px 0;
|
||||
transition: 0.2s ease-in-out;
|
||||
transition-property: stroke;
|
||||
opacity: 0.6;
|
||||
opacity: 0.8;
|
||||
stroke: var(--color-black);
|
||||
transition: 0.2s ease-in-out;
|
||||
transition-property: stroke;
|
||||
|
@ -23,12 +23,11 @@
|
||||
|
||||
.item-link {
|
||||
display: block;
|
||||
padding: 4px 10px 5px;
|
||||
background: var(--background-light);
|
||||
padding: 3px 8px 4px;
|
||||
border: 1px solid var(--background-light-highlight);
|
||||
border-radius: var(--border-radius);
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
box-shadow: 0 1px 2px var(--shadow-color);
|
||||
transition: 0.2s ease-in-out;
|
||||
transition-property: background, box-shadow;
|
||||
|
||||
|
@ -11,6 +11,12 @@
|
||||
{{inline-svg 'assets/share.svg' local-class='link-icon link-icon--integrations'}}
|
||||
<strong>{{t 'components.project_settings.links_list.service_integrations'}}</strong>
|
||||
<p>{{t 'components.project_settings.links_list.service_integrations_text'}}</p>
|
||||
|
||||
{{#if @project.integrations.length}}
|
||||
<span local-class='link-check'>
|
||||
<span local-class='link-check-text'>{{@project.integrations.length}}</span>
|
||||
</span>
|
||||
{{/if}}
|
||||
</LinkTo>
|
||||
{{/if}}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user