Compare commits
No commits in common. "bb09b926d957fde0b7fa5e1d996db438ef71b1da" and "f46981e5a45e74a0e2c2e809f4d0bcc51f8417a8" have entirely different histories.
bb09b926d9
...
f46981e5a4
|
@ -1,8 +1,7 @@
|
||||||
// We need to import the CSS so that webpack will load it.
|
// We need to import the CSS so that webpack will load it.
|
||||||
// The MiniCssExtractPlugin is used to separate it out into
|
// The MiniCssExtractPlugin is used to separate it out into
|
||||||
// its own CSS file.
|
// its own CSS file.
|
||||||
// import "../css/app.css"
|
import "../css/app.css"
|
||||||
// const _css = require("../css/app.css");
|
|
||||||
|
|
||||||
// webpack automatically bundles all modules in your
|
// webpack automatically bundles all modules in your
|
||||||
// entry points. Those entry points can be configured
|
// entry points. Those entry points can be configured
|
||||||
|
@ -17,10 +16,6 @@ import "phoenix_html"
|
||||||
import {Socket} from "phoenix"
|
import {Socket} from "phoenix"
|
||||||
import topbar from "topbar"
|
import topbar from "topbar"
|
||||||
import {LiveSocket} from "phoenix_live_view"
|
import {LiveSocket} from "phoenix_live_view"
|
||||||
import React from "react";
|
|
||||||
import ReactDOM from "react-dom";
|
|
||||||
import SplashPage from './pages/SplashPage';
|
|
||||||
import { GlobalStyle } from '@intended/intended-ui';
|
|
||||||
|
|
||||||
let csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content")
|
let csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content")
|
||||||
let liveSocket = new LiveSocket("/live", Socket, {params: {_csrf_token: csrfToken}})
|
let liveSocket = new LiveSocket("/live", Socket, {params: {_csrf_token: csrfToken}})
|
||||||
|
@ -39,10 +34,3 @@ liveSocket.connect()
|
||||||
// >> liveSocket.disableLatencySim()
|
// >> liveSocket.disableLatencySim()
|
||||||
window.liveSocket = liveSocket
|
window.liveSocket = liveSocket
|
||||||
|
|
||||||
ReactDOM.render(<div>
|
|
||||||
<GlobalStyle />
|
|
||||||
<SplashPage />
|
|
||||||
</div>
|
|
||||||
,
|
|
||||||
document.getElementById("root")
|
|
||||||
);
|
|
|
@ -1,24 +0,0 @@
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
import { CenteredContainer, SplashIconHeader, Header1, Header3, Spacer, Button } from '@intended/intended-ui';
|
|
||||||
|
|
||||||
const SplashPage = () => {
|
|
||||||
return (
|
|
||||||
<CenteredContainer fullscreen>
|
|
||||||
<CenteredContainer wide>
|
|
||||||
<SplashIconHeader />
|
|
||||||
<Header1>Securely Share Your Secrets</Header1>
|
|
||||||
<Header3>
|
|
||||||
With Intended Link you can easily share messages and files securely
|
|
||||||
and secretly.
|
|
||||||
</Header3>
|
|
||||||
<Spacer />
|
|
||||||
<Button variant="secondary" boldFont onClick={() => {}}>
|
|
||||||
START SHARING
|
|
||||||
</Button>
|
|
||||||
</CenteredContainer>
|
|
||||||
</CenteredContainer>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default SplashPage;
|
|
File diff suppressed because it is too large
Load Diff
|
@ -7,32 +7,23 @@
|
||||||
"watch": "webpack --mode development --watch"
|
"watch": "webpack --mode development --watch"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@intended/intended-ui": "0.1.16",
|
|
||||||
"phoenix": "file:../deps/phoenix",
|
"phoenix": "file:../deps/phoenix",
|
||||||
"phoenix_html": "file:../deps/phoenix_html",
|
"phoenix_html": "file:../deps/phoenix_html",
|
||||||
"phoenix_live_view": "file:../deps/phoenix_live_view",
|
"phoenix_live_view": "file:../deps/phoenix_live_view",
|
||||||
"react": "^17.0.2",
|
|
||||||
"react-dom": "^17.0.2",
|
|
||||||
"topbar": "^0.1.4"
|
"topbar": "^0.1.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.0.0",
|
"@babel/core": "^7.0.0",
|
||||||
"@babel/preset-env": "^7.0.0",
|
"@babel/preset-env": "^7.0.0",
|
||||||
"@types/phoenix": "^1.5.3",
|
|
||||||
"@types/react": "^17.0.37",
|
|
||||||
"@types/react-dom": "^17.0.11",
|
|
||||||
"babel-loader": "^8.0.0",
|
"babel-loader": "^8.0.0",
|
||||||
"copy-webpack-plugin": "^5.1.1",
|
"copy-webpack-plugin": "^5.1.1",
|
||||||
"css-loader": "^3.4.2",
|
"css-loader": "^3.4.2",
|
||||||
|
"sass-loader": "^8.0.2",
|
||||||
|
"node-sass": "^4.13.1",
|
||||||
"hard-source-webpack-plugin": "^0.13.1",
|
"hard-source-webpack-plugin": "^0.13.1",
|
||||||
"mini-css-extract-plugin": "^0.9.0",
|
"mini-css-extract-plugin": "^0.9.0",
|
||||||
"node-sass": "^4.13.1",
|
|
||||||
"optimize-css-assets-webpack-plugin": "^5.0.1",
|
"optimize-css-assets-webpack-plugin": "^5.0.1",
|
||||||
"sass-loader": "^8.0.2",
|
|
||||||
"source-map-loader": "^3.0.0",
|
|
||||||
"terser-webpack-plugin": "^2.3.2",
|
"terser-webpack-plugin": "^2.3.2",
|
||||||
"ts-loader": "8.2.0",
|
|
||||||
"typescript": "^4.5.2",
|
|
||||||
"webpack": "^4.41.5",
|
"webpack": "^4.41.5",
|
||||||
"webpack-cli": "^3.3.2"
|
"webpack-cli": "^3.3.2"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"target": "es5",
|
|
||||||
"module": "esnext",
|
|
||||||
"moduleResolution": "node",
|
|
||||||
"allowJs": true,
|
|
||||||
"jsx": "react",
|
|
||||||
"outDir": "./dist/",
|
|
||||||
"strict": true,
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"forceConsistentCasingInFileNames": true,
|
|
||||||
"noUnusedLocals": true,
|
|
||||||
"noUnusedParameters": true
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"/node_modules/**/*",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
|
@ -28,16 +28,11 @@ module.exports = (env, options) => {
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
test: /\.(j|t)s.?$/,
|
test: /\.js$/,
|
||||||
exclude: /node_modules/,
|
exclude: /node_modules/,
|
||||||
use: [
|
use: {
|
||||||
{
|
loader: 'babel-loader'
|
||||||
loader: "babel-loader"
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
loader: "ts-loader"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.[s]?css$/,
|
test: /\.[s]?css$/,
|
||||||
|
@ -49,9 +44,6 @@ module.exports = (env, options) => {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
resolve: {
|
|
||||||
extensions: [".ts", ".tsx", ".js", ".jsx"]
|
|
||||||
},
|
|
||||||
plugins: [
|
plugins: [
|
||||||
new MiniCssExtractPlugin({ filename: '../css/app.css' }),
|
new MiniCssExtractPlugin({ filename: '../css/app.css' }),
|
||||||
new CopyWebpackPlugin([{ from: 'static/', to: '../' }])
|
new CopyWebpackPlugin([{ from: 'static/', to: '../' }])
|
||||||
|
|
|
@ -9,35 +9,31 @@ defmodule Entendu.Application do
|
||||||
topologies = [
|
topologies = [
|
||||||
k8s_entendu: [
|
k8s_entendu: [
|
||||||
strategy: Elixir.Cluster.Strategy.Kubernetes.DNS,
|
strategy: Elixir.Cluster.Strategy.Kubernetes.DNS,
|
||||||
config: [
|
config: [
|
||||||
service: "entendu-nodes",
|
service: "entendu-nodes",
|
||||||
application_name: "entendu"
|
application_name: "entendu"
|
||||||
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
|
||||||
|
|
||||||
children =
|
children = case Application.get_env(:frayt_elixir, :enable_k8s) do
|
||||||
case Application.get_env(:frayt_elixir, :enable_k8s) do
|
true -> [
|
||||||
true ->
|
{Cluster.Supervisor, [topologies, [name: Entendu.ClusterSupervisor]]}
|
||||||
[
|
]
|
||||||
{Cluster.Supervisor, [topologies, [name: Entendu.ClusterSupervisor]]}
|
_ -> []
|
||||||
]
|
end
|
||||||
|
|> Kernel.++([
|
||||||
_ ->
|
# Start the Ecto repository
|
||||||
[]
|
Entendu.Repo,
|
||||||
end
|
# Start the Telemetry supervisor
|
||||||
|> Kernel.++([
|
EntenduWeb.Telemetry,
|
||||||
# Start the Ecto repository
|
# Start the PubSub system
|
||||||
Entendu.Repo,
|
{Phoenix.PubSub, name: Entendu.PubSub},
|
||||||
# Start the Telemetry supervisor
|
# Start the Endpoint (http/https)
|
||||||
EntenduWeb.Telemetry,
|
EntenduWeb.Endpoint
|
||||||
# Start the PubSub system
|
# Start a worker by calling: Entendu.Worker.start_link(arg)
|
||||||
{Phoenix.PubSub, name: Entendu.PubSub},
|
# {Entendu.Worker, arg}
|
||||||
# Start the Endpoint (http/https)
|
])
|
||||||
EntenduWeb.Endpoint
|
|
||||||
# Start a worker by calling: Entendu.Worker.start_link(arg)
|
|
||||||
# {Entendu.Worker, arg}
|
|
||||||
])
|
|
||||||
|
|
||||||
# See https://hexdocs.pm/elixir/Supervisor.html
|
# See https://hexdocs.pm/elixir/Supervisor.html
|
||||||
# for other strategies and supported options
|
# for other strategies and supported options
|
||||||
|
|
|
@ -5,25 +5,7 @@ defmodule EntenduWeb.LinkController do
|
||||||
|
|
||||||
use EntenduWeb, :controller
|
use EntenduWeb, :controller
|
||||||
|
|
||||||
def just_page(conn, _params) do
|
def just(conn, _params) do
|
||||||
render(conn, "just.html")
|
render(conn, "just.html")
|
||||||
end
|
|
||||||
|
|
||||||
def just(conn, %{encrypted_contents: contents}) do
|
|
||||||
conn
|
|
||||||
|> put_session(:encrypted_contents, contents)
|
|
||||||
|> redirect(to: "/just/for")
|
|
||||||
end
|
|
||||||
|
|
||||||
def for_page(conn, _params) do
|
|
||||||
render(conn, "for.html")
|
|
||||||
end
|
|
||||||
|
|
||||||
def for(conn, %{username: username, service: service}) do
|
|
||||||
{:error, "not implemented"}
|
|
||||||
end
|
|
||||||
|
|
||||||
def you_page(conn, _params) do
|
|
||||||
render(conn, "you.html")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,11 +18,7 @@ defmodule EntenduWeb.Router do
|
||||||
pipe_through :browser
|
pipe_through :browser
|
||||||
|
|
||||||
get "/", PageController, :index
|
get "/", PageController, :index
|
||||||
get "/just", LinkController, :just_page
|
get "/just", LinkController, :just
|
||||||
post "/just", LinkController, :just
|
|
||||||
get "/just/for", LinkController, :for_page
|
|
||||||
post "/just/for", LinkController, :for
|
|
||||||
get "/just/for/you", LinkController, :you_page
|
|
||||||
end
|
end
|
||||||
|
|
||||||
scope "/auth", EntenduWeb do
|
scope "/auth", EntenduWeb do
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
<script defer phx-track-static type="text/javascript" src="<%= Routes.static_path(@conn, "/js/app.js") %>"></script>
|
<script defer phx-track-static type="text/javascript" src="<%= Routes.static_path(@conn, "/js/app.js") %>"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root">
|
|
||||||
<header>
|
<header>
|
||||||
<section class="container">
|
<section class="container">
|
||||||
<nav role="navigation">
|
<nav role="navigation">
|
||||||
|
@ -27,6 +26,5 @@
|
||||||
</section>
|
</section>
|
||||||
</header>
|
</header>
|
||||||
<%= @inner_content %>
|
<%= @inner_content %>
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
<section class="phx-hero">
|
|
||||||
<h2>Create a secret!</h2>
|
|
||||||
<p>There will be a form here</p>
|
|
||||||
<p>And a file input here</p>
|
|
||||||
<p>Then a next button</p>
|
|
||||||
</section>
|
|
|
@ -3,8 +3,4 @@
|
||||||
<p>There will be a form here</p>
|
<p>There will be a form here</p>
|
||||||
<p>And a file input here</p>
|
<p>And a file input here</p>
|
||||||
<p>Then a next button</p>
|
<p>Then a next button</p>
|
||||||
<form phx-submit="just">
|
|
||||||
<textarea></textarea>
|
|
||||||
<button>Submit</button>
|
|
||||||
</form>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
<section class="phx-hero">
|
|
||||||
<h2>Create a secret!</h2>
|
|
||||||
<p>There will be a form here</p>
|
|
||||||
<p>And a file input here</p>
|
|
||||||
<p>Then a next button</p>
|
|
||||||
</section>
|
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"lockfileVersion": 1
|
|
||||||
}
|
|
|
@ -10,5 +10,6 @@ defmodule Entendu.Repo.Migrations.CreateLinks do
|
||||||
|
|
||||||
timestamps()
|
timestamps()
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue