got followers
This commit is contained in:
@@ -30,7 +30,7 @@ html, body {
|
||||
}
|
||||
|
||||
#admin.el-card {
|
||||
max-width: 850px;
|
||||
max-width: 870px;
|
||||
}
|
||||
|
||||
.el-dialog {
|
||||
|
||||
@@ -13,7 +13,7 @@ gem "jekyll", "~> 3.8.6"
|
||||
# This is the default theme for new Jekyll sites. You may change this to anything you like.
|
||||
#gem "minima", "~> 2.0"
|
||||
gem "just-the-docs"
|
||||
gem "jemoji"
|
||||
gem "mini_magick"
|
||||
|
||||
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
|
||||
# uncomment the line below. To upgrade, run `bundle update github-pages`.
|
||||
@@ -22,6 +22,7 @@ gem "jemoji"
|
||||
# If you have any plugins, put them here!
|
||||
group :jekyll_plugins do
|
||||
gem "jekyll-feed", "~> 0.6"
|
||||
gem "jemoji"
|
||||
end
|
||||
|
||||
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||
|
||||
@@ -59,6 +59,7 @@ GEM
|
||||
rb-inotify (~> 0.9, >= 0.9.7)
|
||||
ruby_dep (~> 1.2)
|
||||
mercenary (0.3.6)
|
||||
mini_magick (4.9.5)
|
||||
mini_portile2 (2.4.0)
|
||||
minitest (5.11.3)
|
||||
nokogiri (1.10.3)
|
||||
@@ -93,6 +94,7 @@ DEPENDENCIES
|
||||
jekyll-feed (~> 0.6)
|
||||
jemoji
|
||||
just-the-docs
|
||||
mini_magick
|
||||
tzinfo (~> 1.2)
|
||||
tzinfo-data
|
||||
wdm (~> 0.1.0)
|
||||
|
||||
@@ -5,38 +5,27 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
|
||||
<title> - Gancio</title>
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="https://gancio.org/favicon.ico" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="https://gancio.org/assets/css/just-the-docs.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.6.1 -->
|
||||
<title>Gancio | A shared agenda for local communities</title>
|
||||
<meta name="generator" content="Jekyll v3.8.6" />
|
||||
<meta property="og:title" content="Gancio" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="A shared agenda for local communities" />
|
||||
<meta property="og:description" content="A shared agenda for local communities" />
|
||||
<link rel="canonical" href="https://gancio.org/404.html" />
|
||||
<meta property="og:url" content="https://gancio.org/404.html" />
|
||||
<meta property="og:site_name" content="Gancio" />
|
||||
<script type="application/ld+json">
|
||||
{"@type":"WebPage","url":"https://gancio.org/404.html","headline":"Gancio","description":"A shared agenda for local communities","@context":"https://schema.org"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
<script src="//code.jquery.com/jquery-3.3.1.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
|
||||
<script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
@@ -5,38 +5,27 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
|
||||
<title>Admin - Gancio</title>
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="https://gancio.org/favicon.ico" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="https://gancio.org/assets/css/just-the-docs.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.6.1 -->
|
||||
<title>Admin | Gancio</title>
|
||||
<meta name="generator" content="Jekyll v3.8.6" />
|
||||
<meta property="og:title" content="Admin" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="A shared agenda for local communities" />
|
||||
<meta property="og:description" content="A shared agenda for local communities" />
|
||||
<link rel="canonical" href="https://gancio.org/admin" />
|
||||
<meta property="og:url" content="https://gancio.org/admin" />
|
||||
<meta property="og:site_name" content="Gancio" />
|
||||
<script type="application/ld+json">
|
||||
{"@type":"WebPage","url":"https://gancio.org/admin","headline":"Admin","description":"A shared agenda for local communities","@context":"https://schema.org"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
<script src="//code.jquery.com/jquery-3.3.1.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
|
||||
<script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
@@ -5,38 +5,27 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
|
||||
<title>Configuration - Gancio</title>
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="https://gancio.org/favicon.ico" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="https://gancio.org/assets/css/just-the-docs.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.6.1 -->
|
||||
<title>Configuration | Gancio</title>
|
||||
<meta name="generator" content="Jekyll v3.8.6" />
|
||||
<meta property="og:title" content="Configuration" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="A shared agenda for local communities" />
|
||||
<meta property="og:description" content="A shared agenda for local communities" />
|
||||
<link rel="canonical" href="https://gancio.org/config" />
|
||||
<meta property="og:url" content="https://gancio.org/config" />
|
||||
<meta property="og:site_name" content="Gancio" />
|
||||
<script type="application/ld+json">
|
||||
{"@type":"WebPage","url":"https://gancio.org/config","headline":"Configuration","description":"A shared agenda for local communities","@context":"https://schema.org"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
<script src="//code.jquery.com/jquery-3.3.1.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
|
||||
<script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
@@ -5,38 +5,27 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
|
||||
<title>Contribute - Gancio</title>
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="https://gancio.org/favicon.ico" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="https://gancio.org/assets/css/just-the-docs.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.6.1 -->
|
||||
<title>Contribute | Gancio</title>
|
||||
<meta name="generator" content="Jekyll v3.8.6" />
|
||||
<meta property="og:title" content="Contribute" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="A shared agenda for local communities" />
|
||||
<meta property="og:description" content="A shared agenda for local communities" />
|
||||
<link rel="canonical" href="https://gancio.org/contribute" />
|
||||
<meta property="og:url" content="https://gancio.org/contribute" />
|
||||
<meta property="og:site_name" content="Gancio" />
|
||||
<script type="application/ld+json">
|
||||
{"@type":"WebPage","url":"https://gancio.org/contribute","headline":"Contribute","description":"A shared agenda for local communities","@context":"https://schema.org"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
<script src="//code.jquery.com/jquery-3.3.1.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
|
||||
<script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
@@ -5,38 +5,27 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
|
||||
<title>Hacking - Gancio</title>
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="https://gancio.org/favicon.ico" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="https://gancio.org/assets/css/just-the-docs.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.6.1 -->
|
||||
<title>Hacking | Gancio</title>
|
||||
<meta name="generator" content="Jekyll v3.8.6" />
|
||||
<meta property="og:title" content="Hacking" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="A shared agenda for local communities" />
|
||||
<meta property="og:description" content="A shared agenda for local communities" />
|
||||
<link rel="canonical" href="https://gancio.org/dev" />
|
||||
<meta property="og:url" content="https://gancio.org/dev" />
|
||||
<meta property="og:site_name" content="Gancio" />
|
||||
<script type="application/ld+json">
|
||||
{"@type":"WebPage","url":"https://gancio.org/dev","headline":"Hacking","description":"A shared agenda for local communities","@context":"https://schema.org"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
<script src="//code.jquery.com/jquery-3.3.1.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
|
||||
<script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
@@ -5,38 +5,27 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
|
||||
<title>Migration - Gancio</title>
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="https://gancio.org/favicon.ico" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="https://gancio.org/assets/css/just-the-docs.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.6.1 -->
|
||||
<title>Migration | Gancio</title>
|
||||
<meta name="generator" content="Jekyll v3.8.6" />
|
||||
<meta property="og:title" content="Migration" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="A shared agenda for local communities" />
|
||||
<meta property="og:description" content="A shared agenda for local communities" />
|
||||
<link rel="canonical" href="https://gancio.org/dev/migration" />
|
||||
<meta property="og:url" content="https://gancio.org/dev/migration" />
|
||||
<meta property="og:site_name" content="Gancio" />
|
||||
<script type="application/ld+json">
|
||||
{"@type":"WebPage","url":"https://gancio.org/dev/migration","headline":"Migration","description":"A shared agenda for local communities","@context":"https://schema.org"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
<script src="//code.jquery.com/jquery-3.3.1.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
|
||||
<script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
@@ -5,38 +5,27 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
|
||||
<title>Project Structure - Gancio</title>
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="https://gancio.org/favicon.ico" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="https://gancio.org/assets/css/just-the-docs.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.6.1 -->
|
||||
<title>Project Structure | Gancio</title>
|
||||
<meta name="generator" content="Jekyll v3.8.6" />
|
||||
<meta property="og:title" content="Project Structure" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="A shared agenda for local communities" />
|
||||
<meta property="og:description" content="A shared agenda for local communities" />
|
||||
<link rel="canonical" href="https://gancio.org/dev/structure" />
|
||||
<meta property="og:url" content="https://gancio.org/dev/structure" />
|
||||
<meta property="og:site_name" content="Gancio" />
|
||||
<script type="application/ld+json">
|
||||
{"@type":"WebPage","url":"https://gancio.org/dev/structure","headline":"Project Structure","description":"A shared agenda for local communities","@context":"https://schema.org"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
<script src="//code.jquery.com/jquery-3.3.1.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
|
||||
<script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.8.6">Jekyll</generator><link href="https://gancio.org/feed.xml" rel="self" type="application/atom+xml" /><link href="https://gancio.org/" rel="alternate" type="text/html" /><updated>2019-07-27T13:03:35+02:00</updated><id>https://gancio.org/feed.xml</id><title type="html">Gancio</title><subtitle>A shared agenda for local communities</subtitle></feed>
|
||||
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.8.6">Jekyll</generator><link href="https://gancio.org/feed.xml" rel="self" type="application/atom+xml" /><link href="https://gancio.org/" rel="alternate" type="text/html" /><updated>2019-07-29T21:13:52+02:00</updated><id>https://gancio.org/feed.xml</id><title type="html">Gancio</title><subtitle>A shared agenda for local communities</subtitle></feed>
|
||||
@@ -5,40 +5,29 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
|
||||
<title>Home - Gancio</title>
|
||||
|
||||
|
||||
<meta name="Description" content="Gancio is a shared agenda for local communities.">
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="https://gancio.org/favicon.ico" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="https://gancio.org/assets/css/just-the-docs.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.6.1 -->
|
||||
<title>Home | Gancio</title>
|
||||
<meta name="generator" content="Jekyll v3.8.6" />
|
||||
<meta property="og:title" content="Home" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="Gancio is a shared agenda for local communities." />
|
||||
<meta property="og:description" content="Gancio is a shared agenda for local communities." />
|
||||
<link rel="canonical" href="https://gancio.org/" />
|
||||
<meta property="og:url" content="https://gancio.org/" />
|
||||
<meta property="og:site_name" content="Gancio" />
|
||||
<script type="application/ld+json">
|
||||
{"@type":"WebSite","url":"https://gancio.org/","name":"Gancio","headline":"Home","description":"Gancio is a shared agenda for local communities.","@context":"https://schema.org"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
<script src="//code.jquery.com/jquery-3.3.1.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
|
||||
<script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
@@ -300,7 +289,11 @@
|
||||
<p><a href="install" class="btn btn-primary fs-5 mb-4 mb-md-0 mr-2">Get started now</a> <a href="https://demo.gancio.org" class="btn btn-green fs-5 mb-4 mb-md-0">Demo</a>
|
||||
<a href="https://git.lattuga.net/cisti/gancio" class="btn fs-5">Source</a></p>
|
||||
|
||||
<p><img src="assets/home1.png" alt="screenshoot"></p>
|
||||
<p><a href="assets/home1.png" data-fancybox="gallery" data-caption="<h2 style='color: white'>Home of first instance of gancio</h2>"><img src="assets/thumbs/home1.png" alt="diocane"></a>
|
||||
<a href="assets/mobile1.png" data-fancybox="gallery" data-caption="<h2 style='color: white'>Home of first instance of gancio</h2>"><img src="assets/thumbs/mobile1.png" alt="diocane"></a>
|
||||
<a href="assets/mobile2.png" data-fancybox="gallery" data-caption="<h2 style='color: white'>Home of first instance of gancio</h2>"><img src="assets/thumbs/mobile2.png" alt="diocane"></a>
|
||||
<a href="assets/admin_users.png" data-fancybox="gallery" data-caption="<h2 style='color: white'>Home of first instance of gancio</h2>"><img src="assets/thumbs/admin_users.png" alt="diocane"></a>
|
||||
<a href="assets/login.png" data-fancybox="gallery" data-caption="<h2 style='color: white'>Home of first instance of gancio</h2>"><img src="assets/thumbs/login.png" alt="diocane"></a></p>
|
||||
|
||||
<h3 id="about-the-project">About the project</h3>
|
||||
|
||||
|
||||
@@ -5,38 +5,27 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
|
||||
<title>Install - Gancio</title>
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="https://gancio.org/favicon.ico" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="https://gancio.org/assets/css/just-the-docs.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.6.1 -->
|
||||
<title>Install | Gancio</title>
|
||||
<meta name="generator" content="Jekyll v3.8.6" />
|
||||
<meta property="og:title" content="Install" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="A shared agenda for local communities" />
|
||||
<meta property="og:description" content="A shared agenda for local communities" />
|
||||
<link rel="canonical" href="https://gancio.org/install" />
|
||||
<meta property="og:url" content="https://gancio.org/install" />
|
||||
<meta property="og:site_name" content="Gancio" />
|
||||
<script type="application/ld+json">
|
||||
{"@type":"WebPage","url":"https://gancio.org/install","headline":"Install","description":"A shared agenda for local communities","@context":"https://schema.org"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
<script src="//code.jquery.com/jquery-3.3.1.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
|
||||
<script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
@@ -294,9 +283,9 @@
|
||||
<h1 id="install">Install</h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="classic">Classic install</a></li>
|
||||
<li><a href="docker">Using docker</a></li>
|
||||
<li><a href="nginx">Nginx as a proxy</a></li>
|
||||
<li><a href="/install/classic">Classic install</a></li>
|
||||
<li><a href="/install/docker">Using docker</a></li>
|
||||
<li><a href="/install/nginx">Nginx as a proxy</a></li>
|
||||
<li><a href="../dev">Hacking & contribute</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -5,38 +5,27 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
|
||||
<title>Classic - Gancio</title>
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="https://gancio.org/favicon.ico" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="https://gancio.org/assets/css/just-the-docs.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.6.1 -->
|
||||
<title>Classic | Gancio</title>
|
||||
<meta name="generator" content="Jekyll v3.8.6" />
|
||||
<meta property="og:title" content="Classic" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="A shared agenda for local communities" />
|
||||
<meta property="og:description" content="A shared agenda for local communities" />
|
||||
<link rel="canonical" href="https://gancio.org/install/classic" />
|
||||
<meta property="og:url" content="https://gancio.org/install/classic" />
|
||||
<meta property="og:site_name" content="Gancio" />
|
||||
<script type="application/ld+json">
|
||||
{"@type":"WebPage","url":"https://gancio.org/install/classic","headline":"Classic","description":"A shared agenda for local communities","@context":"https://schema.org"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
<script src="//code.jquery.com/jquery-3.3.1.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
|
||||
<script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
@@ -5,38 +5,27 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
|
||||
<title>Docker - Gancio</title>
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="https://gancio.org/favicon.ico" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="https://gancio.org/assets/css/just-the-docs.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.6.1 -->
|
||||
<title>Docker | Gancio</title>
|
||||
<meta name="generator" content="Jekyll v3.8.6" />
|
||||
<meta property="og:title" content="Docker" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="A shared agenda for local communities" />
|
||||
<meta property="og:description" content="A shared agenda for local communities" />
|
||||
<link rel="canonical" href="https://gancio.org/install/docker" />
|
||||
<meta property="og:url" content="https://gancio.org/install/docker" />
|
||||
<meta property="og:site_name" content="Gancio" />
|
||||
<script type="application/ld+json">
|
||||
{"@type":"WebPage","url":"https://gancio.org/install/docker","headline":"Docker","description":"A shared agenda for local communities","@context":"https://schema.org"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
<script src="//code.jquery.com/jquery-3.3.1.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
|
||||
<script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
@@ -5,38 +5,27 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
|
||||
<title>Nginx - Gancio</title>
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="https://gancio.org/favicon.ico" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="https://gancio.org/assets/css/just-the-docs.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.6.1 -->
|
||||
<title>Nginx | Gancio</title>
|
||||
<meta name="generator" content="Jekyll v3.8.6" />
|
||||
<meta property="og:title" content="Nginx" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="A shared agenda for local communities" />
|
||||
<meta property="og:description" content="A shared agenda for local communities" />
|
||||
<link rel="canonical" href="https://gancio.org/install/nginx" />
|
||||
<meta property="og:url" content="https://gancio.org/install/nginx" />
|
||||
<meta property="og:site_name" content="Gancio" />
|
||||
<script type="application/ld+json">
|
||||
{"@type":"WebPage","url":"https://gancio.org/install/nginx","headline":"Nginx","description":"A shared agenda for local communities","@context":"https://schema.org"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
<script src="//code.jquery.com/jquery-3.3.1.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
|
||||
<script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
@@ -5,38 +5,27 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
|
||||
<title>Instances - Gancio</title>
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="https://gancio.org/favicon.ico" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="https://gancio.org/assets/css/just-the-docs.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.6.1 -->
|
||||
<title>Instances | Gancio</title>
|
||||
<meta name="generator" content="Jekyll v3.8.6" />
|
||||
<meta property="og:title" content="Instances" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="A shared agenda for local communities" />
|
||||
<meta property="og:description" content="A shared agenda for local communities" />
|
||||
<link rel="canonical" href="https://gancio.org/instances" />
|
||||
<meta property="og:url" content="https://gancio.org/instances" />
|
||||
<meta property="og:site_name" content="Gancio" />
|
||||
<script type="application/ld+json">
|
||||
{"@type":"WebPage","url":"https://gancio.org/instances","headline":"Instances","description":"A shared agenda for local communities","@context":"https://schema.org"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
<script src="//code.jquery.com/jquery-3.3.1.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
|
||||
<script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
@@ -5,38 +5,27 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
|
||||
<title>Usage - Gancio</title>
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="https://gancio.org/favicon.ico" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="https://gancio.org/assets/css/just-the-docs.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="https://gancio.org/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.6.1 -->
|
||||
<title>Usage | Gancio</title>
|
||||
<meta name="generator" content="Jekyll v3.8.6" />
|
||||
<meta property="og:title" content="Usage" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="A shared agenda for local communities" />
|
||||
<meta property="og:description" content="A shared agenda for local communities" />
|
||||
<link rel="canonical" href="https://gancio.org/usage" />
|
||||
<meta property="og:url" content="https://gancio.org/usage" />
|
||||
<meta property="og:site_name" content="Gancio" />
|
||||
<script type="application/ld+json">
|
||||
{"@type":"WebPage","url":"https://gancio.org/usage","headline":"Usage","description":"A shared agenda for local communities","@context":"https://schema.org"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
<script src="//code.jquery.com/jquery-3.3.1.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
|
||||
<script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
@@ -15,7 +15,12 @@ A shared agenda for local communities.
|
||||
[Get started now](install){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 } [Demo](https://demo.gancio.org){: .btn .btn-green .fs-5 .mb-4 .mb-md-0 }
|
||||
[Source](https://git.lattuga.net/cisti/gancio){: .btn .fs-5 }
|
||||
|
||||

|
||||
|
||||
[](assets/home1.png){: data-fancybox="gallery" data-caption="<h2 style='color: white'>Home of first instance of gancio</h2>" }
|
||||
[](assets/mobile1.png){: data-fancybox="gallery" data-caption="<h2 style='color: white'>Home of first instance of gancio</h2>" }
|
||||
[](assets/mobile2.png){: data-fancybox="gallery" data-caption="<h2 style='color: white'>Home of first instance of gancio</h2>" }
|
||||
[](assets/admin_users.png){: data-fancybox="gallery" data-caption="<h2 style='color: white'>Home of first instance of gancio</h2>" }
|
||||
[](assets/login.png){: data-fancybox="gallery" data-caption="<h2 style='color: white'>Home of first instance of gancio</h2>" }
|
||||
|
||||
|
||||
### About the project
|
||||
|
||||
@@ -10,7 +10,7 @@ has_toc: false
|
||||
# Install
|
||||
|
||||
|
||||
- [Classic install](install/classic)
|
||||
- [Using docker](install/docker)
|
||||
- [Nginx as a proxy](install/nginx)
|
||||
- [Classic install](/install/classic)
|
||||
- [Using docker](/install/docker)
|
||||
- [Nginx as a proxy](/install/nginx)
|
||||
- [Hacking & contribute](../dev)
|
||||
|
||||
@@ -1,69 +1,68 @@
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const moment = require('moment')
|
||||
const { event: Event, comment: Comment } = require('../models')
|
||||
const config = require('config')
|
||||
const Mastodon = require('mastodon-api')
|
||||
const settingsController = require('./settings')
|
||||
const get = require('lodash/get')
|
||||
// const fs = require('fs')
|
||||
// const path = require('path')
|
||||
// const moment = require('moment')
|
||||
// const { event: Event, comment: Comment } = require('../models')
|
||||
// const config = require('config')
|
||||
// const settingsController = require('./settings')
|
||||
// const get = require('lodash/get')
|
||||
|
||||
const botController = {
|
||||
bots: null,
|
||||
async initialize() {
|
||||
const access_token = get(settingsController.secretSettings, 'mastodon_auth.access_token')
|
||||
const instance = get(settingsController.settings, 'mastodon_instance')
|
||||
if (!access_token || !instance) return
|
||||
botController.bot = new Mastodon({
|
||||
access_token,
|
||||
api_url: `https://${instance}/api/v1`
|
||||
})
|
||||
const listener = botController.bot.stream('/streaming/user')
|
||||
listener.on('message', botController.message)
|
||||
listener.on('error', botController.error)
|
||||
},
|
||||
async post(event) {
|
||||
const status = `${event.title} @${event.place.name} ${moment(event.start_datetime).format('ddd, D MMMM HH:mm')} -
|
||||
${event.description.length > 200 ? event.description.substr(0, 200) + '...' : event.description} - ${event.tags.map(t => '#' + t.tag).join(' ')} ${config.baseurl}/event/${event.id}`
|
||||
// const botController = {
|
||||
// bots: null,
|
||||
// async initialize() {
|
||||
// const access_token = get(settingsController.secretSettings, 'mastodon_auth.access_token')
|
||||
// const instance = get(settingsController.settings, 'mastodon_instance')
|
||||
// if (!access_token || !instance) return
|
||||
// botController.bot = new Mastodon({
|
||||
// access_token,
|
||||
// api_url: `https://${instance}/api/v1`
|
||||
// })
|
||||
// const listener = botController.bot.stream('/streaming/user')
|
||||
// listener.on('message', botController.message)
|
||||
// listener.on('error', botController.error)
|
||||
// },
|
||||
// async post(event) {
|
||||
// const status = `${event.title} @${event.place.name} ${moment(event.start_datetime).format('ddd, D MMMM HH:mm')} -
|
||||
// ${event.description.length > 200 ? event.description.substr(0, 200) + '...' : event.description} - ${event.tags.map(t => '#' + t.tag).join(' ')} ${config.baseurl}/event/${event.id}`
|
||||
|
||||
let media
|
||||
if (event.image_path) {
|
||||
const file = path.resolve(config.upload_path, event.image_path)
|
||||
if (fs.statSync(file)) {
|
||||
media = await botController.bot.post('/media', { file: fs.createReadStream(file) })
|
||||
}
|
||||
}
|
||||
return botController.bot.post('/statuses', { status, media_ids: media ? [media.data.id] : [] })
|
||||
},
|
||||
// let media
|
||||
// if (event.image_path) {
|
||||
// const file = path.resolve(config.upload_path, event.image_path)
|
||||
// if (fs.statSync(file)) {
|
||||
// media = await botController.bot.post('/media', { file: fs.createReadStream(file) })
|
||||
// }
|
||||
// }
|
||||
// return botController.bot.post('/statuses', { status, media_ids: media ? [media.data.id] : [] })
|
||||
// },
|
||||
|
||||
async message(msg) {
|
||||
const type = msg.event
|
||||
// async message(msg) {
|
||||
// const type = msg.event
|
||||
|
||||
if (type === 'delete') {
|
||||
const activitypub_id = String(msg.data)
|
||||
const event = await Comment.findOne({ where: { activitypub_id } })
|
||||
if (event) await event.destroy()
|
||||
return
|
||||
}
|
||||
// if (type === 'delete') {
|
||||
// const activitypub_id = String(msg.data)
|
||||
// const event = await Comment.findOne({ where: { activitypub_id } })
|
||||
// if (event) await event.destroy()
|
||||
// return
|
||||
// }
|
||||
|
||||
const activitypub_id = String(msg.data.status.in_reply_to_id)
|
||||
if (!activitypub_id) return
|
||||
let event = await Event.findOne({ where: { activitypub_id } })
|
||||
if (!event) {
|
||||
// check for comment..
|
||||
const comment = await Comment.findOne( { include: [Event], where: { activitypub_id }})
|
||||
if (!comment) return
|
||||
event = comment.event
|
||||
}
|
||||
await Comment.create({
|
||||
activitypub_id: String(msg.data.status.id),
|
||||
data: msg.data.status,
|
||||
eventId: event.id
|
||||
})
|
||||
},
|
||||
error(err) {
|
||||
console.log('error ', err)
|
||||
}
|
||||
}
|
||||
// const activitypub_id = String(msg.data.status.in_reply_to_id)
|
||||
// if (!activitypub_id) return
|
||||
// let event = await Event.findOne({ where: { activitypub_id } })
|
||||
// if (!event) {
|
||||
// // check for comment..
|
||||
// const comment = await Comment.findOne( { include: [Event], where: { activitypub_id }})
|
||||
// if (!comment) return
|
||||
// event = comment.event
|
||||
// }
|
||||
// await Comment.create({
|
||||
// activitypub_id: String(msg.data.status.id),
|
||||
// data: msg.data.status,
|
||||
// eventId: event.id
|
||||
// })
|
||||
// },
|
||||
// error(err) {
|
||||
// console.log('error ', err)
|
||||
// }
|
||||
// }
|
||||
|
||||
setTimeout(botController.initialize, 5000)
|
||||
module.exports = botController
|
||||
// setTimeout(botController.initialize, 5000)
|
||||
// module.exports = botController
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
const Mastodon = require('mastodon-api')
|
||||
const { setting: Setting } = require('../models')
|
||||
const config = require('config')
|
||||
const consola = require('consola')
|
||||
@@ -78,39 +77,6 @@ const settingsController = {
|
||||
}
|
||||
res.json(settings)
|
||||
},
|
||||
|
||||
// async getAuthURL(req, res) {
|
||||
// const instance = req.body.instance
|
||||
// const callback = `${config.baseurl}/api/settings/oauth`
|
||||
// const { client_id, client_secret } = await Mastodon.createOAuthApp(`https://${instance}/api/v1/apps`,
|
||||
// 'gancio', 'read write', callback)
|
||||
// const url = await Mastodon.getAuthorizationUrl(client_id, client_secret,
|
||||
// `https://${instance}`, 'read write', callback)
|
||||
|
||||
// await settingsController.set('mastodon_instance', instance )
|
||||
// await settingsController.set('mastodon_auth', { client_id, client_secret }, true)
|
||||
// res.json(url)
|
||||
// },
|
||||
|
||||
// async code(req, res) {
|
||||
// const code = req.query.code
|
||||
// const callback = `${config.baseurl}/api/settings/oauth`
|
||||
// const client_id = settingsController.secretSettings.mastodon_auth.client_id
|
||||
// const client_secret = settingsController.secretSettings.mastodon_auth.client_secret
|
||||
// const instance = settingsController.settings.mastodon_instance
|
||||
|
||||
// try {
|
||||
// const access_token = await Mastodon.getAccessToken(client_id, client_secret, code,
|
||||
// `https://${instance}`, callback)
|
||||
// const mastodon_auth = { client_id, client_secret, access_token }
|
||||
// await settingsController.set('mastodon_auth', mastodon_auth, true)
|
||||
// const botController = require('./fediverse')
|
||||
// botController.initialize()
|
||||
// res.redirect('/admin')
|
||||
// } catch (e) {
|
||||
// res.json(e)
|
||||
// }
|
||||
// },
|
||||
}
|
||||
|
||||
setTimeout(settingsController.initialize, 200)
|
||||
|
||||
@@ -21,14 +21,15 @@ fs
|
||||
const model = sequelize.import(path.join(__dirname, file))
|
||||
db[model.name] = model
|
||||
})
|
||||
|
||||
Object.keys(db).forEach(modelName => {
|
||||
if (db[modelName].associate) {
|
||||
db[modelName].associate(db)
|
||||
}
|
||||
})
|
||||
|
||||
db.sequelize = sequelize
|
||||
db.Sequelize = Sequelize
|
||||
|
||||
module.exports = db
|
||||
|
||||
Object.keys(db).forEach(modelName => {
|
||||
if (db[modelName].associate) {
|
||||
db[modelName].associate(db)
|
||||
}
|
||||
})
|
||||
|
||||
db.sequelize = sequelize
|
||||
db.Sequelize = Sequelize
|
||||
|
||||
module.exports = db
|
||||
|
||||
@@ -25,7 +25,11 @@ module.exports = (sequelize, DataTypes) => {
|
||||
recover_code: DataTypes.STRING,
|
||||
is_admin: DataTypes.BOOLEAN,
|
||||
is_active: DataTypes.BOOLEAN,
|
||||
rsa: DataTypes.JSONB
|
||||
rsa: DataTypes.JSON,
|
||||
followers: {
|
||||
type: DataTypes.JSON,
|
||||
defaultValue: []
|
||||
}
|
||||
}, {
|
||||
scopes: {
|
||||
withoutPassword: {
|
||||
|
||||
@@ -174,7 +174,7 @@ async function setup (options) {
|
||||
await firstrun.setup(config, options.config)
|
||||
consola.info(`You can edit '${options.config}' to modify your configuration. `)
|
||||
consola.info(`Run "gancio --config ${options.config}"`)
|
||||
process.exit(0)
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
async function upgrade (options) {
|
||||
|
||||
3
server/dbconfig.js
Normal file
3
server/dbconfig.js
Normal file
@@ -0,0 +1,3 @@
|
||||
const config = require('config')
|
||||
|
||||
modules.exports = config.db
|
||||
@@ -2,6 +2,84 @@ const express = require('express')
|
||||
const router = express.Router()
|
||||
const { user: User } = require('../api/models')
|
||||
const config = require('config')
|
||||
const get = require('lodash/get')
|
||||
const crypto = require('crypto')
|
||||
const request = require('request')
|
||||
|
||||
function signAndSend(message, usre, domain, req, res, targetDomain) {
|
||||
// get the URI of the actor object and append 'inbox' to it
|
||||
let inbox = message.object.actor+'/inbox'
|
||||
let inboxFragment = inbox.replace('https://'+targetDomain,'')
|
||||
// get the private key
|
||||
const privkey = user.rsa.privateKey
|
||||
const signer = crypto.createSign('sha256')
|
||||
let d = new Date()
|
||||
let stringToSign = `(request-target): post ${inboxFragment}\nhost: ${targetDomain}\ndate: ${d.toUTCString()}`
|
||||
signer.update(stringToSign)
|
||||
signer.end()
|
||||
const signature = signer.sign(privkey)
|
||||
const signature_b64 = signature.toString('base64')
|
||||
let header = `keyId="https://${domain}/u/${name}",headers="(request-target) host date",signature="${signature_b64}"`
|
||||
console.error('vado di request accept !')
|
||||
request({
|
||||
url: inbox,
|
||||
headers: {
|
||||
'Host': targetDomain,
|
||||
'Date': d.toUTCString(),
|
||||
'Signature': header
|
||||
},
|
||||
method: 'POST',
|
||||
json: true,
|
||||
body: message
|
||||
}, function (error, response){
|
||||
if (error) {
|
||||
console.log('Error:', error, response.body)
|
||||
}
|
||||
else {
|
||||
console.log('Response:', response.body)
|
||||
}
|
||||
})
|
||||
return res.status(200);
|
||||
}
|
||||
|
||||
function sendAcceptMessage (body, user, req, res, targetDomain) {
|
||||
const guid = crypto.randomBytes(16).toString('hex')
|
||||
let message = {
|
||||
'@context': 'https://www.w3.org/ns/activitystreams',
|
||||
'id': `${config.baseurl}/federation/${guid}`,
|
||||
'type': 'Accept',
|
||||
'actor': `${config.baseurl}/federation/u/${user.username}`,
|
||||
'object': body,
|
||||
}
|
||||
signAndSend(message, user, domain, req, res, targetDomain)
|
||||
}
|
||||
|
||||
router.post('/inbox', async (req, res) => {
|
||||
const b = req.body
|
||||
console.error('> INBOX ', b)
|
||||
const targetDomain = new URL(b.actor).host
|
||||
const domain = new URL(config.baseurl).host
|
||||
switch(b.type) {
|
||||
case 'Follow':
|
||||
if (typeof b.object !== 'string') return
|
||||
const username = b.object.replace(`${config.baseurl}/federation/u/`, '')
|
||||
console.error('someone wants to follow ' + username)
|
||||
const user = await User.findOne({ where: { username }})
|
||||
if (!user) {
|
||||
console.error('No user found!')
|
||||
return
|
||||
}
|
||||
sendAcceptMessage(b, user, domain, req, res, targetDomain)
|
||||
console.error('FOLLOWERS ', user.followers)
|
||||
if (user.followers.indexOf(b.actor) === -1) {
|
||||
console.error('ok this is a new follower: ', b.actor)
|
||||
user.followers.push(b.actor)
|
||||
await user.save()
|
||||
}
|
||||
|
||||
break
|
||||
}
|
||||
})
|
||||
|
||||
router.get('/u/:name', async (req, res) => {
|
||||
const name = req.params.name
|
||||
@@ -13,17 +91,40 @@ router.get('/u/:name', async (req, res) => {
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
'https://w3id.org/security/v1'
|
||||
],
|
||||
'id': `${config.baseurl}/federation/u/${name}`,
|
||||
'type': 'Person',
|
||||
'preferredUsername': name,
|
||||
'inbox': `${config.baseurl}/federation/inbox`,
|
||||
'followers': `${config.baseurl}/federation/u/${name}/followers`,
|
||||
'publicKey': {
|
||||
'id': `${config.baseurl}/federation/u/${name}#main-key`,
|
||||
'owner': `${config.baseurl}/federation/u/${name}`,
|
||||
'publicKeyPem': user.rsa.publicKey
|
||||
id: `${config.baseurl}/federation/u/${name}`,
|
||||
type: 'Person',
|
||||
preferredUsername: name,
|
||||
inbox: `${config.baseurl}/federation/inbox`,
|
||||
followers: `${config.baseurl}/federation/u/${name}/followers`,
|
||||
publicKey: {
|
||||
id: `${config.baseurl}/federation/u/${name}#main-key`,
|
||||
owner: `${config.baseurl}/federation/u/${name}`,
|
||||
publicKeyPem: get(user, 'rsa.publicKey', '')
|
||||
}
|
||||
}
|
||||
res.json(ret)
|
||||
})
|
||||
module.exports = router
|
||||
|
||||
router.get('/u/:name/followers', async (req, res) => {
|
||||
const name = req.params.name
|
||||
if (!name) return res.status(400).send('Bad request.')
|
||||
const user = await User.findOne({where: { username: name }})
|
||||
if (!user) return res.status(404).send(`No record found for ${name}`)
|
||||
const ret = {
|
||||
'@context': [ 'https://www.w3.org/ns/activitystreams' ],
|
||||
id: `${config.baseurl}/federation/u/${name}/followers`,
|
||||
type: 'OrderedCollection',
|
||||
totalItems: user.followers.length,
|
||||
first: {
|
||||
id: `${config.baseurl}/federation/u/${name}/followers?page=1`,
|
||||
type: 'OrderedCollectionPage',
|
||||
totalItems: user.followers.length,
|
||||
partOf: `${config.baseurl}/federation/u/${name}/followers`,
|
||||
orderedItems: user.followers,
|
||||
}
|
||||
}
|
||||
res.json(ret)
|
||||
})
|
||||
|
||||
|
||||
module.exports = router
|
||||
@@ -4,6 +4,7 @@ const { user: User } = require('../api/models')
|
||||
const config = require('config')
|
||||
|
||||
router.get('/', async (req, res) => {
|
||||
console.error('ma sono dentro webfinger ?!?!')
|
||||
const resource = req.query.resource
|
||||
if (!resource || !resource.includes('acct:')) {
|
||||
return res.status(400).send('Bad request. Please make sure "acct:USER@DOMAIN" is what you are sending as the "resource" query parameter.')
|
||||
|
||||
@@ -26,8 +26,7 @@ module.exports = {
|
||||
|
||||
try {
|
||||
await db.user.findAll()
|
||||
consola.warn(`⚠️ Non empty db! Please move your current db elsewhere than retry.
|
||||
If you want to `)
|
||||
consola.warn(`⚠️ Non empty db! Please move your current db elsewhere than retry.`)
|
||||
return -1
|
||||
} catch(e) { }
|
||||
|
||||
@@ -40,7 +39,10 @@ If you want to `)
|
||||
// create admin user
|
||||
consola.info('Create admin user', admin)
|
||||
await db.user.create({
|
||||
...admin,
|
||||
email: admin.email,
|
||||
password: admin.password,
|
||||
username: admin.email,
|
||||
display_name: config.title,
|
||||
is_admin: true,
|
||||
is_active: true
|
||||
})
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
module.exports = {
|
||||
up: (queryInterface, Sequelize) => {
|
||||
return queryInterface.addColumn('users', 'rsa', {
|
||||
type: Sequelize.JSONB
|
||||
type: Sequelize.JSON
|
||||
})
|
||||
/*
|
||||
Add altering commands here.
|
||||
|
||||
26
server/migrations/20190729192753-add_followers.js
Normal file
26
server/migrations/20190729192753-add_followers.js
Normal file
@@ -0,0 +1,26 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
up: (queryInterface, Sequelize) => {
|
||||
return queryInterface.addColumn('users', 'followers', {
|
||||
type: Sequelize.JSON
|
||||
})
|
||||
/*
|
||||
Add altering commands here.
|
||||
Return a promise to correctly handle asynchronicity.
|
||||
|
||||
Example:
|
||||
return queryInterface.createTable('users', { id: Sequelize.INTEGER });
|
||||
*/
|
||||
},
|
||||
|
||||
down: (queryInterface, Sequelize) => {
|
||||
/*
|
||||
Add reverting commands here.
|
||||
Return a promise to correctly handle asynchronicity.
|
||||
|
||||
Example:
|
||||
return queryInterface.dropTable('users');
|
||||
*/
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user