diff --git a/app/controllers/services/chat_controller.rb b/app/controllers/services/chat_controller.rb new file mode 100644 index 0000000..dfc69e3 --- /dev/null +++ b/app/controllers/services/chat_controller.rb @@ -0,0 +1,14 @@ +class Services::ChatController < Services::BaseController + before_action :authenticate_user! + before_action :require_service_available + + def show + @service_enabled = current_user.services_enabled.include?(:xmpp) + end + + private + + def require_service_available + http_status :not_found unless Setting.ejabberd_enabled? + end +end diff --git a/app/javascript/controllers/application.js b/app/javascript/controllers/application.js index 97645a6..f93adf1 100644 --- a/app/javascript/controllers/application.js +++ b/app/javascript/controllers/application.js @@ -1,9 +1,10 @@ import { Application } from "@hotwired/stimulus" -import { Modal } from "tailwindcss-stimulus-components" +import { Modal, Tabs } from "tailwindcss-stimulus-components" const application = Application.start() application.register('modal', Modal) +application.register('tabs', Tabs) // Configure Stimulus development experience application.debug = false diff --git a/app/views/dashboard/index.html.erb b/app/views/dashboard/index.html.erb index 590361b..a1ac038 100644 --- a/app/views/dashboard/index.html.erb +++ b/app/views/dashboard/index.html.erb @@ -10,7 +10,7 @@
diff --git a/app/views/services/chat/show.html.erb b/app/views/services/chat/show.html.erb
new file mode 100644
index 0000000..4e26dd6
--- /dev/null
+++ b/app/views/services/chat/show.html.erb
@@ -0,0 +1,98 @@
+<%= render HeaderComponent.new(title: "Chat") %>
+
+<%= render MainSimpleComponent.new do %>
+
+ Chat with anyone on the open Jabber network. Message people directly, or
+ join public channels or private rooms.
+
+ When you exchange contacts with people, give them your
+ address, or add them using their address:
+
+ disabled="disabled"
+ data-clipboard-target="source" />
+
+
+ Use your Kosmos account with many different apps, and on any devices
+ you wish! When opening an app for the first time, just enter your
+ user address and password to log in.
+ Your Chat Address
+ Chat Apps
+ Recommended Apps
+
+
+
+