Skip to content

Commit

Permalink
Merge branch 'master' into migrate-balances-labels
Browse files Browse the repository at this point in the history
  • Loading branch information
tspenov committed Nov 10, 2023
2 parents 0f9cc72 + aa47883 commit 2a49e0f
Show file tree
Hide file tree
Showing 1,127 changed files with 7,832 additions and 32,992 deletions.
9 changes: 3 additions & 6 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ erl_crash.dump
# Since we are building assets from assets/,
# we ignore priv/static. You may want to comment
# this depending on your deployment strategy.
/priv/static/
/priv/static/assets/
/priv/static/cache_manifest.json

Jenkinsfile

.tool-versions
docker-compose-yaml
PULL_REQUEST_TEMPLATE.md
Jenkinsfile
14 changes: 4 additions & 10 deletions .formatter.exs
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
[
inputs: [
"config/*.{ex,exs}",
"lib/*.{ex,exs}",
"lib/**/*.{ex,exs}",
"test/*.{ex,exs}",
"test/**/*.{ex,exs}",
"priv/**/*.{ex,exs}",
"mix.exs",
".formatter.exs"
]
import_deps: [:ecto, :ecto_sql, :phoenix],
plugins: [Phoenix.LiveView.HTMLFormatter],
inputs: ["*.{heex,ex,exs}", "{config,lib,test}/**/*.{heex,ex,exs}", "priv/*/seeds.exs"],
subdirectories: ["priv/*/migrations"]
]
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ npm-debug.log
# Since we are building assets from assets/,
# we ignore priv/static. You may want to comment
# this depending on your deployment strategy.
/priv/static/
/priv/static/assets
/priv/static/cache_manifest.json

# Emacs backups
*~
Expand Down
1 change: 0 additions & 1 deletion .iex.exs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ alias Sanbase.Model.{
MarketSegment,
LatestCoinmarketcapData,
ModelUtils,

Currency,
Ico,
IcoCurrency
Expand Down
24 changes: 12 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ENV PATH=/root/.cargo/bin:$PATH

# install hex + rebar
RUN mix local.hex --force && \
mix local.rebar --force
mix local.rebar --force

# set build ENV
ENV MIX_ENV="prod"
Expand All @@ -50,14 +50,14 @@ RUN mkdir config
# to ensure any relevant config change will trigger the dependencies
# to be re-compiled.
COPY config/config.exs \
config/ueberauth_config.exs \
config/ex_admin_config.exs \
config/notifications_config.exs \
config/scheduler_config.exs \
config/scrapers_config.exs \
config/stripe_config.exs \
config/${MIX_ENV}.exs \
config/
config/ueberauth_config.exs \
config/ex_admin_config.exs \
config/notifications_config.exs \
config/scheduler_config.exs \
config/scrapers_config.exs \
config/stripe_config.exs \
config/${MIX_ENV}.exs \
config/

RUN mix deps.compile

Expand All @@ -72,8 +72,8 @@ COPY assets assets

# compile assets
RUN cd assets && npm install
RUN cd assets && npm run build:prod
RUN mix phx.digest
RUN mix assets.setup
RUN mix assets.deploy

# Compile the release
RUN mix compile
Expand All @@ -89,7 +89,7 @@ RUN mix release
FROM ${RUNNER_IMAGE}

RUN apt-get update -y && apt-get install -y libstdc++6 openssl libncurses5 locales imagemagick git \
&& apt-get clean && rm -f /var/lib/apt/lists/*_*
&& apt-get clean && rm -f /var/lib/apt/lists/*_*

# Set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
Expand Down
5 changes: 0 additions & 5 deletions assets/.babelrc

This file was deleted.

36 changes: 3 additions & 33 deletions assets/css/app.css
Original file line number Diff line number Diff line change
@@ -1,33 +1,3 @@
/* This file is for your main application css. */

@tailwind base;
@tailwind components;
@tailwind utilities;

.show {
@apply px-6 py-4 text-lg text-gray-700 border-b
}

.input {
transition: border 0.2s ease-in-out;
min-width: 280px
}

.input:focus+.label,
.input:active+.label,
.input.filled+.label {
font-size: .75rem;
transition: all 0.2s ease-out;
top: -0.1rem;
color: #667eea;
}

.label {
font-size: .75rem;
transition: all 0.2s ease-out;
top: -0.1rem;
color: #667eea;
left: 0;
}


@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";
37 changes: 19 additions & 18 deletions assets/js/app.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
// Brunch automatically concatenates all files in your
// watched paths. Those paths can be configured at
// config.paths.watched in "brunch-config.js".
//
// However, those files will only be executed if
// explicitly imported. The only exception are files
// in vendor, which are never wrapped in imports and
// therefore are always executed.

// Import dependencies
//
// If you no longer want to use a dependency, remember
// to also remove its path from "config.paths.watched".
import "phoenix_html"
// Establish Phoenix Socket and LiveView configuration.
import {Socket} from "phoenix"
import {LiveSocket} from "phoenix_live_view"
import topbar from "../vendor/topbar"

let csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content")
let liveSocket = new LiveSocket("/live", Socket, {params: {_csrf_token: csrfToken}})

// Show progress bar on live navigation and form submits
topbar.config({barColors: {0: "#29d"}, shadowColor: "rgba(0, 0, 0, .3)"})
window.addEventListener("phx:page-loading-start", _info => topbar.show(300))
window.addEventListener("phx:page-loading-stop", _info => topbar.hide())

// Import local files
//
// Local files can be imported directly using relative
// paths "./socket" or full ones "web/static/js/socket".
// connect if there are any LiveViews on the page
liveSocket.connect()

import css from '../css/app.css';
// expose liveSocket on window for web console debug logs and latency simulation:
// >> liveSocket.enableDebug()
// >> liveSocket.enableLatencySim(1000) // enabled for duration of browser session
// >> liveSocket.disableLatencySim()
window.liveSocket = liveSocket
10 changes: 5 additions & 5 deletions assets/js/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ let socket = new Socket("/socket", {params: {token: window.userToken}})
socket.connect()

// Now that you are connected, you can join channels with a topic:
let channel = socket.channel("topic:subtopic", {})
channel.join()
.receive("ok", resp => { console.log("Joined successfully", resp) })
.receive("error", resp => { console.log("Unable to join", resp) })
// let channel = socket.channel("topic:subtopic", {})
// channel.join()
// .receive("ok", resp => { console.log("Joined successfully", resp) })
// .receive("error", resp => { console.log("Unable to join", resp) })

export default socket
// export default socket
Loading

0 comments on commit 2a49e0f

Please sign in to comment.