Skip to content

Commit

Permalink
add infinity_one_pages package
Browse files Browse the repository at this point in the history
  • Loading branch information
smpallen99 committed Apr 2, 2018
1 parent ff199f2 commit c5944b9
Show file tree
Hide file tree
Showing 14 changed files with 198 additions and 16 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# InfinityOne Changelog

## 1.0.0.beta10 (2018-04-02)

### Enhancements

* Add InfinityOnePages package including download desktop app support
* Update the default home page default text
* Support markdown for home page text entry

### Bug Fixes


## 1.0.0.beta9 (2018-03-28)

### Enhancements
Expand Down
46 changes: 39 additions & 7 deletions assets/brunch-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,17 @@ exports.config = {
joinTo: {
"js/app.js": /^(js|..\/deps|node_modules)/,
"js/landing.js": /^(landing_js|..\/deps|node_modules)/,
"js/help.js": /^(help_js|..\/deps|node_modules)/,
// "js/help.js": /^(help_js|..\/deps|node_modules)/,
"js/adapter.js": ["vendor/adapter.js"],
"js/textarea-autogrow.js": ["vendor/textarea-autogrow.js"]
"js/header.js": ["vendor/header.js"],
"js/textarea-autogrow.js": ["vendor/textarea-autogrow.js"],
"js/infinity_one_pages.js": [
"node_modules/infinity_one_pages/priv/dist/js/infinity_one_pages.js",
"node_modules/infinity_one_pages/priv/dist/js/help.js",
],
"js/infinity_one_pages_vendor.js": [
"node_modules/infinity_one_pages/priv/dist/js/infinity_one_pages_vendor.js"
]
// "js/vendor.js": /^(web\/static\/vendor)|(deps)/
},
//
Expand All @@ -38,7 +46,10 @@ exports.config = {
"css/channel_settings.css": ["scss/channel_settings.scss"],
"css/help.css": ["scss/help.scss", "scss/components.scss"],
"css/toastr.css": ["css/toastr.css"],
"css/emojipicker.css": ["vendor/emojiPicker.css"]
"css/emojipicker.css": ["vendor/emojiPicker.css"],
"css/infinity_one_pages.css": [
"../deps/infinity_one_pages/priv/dist/css/infinity_one_pages.css"
]
// "css/toastr.css": ["web/static/scss/toastr.scss"]
},
order: {
Expand All @@ -55,13 +66,25 @@ exports.config = {
// This option sets where we should place non-css and non-js assets in.
// By default, we set this to "/assets/static". Files in this directory
// will be copied to `paths.public`, which is "priv/static" by default.
assets: /^(static)/
assets: [
/^(static)/,
/^(node_modules\/infinity_one_pages)/,
]
},

// Phoenix paths configuration
paths: {
// Dependencies and current project directories to watch
watched: ["static", "fonts", "css", "js", "help_js", "vendor", "scss", "../plugins/one_admin/priv/static"],
watched: [
"static",
"fonts",
"css",
"js",
"help_js",
"vendor",
"scss", "../plugins/one_admin/priv/static",
"node_modules/infinity_one_pages/priv/dist/js"
],
// Where to compile files to
public: "../priv/static"
},
Expand All @@ -86,12 +109,20 @@ exports.config = {
coffeescript: {
// bare: true
},
copycat: {
"fonts": ["node_modules/infinity_one_pages/priv/dist/fonts"],
"images": ["node_modules/infinity_one_pages/priv/dist/images"],
// "js": ["node_modules/infinity_one_pages/priv/dist/js"],
"css": ["node_modules/infinity_one_pages/priv/dist/css"],
verbose: false,
onlyChanged: true
},
},

modules: {
autoRequire: {
"js/app.js": ["js/app"],
"js/help.js": ["help_js/help"]
"js/help.js": ["help_js/help"],
}
},

Expand All @@ -101,7 +132,8 @@ exports.config = {
styles: {
// toastr: ["toastr.css"],
"highlight.js": ['styles/solarized-dark.css'],
sweetalert: ['dist/sweetalert.css']
sweetalert: ['dist/sweetalert.css'],
infinity_one_pages: ['css/infinity_one_pages.css']
// one_admin: ['priv/static/one_admin.scss'] // this isn't working
// emojionearea: ['dist/emojionearea.min.css']
// emojipicker: ['dist/emojipicker.css']
Expand Down
57 changes: 57 additions & 0 deletions assets/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"license": "MIT",
"scripts": {
"deploy": "brunch build --production",
"watch": "brunch watch --stdin"
"watch": "brunch watch --stdin",
"build": "brunch build"
},
"dependencies": {
"bourbon": "^4.3.4",
Expand All @@ -14,6 +15,7 @@
"perfect-scrollbar": "^1.3.0",
"phoenix": "file:../deps/phoenix",
"phoenix_html": "file:../deps/phoenix_html",
"infinity_one_pages": "file:../deps/infinity_one_pages",
"sweetalert": "^1.1.3",
"toastr": "^2.1.2",
"underscore": "^1.8.3"
Expand All @@ -22,6 +24,7 @@
"autoprefixer": "^6.3.6",
"babel-brunch": "^6",
"brunch": "^2",
"copycat-brunch": "^1.1.0",
"clean-css-brunch": "^2",
"coffee-script-brunch": "^2",
"css-brunch": "^2",
Expand Down
1 change: 1 addition & 0 deletions assets/help_js/header.js → assets/vendor/header.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
$(function () {
console.log('header running....');
$('.portico-header a .logout').on('click', function () {
$('#logout_form').submit();
return false;
Expand Down
5 changes: 5 additions & 0 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ config :infinity_one, :generators,
migration: true,
binary_id: true

config :infinity_one_pages,
standalone: false,
repo: InfinityOne.Repo,
endpoint: InfinityOneWeb.Endpoint,
deps_path: Mix.Project.deps_path() <> "/infinity_one_pages"
# sample_binary_id: "11111111-1111-1111-1111-111111111111"

# The example below replaces [UCX-123] with
Expand Down
2 changes: 1 addition & 1 deletion lib/infinity_one/ucc_model.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule OneModel do
defmodule OneModelOld do
@moduledoc """
Model abstraction for InfinityOne.
Expand Down
11 changes: 9 additions & 2 deletions lib/infinity_one_web/router.ex
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
defmodule InfinityOneWeb.Router do
use InfinityOneWeb, :router
use InfinityOnePagesWeb.Router
use Coherence.Router

pipeline :browser do
Expand Down Expand Up @@ -29,11 +30,17 @@ defmodule InfinityOneWeb.Router do
scope "/", InfinityOneWeb do
pipe_through(:browser)
get("/landing", LandingController, :index)
get("/help", HelpController, :index)
get("/help/:id", HelpController, :show)
# get("/help", HelpController, :index)
# get("/help/:id", HelpController, :show)
coherence_routes()
end

scope "/", InfinityOnePagesWeb do
pipe_through :browser

infinity_one_pages_routes()
end

scope "/", InfinityOneWeb do
pipe_through(:protected)

Expand Down
7 changes: 5 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ defmodule InfinityOne.Mixfile do
# {:phoenix, "~> 1.3.0-rc"},
{:phoenix_pubsub, "~> 1.0"},
{:phoenix_ecto, "~> 3.2"},
{:mariaex, ">= 0.0.0", only: [:dev, :prod]},
{:mariaex, ">= 0.0.0", only: [:dev, :prod], override: true},
{:phoenix_html, "~> 2.10"},
{:phoenix_live_reload, "~> 1.0", only: :dev},
{:gettext, "~> 0.13"},
Expand Down Expand Up @@ -123,7 +123,10 @@ defmodule InfinityOne.Mixfile do
# {:scrivener_ecto, path: "../scrivener_ecto"}
{:scrivener_ecto, github: "smpallen99/scrivener_ecto"},
{:ex_doc, "~> 0.18", only: :dev},
{:briefly, "~> 0.3"}
{:briefly, "~> 0.3"},
{:one_model, github: "infinityoneframework/one_model"},
{:infinity_one_pages, github: "infinityoneframework/infinity_one_pages", branch: "integrate"}
# {:infinity_one_pages, path: "../infinity_one_pages"},
] ++ plugin_deps()
end

Expand Down
2 changes: 2 additions & 0 deletions mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"hedwig_simple_responders": {:git, "https://github.com/smpallen99/hedwig_simple_responders.git", "abc3811f72f569ab9a432233764ef052fa9cb3c0", []},
"httpoison": {:hex, :httpoison, "0.13.0", "bfaf44d9f133a6599886720f3937a7699466d23bb0cd7a88b6ba011f53c6f562", [:mix], [{:hackney, "~> 1.8", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm"},
"idna": {:hex, :idna, "5.1.0", "d72b4effeb324ad5da3cab1767cb16b17939004e789d8c0ad5b70f3cea20c89a", [:rebar3], [{:unicode_util_compat, "0.3.1", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm"},
"infinity_one_pages": {:git, "https://github.com/infinityoneframework/infinity_one_pages.git", "52ed251e1ddb3a795969a35d17b08205d7055006", [branch: "integrate"]},
"inflex": {:hex, :inflex, "1.9.0", "2bef01a84437bca0a12fc107821ae7771b0ba847dccab5d1cd61f35972e66813", [:mix], [], "hexpm"},
"jsx": {:hex, :jsx, "2.8.3", "a05252d381885240744d955fbe3cf810504eb2567164824e19303ea59eef62cf", [:mix, :rebar3], [], "hexpm"},
"lager": {:git, "git://github.com/basho/lager.git", "b6b6cebcb27ccff8acc59ae775acebc2f52e4926", [tag: "2.0.3"]},
Expand All @@ -63,6 +64,7 @@
"mochiweb_html": {:hex, :mochiweb_html, "2.15.0", "d7402e967d7f9f2912f8befa813c37be62d5eeeddbbcb6fe986c44e01460d497", [:rebar3], [], "hexpm"},
"mogrify": {:hex, :mogrify, "0.5.6", "8ba04d4204f7149fac4ca302ca37aeb1550074958bed9fa892fdf6cd46806082", [:mix], [], "hexpm"},
"neotoma": {:hex, :neotoma, "1.7.3", "d8bd5404b73273989946e4f4f6d529e5c2088f5fa1ca790b4dbe81f4be408e61", [:rebar], [], "hexpm"},
"one_model": {:git, "https://github.com/infinityoneframework/one_model.git", "2705d527f9aaf898e7d44a256d97b669c3fd4343", []},
"parse_trans": {:git, "git://github.com/uwiger/parse_trans.git", "82cc00264aa1bad8fc5c0739b7541feb4a843432", [tag: "2.9"]},
"phoenix": {:hex, :phoenix, "1.3.2", "2a00d751f51670ea6bc3f2ba4e6eb27ecb8a2c71e7978d9cd3e5de5ccf7378bd", [:mix], [{:cowboy, "~> 1.0", [hex: :cowboy, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 1.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:plug, "~> 1.3.3 or ~> 1.4", [hex: :plug, repo: "hexpm", optional: false]}, {:poison, "~> 2.2 or ~> 3.0", [hex: :poison, repo: "hexpm", optional: false]}], "hexpm"},
"phoenix_ecto": {:hex, :phoenix_ecto, "3.3.0", "702f6e164512853d29f9d20763493f2b3bcfcb44f118af2bc37bb95d0801b480", [:mix], [{:ecto, "~> 2.1", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.9", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm"},
Expand Down
21 changes: 19 additions & 2 deletions plugins/one_chat/lib/one_chat/settings/schema/layout.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ defmodule OneChat.Settings.Schema.Layout do
@primary_key {:id, :binary_id, autogenerate: true}
@foreign_key_type :binary_id

@content_home_body_default """
# Welcome to InfinityOne
InfinityOne is your one-stop location of all your communication needs.
Click on one of the Rooms listed on the left navigation panel to get started.
Access InfinityOne in your browser, or download [The Desktop App](/apps) for an even better experience!
## Helpful Links
* [Desktop Apps](/apps)
* [InfinityOne Overview](/pages)
* [Features](/features)
"""

schema "settings_layout" do
field :display_roles, :boolean, default: true
field :merge_private_groups, :boolean, default: true
Expand All @@ -14,8 +30,7 @@ defmodule OneChat.Settings.Schema.Layout do
"'Segoe UI Emoji', 'Segoe UI Symbol', 'Meiryo UI'"
field :content_home_title, :string, default: "Home"
field :content_home_body, :string,
default: "Welcome to Ucx Chat <br> Go to APP SETTINGS -> Layout" <>
" to customize this intro."
default: @content_home_body_default
field :content_side_nav_footer, :string,
default: ~s(<img src="/images/logo.png" />)
end
Expand All @@ -34,4 +49,6 @@ defmodule OneChat.Settings.Schema.Layout do
struct
|> cast(params, @fields)
end

def content_home_body_default, do: @content_home_body_default
end
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
i
h2
.room-title= OneSettings.content_home_title()
.content= raw OneSettings.content_home_body()
.content.markdown-body
= raw Earmark.as_html!(OneSettings.content_home_body())

div.main-content-cache.hidden
= render OneChatWeb.SideNavView, "show.html", conn: @conn, chatd: @chatd
Expand Down
22 changes: 22 additions & 0 deletions priv/repo/migrations/20180330014259_create_app_versions.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
defmodule InfinityOnePages.Repo.Migrations.CreateAppVersions do
use Ecto.Migration

def change do
create table(:app_versions, primary_key: false) do
add :id, :binary_id, primary_key: true
add :url, :string
add :assets_url, :string
add :html_url, :string
add :git_id, :integer
add :tag_name, :string
add :name, :string
add :draft, :boolean, default: false, null: false
add :prerelease, :boolean, default: false, null: false
add :body, :text

timestamps()
end

unique_index(:app_versions, [:name])
end
end
Loading

0 comments on commit c5944b9

Please sign in to comment.