Compare commits
10 Commits
b7fa4b012a
...
v0.8.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f3b9f176e
|
||
| 822ae2f945 | |||
|
|
96c669ab4e
|
||
|
|
558100c35e
|
||
|
|
6739b38f4c
|
||
| 7e1272c936 | |||
|
|
ecdeb4c122
|
||
|
|
8614e2f12b
|
||
|
|
a038a857d9
|
||
|
|
eee81d0cf1
|
@@ -22,6 +22,8 @@ WEBHOOKS_ALLOWED_IPS='10.1.1.163'
|
|||||||
DISCOURSE_PUBLIC_URL='https://community.kosmos.org'
|
DISCOURSE_PUBLIC_URL='https://community.kosmos.org'
|
||||||
DISCOURSE_CONNECT_SECRET='discourse_connect_ftw'
|
DISCOURSE_CONNECT_SECRET='discourse_connect_ftw'
|
||||||
|
|
||||||
|
DRONECI_PUBLIC_URL='https://drone.kosmos.org'
|
||||||
|
|
||||||
GITEA_PUBLIC_URL='https://gitea.kosmos.org'
|
GITEA_PUBLIC_URL='https://gitea.kosmos.org'
|
||||||
MASTODON_PUBLIC_URL='https://kosmos.social'
|
MASTODON_PUBLIC_URL='https://kosmos.social'
|
||||||
MEDIAWIKI_PUBLIC_URL='https://wiki.kosmos.org'
|
MEDIAWIKI_PUBLIC_URL='https://wiki.kosmos.org'
|
||||||
|
|||||||
@@ -9,6 +9,6 @@ class Services::MastodonController < Services::BaseController
|
|||||||
private
|
private
|
||||||
|
|
||||||
def require_service_available
|
def require_service_available
|
||||||
http_status :not_found unless Setting.ejabberd_enabled?
|
http_status :not_found unless Setting.mastodon_enabled?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -51,6 +51,16 @@ class Setting < RailsSettings::Base
|
|||||||
field :discourse_connect_secret, type: :string,
|
field :discourse_connect_secret, type: :string,
|
||||||
default: ENV["DISCOURSE_CONNECT_SECRET"].presence
|
default: ENV["DISCOURSE_CONNECT_SECRET"].presence
|
||||||
|
|
||||||
|
#
|
||||||
|
# Drone CI
|
||||||
|
#
|
||||||
|
|
||||||
|
field :droneci_public_url, type: :string,
|
||||||
|
default: ENV["DRONECI_PUBLIC_URL"].presence
|
||||||
|
|
||||||
|
field :droneci_enabled, type: :boolean,
|
||||||
|
default: (ENV["DRONECI_PUBLIC_URL"].present?.to_s || false)
|
||||||
|
|
||||||
#
|
#
|
||||||
# ejabberd
|
# ejabberd
|
||||||
#
|
#
|
||||||
|
|||||||
16
app/views/admin/settings/services/_droneci.html.erb
Normal file
16
app/views/admin/settings/services/_droneci.html.erb
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<h3>Drone CI</h3>
|
||||||
|
<ul role="list">
|
||||||
|
<%= render FormElements::FieldsetToggleComponent.new(
|
||||||
|
form: f,
|
||||||
|
attribute: :droneci_enabled,
|
||||||
|
enabled: Setting.droneci_enabled?,
|
||||||
|
title: "Enable Drone CI integration",
|
||||||
|
description: "Drone CI configuration present and features enabled"
|
||||||
|
) %>
|
||||||
|
<% if Setting.droneci_enabled? %>
|
||||||
|
<%= render FormElements::FieldsetResettableSettingComponent.new(
|
||||||
|
key: :droneci_public_url,
|
||||||
|
title: "Public URL"
|
||||||
|
) %>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
@@ -7,73 +7,85 @@
|
|||||||
services:
|
services:
|
||||||
</p>
|
</p>
|
||||||
<div class="services grid grid-cols-1 sm:grid-cols-2 gap-4 sm:gap-6">
|
<div class="services grid grid-cols-1 sm:grid-cols-2 gap-4 sm:gap-6">
|
||||||
<div class="border border-gray-300 rounded-md hover:border-gray-400
|
<% if Setting.ejabberd_enabled? %>
|
||||||
bg-cover bg-[center_top_-50px] bg-no-repeat
|
<div class="border border-gray-300 rounded-md hover:border-gray-400
|
||||||
bg-[url(/img/logos/icon_xmpp.svg)]">
|
bg-cover bg-[center_top_-50px] bg-no-repeat
|
||||||
<%= link_to services_chat_path,
|
bg-[url(/img/logos/icon_xmpp.svg)]">
|
||||||
class: "block h-full px-6 py-6 rounded-md" do %>
|
<%= link_to services_chat_path,
|
||||||
<h3 class="mb-3.5">Chat</h3>
|
class: "block h-full px-6 py-6 rounded-md" do %>
|
||||||
<p class="text-gray-600">
|
<h3 class="mb-3.5">Chat</h3>
|
||||||
Federated chat rooms and instant messaging
|
<p class="text-gray-600">
|
||||||
</p>
|
Federated chat rooms and instant messaging
|
||||||
<% end %>
|
</p>
|
||||||
</div>
|
<% end %>
|
||||||
<div class="border border-gray-300 rounded-md hover:border-gray-400
|
</div>
|
||||||
bg-[length:95%] bg-center bg-no-repeat
|
<% end %>
|
||||||
bg-[url(/img/logos/icon_discourse.svg)]">
|
<% if Setting.mastodon_enabled? %>
|
||||||
<%= link_to "#{Setting.discourse_public_url}/session/sso?return_path=/",
|
<div class="border border-gray-300 rounded-md hover:border-gray-400
|
||||||
class: "block h-full px-6 py-6 rounded-md" do %>
|
bg-[length:80%] bg-[right_top_-30px] bg-no-repeat
|
||||||
<h3 class="mb-3.5">Discourse</h3>
|
bg-[url(/img/logos/icon_mastodon.svg)]">
|
||||||
<p class="text-gray-600">
|
<%= link_to services_mastodon_path, class: "block h-full px-6 py-6 rounded-md" do %>
|
||||||
Kosmos community forums and user support/help site
|
<h3 class="mb-3.5">Mastodon</h3>
|
||||||
</p>
|
<p class="text-gray-600">
|
||||||
<% end %>
|
Your account on the Open Social Web
|
||||||
</div>
|
</p>
|
||||||
<div class="border border-gray-300 rounded-md hover:border-gray-400
|
<% end %>
|
||||||
bg-cover bg-[center_top_-20px] bg-no-repeat
|
</div>
|
||||||
bg-[url(/img/logos/icon_mediawiki.svg)]">
|
<% end %>
|
||||||
<%= link_to "https://wiki.kosmos.org",
|
<% if Setting.discourse_enabled? %>
|
||||||
class: "block h-full px-6 py-6 rounded-md" do %>
|
<div class="border border-gray-300 rounded-md hover:border-gray-400
|
||||||
<h3 class="mb-3.5">Wiki</h3>
|
bg-[length:95%] bg-center bg-no-repeat
|
||||||
<p class="text-gray-600">
|
bg-[url(/img/logos/icon_discourse.svg)]">
|
||||||
Kosmos documentation and knowledge base
|
<%= link_to "#{Setting.discourse_public_url}/session/sso?return_path=/",
|
||||||
</p>
|
class: "block h-full px-6 py-6 rounded-md" do %>
|
||||||
<% end %>
|
<h3 class="mb-3.5">Discourse</h3>
|
||||||
</div>
|
<p class="text-gray-600">
|
||||||
<div class="border border-gray-300 rounded-md hover:border-gray-400
|
Kosmos community forums and user support/help site
|
||||||
bg-cover bg-center sm:bg-[center_top_-140px] bg-no-repeat
|
</p>
|
||||||
bg-[url(/img/logos/icon_lightning.svg)]">
|
<% end %>
|
||||||
<%= link_to services_lightning_index_path,
|
</div>
|
||||||
class: "block h-full px-6 py-6 rounded-md" do %>
|
<% end %>
|
||||||
<h3 class="mb-3.5">Lightning Network</h3>
|
<% if Setting.lndhub_enabled? %>
|
||||||
<p class="text-gray-600">
|
<div class="border border-gray-300 rounded-md hover:border-gray-400
|
||||||
Send and receive sats over the Bitcoin Lightning Network
|
bg-cover bg-center sm:bg-[center_top_-140px] bg-no-repeat
|
||||||
</p>
|
bg-[url(/img/logos/icon_lightning.svg)]">
|
||||||
<% end %>
|
<%= link_to services_lightning_index_path,
|
||||||
</div>
|
class: "block h-full px-6 py-6 rounded-md" do %>
|
||||||
<div class="border border-gray-300 rounded-md hover:border-gray-400
|
<h3 class="mb-3.5">Lightning Network</h3>
|
||||||
bg-cover bg-center bg-no-repeat
|
<p class="text-gray-600">
|
||||||
bg-[url(/img/logos/icon_gitea.png)]">
|
Send and receive sats over the Bitcoin Lightning Network
|
||||||
<%= link_to "https://gitea.kosmos.org",
|
</p>
|
||||||
class: "block h-full px-6 py-6 rounded-md" do %>
|
<% end %>
|
||||||
<h3 class="mb-3.5">Gitea</h3>
|
</div>
|
||||||
<p class="text-gray-600">
|
<% end %>
|
||||||
Code hosting and collaboration for software projects
|
<% if Setting.gitea_enabled? %>
|
||||||
</p>
|
<div class="border border-gray-300 rounded-md hover:border-gray-400
|
||||||
<% end %>
|
bg-cover bg-center bg-no-repeat
|
||||||
</div>
|
bg-[url(/img/logos/icon_gitea.png)]">
|
||||||
<div class="border border-gray-300 rounded-md hover:border-gray-400
|
<%= link_to Setting.gitea_public_url,
|
||||||
bg-cover bg-[center_top_-70px] bg-no-repeat
|
class: "block h-full px-6 py-6 rounded-md" do %>
|
||||||
bg-[url(/img/logos/icon_droneci.svg)]">
|
<h3 class="mb-3.5">Gitea</h3>
|
||||||
<%= link_to "https://drone.kosmos.org",
|
<p class="text-gray-600">
|
||||||
class: "block h-full px-6 py-6 rounded-md" do %>
|
Code hosting and collaboration for software projects
|
||||||
<h3 class="mb-3.5">Drone CI</h3>
|
</p>
|
||||||
<p class="text-gray-600">
|
<% end %>
|
||||||
Continuous integration for software projects on Gitea
|
</div>
|
||||||
</p>
|
<% end %>
|
||||||
<% end %>
|
<% if Setting.droneci_enabled? %>
|
||||||
</div>
|
<div class="border border-gray-300 rounded-md hover:border-gray-400
|
||||||
<% if Setting.remotestorage_enabled? && Flipper.enabled?(:remotestorage, current_user) %>
|
bg-cover bg-[center_top_-70px] bg-no-repeat
|
||||||
|
bg-[url(/img/logos/icon_droneci.svg)]">
|
||||||
|
<%= link_to Setting.droneci_public_url,
|
||||||
|
class: "block h-full px-6 py-6 rounded-md" do %>
|
||||||
|
<h3 class="mb-3.5">Drone CI</h3>
|
||||||
|
<p class="text-gray-600">
|
||||||
|
Continuous integration for software projects on Gitea
|
||||||
|
</p>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% if Setting.remotestorage_enabled? &&
|
||||||
|
Flipper.enabled?(:remotestorage, current_user) %>
|
||||||
<div class="border border-gray-300 rounded-md hover:border-gray-400">
|
<div class="border border-gray-300 rounded-md hover:border-gray-400">
|
||||||
<%= link_to services_storage_path,
|
<%= link_to services_storage_path,
|
||||||
class: "block h-full px-6 py-6 rounded-md" do %>
|
class: "block h-full px-6 py-6 rounded-md" do %>
|
||||||
@@ -84,16 +96,19 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<!-- <div class="border border-gray-300 rounded-md hover:border-gray-400 -->
|
<% if Setting.mediawiki_enabled? %>
|
||||||
<!-- bg-[length:80%] bg-[right_top_-30px] bg-no-repeat -->
|
<div class="border border-gray-300 rounded-md hover:border-gray-400
|
||||||
<!-- bg-[url(/img/logos/icon_mastodon.svg)]"> -->
|
bg-cover bg-[center_top_-20px] bg-no-repeat
|
||||||
<!-- <%= link_to "https://kosmos.social", class: "block h-full px-6 py-6 rounded-md" do %> -->
|
bg-[url(/img/logos/icon_mediawiki.svg)]">
|
||||||
<!-- <h3 class="mb-3.5">Mastodon</h3> -->
|
<%= link_to Setting.mediawiki_public_url,
|
||||||
<!-- <p class="text-gray-400"> -->
|
class: "block h-full px-6 py-6 rounded-md" do %>
|
||||||
<!-- Your account on the Open Social Web -->
|
<h3 class="mb-3.5">Wiki</h3>
|
||||||
<!-- </p> -->
|
<p class="text-gray-600">
|
||||||
<!-- <% end %> -->
|
Kosmos documentation and knowledge base
|
||||||
<!-- </div> -->
|
</p>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -36,8 +36,8 @@
|
|||||||
<h3>Social Apps</h3>
|
<h3>Social Apps</h3>
|
||||||
<p>
|
<p>
|
||||||
Use your Mastodon account with many different apps, and on any devices
|
Use your Mastodon account with many different apps, and on any devices
|
||||||
you wish! When adding your account to an app, you will log in via <a
|
you wish! When adding your account to an app, you will log in via
|
||||||
href="https://kosmos.social">kosmos.social</a>.
|
<a href="https://kosmos.social" target="_blank" class="ks-text-link">kosmos.social</a>.
|
||||||
</p>
|
</p>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
|
|||||||
@@ -5,6 +5,13 @@
|
|||||||
icon: Setting.discourse_enabled? ? "check" : "x",
|
icon: Setting.discourse_enabled? ? "check" : "x",
|
||||||
active: current_page?(admin_settings_services_path(params: { s: "discourse" })),
|
active: current_page?(admin_settings_services_path(params: { s: "discourse" })),
|
||||||
) %>
|
) %>
|
||||||
|
<%= render SidenavLinkComponent.new(
|
||||||
|
level: 2,
|
||||||
|
name: "Drone CI",
|
||||||
|
path: admin_settings_services_path(params: { s: "droneci" }),
|
||||||
|
icon: Setting.droneci_enabled? ? "check" : "x",
|
||||||
|
active: current_page?(admin_settings_services_path(params: { s: "droneci" })),
|
||||||
|
) %>
|
||||||
<%= render SidenavLinkComponent.new(
|
<%= render SidenavLinkComponent.new(
|
||||||
level: 2,
|
level: 2,
|
||||||
name: "ejabberd",
|
name: "ejabberd",
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
class CreateRemoteStorageAuthorizations < ActiveRecord::Migration[7.0]
|
class CreateRemoteStorageAuthorizations < ActiveRecord::Migration[7.0]
|
||||||
def change
|
def change
|
||||||
|
db_type = ActiveRecord::Base.configurations.find_db_config(Rails.env).adapter
|
||||||
|
array_default = db_type == "postgresql" ? [] : [].to_yaml
|
||||||
|
|
||||||
create_table :remote_storage_authorizations do |t|
|
create_table :remote_storage_authorizations do |t|
|
||||||
t.references :user, null: false, foreign_key: true
|
t.references :user, null: false, foreign_key: true
|
||||||
t.string :token
|
t.string :token
|
||||||
t.text :permissions, array: true, default: [].to_yaml
|
t.text :permissions, array: true, default: array_default
|
||||||
t.string :client_id
|
t.string :client_id
|
||||||
t.string :redirect_uri
|
t.string :redirect_uri
|
||||||
t.string :app_name
|
t.string :app_name
|
||||||
|
|||||||
@@ -84,13 +84,12 @@ ActiveRecord::Schema[7.0].define(version: 2023_05_23_120753) do
|
|||||||
t.datetime "confirmed_at", precision: nil
|
t.datetime "confirmed_at", precision: nil
|
||||||
t.datetime "confirmation_sent_at", precision: nil
|
t.datetime "confirmation_sent_at", precision: nil
|
||||||
t.string "unconfirmed_email"
|
t.string "unconfirmed_email"
|
||||||
t.text "ln_login_ciphertext"
|
|
||||||
t.text "ln_password_ciphertext"
|
t.text "ln_password_ciphertext"
|
||||||
t.string "ln_account"
|
t.string "ln_account"
|
||||||
|
t.string "nostr_pubkey"
|
||||||
t.datetime "remember_created_at"
|
t.datetime "remember_created_at"
|
||||||
t.string "remember_token"
|
t.string "remember_token"
|
||||||
t.text "preferences"
|
t.text "preferences"
|
||||||
t.string "nostr_pubkey"
|
|
||||||
t.index ["email"], name: "index_users_on_email", unique: true
|
t.index ["email"], name: "index_users_on_email", unique: true
|
||||||
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
|
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
"postcss-preset-env": "^7.8.3",
|
"postcss-preset-env": "^7.8.3",
|
||||||
"tailwindcss": "^3.2.4"
|
"tailwindcss": "^3.2.4"
|
||||||
},
|
},
|
||||||
"version": "0.7.0",
|
"version": "0.8.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:css:tailwind": "tailwindcss --postcss -i ./app/assets/stylesheets/application.tailwind.css -o ./app/assets/builds/application.css",
|
"build:css:tailwind": "tailwindcss --postcss -i ./app/assets/stylesheets/application.tailwind.css -o ./app/assets/builds/application.css",
|
||||||
"build:css": "yarn run build:css:tailwind"
|
"build:css": "yarn run build:css:tailwind"
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ RSpec.describe CreateLndhubAccountJob, type: :job do
|
|||||||
|
|
||||||
context "with existing credentials stored" do
|
context "with existing credentials stored" do
|
||||||
before do
|
before do
|
||||||
user.ln_login = "foo"
|
user.ln_account = "foo"
|
||||||
user.ln_password = "bar"
|
user.ln_password = "bar"
|
||||||
user.save!
|
user.save!
|
||||||
end
|
end
|
||||||
@@ -36,7 +36,7 @@ RSpec.describe CreateLndhubAccountJob, type: :job do
|
|||||||
expect(WebMock).to_not have_requested(:post, "http://localhost:3023/create")
|
expect(WebMock).to_not have_requested(:post, "http://localhost:3023/create")
|
||||||
|
|
||||||
user.reload
|
user.reload
|
||||||
expect(user.ln_login).to eq("foo")
|
expect(user.ln_account).to eq("foo")
|
||||||
expect(user.ln_password).to eq("bar")
|
expect(user.ln_password).to eq("bar")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user