Skip to content

Commit

Permalink
Merge pull request #128 from doughsay/dep-updates
Browse files Browse the repository at this point in the history
Dep updates
  • Loading branch information
doughsay authored Dec 18, 2021
2 parents 6a8bd46 + fbc4713 commit d24e6fb
Show file tree
Hide file tree
Showing 24 changed files with 248 additions and 628 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/[email protected].0
uses: docker/[email protected].2
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

Expand Down
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
elixir 1.13.0-otp-24
erlang 24.1.7
elixir 1.13.1-otp-24
erlang 24.2
nodejs 16.13.1
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# -----------------------------------

# NOTE: make sure these versions match in .github/workflows/elixir.yml
FROM hexpm/elixir:1.12.3-erlang-24.1.2-alpine-3.14.2 AS elixir-builder
FROM hexpm/elixir:1.13.1-erlang-24.2-alpine-3.14.2 AS elixir-builder

RUN --mount=type=cache,target=~/.hex/packages/hexpm,sharing=locked \
--mount=type=cache,target=~/.cache/rebar3,sharing=locked \
Expand Down Expand Up @@ -92,7 +92,7 @@ RUN mix compile
# - stage: build
# - job: assets
# -----------------------------------
FROM node:16.13.0-alpine3.14 AS assets
FROM node:16.13.1-alpine3.14 AS assets

WORKDIR /src/assets

