mirror of
https://github.com/bonfire-networks/bonfire-app.git
synced 2024-05-14 15:12:40 +00:00
This commit is contained in:
parent
ffa1a19c0e
commit
17eb5a703d
|
@ -72,7 +72,7 @@ RUN mix do deps.get --only prod
|
|||
|
||||
# Include translations
|
||||
COPY priv/localisation/ priv/localisation/
|
||||
RUN ls -la priv/localisation/
|
||||
# RUN ls -la priv/localisation/
|
||||
|
||||
# Compile remaining deps
|
||||
RUN MIX_ENV=prod mix do deps.compile
|
||||
|
@ -98,7 +98,7 @@ COPY data/current_flavour/repo priv/repo
|
|||
# bonfire-app code & assets
|
||||
COPY lib lib
|
||||
COPY assets assets
|
||||
# COPY . .
|
||||
# RUN ls -la assets/static
|
||||
|
||||
# include an archive of the source code
|
||||
COPY LICENSE ./
|
||||
|
@ -111,6 +111,7 @@ RUN tar --exclude=*.env --exclude=.git --exclude=assets/node_modules --exclude=a
|
|||
COPY data/current_flavour/config/deps_hooks.js data/current_flavour/config/deps_hooks.js
|
||||
RUN mix assets.build
|
||||
RUN MIX_ENV=prod CI=1 mix phx.digest
|
||||
# RUN ls -la priv/static
|
||||
|
||||
# build final OTP release
|
||||
RUN MIX_ENV=prod CI=1 mix release
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"license": "AGPL-3.0",
|
||||
"scripts": {
|
||||
"watch.assets": "cpx 'static/**/*' ../priv/static --watch",
|
||||
"prepare.static": "mkdir -p ../priv/static/ && cp -r static/*.ico ../priv/static/ && cp -r static/images ../priv/static/ && cp -r static/fonts ../priv/static/",
|
||||
"prepare.static": "mkdir -p ../priv/static/ && cp -r static/*.ico ../priv/static/ && cp -r static/images ../priv/static/ && cp -r static/fonts ../priv/static/ && cp -r static/pwa* ../priv/static/",
|
||||
"build": "yarn prepare.static && yarn build.postcss && yarn build.esbuild",
|
||||
"watch.js": "esbuild ./js/bonfire_live.js ./js/bonfire_basic.js --target=es2017 --bundle --sourcemap --loader:.svg=text --outdir=../priv/static/assets --watch",
|
||||
"build.esbuild": "esbuild ./js/bonfire_live.js ./js/bonfire_basic.js --target=es2017 --bundle --sourcemap --loader:.svg=text --bundle --outdir=../priv/static/assets",
|
||||
|
|
|
@ -86,6 +86,7 @@ module.exports = {
|
|||
}
|
||||
},
|
||||
daisyui: {
|
||||
darkTheme: "bonfire",
|
||||
themes: [
|
||||
{
|
||||
bonfire: {
|
||||
|
@ -100,7 +101,7 @@ module.exports = {
|
|||
"error": "#FF5757"
|
||||
},
|
||||
},
|
||||
"light", "dark", "cupcake", "bumblebee", "emerald", "corporate", "synthwave", "retro", "cyberpunk", "valentine", "halloween", "garden", "forest", "aqua", "lofi", "pastel", "fantasy", "wireframe", "black", "luxury", "dracula", "cmyk", "autumn", "business", "acid", "lemonade", "night", "coffee", "winter"
|
||||
"dark", "light", "cupcake", "bumblebee", "emerald", "corporate", "synthwave", "retro", "cyberpunk", "valentine", "halloween", "garden", "forest", "aqua", "lofi", "pastel", "fantasy", "wireframe", "black", "luxury", "dracula", "cmyk", "autumn", "business", "acid", "lemonade", "night", "coffee", "winter"
|
||||
]
|
||||
},
|
||||
variants: {
|
||||
|
|
|
@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
|
||||
|
||||
## [Unreleased (2022-09-24)]
|
||||
## [Unreleased (2022-09-26)]
|
||||
### Added
|
||||
- Enable/disable extensions [#448](https://github.com/bonfire-networks/bonfire-app/issues/448)
|
||||
- Coordination MVP [#445](https://github.com/bonfire-networks/bonfire-app/issues/445) by mayel & ivanminutillo
|
||||
|
|
|
@ -44,12 +44,7 @@ More details at https://bonfirenetworks.org",
|
|||
theme: "bonfire",
|
||||
themes: [
|
||||
"bonfire",
|
||||
"light",
|
||||
"dark",
|
||||
"cupcake",
|
||||
"bumblebee",
|
||||
"emerald",
|
||||
"corporate",
|
||||
"synthwave",
|
||||
"retro",
|
||||
"cyberpunk",
|
||||
|
@ -58,20 +53,31 @@ More details at https://bonfirenetworks.org",
|
|||
"garden",
|
||||
"forest",
|
||||
"aqua",
|
||||
"black",
|
||||
"luxury",
|
||||
"dracula",
|
||||
"business",
|
||||
"night",
|
||||
"coffee"
|
||||
],
|
||||
themes_light: [
|
||||
"light",
|
||||
"cupcake",
|
||||
"bumblebee",
|
||||
"emerald",
|
||||
"corporate",
|
||||
"retro",
|
||||
"cyberpunk",
|
||||
"valentine",
|
||||
"garden",
|
||||
"lofi",
|
||||
"pastel",
|
||||
"fantasy",
|
||||
"wireframe",
|
||||
"black",
|
||||
"luxury",
|
||||
"dracula",
|
||||
"cmyk",
|
||||
"autumn",
|
||||
"business",
|
||||
"acid",
|
||||
"lemonade",
|
||||
"night",
|
||||
"coffee",
|
||||
"winter"
|
||||
],
|
||||
show_trending_tags: [
|
||||
|
@ -79,9 +85,6 @@ More details at https://bonfirenetworks.org",
|
|||
for_last_x_days: 30,
|
||||
limit: 8
|
||||
],
|
||||
sidebar_components: [
|
||||
{Bonfire.UI.Social.SidebarNavigationLive, []}
|
||||
],
|
||||
smart_input: [
|
||||
post: true,
|
||||
cw: true,
|
||||
|
|
|
@ -3,6 +3,8 @@ import Config
|
|||
config :bonfire, :ui,
|
||||
theme: [
|
||||
instance_name: "Bonfire",
|
||||
instance_theme: "bonfire",
|
||||
instance_theme_light: "light",
|
||||
instance_icon: "/images/bonfire-icon.png",
|
||||
instance_image: "/images/bonfires.png",
|
||||
instance_description: "This is a bonfire demo instance for testing purposes",
|
||||
|
@ -21,22 +23,63 @@ More details at https://bonfirenetworks.org",
|
|||
]
|
||||
]
|
||||
],
|
||||
# TODO: make dynamic based on active extensions
|
||||
app_menu_extension_paths: %{
|
||||
"Social" => Bonfire.UI.Social.FeedsLive,
|
||||
"Breadpub" => Bonfire.Breadpub.Web.HomeLive,
|
||||
"Kanban" => Bonfire.UI.Kanban.HomeLive
|
||||
# "Coordination" => Bonfire.UI.Coordination.ProcessesLive
|
||||
},
|
||||
# TODO: make dynamic based on active extensions
|
||||
sidebar_components: [
|
||||
{Bonfire.UI.Social.SidebarNavigationLive, []}
|
||||
# {Bonfire.UI.Coordination.SidebarNavigationLive, []},
|
||||
# {Bonfire.Breadpub.SidebarNavigationLive, []},
|
||||
# {Bonfire.UI.ValueFlows.ProcessesListLive, [title: "Processes", process_url: "/process/"]},
|
||||
# {Bonfire.UI.ValueFlows.ProcessesListLive, [title: "Lists", process_url: "/breadpub/list/"]}
|
||||
],
|
||||
|
||||
# end theme
|
||||
# rich_text_editor_disabled: true,
|
||||
rich_text_editor: Bonfire.Editor.Quill,
|
||||
# rich_text_editor: Bonfire.Editor.Ck,
|
||||
# default
|
||||
font_family: "Inter (Latin Languages)",
|
||||
font_families: [
|
||||
"Inter (Latin Languages)",
|
||||
"Inter (More Languages)",
|
||||
"Noto Sans (Latin Languages)",
|
||||
"Noto Sans (More Languages)",
|
||||
"OpenDyslexic"
|
||||
],
|
||||
themes: [
|
||||
"bonfire",
|
||||
"dark",
|
||||
"synthwave",
|
||||
"retro",
|
||||
"cyberpunk",
|
||||
"valentine",
|
||||
"halloween",
|
||||
"garden",
|
||||
"forest",
|
||||
"aqua",
|
||||
"black",
|
||||
"luxury",
|
||||
"dracula",
|
||||
"business",
|
||||
"night",
|
||||
"coffee"
|
||||
],
|
||||
themes_light: [
|
||||
"light",
|
||||
"cupcake",
|
||||
"bumblebee",
|
||||
"emerald",
|
||||
"corporate",
|
||||
"retro",
|
||||
"cyberpunk",
|
||||
"valentine",
|
||||
"garden",
|
||||
"lofi",
|
||||
"pastel",
|
||||
"fantasy",
|
||||
"wireframe",
|
||||
"cmyk",
|
||||
"autumn",
|
||||
"acid",
|
||||
"lemonade",
|
||||
"winter"
|
||||
],
|
||||
show_trending_tags: [
|
||||
disabled: false,
|
||||
for_last_x_days: 30,
|
||||
limit: 8
|
||||
],
|
||||
smart_input: [
|
||||
post: true,
|
||||
cw: true,
|
||||
|
|
|
@ -7,9 +7,6 @@ config :bonfire, :ui,
|
|||
instance_image: "https://haha.academy/images/wheel.png",
|
||||
instance_description: "Community roadmaps for learning every branch of human knowledge"
|
||||
],
|
||||
sidebar_components: [
|
||||
{Bonfire.UI.Social.SidebarNavigationLive, []}
|
||||
],
|
||||
rich_text_editor: Bonfire.Editor.Quill,
|
||||
smart_input: [
|
||||
post: true,
|
||||
|
|
|
@ -15,11 +15,6 @@ config :bonfire, :ui,
|
|||
]
|
||||
]
|
||||
],
|
||||
sidebar_components: [
|
||||
{Bonfire.UI.Social.SidebarNavigationLive, []},
|
||||
{Bonfire.UI.Reflow.SidebarNavigationLive, []}
|
||||
# {Bonfire.UI.ValueFlows.ProcessesListLive, [title: "Processes", process_url: "/process/"]},
|
||||
],
|
||||
smart_input: [
|
||||
post: false,
|
||||
cw: true,
|
||||
|
|
|
@ -7,21 +7,6 @@ config :bonfire, :ui,
|
|||
instance_image: "https://bonfirenetworks.org/img/brand2.png",
|
||||
instance_description: "This is a bonfire demo instance for testing purposes"
|
||||
],
|
||||
# TODO: make dynamic based on active extensions
|
||||
app_menu_extension_paths: %{
|
||||
"Social" => Bonfire.UI.Social.FeedsLive,
|
||||
"Breadpub" => Bonfire.Breadpub.Web.HomeLive,
|
||||
"Kanban" => Bonfire.UI.Kanban.HomeLive,
|
||||
"Coordination" => Bonfire.UI.Coordination.ProcessesLive
|
||||
},
|
||||
# TODO: make dynamic based on active extensions
|
||||
sidebar_components: [
|
||||
{Bonfire.UI.Social.SidebarNavigationLive, []}
|
||||
# {Bonfire.UI.Coordination.SidebarNavigationLive, []},
|
||||
# {Bonfire.Breadpub.SidebarNavigationLive, []},
|
||||
# {Bonfire.UI.ValueFlows.ProcessesListLive, [title: "Processes", process_url: "/process/"]},
|
||||
# {Bonfire.UI.ValueFlows.ProcessesListLive, [title: "Lists", process_url: "/breadpub/list/"]}
|
||||
],
|
||||
rich_text_editor: Bonfire.Editor.Quill,
|
||||
smart_input: [
|
||||
post: true,
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
defmodule Bonfire.Web.Endpoint do
|
||||
use Bonfire.Web.EndpointTemplate
|
||||
alias Bonfire.Common.Utils
|
||||
alias Bonfire.Common.Config
|
||||
|
||||
def include_assets(conn) do
|
||||
include_assets(conn, :top)
|
||||
|
|
|
@ -1,27 +1,13 @@
|
|||
defmodule Bonfire.Web.EndpointTemplate do
|
||||
alias Bonfire.Common.Config
|
||||
|
||||
def session_options do
|
||||
# TODO: check that this is changeable at runtime
|
||||
# The session will be stored in the cookie and signed,
|
||||
# this means its contents can be read but not tampered with.
|
||||
# Set :encryption_salt if you would also like to encrypt it.
|
||||
[
|
||||
store: :cookie,
|
||||
key: "_bonfire_key",
|
||||
signing_salt: Config.get!(:signing_salt),
|
||||
encryption_salt: Config.get!(:encryption_salt),
|
||||
# 60 days by default
|
||||
max_age: Config.get(:session_time_to_remember, 60 * 60 * 24 * 60)
|
||||
]
|
||||
end
|
||||
|
||||
defmacro __using__(_) do
|
||||
quote do
|
||||
# make sure this comes before the Phoenix endpoint
|
||||
use Bonfire.ErrorReporting
|
||||
use Phoenix.Endpoint, otp_app: :bonfire
|
||||
import Bonfire.Common.Extend
|
||||
alias Bonfire.Web.EndpointTemplate
|
||||
|
||||
use_if_enabled(Absinthe.Phoenix.Endpoint)
|
||||
|
||||
|
@ -33,7 +19,7 @@ defmodule Bonfire.Web.EndpointTemplate do
|
|||
websocket: [
|
||||
connect_info: [
|
||||
:user_agent,
|
||||
session: Bonfire.Web.EndpointTemplate.session_options()
|
||||
session: EndpointTemplate.session_options()
|
||||
]
|
||||
]
|
||||
)
|
||||
|
@ -106,9 +92,24 @@ defmodule Bonfire.Web.EndpointTemplate do
|
|||
|
||||
plug(Plug.MethodOverride)
|
||||
plug(Plug.Head)
|
||||
plug(Plug.Session, Bonfire.Web.EndpointTemplate.session_options())
|
||||
plug(Plug.Session, EndpointTemplate.session_options())
|
||||
|
||||
plug(Bonfire.Web.Router)
|
||||
end
|
||||
end
|
||||
|
||||
def session_options do
|
||||
# TODO: check that this is changeable at runtime
|
||||
# The session will be stored in the cookie and signed,
|
||||
# this means its contents can be read but not tampered with.
|
||||
# Set :encryption_salt if you would also like to encrypt it.
|
||||
[
|
||||
store: :cookie,
|
||||
key: "_bonfire_key",
|
||||
signing_salt: Config.get!(:signing_salt),
|
||||
encryption_salt: Config.get!(:encryption_salt),
|
||||
# 60 days by default
|
||||
max_age: Config.get(:session_time_to_remember, 60 * 60 * 24 * 60)
|
||||
]
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue