Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2fff2d7e09
|
||
|
|
b62d5a6035
|
||
|
|
455bf93c81
|
||
|
|
939f447eae
|
||
|
|
7b1f33abd0
|
No files matched your search
@@ -43,6 +43,7 @@ gem 'flipper-ui'
|
|||||||
gem 'gpgme', '~> 2.0.24'
|
gem 'gpgme', '~> 2.0.24'
|
||||||
gem 'zbase32', '~> 0.1.1'
|
gem 'zbase32', '~> 0.1.1'
|
||||||
gem 'kramdown'
|
gem 'kramdown'
|
||||||
|
gem 'kramdown-parser-gfm'
|
||||||
gem 'device_detector'
|
gem 'device_detector'
|
||||||
|
|
||||||
# HTTP requests
|
# HTTP requests
|
||||||
|
|||||||
@@ -561,6 +561,7 @@ DEPENDENCIES
|
|||||||
importmap-rails
|
importmap-rails
|
||||||
jbuilder (~> 2.15)
|
jbuilder (~> 2.15)
|
||||||
kramdown
|
kramdown
|
||||||
|
kramdown-parser-gfm
|
||||||
letter_opener
|
letter_opener
|
||||||
letter_opener_web
|
letter_opener_web
|
||||||
listen (~> 3.2)
|
listen (~> 3.2)
|
||||||
|
|||||||
@@ -3,5 +3,11 @@ class DashboardController < ApplicationController
|
|||||||
|
|
||||||
def index
|
def index
|
||||||
@current_section = :services
|
@current_section = :services
|
||||||
|
@storage_path =
|
||||||
|
if Setting.remotestorage_enabled? && current_user.remote_storage_authorizations.exists?
|
||||||
|
apps_services_storage_path
|
||||||
|
else
|
||||||
|
services_storage_path
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
<div class="border border-gray-300 rounded-md hover:border-gray-400
|
<div class="border border-gray-300 rounded-md hover:border-gray-400
|
||||||
bg-[length:80%] bg-[center_top_-156px] bg-no-repeat
|
bg-[length:80%] bg-[center_top_-156px] bg-no-repeat
|
||||||
bg-[url(/img/logos/icon_remotestorage.svg)]">
|
bg-[url(/img/logos/icon_remotestorage.svg)]">
|
||||||
<%= link_to services_storage_path,
|
<%= link_to @storage_path,
|
||||||
class: "block h-full px-6 py-6 rounded-md btn-text-dark" do %>
|
class: "block h-full px-6 py-6 rounded-md btn-text-dark" do %>
|
||||||
<h3 class="mb-3.5">Storage</h3>
|
<h3 class="mb-3.5">Storage</h3>
|
||||||
<p class="text-gray-600">
|
<p class="text-gray-600">
|
||||||
|
|||||||
+2
-1
@@ -97,7 +97,7 @@ services:
|
|||||||
GARAGE_DEFAULT_BUCKET: remotestorage
|
GARAGE_DEFAULT_BUCKET: remotestorage
|
||||||
|
|
||||||
liquor-cabinet:
|
liquor-cabinet:
|
||||||
image: gitea.kosmos.org/5apps/liquor-cabinet:2.0.0-rc.1
|
image: gitea.kosmos.org/5apps/liquor-cabinet:2.0.0-rc.2
|
||||||
networks:
|
networks:
|
||||||
- external_network
|
- external_network
|
||||||
- internal_network
|
- internal_network
|
||||||
@@ -108,6 +108,7 @@ services:
|
|||||||
command: ["bundle", "exec", "rainbows", "-c", "/etc/liquor-cabinet/rainbows.conf.rb", "--listen", "0.0.0.0:4567"]
|
command: ["bundle", "exec", "rainbows", "-c", "/etc/liquor-cabinet/rainbows.conf.rb", "--listen", "0.0.0.0:4567"]
|
||||||
environment:
|
environment:
|
||||||
RACK_ENV: staging
|
RACK_ENV: staging
|
||||||
|
RS_HASHED_ACCESS_TOKENS: "true"
|
||||||
REDIS_HOST: redis
|
REDIS_HOST: redis
|
||||||
REDIS_PORT: 6379
|
REDIS_PORT: 6379
|
||||||
REDIS_DB: 1
|
REDIS_DB: 1
|
||||||
|
|||||||
@@ -11,4 +11,30 @@ RSpec.describe 'Account dashboard', type: :feature do
|
|||||||
visit root_path
|
visit root_path
|
||||||
expect(page).to have_content('Services')
|
expect(page).to have_content('Services')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'with connected remoteStorage apps' do
|
||||||
|
before do
|
||||||
|
allow_any_instance_of(AppCatalog::WebApp).to receive(:update_metadata).and_return(true)
|
||||||
|
allow_any_instance_of(RemoteStorageAuthorization).to receive(:remove_token_expiry_job).and_return(nil)
|
||||||
|
|
||||||
|
user.remote_storage_authorizations.create!(
|
||||||
|
permissions: ["documents:rw"],
|
||||||
|
client_id: "app.example.com",
|
||||||
|
redirect_uri: "https://app.example.com",
|
||||||
|
expire_at: 1.month.from_now
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
scenario 'links the Storage card to the connected apps dashboard' do
|
||||||
|
visit root_path
|
||||||
|
expect(page).to have_link('Storage', href: apps_services_storage_path)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'without connected remoteStorage apps' do
|
||||||
|
scenario 'links the Storage card to the storage info page' do
|
||||||
|
visit root_path
|
||||||
|
expect(page).to have_link('Storage', href: services_storage_path)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
@@ -1,4 +1,13 @@
|
|||||||
require 'rails_helper'
|
require 'rails_helper'
|
||||||
|
|
||||||
describe ApplicationHelper do
|
describe ApplicationHelper do
|
||||||
|
describe "#markdown_to_html" do
|
||||||
|
it "renders GFM input" do
|
||||||
|
expect(helper.markdown_to_html("**bold**")).to include("<strong>bold</strong>")
|
||||||
|
end
|
||||||
|
|
||||||
|
it "renders GFM-specific syntax" do
|
||||||
|
expect(helper.markdown_to_html("~~struck~~")).to include("<del>struck</del>")
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
Reference in new issue
Block a user