Open platform to collect and prioritize feedback
Prepare for 0.3.0 (#54)
Guilherme Oenning082b39fe9ee6
diff --git a/Makefile b/Makefileindex e4a0fb291..80d105441 100644--- a/Makefile+++ b/Makefile@@ -19,6 +19,6 @@ watch:gin --buildArgs "-ldflags='-X main.buildtime=${BUILD_TIME}'"run:- fider+ godotenv -f .env ./fider.DEFAULT_GOAL := builddiff --git a/README.md b/README.mdindex 6d5897177..513ad2ee9 100644--- a/README.md+++ b/README.md@@ -1,4 +1,4 @@-+[](https://app.wercker.com/project/byKey/99ca65c4a8cd5711504a19deedbc6461)[](https://codecov.io/gh/getfider/fider)diff --git a/app/handlers/signup.go b/app/handlers/signup.goindex 48482023f..a8755035e 100644--- a/app/handlers/signup.go+++ b/app/handlers/signup.go@@ -17,7 +17,7 @@ import (// CheckAvailability checks if given domain is available to be usedfunc CheckAvailability() web.HandlerFunc {return func(c web.Context) error {- subdomain := c.Param("subdomain")+ subdomain := strings.ToLower(c.Param("subdomain"))ok, messages, err := validate.Subdomain(c.Services().Tenants, subdomain)if err != nil {return c.Failure(err)@@ -59,7 +59,7 @@ func CreateTenant() web.HandlerFunc {}if env.IsSingleHostMode() {- input.Subdomain = "Default"+ input.Subdomain = "default"}tenant := &models.Tenant{@@ -67,6 +67,8 @@ func CreateTenant() web.HandlerFunc {Subdomain: input.Subdomain,}+ tenant.Subdomain = strings.ToLower(input.Subdomain)+if tenant.Name == "" {return c.BadRequest(echo.Map{"message": "Name is required",diff --git a/app/pkg/web/engine.go b/app/pkg/web/engine.goindex bd561669d..3d5174217 100644--- a/app/pkg/web/engine.go+++ b/app/pkg/web/engine.go@@ -40,7 +40,19 @@ func New(settings *models.AppSettings) *Engine {//Start an HTTP server.func (e *Engine) Start(address string) {- e.router.Logger.Fatal(e.router.Start(address))+ cert := env.GetEnvOrDefault("SSL_CERT", "")+ key := env.GetEnvOrDefault("SSL_CERT_KEY", "")++ var err error+ if cert == "" && key == "" {+ err = e.router.Start(address)+ } else {+ err = e.router.StartTLS(address, cert, key)+ }++ if err != nil {+ e.router.Logger.Fatal(err)+ }}//Use middleware on root routerdiff --git a/app/validate/domain.go b/app/validate/domain.goindex 9caf68fc7..2418163bd 100644--- a/app/validate/domain.go+++ b/app/validate/domain.go@@ -4,6 +4,8 @@ import ("fmt""regexp"+ "strings"+"github.com/getfider/fider/app/storage")@@ -11,6 +13,8 @@ var r, _ = regexp.Compile("^[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$")//Subdomain validates given subdomainfunc Subdomain(tenants storage.Tenant, subdomain string) (bool, []string, error) {+ subdomain = strings.ToLower(subdomain)+if len(subdomain) <= 2 {return false, []string{"Subdomain must be more than 2 characters"}, nil}diff --git a/app/validate/domain_test.go b/app/validate/domain_test.goindex 9c33d3b38..fb017361a 100644--- a/app/validate/domain_test.go+++ b/app/validate/domain_test.go@@ -42,6 +42,7 @@ func TestValidSubdomains_Availability(t *testing.T) {"footbook","yourcompany","newyork",+ "NewYork",} {ok, messages, err := validate.Subdomain(tenants, subdomain)Expect(ok).To(BeFalse())diff --git a/docs/docker-compose.yml b/docs/docker-compose.ymlindex 829759ecb..86f94006a 100644--- a/docs/docker-compose.yml+++ b/docs/docker-compose.yml@@ -6,6 +6,7 @@ services:environment:POSTGRES_USER: fiderPOSTGRES_PASSWORD: s0m3g00dp4ssw0rd+app:restart: alwaysimage: getfider/fider:latest@@ -13,9 +14,29 @@ services:- "9999:8080"environment:PORT: 8080++ # Use production for best performance or development for more verbose loggingGO_ENV: production++ # The address where the application is listening to+ # Change it according to your DNS settings, eg.: http://feedback.mycompany.com+ AUTH_ENDPOINT: http://localhost:9999++ # Connection string to the Postgres database (following example uses Docker defined above)DATABASE_URL: postgres://fider:s0m3g00dp4ssw0rd@db:5432/fider?sslmode=disable- JWT_SECRET: Ml_1%vQwv]lchqm5;>y2(xKbU@Q@Lybwb(COx+d.o3&|5>)y;~G[KuWWYvR--6_g+# You can generate a new salt here: https://api.wordpress.org/secret-key/1.1/salt/+ JWT_SECRET: Ml_1%vQwv]lchqm5;>y2(xKbU@Q@Lybwb(COx+d.o3&|5>)y;~G[KuWWYvR--6_g++ # At least one of the following auth method needs to be enabled++ # Facebook: https://developers.facebook.com/apps/+ # OAUTH_FACEBOOK_APPID: <fb_app_id>+ # OAUTH_FACEBOOK_SECRET: <fb_app_secret>++ # Google: https://console.developers.google.com+ # OAUTH_GOOGLE_CLIENTID: <google_app_id>+ # OAUTH_GOOGLE_SECRET: <google_app_secret>+depends_on:- db\ No newline at end of filediff --git a/etc/server.crt b/etc/server.crtnew file mode 100644index 000000000..0e1f71d2b--- /dev/null+++ b/etc/server.crt@@ -0,0 +1,15 @@+-----BEGIN CERTIFICATE-----+MIICWDCCAd6gAwIBAgIJANjpG+CtupwkMAoGCCqGSM49BAMCMGoxCzAJBgNVBAYT+AklFMRcwFQYDVQQIDA5TYW50YSBDYXRhcmluYTESMBAGA1UEBwwJSm9pbnZpbGxl+MQ4wDAYDVQQKDAVGaWRlcjEeMBwGCSqGSIb3DQEJARYPbWVAZ29lbm5pbmcubmV0+MB4XDTE3MDcwMTE5MjUzNVoXDTI3MDYyOTE5MjUzNVowajELMAkGA1UEBhMCSUUx+FzAVBgNVBAgMDlNhbnRhIENhdGFyaW5hMRIwEAYDVQQHDAlKb2ludmlsbGUxDjAM+BgNVBAoMBUZpZGVyMR4wHAYJKoZIhvcNAQkBFg9tZUBnb2VubmluZy5uZXQwdjAQ+BgcqhkjOPQIBBgUrgQQAIgNiAASNjA4/I5bN6YW3fB1saIdXjzriWSt6V7MquTIv+i0rI1Wbbi800me0Z8pvZrU4DT8cWNw9FIqUJZsthrLxwCgNKZNmq3REQQhMwtzJo+FVeJ9vVqJhjQBQhvai85o1/r0BGjUDBOMB0GA1UdDgQWBBTm8JGD741NrUk7gbcQ+/XqP8Hls1TAfBgNVHSMEGDAWgBTm8JGD741NrUk7gbcQ/XqP8Hls1TAMBgNVHRME+BTADAQH/MAoGCCqGSM49BAMCA2gAMGUCMCQwZowj8tKkmaKkNTPFGYG2u7fRl+7B+mqqtwXXwMdY0mFGNjJd7NJOl4uhsQnsgnQIxAPU9GzWzciAb/w4t1Eh8LsISORBr+XYJ8PQw3nMyctcsd1Eh01M5rUhIpIS/AuE6qQA==+-----END CERTIFICATE-----diff --git a/etc/server.key b/etc/server.keynew file mode 100644index 000000000..cd9a01b83--- /dev/null+++ b/etc/server.key@@ -0,0 +1,9 @@+-----BEGIN EC PARAMETERS-----+BgUrgQQAIg==+-----END EC PARAMETERS-----+-----BEGIN EC PRIVATE KEY-----+MIGkAgEBBDDSmLxu7BOE8zrEUskxC95PRz82meko7uRci3SQ+Ka8BNNXtalTmtYq+9AC0unK+LE6gBwYFK4EEACKhZANiAASNjA4/I5bN6YW3fB1saIdXjzriWSt6V7Mq+uTIvi0rI1Wbbi800me0Z8pvZrU4DT8cWNw9FIqUJZsthrLxwCgNKZNmq3REQQhMw+tzJoFVeJ9vVqJhjQBQhvai85o1/r0BE=+-----END EC PRIVATE KEY-----diff --git a/favicon.ico b/favicon.icoindex d6bcd37ca..88e84cfad 100644Binary files a/favicon.ico and b/favicon.ico differdiff --git a/public/components/common/Footer.tsx b/public/components/common/Footer.tsxindex 2a8ab331a..e97316175 100644--- a/public/components/common/Footer.tsx+++ b/public/components/common/Footer.tsx@@ -1,5 +1,5 @@import * as React from 'react';-const logo = require('@fider/images/logo.png');+const logo = require('@fider/images/logo-small.png');export const Footer = () => {return <div id="footer" className="ui vertical footer segment">diff --git a/public/components/common/SocialSignInList.tsx b/public/components/common/SocialSignInList.tsxindex e58a402ac..459544a6e 100644--- a/public/components/common/SocialSignInList.tsx+++ b/public/components/common/SocialSignInList.tsx@@ -41,7 +41,7 @@ export class SocialSignInList extends React.Component<SocialSignInListProps, {}>const noAuth = !facebook && !google &&<div className="item"><div className="ui tertiary inverted red segment">- There are no authentication methods enabled.+ No authentication methods available.</div></div>;diff --git a/public/images/logo-small.png b/public/images/logo-small.pngnew file mode 100644index 000000000..8f9958525Binary files /dev/null and b/public/images/logo-small.png differdiff --git a/public/images/logo.png b/public/images/logo.pngindex 02e9b85a3..d7f96778f 100644Binary files a/public/images/logo.png and b/public/images/logo.png differdiff --git a/public/images/logo2.png b/public/images/logo2.pngdeleted file mode 100644index a2d290ba1..000000000Binary files a/public/images/logo2.png and /dev/null differdiff --git a/public/pages/SignUpPage.tsx b/public/pages/SignUpPage.tsxindex e69ffdfbe..bd0467c02 100644--- a/public/pages/SignUpPage.tsx+++ b/public/pages/SignUpPage.tsx@@ -5,7 +5,7 @@ import { AppSettings } from '@fider/models';import { setTitle, getQueryString } from '@fider/utils/page';import { decode } from '@fider/utils/jwt';const td = require('throttle-debounce');-const logo = require('@fider/images/logo.png');+const logo = require('@fider/images/logo-small.png');import { inject, injectables } from '@fider/di';import { Session, TenantService, Failure } from '@fider/services';diff --git a/public/pages/signup.scss b/public/pages/signup.scssindex c1a15c5eb..95677ba2f 100644--- a/public/pages/signup.scss+++ b/public/pages/signup.scss@@ -1,5 +1,6 @@#fdr-signup-page {margin-top: 50px;+ max-width: 500px !important;.logo {height: 100px;