Expand Down
765 changes: 195 additions & 570 deletions assets/package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"watch_js": "NODE_PATH=../deps esbuild js/app.js --bundle --target=es2016 --outdir=../priv/static/assets --sourcemap=inline --watch"
},
"devDependencies": {
"@tailwindcss/aspect-ratio": "^0.3.0",
"@tailwindcss/aspect-ratio": "^0.4.0",
"autoprefixer": "^10.3.7",
"esbuild": "^0.14.0",
"esbuild": "^0.14.3",
"postcss": "^8.4.4",
"postcss-cli": "^9.0.2",
"postcss-cli": "^9.1.0",
"postcss-import": "^14.0.2",
"tailwindcss": "^2.2.19"
"tailwindcss": "^3.0.1"
},
"dependencies": {
"alpinejs": "^3.3.3",
Expand Down
9 changes: 2 additions & 7 deletions assets/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
const colors = require('tailwindcss/colors')

module.exports = {
mode: 'jit',
purge: ['./js/**/*.js', '../lib/*_web/**/*.*ex', '../lib/*_web/**/*.sface'],
content: ['./js/**/*.js', '../lib/*_web/**/*.*ex', '../lib/*_web/**/*.sface'],
theme: {
extend: {
colors: {
gray: colors.gray,
lime: colors.lime
gray: colors.zinc
}
}
},
variants: {
extend: {}
},
plugins: [require('@tailwindcss/aspect-ratio')]
}
6 changes: 3 additions & 3 deletions lib/ambry_web/live/admin/audit_live/index.sface
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<AdminNav />

<div class="flex items-center">
<div class="flex-grow">
<div class="grow">
<h1 class="text-4xl mb-4">Media Audit</h1>
</div>
<a href="#" :on-click="reload">
Expand Down Expand Up @@ -44,7 +44,7 @@
<div class="flex-none w-24">
<span class="px-1 border border-blue-200 rounded-md bg-blue-50">{format_filesize(file.size)}</span>
</div>
<div class="flex-grow break-all pl-2">
<div class="grow break-all pl-2">
{file.path}
</div>
<a data-confirm="Are you sure?" href="#" :on-click="delete-file" :values={id: file.id}>
Expand Down Expand Up @@ -84,7 +84,7 @@
<div class="flex-none w-24">
<span class="px-1 border border-blue-200 rounded-md bg-blue-50">{format_filesize(folder.size)}</span>
</div>
<div class="flex-grow break-all pl-2">
<div class="grow break-all pl-2">
{folder.path}
</div>
<a data-confirm="Are you sure?" href="#" :on-click="delete-folder" :values={id: folder.id}>
Expand Down
2 changes: 1 addition & 1 deletion lib/ambry_web/live/admin/book_live/form_component.sface
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<Field name={:book_number} class="w-14 mr-2 flex-none">
<TextInput class="border-2 rounded px-2 py-1 w-full focus:outline-none focus:border-lime-400 focus:shadow" />
</Field>
<Field name={:series_id} class="flex-grow">
<Field name={:series_id} class="grow">
<Select
prompt=""
options={@series}
Expand Down
6 changes: 3 additions & 3 deletions lib/ambry_web/live/admin/book_live/index.sface
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{/if}

<div class="flex items-center">
<Form for={:search} submit="search" class="flex-grow">
<Form for={:search} submit="search" class="grow">
<Field name="query">
<TextInput
opts={placeholder: "Search..."}
Expand Down Expand Up @@ -63,7 +63,7 @@
{/if}
{#for book <- @books}
<div class="p-2 flex">
<div class="flex-grow pr-2">
<div class="grow pr-2">
<LivePatch
to={Routes.admin_book_index_path(@socket, :edit, book, patch_opts(@list_opts))}
class="hover:underline inline-block w-full"
Expand Down Expand Up @@ -127,7 +127,7 @@
<span>Previous</span>
</LivePatch>
{/if}
<span class="flex-grow" />
<span class="grow" />
{#if @has_more?}
<LivePatch
to={Routes.admin_book_index_path(@socket, :index, next_opts(@list_opts))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<TextInput opts={disabled: true} />
<HiddenInput />
</Field>
<Field name={:title} class="flex-grow">
<Field name={:title} class="grow">
<TextInput class="border-2 rounded px-2 py-1 w-full focus:outline-none focus:border-lime-400 focus:shadow" />
</Field>
</div>
Expand Down
8 changes: 4 additions & 4 deletions lib/ambry_web/live/admin/media_live/file_stat_row.ex
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ defmodule AmbryWeb.Admin.MediaLive.FileStatRow do
</span>
</div>
{#if @file}
<div class="flex-grow break-all pr-2">
<div class="grow break-all pr-2">
{@file.path}
</div>
<div class="flex-shrink">
<div class="shrink">
{#case @file.stat}
{#match error when is_atom(error)}
<span class={"px-1 border rounded-md " <> classes_for_error_type(@error_type)}>
Expand All @@ -34,8 +34,8 @@ defmodule AmbryWeb.Admin.MediaLive.FileStatRow do
{/case}
</div>
{#else}
<div class="flex-grow" />
<div class="flex-shrink">
<div class="grow" />
<div class="shrink">
<span class="px-1 border border-red-200 rounded-md bg-red-50">
nil
</span>
Expand Down
6 changes: 3 additions & 3 deletions lib/ambry_web/live/admin/media_live/index.sface
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{/if}

<div class="flex items-center">
<Form for={:search} submit="search" class="flex-grow">
<Form for={:search} submit="search" class="grow">
<Field name="query">
<TextInput
opts={placeholder: "Search..."}
Expand Down Expand Up @@ -89,7 +89,7 @@
<span class="px-1 border border-lime-200 rounded-md bg-lime-50">ready</span>
{/case}
</div>
<div class="flex-grow pr-2">
<div class="grow pr-2">
<LivePatch
to={Routes.admin_media_index_path(@socket, :edit, media, patch_opts(@list_opts))}
class="hover:underline inline-block w-full"
Expand Down Expand Up @@ -170,7 +170,7 @@
<span>Previous</span>
</LivePatch>
{/if}
<span class="flex-grow" />
<span class="grow" />
{#if @has_more?}
<LivePatch
to={Routes.admin_media_index_path(@socket, :index, next_opts(@list_opts))}
Expand Down
4 changes: 2 additions & 2 deletions lib/ambry_web/live/admin/person_live/form_component.sface
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<Inputs for={:authors}>
<HiddenInputs for={:author} />
<div class="flex items-center">
<Field name={:name} class="flex-grow">
<Field name={:name} class="grow">
<TextInput class="border-2 rounded px-3 py-2 w-full focus:outline-none focus:border-lime-400 focus:shadow" />
</Field>
<Field name={:delete}>
Expand Down Expand Up @@ -67,7 +67,7 @@
<Inputs for={:narrators}>
<HiddenInputs for={:narrator} />
<div class="flex items-center">
<Field name={:name} class="flex-grow">
<Field name={:name} class="grow">
<TextInput class="border-2 rounded px-3 py-2 w-full focus:outline-none focus:border-lime-400 focus:shadow" />
</Field>
<Field name={:delete}>
Expand Down
6 changes: 3 additions & 3 deletions lib/ambry_web/live/admin/person_live/index.sface
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{/if}

<div class="flex items-center">
<Form for={:search} submit="search" class="flex-grow">
<Form for={:search} submit="search" class="grow">
<Field name="query">
<TextInput
opts={placeholder: "Search..."}
Expand Down Expand Up @@ -63,7 +63,7 @@
{/if}
{#for person <- @people}
<div class="p-2 flex">
<div class="flex-grow pr-2">
<div class="grow pr-2">
<LivePatch
to={Routes.admin_person_index_path(@socket, :edit, person, patch_opts(@list_opts))}
class="hover:underline inline-block w-full"
Expand Down Expand Up @@ -121,7 +121,7 @@
<span>Previous</span>
</LivePatch>
{/if}
<span class="flex-grow" />
<span class="grow" />
{#if @has_more?}
<LivePatch
to={Routes.admin_person_index_path(@socket, :index, next_opts(@list_opts))}
Expand Down
2 changes: 1 addition & 1 deletion lib/ambry_web/live/admin/series_live/form_component.sface
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<Field name={:book_number} class="w-14 mr-2 flex-none">
<TextInput class="border-2 rounded px-2 py-1 w-full focus:outline-none focus:border-lime-400 focus:shadow" />
</Field>
<Field name={:book_id} class="flex-grow">
<Field name={:book_id} class="grow">
<Select
prompt=""
options={@books}
Expand Down
6 changes: 3 additions & 3 deletions lib/ambry_web/live/admin/series_live/index.sface
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{/if}

<div class="flex items-center">
<Form for={:search} submit="search" class="flex-grow">
<Form for={:search} submit="search" class="grow">
<Field name="query">
<TextInput
opts={placeholder: "Search..."}
Expand Down Expand Up @@ -63,7 +63,7 @@
{/if}
{#for series <- @series}
<div class="p-2 flex">
<div class="flex-grow pr-2">
<div class="grow pr-2">
<LivePatch
to={Routes.admin_series_index_path(@socket, :edit, series, patch_opts(@list_opts))}
class="hover:underline inline-block w-full"
Expand Down Expand Up @@ -121,7 +121,7 @@
<span>Previous</span>
</LivePatch>
{/if}
<span class="flex-grow" />
<span class="grow" />
{#if @has_more?}
<LivePatch
to={Routes.admin_series_index_path(@socket, :index, next_opts(@list_opts))}
Expand Down
2 changes: 1 addition & 1 deletion lib/ambry_web/live/book_live/show.sface
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div class="rounded-lg border shadow-lg px-3 divide-y divide-gray-200">
{#for media <- @book.media}
<div class="flex items-center py-3">
<div class="flex-grow mr-2">
<div class="grow mr-2">
<p class="text-lg">{@book.title} ({recording_type(media)})</p>
<p class="text-gray-500">
Narrated by
Expand Down
2 changes: 1 addition & 1 deletion lib/ambry_web/live/components/modal.sface
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform sm:my-8 sm:align-middle sm:max-w-lg md:max-w-xl lg:max-w-2xl xl:max-w-3xl 2xl:max-w-5xl w-full">
{!-- Close button --}
<div class="flex px-2 text-3xl">
<span class="flex-grow" />
<span class="grow" />
<LivePatch to={@return_to} class="hover:text-red-600 transition-colors">&times;</LivePatch>
</div>

Expand Down
4 changes: 2 additions & 2 deletions lib/ambry_web/live/header_live/bookmarks.sface
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform sm:my-8 sm:align-middle sm:max-w-lg w-full">
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
<div class="flex flex-row">
<h3 class="flex-grow text-lg font-bold mb-2">
<h3 class="grow text-lg font-bold mb-2">
Bookmarks
</h3>
<button id="bookmark-button" phx-hook="bookmarkButton">
Expand Down Expand Up @@ -57,7 +57,7 @@
{format_timecode(bookmark.position)}
</a>
</div>
<div class="flex-grow">
<div class="grow">
{#if @editing && @editing.id == bookmark.id}
<Form for={@editing.changeset} submit="update-bookmark">
<Field name={:label}>
Expand Down
4 changes: 2 additions & 2 deletions lib/ambry_web/live/header_live/chapters.sface
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform sm:my-8 sm:align-middle sm:max-w-lg w-full">
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
<div class="flex flex-row">
<h3 class="flex-grow text-lg font-bold mb-2">
<h3 class="grow text-lg font-bold mb-2">
Chapters
</h3>
</div>
Expand All @@ -35,7 +35,7 @@
{format_timecode(chapter.time)}
</a>
</div>
<div class="flex-grow">
<div class="grow">
<a href="#" onClick={"mediaPlayer.seek(#{chapter.time})"}>
{chapter.title}
</a>
Expand Down
4 changes: 2 additions & 2 deletions lib/ambry_web/live/header_live/header.sface
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<img class="h-10 sm:h-12" src={Routes.static_path(@socket, "/images/logo_48x196.svg")}>
</a>
</div>
<div class="flex-grow ml-0 sm:ml-5 md:ml-10">
<div class="grow ml-0 sm:ml-5 md:ml-10">
<div class="hidden sm:block">
<SearchForm change="search" close="close" query={assigns[:query]} />
</div>
Expand Down Expand Up @@ -43,7 +43,7 @@
<div class="sm:hidden">
<SearchForm change="search" close="close" query={assigns[:query]} />
</div>
<div class="flex-grow text-right">
<div class="grow text-right">
<Link
class="text-lime-500 hover:underline"
to={Routes.user_session_path(@socket, :delete)}
Expand Down
10 changes: 5 additions & 5 deletions lib/ambry_web/live/header_live/player.sface
Original file line number Diff line number Diff line change
Expand Up @@ -222,23 +222,23 @@
<div class="flex space-x-4 tabular-nums">
<button
@click="mediaPlayer.setPlaybackRate(1.0)"
class="rounded border border-gray-200 bg-gray-50 flex-grow"
class="rounded border border-gray-200 bg-gray-50 grow"
>1.0x</button>
<button
@click="mediaPlayer.setPlaybackRate(1.25)"
class="rounded border border-gray-200 bg-gray-50 flex-grow"
class="rounded border border-gray-200 bg-gray-50 grow"
>1.25x</button>
<button
@click="mediaPlayer.setPlaybackRate(1.5)"
class="rounded border border-gray-200 bg-gray-50 flex-grow"
class="rounded border border-gray-200 bg-gray-50 grow"
>1.5x</button>
<button
@click="mediaPlayer.setPlaybackRate(1.75)"
class="rounded border border-gray-200 bg-gray-50 flex-grow"
class="rounded border border-gray-200 bg-gray-50 grow"
>1.75x</button>
<button
@click="mediaPlayer.setPlaybackRate(2.0)"
class="rounded border border-gray-200 bg-gray-50 flex-grow"
class="rounded border border-gray-200 bg-gray-50 grow"
>2.0x</button>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions lib/ambry_web/templates/layout/live.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
phx-click="lv:clear-flash"
class="z-50 fixed max-w-lg top-24 right-10 shadow-lg p-4 cursor-pointer rounded-md bg-blue-100 border border-blue-200 flex items-center"
>
<p class="flex-grow pr-2"><%= message %></p>
<p class="grow pr-2"><%= message %></p>

<svg class="flex-none" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
<path d="M14.53 4.53l-1.06-1.06L9 7.94 4.53 3.47 3.47 4.53 7.94 9l-4.47 4.47 1.06 1.06L9 10.06l4.47 4.47 1.06-1.06L10.06 9z"></path>
Expand All @@ -20,7 +20,7 @@
phx-click="lv:clear-flash"
class="z-50 fixed max-w-lg top-24 right-10 shadow-lg p-4 cursor-pointer w-full rounded-md bg-red-100 border border-red-200 flex items-center"
>
<p class="flex-grow pr-2"><%= message %></p>
<p class="grow pr-2"><%= message %></p>

<svg class="flex-none" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
<path d="M14.53 4.53l-1.06-1.06L9 7.94 4.53 3.47 3.47 4.53 7.94 9l-4.47 4.47 1.06 1.06L9 10.06l4.47 4.47 1.06-1.06L10.06 9z"></path>
Expand Down
Loading

0 comments on commit d24e6fb

Please sign in to comment.