Open platform to collect and prioritize feedback
refactor: some general changes to UI (#649)
Guilherme Oenning8aa0aadd1a74
diff --git a/app/cmd/routes.go b/app/cmd/routes.goindex 01f80410e..f3b9290c7 100644--- a/app/cmd/routes.go+++ b/app/cmd/routes.go@@ -98,10 +98,10 @@ func routes(r *web.Engine) *web.Engine {** START*/r.Get("/ideas/:number", func(c web.Context) error {- return c.Redirect(strings.Replace(c.Request.URL.Path, "/ideas/", "/posts/", 1))+ return c.PermanentRedirect(strings.Replace(c.Request.URL.Path, "/ideas/", "/posts/", 1))})r.Get("/ideas/:number/*all", func(c web.Context) error {- return c.Redirect(strings.Replace(c.Request.URL.Path, "/ideas/", "/posts/", 1))+ return c.PermanentRedirect(strings.Replace(c.Request.URL.Path, "/ideas/", "/posts/", 1))})/*** ENDdiff --git a/app/pkg/web/context.go b/app/pkg/web/context.goindex 269a7ee0b..6166c7a1e 100644--- a/app/pkg/web/context.go+++ b/app/pkg/web/context.go@@ -510,6 +510,14 @@ func (ctx *Context) Redirect(url string) error {return nil}+// PermanentRedirect the request to a provided URL+func (ctx *Context) PermanentRedirect(url string) error {+ ctx.Response.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate")+ ctx.Response.Header().Set("Location", url)+ ctx.Response.WriteHeader(http.StatusPermanentRedirect)+ return nil+}+// GlobalAssetsURL return the full URL to a globally shared static assetfunc (ctx *Context) GlobalAssetsURL(path string, a ...interface{}) string {path = fmt.Sprintf(path, a...)diff --git a/etc/homepage.png b/etc/homepage.pngindex 95c84e157..efa7d6130 100644Binary files a/etc/homepage.png and b/etc/homepage.png differdiff --git a/etc/logo-small.png b/etc/logo-small.pngindex 8f9958525..6e34acafe 100644Binary files a/etc/logo-small.png and b/etc/logo-small.png differdiff --git a/etc/logo.png b/etc/logo.pngindex d7f96778f..be7756291 100644Binary files a/etc/logo.png and b/etc/logo.png differdiff --git a/favicon.ico b/favicon.icoold mode 100755new mode 100644index 8ffb807b3..41ae987adBinary files a/favicon.ico and b/favicon.ico differdiff --git a/public/assets/styles/index.scss b/public/assets/styles/index.scssnew file mode 100644index 000000000..3c1b64384--- /dev/null+++ b/public/assets/styles/index.scss@@ -0,0 +1,4 @@+@import 'variables.scss';+@import 'main.scss';+@import 'grid.scss';+@import 'utility.scss';\ No newline at end of filediff --git a/public/assets/styles/main.scss b/public/assets/styles/main.scssindex 5089ec754..5c9a0fd7a 100644--- a/public/assets/styles/main.scss+++ b/public/assets/styles/main.scss@@ -1,15 +1,22 @@-@import 'variables.scss';-@import 'reset.scss';-@import 'grid.scss';-@import 'utility.scss';-/*******************************Site*******************************/+@-ms-viewport {+ width: device-width;+}+html,body {height: 100%;+ box-sizing: border-box;+ -ms-overflow-style: scrollbar;+}++*,+*::before,+*::after {+ box-sizing: inherit;}body {@@ -17,10 +24,9 @@ body {padding: 0px;overflow-x: hidden;min-width: 320px;- font-size: $font-size;font-family: $font-site;background-color: $bg-color;- color: $text-color;+ color: $gray-darkest;font-size: $font-size;}@@ -111,39 +117,34 @@ a:hover {.status-label {text-transform: uppercase;- color: $white;display: inline-block;line-height: 1;- padding: 5px 4px;font-weight: 600;- border: none;- border-radius: 3px;- font-size: $font-size-micro;+ font-size: $font-size-mini;}.status-open {- color: $text-color;- background-color: #e8e8e8;+ color: $gray-darkest;}.status-planned {- background-color: #6435c9;+ color: #6435c9;}.status-started {- background-color: #2185d0;+ color: #2185d0;}.status-completed {- background-color: #21ba45;+ color: #21ba45;}.status-declined {- background-color: #db2828+ color: #db2828}.status-duplicate {- background-color: #fbbd08;+ color: #d6a100;}/*******************************@@ -197,7 +198,7 @@ body, h1, h2, h3, h4, h5, .ui, input {.info {font-size: 90%;font-weight: 400;- color: rgba($text-color, .8);+ color: $gray-darker;}.right {@@ -226,7 +227,7 @@ svg.icon {font-weight: 600;letter-spacing: .3px;text-transform: uppercase;- color: #999;+ color: $gray-dark;display: block;&.active {cursor: pointer;diff --git a/public/assets/styles/reset.scss b/public/assets/styles/reset.scssdeleted file mode 100644index d9e1f3aaf..000000000--- a/public/assets/styles/reset.scss+++ /dev/null@@ -1,14 +0,0 @@-@-ms-viewport {- width: device-width;-}--html {- box-sizing: border-box;- -ms-overflow-style: scrollbar;-}--*,-*::before,-*::after {- box-sizing: inherit;-}\ No newline at end of filediff --git a/public/assets/styles/variables.scss b/public/assets/styles/variables.scssindex 08d0df86a..be77c66ab 100644--- a/public/assets/styles/variables.scss+++ b/public/assets/styles/variables.scss@@ -10,31 +10,101 @@ $font-size-xlarge: 22px;$font-site: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "Helvetica Neue", Helvetica, sans-serif;$font-code: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;-$main-color: #0069ff;-$admin-color: #365899;$bg-color: #fdfdfd;-$menu-color: #fff;-$text-color: #333;-$link-color: #07C;-$focus-color: #85b7d9;--// Buttons-$black-light: #232323;-$black: #000;$white: #fff;-$white-dark: #f9f9f9;-$gray-lightest: rgba(0,0,0,.03);-$gray-lighter: #eee;-$gray-light: #d5d5d5;-$gray: #d5d5d5;-$gray-dark: rgba(0, 0, 0, 0.3);-$gray-darker: rgba(0, 0, 0, 0.4);-$gray-darkest: rgba(0, 0, 0, 0.5);-$green: #28a745;-$green-darker: #49852e;-$red: #c82333;++// http://www.colorbox.io+// Luminosity 98 to 15 with Sine EaseOut+$gray-darkest: #262626;+$gray-darker: #5c5c5c;+$gray-dark: #929292;+$gray: #c2c2c2;+$gray-light: #e3e3e3;+$gray-lighter: #f5f5f5;+$gray-lightest: #fafafa;++$gray-scale: (+ darkest: $gray-darkest,+ darker: $gray-darker,+ dark: $gray-dark,+ default: $gray,+ light: $gray-light,+ lighter: $gray-lighter,+ lightest: $gray-lightest,+);++// http://www.colorbox.io+// Hue 121 to 121 SineEaseOut+// Saturation 5 to 80 SineEaseOut+// Luminosity 100 to 40 SineEaseOut+$green-darkest: #19801b;+$green-darker: #23a025;+$green-dark: #36c138;+$green: #58dd5a;+$green-light: #89f18b;+$green-lighter: #bffcc0;+$green-lightest: #f2fff2;++$green-scale: (+ darkest: $green-darkest,+ darker: $green-darker,+ dark: $green-dark,+ default: $green,+ light: $green-light,+ lighter: $green-lighter,+ lightest: $green-lightest,+);++// http://www.colorbox.io+// Hue 0 to 0 SineEaseOut+// Saturation 5 to 80 SineEaseOut+// Luminosity 100 to 40 SineEaseOut+$red-darkest: #801919;+$red-darker: #a02323;+$red-dark: #c13636;+$red: #dd5858;+$red-light: #f18989;+$red-lighter: #fcbfbf;+$red-lightest: #fff2f2;++$red-scale: (+ darkest: $red-darkest,+ darker: $red-darker,+ dark: $red-dark,+ default: $red,+ light: $red-light,+ lighter: $red-lighter,+ lightest: $red-lightest,+);+++// http://www.colorbox.io+// Hue 220 to 220 SineEaseOut+// Saturation 5 to 80 SineEaseOut+// Luminosity 100 to 40 SineEaseOut+$blue-darkest: #193c80;+$blue-darker: #234da0;+$blue-dark: #3664c1;+$blue: #5885dd;+$blue-light: #89acf1;+$blue-lighter: #bfd4fc;+$blue-lightest: #f2f7ff;++$main-color: #3b4ade;+$admin-color: #3b4ade;+$link-color: #3664c1;++$blue-scale: (+ darkest: $blue-darkest,+ darker: $blue-darker,+ dark: $blue-dark,+ default: $blue,+ light: $blue-light,+ lighter: $blue-lighter,+ lightest: $blue-lightest,+);+$orange: #ff9320;-$error: #ef7878;// Queries$sm-width: 576px;@@ -92,14 +162,14 @@ $xl-width: 1200px;@function textColorFor($color) {@if (lightness($color) > 60) {- @return #484848; // Lighter background, return dark color+ @return $gray-darkest; // Lighter background, return dark color} @else {- @return #ffffff; // Darker background, return light color+ @return $gray-lightest; // Darker background, return light color}}@mixin disabled() {- cursor: default;+ cursor: not-allowed;opacity: .45!important;background-image: none!important;-webkit-box-shadow: none!important;diff --git a/public/components/ShowPostResponse.tsx b/public/components/ShowPostResponse.tsxindex 0f02d140c..8589e01e7 100644--- a/public/components/ShowPostResponse.tsx+++ b/public/components/ShowPostResponse.tsx@@ -32,6 +32,7 @@ const DuplicateDetails = (props: PostResponseProps): JSX.Element | null => {interface PostResponseProps {status: string;response: PostResponse | null;+ showUser: boolean;}const StatusDetails = (props: PostResponseProps): JSX.Element | null => {@@ -53,7 +54,11 @@ export const ShowPostResponse = (props: PostResponseProps): JSX.Element => {return (<Segment className="l-response">{status.show && <ShowPostStatus status={status} />}- <Gravatar user={props.response.user} size="small" /> <UserName user={props.response.user} />+ {props.showUser && (+ <>+ <Gravatar user={props.response.user} size="small" /> <UserName user={props.response.user} />+ </>+ )}{status === PostStatus.Duplicate ? DuplicateDetails(props) : StatusDetails(props)}</Segment>);diff --git a/public/components/ShowTag.scss b/public/components/ShowTag.scssindex 9b0d45027..4baa1a402 100644--- a/public/components/ShowTag.scss+++ b/public/components/ShowTag.scss@@ -4,7 +4,7 @@display: inline-block;line-height: 1;vertical-align: baseline;- color: $text-color;+ color: $gray-darkest;font-weight: 600;border-radius: 3px;border: 0;diff --git a/public/components/VoteCounter.scss b/public/components/VoteCounter.scssindex 2f9791453..db9df8df1 100644--- a/public/components/VoteCounter.scss+++ b/public/components/VoteCounter.scss@@ -11,13 +11,14 @@width: 45px;font-weight: 700;cursor: pointer;- background-color: $bg-color;+ background-color: transparent;text-align: center;margin: 0 auto;padding: 0 0;+ color: $gray-darker;.icon {- color: #C4C9CD;+ color: $gray-darker;margin-bottom: -3px;}}@@ -31,7 +32,7 @@color: $main-color;.icon {- color: lighten($main-color, 20%) !important;+ color: $main-color;}}diff --git a/public/components/common/Button.scss b/public/components/common/Button.scssindex dbfaf8088..e0e977144 100644--- a/public/components/common/Button.scss+++ b/public/components/common/Button.scss@@ -19,7 +19,6 @@}&.m-cancel {- color: $link-color;background-color: transparent;&:hover {@@ -28,19 +27,19 @@}&.m-default {- color: $text-color;+ color: $gray-darkest;background-color: $gray-lightest;- border: 1px solid $gray;+ border: 1px solid $gray-light;&:hover {- background-color: $gray-lighter;+ border: 1px solid $gray-dark;}}&.m-positive {color: $white;- background-color: $green;- border: 1px solid $green;+ background-color: $green-dark;+ border: 1px solid $green-dark;&:hover {background-color: $green-darker;@@ -50,11 +49,12 @@&.m-danger {color: $red;- border: 1px solid $red;+ border: 1px solid $gray-light;background-color: transparent;&:hover {color: $white;+ border: 1px solid $red;background-color: $red;}}@@ -138,7 +138,7 @@&.m-social {background-color: $white;- color: $text-color;+ color: $gray-darkest;text-align: center;height: 40px;line-height: 22px;@@ -160,7 +160,9 @@&:hover {background-color: #fafafb;- color: $text-color;+ color: $gray-darkest;+ border: none;+ box-shadow: 0 0 0 1px rgba(20,11,47,0.1), 0 2px 4px -2px rgba(0,0,0,0.2);}}}diff --git a/public/components/common/DropDown.scss b/public/components/common/DropDown.scssindex 5bad07e6e..eac131e66 100644--- a/public/components/common/DropDown.scss+++ b/public/components/common/DropDown.scss@@ -14,7 +14,7 @@&.is-open {.c-dropdown-arrow {- border-color: transparent transparent $gray-dark;+ border-color: transparent transparent $gray;border-width: 0 5px 5px;}}@@ -25,15 +25,29 @@}}++ &.m-style-simple {++ }++ &.m-style-normal {+ .c-dropdown-control {+ border: 1px solid $gray-light;++ &:hover {+ box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);+ }+ }+ }+.c-dropdown-control {position: relative;+ cursor: pointer;overflow: hidden;background-color: $white;- border: 1px solid $gray-light;border-radius: 3px;box-sizing: border-box;- color: #333;- cursor: default;+ color: $gray-darkest;outline: none;padding: 8px 52px 8px 10px;transition: all 200ms ease;@@ -57,13 +71,9 @@margin-top: -ceil(2.5);position: absolute;right: 10px;- top: 14px;+ top: 40%;width: 0}-- &:hover {- box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);- }}.c-dropdown-menu {@@ -111,7 +121,6 @@}&.is-selected {- background-color: $gray-lightest;font-weight: 700;}}diff --git a/public/components/common/DropDown.tsx b/public/components/common/DropDown.tsxindex d20be6041..a45a2eee0 100644--- a/public/components/common/DropDown.tsx+++ b/public/components/common/DropDown.tsx@@ -17,12 +17,14 @@ export interface DropDownProps {placeholder?: string;searchable?: boolean;inline?: boolean;+ style: "normal" | "simple";highlightSelected?: boolean;header?: string;direction?: "left" | "right";onChange?: (item: DropDownItem) => void;onSearchChange?: (e: React.FormEvent<HTMLInputElement>) => void;- renderText?: (item?: DropDownItem) => JSX.Element | undefined;+ renderText?: (item?: DropDownItem) => JSX.Element | string | undefined;+ renderControl?: (item?: DropDownItem) => JSX.Element | string | undefined;}export interface DropDownState {@@ -35,6 +37,7 @@ export class DropDown extends React.Component<DropDownProps, DropDownState> {public static defaultProps: Partial<DropDownProps> = {direction: "right",+ style: "normal",highlightSelected: true};@@ -171,6 +174,7 @@ export class DropDown extends React.Component<DropDownProps, DropDownState> {"c-dropdown": true,[`${this.props.className}`]: this.props.className,"is-open": this.state.isOpen,+ [`m-style-${this.props.style}`]: true,"is-inline": this.props.inline,"m-right": this.props.direction === "right","m-left": this.props.direction === "left"@@ -179,11 +183,17 @@ export class DropDown extends React.Component<DropDownProps, DropDownState> {return (<div className={dropdownClass}><div onMouseDown={this.handleMouseDown} onTouchEnd={this.handleMouseDown}>- {this.props.renderText ? (- <div className="c-dropdown-text">{this.props.renderText(this.state.selected)}</div>+ {this.props.renderControl ? (+ <div className="c-dropdown-control">{this.props.renderControl(this.state.selected)}</div>) : (<div className="c-dropdown-control">- {this.state.isOpen && this.props.searchable ? search : <div>{text}</div>}+ {this.state.isOpen && this.props.searchable ? (+ search+ ) : this.props.renderText ? (+ this.props.renderText(this.state.selected)+ ) : (+ <div>{text}</div>+ )}<span className="c-dropdown-arrow" /></div>)}diff --git a/public/components/common/Footer.scss b/public/components/common/Footer.scssindex ddf86fc2b..caf021076 100644--- a/public/components/common/Footer.scss+++ b/public/components/common/Footer.scss@@ -18,7 +18,7 @@display: block;}span {- color: rgba($text-color, 0.5);+ color: rgba($gray-darkest, 0.5);display: none;}&:hover {@@ -32,7 +32,7 @@}.l-links a {- color: rgba($text-color, 0.5);+ color: rgba($gray-darker, 0.5);margin: 0px 10px;&:hover {color: $link-color;diff --git a/public/components/common/Header.scss b/public/components/common/Header.scssindex 1f4ba1e8b..0d8821e31 100644--- a/public/components/common/Header.scss+++ b/public/components/common/Header.scss@@ -83,7 +83,7 @@&:hover {> span {- color: $text-color;+ color: $gray-darkest;}}@@ -96,7 +96,7 @@top: 100%!important;opacity: 1;z-index: 11;- background-color: $menu-color;+ background-color: $white;box-shadow: 0 1px 3px 0 rgba(0,0,0,.08);border: 1px solid rgba(34,36,38,.15);min-width: 160px;@@ -111,7 +111,7 @@font-size: $font-size-mini;padding: 10px;display: block;- color: $text-color;+ color: $gray-darkest;text-transform: uppercase;font-weight: 600;cursor: default;@@ -121,9 +121,9 @@font-size: $font-size-small;padding: 10px;display: block;- color: $text-color;+ color: $gray-darkest;&:hover {- background-color: $gray-lightest;+ background-color: $gray-lighter;}}.c-menu-user-divider {diff --git a/public/components/common/Heading.scss b/public/components/common/Heading.scssindex 1fee28e9f..125e984b7 100644--- a/public/components/common/Heading.scss+++ b/public/components/common/Heading.scss@@ -10,7 +10,7 @@.c-heading-subtitle {font-weight: 400;margin-top: 5px;- color: $gray-darkest;+ color: $gray-darker;font-size: $font-size;}}diff --git a/public/components/common/Hint.scss b/public/components/common/Hint.scssnew file mode 100644index 000000000..330d45b30--- /dev/null+++ b/public/components/common/Hint.scss@@ -0,0 +1,18 @@+@import '~@fider/assets/styles/variables.scss';++.c-hint {+ position: relative;+ padding: 15px 35px 15px 15px;+ margin-bottom: 10px;+ color: $blue-darker;+ border-left: 4px solid $blue;+ background-color: $blue-lightest;++ .close {+ position: absolute;+ right: 15px;+ top: 15px;+ font-size: $font-size-large;+ cursor: pointer;+ }+}\ No newline at end of filediff --git a/public/components/common/Hint.tsx b/public/components/common/Hint.tsxnew file mode 100644index 000000000..df24857f9--- /dev/null+++ b/public/components/common/Hint.tsx@@ -0,0 +1,50 @@+import "./Hint.scss";++import React from "react";+import { FaTimes } from "react-icons/fa";++import { cache } from "@fider/services";++interface HintProps {+ permanentCloseKey?: string;+ condition?: boolean;+}++interface HintState {+ isClosed: boolean;+}++export class Hint extends React.Component<HintProps, HintState> {+ private cacheKey: string | undefined;++ constructor(props: HintProps) {+ super(props);+ this.cacheKey = this.props.permanentCloseKey ? `Hint-Closed-${this.props.permanentCloseKey}` : undefined;+ this.state = {+ isClosed: this.cacheKey ? cache.local.has(this.cacheKey) : false+ };+ }++ private close = () => {+ if (this.cacheKey) {+ cache.local.set(this.cacheKey, "true");+ }++ this.setState({+ isClosed: true+ });+ };++ public render() {+ if (this.props.condition === false || this.state.isClosed) {+ return null;+ }++ return (+ <p className="c-hint">+ <strong>HINT:</strong> {this.props.children}+ {this.cacheKey && <FaTimes onClick={this.close} className="close" />}+ </p>+ );+ }+}diff --git a/public/components/common/List.scss b/public/components/common/List.scssindex 61b03007f..030508dff 100644--- a/public/components/common/List.scss+++ b/public/components/common/List.scss@@ -21,7 +21,6 @@.c-list-item {padding: 15px 0 0 0;margin: 0 0 15px 0;- border-top: 1px solid $gray-lighter;&:first-child {border-top: none;padding-top: 0;diff --git a/public/components/common/Message.scss b/public/components/common/Message.scssindex a6a31c334..46cf57ace 100644--- a/public/components/common/Message.scss+++ b/public/components/common/Message.scss@@ -1,31 +1,24 @@@import '~@fider/assets/styles/variables.scss';.c-message {- border-style: solid;- border-width: 1px;- font-weight: 600;- padding: 10px;- border-radius: 3px;+ padding: 15px;margin-bottom: 10px;.icon {margin-right: 5px;+ margin-top: -4px;height: 14px;}- span {- vertical-align: middle;- }-&.m-success {color: $green-darker;- border-color: $green-darker;- background-color: rgba($green-darker, 0.08)+ border-left: 4px solid $green;+ background-color: $green-lightest;}&.m-error {- color: $error;- border-color: $error;- background-color: rgba($error, 0.08)+ color: $red-darker;+ border-left: 4px solid $red;+ background-color: $red-lightest;}}\ No newline at end of filediff --git a/public/components/common/Message.tsx b/public/components/common/Message.tsxindex c55efde8e..a5c0da073 100644--- a/public/components/common/Message.tsx+++ b/public/components/common/Message.tsx@@ -18,9 +18,9 @@ export const Message: React.StatelessComponent<MessageProps> = props => {const icon = props.type === "error" ? <FaBan /> : <FaRegCheckCircle />;return (- <div className={className}>+ <p className={className}>{props.showIcon === true && icon}<span>{props.children}</span>- </div>+ </p>);};diff --git a/public/components/common/Modal.scss b/public/components/common/Modal.scssindex 5e012c939..7b4ce9b9a 100644--- a/public/components/common/Modal.scss+++ b/public/components/common/Modal.scss@@ -45,7 +45,7 @@text-align: left;background: #fff;border: none;- border-radius: 0.3rem;+ border-radius: 3px;-webkit-box-shadow: 1px 3px 3px 0 rgba(0,0,0,.2), 1px 3px 15px 2px rgba(0,0,0,.2);box-shadow: 1px 3px 3px 0 rgba(0,0,0,.2), 1px 3px 15px 2px rgba(0,0,0,.2);width: 100%;@@ -79,9 +79,11 @@}.c-modal-footer {- background: #f9fafb;+ background: $gray-lightest;padding: 10px;- border-top: 1px solid rgba(34,36,38,.15);+ border-bottom-right-radius: 3px;+ border-bottom-left-radius: 3px;+ border-top: 1px solid $gray-light;&.m-right {text-align: right;}diff --git a/public/components/common/Segment.scss b/public/components/common/Segment.scssindex 573f5bbe0..5f85f0a06 100644--- a/public/components/common/Segment.scss+++ b/public/components/common/Segment.scss@@ -5,9 +5,13 @@padding: 15px;margin: 10px 0;background-color: $white;- box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15);border-radius: 5px;- border: 0.1px solid rgba(34, 36, 38, 0.15);+ box-shadow: 0px 2px 5px 0px $gray-light;+ transition: all 0.2s ease;++ &:hover {+ box-shadow: 0px 5px 10px 0px $gray-light;+ }&:first-child {margin-top: 0em;@@ -16,10 +20,14 @@.c-segments {position: relative;- box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15);+ box-shadow: 0px 2px 5px 0px $gray-light;border-radius: 5px;margin: 10px 0;- border: 0.1px solid rgba(34, 36, 38, 0.15);+ transition: all 0.2s ease;++ &:hover {+ box-shadow: 0px 5px 10px 0px $gray-light;+ }&:first-child {margin-top: 0em;@@ -28,7 +36,6 @@.c-segment {margin: 0;box-shadow: none;- border-radius: 0px;border: none;border-bottom: 0.1px solid rgba(34, 36, 38, 0.15);&:last-child {diff --git a/public/components/common/Toggle.scss b/public/components/common/Toggle.scssindex c19cf9c18..065219a74 100644--- a/public/components/common/Toggle.scss+++ b/public/components/common/Toggle.scss@@ -22,8 +22,8 @@label {display: inline-block;vertical-align: middle;- width: 40px;- height: 20px;+ width: 30px;+ height: 15px;border-radius: 10px;position: relative;cursor: pointer;@@ -32,23 +32,23 @@.switch {position: absolute;- width: 19px;- height: 18px;+ width: 13px;+ height: 13px;margin-top: 1px;margin-left: 1px;border-radius: 1em;- background: $white;- box-shadow: 5px 0px 28px -9px rgba(0, 0, 0, 0.75);+ box-shadow: 0px 1px 5px 0px $gray-dark;+ background: $gray-lightest;transition: transform .2s ease-in;}input:checked ~ label {- background: $green;+ background: $green-dark;}input:checked ~ label .switch {- background: $white;- transform: translatex(19px);+ background: $gray-lightest;+ transform: translatex(15px);transition: transform .2s ease-in;}}diff --git a/public/components/common/UserName.scss b/public/components/common/UserName.scssindex 952dc5a20..f858fb4ed 100644--- a/public/components/common/UserName.scss+++ b/public/components/common/UserName.scss@@ -1,11 +1,10 @@@import '~@fider/assets/styles/variables.scss';.c-username {- color: $black-light;- font-weight: 500;+ color: $gray-darkest;+ font-weight: 600;&.m-staff {- font-weight: 600;color: $admin-color;border-color: $admin-color;}diff --git a/public/components/common/form/Form.scss b/public/components/common/form/Form.scssindex 23f282f69..0e8b2d37b 100644--- a/public/components/common/form/Form.scss+++ b/public/components/common/form/Form.scss@@ -59,7 +59,8 @@border-radius: 3px;&:focus {- border: 1px solid $focus-color;+ border: 1px solid $gray;+ box-shadow: 0px 0px 1px 1px $gray-light;}&:disabled {@@ -97,8 +98,11 @@input[type=text],textarea,select {- background-color: rgba($error, .05);- border-color: $error;+ border-color: $red;+ }++ label {+ color: $red;}}@@ -127,7 +131,7 @@.c-form-input-suffix {line-height: 20px;flex: 0 0 auto;- padding: 8px 10px 9px 10px;;+ padding: 8px 10px 9px 10px;font-weight: 600;background-color: $gray-lighter;border-top-right-radius: 3px;@@ -147,7 +151,7 @@}.c-form-field-error {- color: $error;+ color: $red;font-weight: bold;font-size: $font-size-small;margin: 0 0 10px 0;diff --git a/public/components/common/index.tsx b/public/components/common/index.tsxindex 42b291cdd..fa3b7ccf5 100644--- a/public/components/common/index.tsx+++ b/public/components/common/index.tsx@@ -12,6 +12,7 @@ export * from "./MultiLineText";export * from "./EnvironmentInfo";export * from "./Gravatar";export * from "./Message";+export * from "./Hint";export * from "./Footer";export * from "./Header";export * from "./Heading";diff --git a/public/index.tsx b/public/index.tsxindex a4c35bf5c..c1e7bdbf0 100644--- a/public/index.tsx+++ b/public/index.tsx@@ -12,7 +12,7 @@ const Loading = () => (</div>);-import "@fider/assets/styles/main.scss";+import "@fider/assets/styles/index.scss";const logProductionError = (err: Error) => {if (Fider.isProduction()) {diff --git a/public/jest.setup.ts b/public/jest.setup.tsindex 5855272ad..d24f93460 100644--- a/public/jest.setup.ts+++ b/public/jest.setup.ts@@ -3,23 +3,23 @@ import Adapter from "enzyme-adapter-react-16";configure({ adapter: new Adapter() });-let storage: {+let localStorageCache: {[key: string]: string | undefined;};beforeEach(() => {- storage = {};+ localStorageCache = {};});-(window as any).sessionStorage = {+(window as any).localStorage = {getItem: (key: string) => {- const value = storage[key];+ const value = localStorageCache[key];return typeof value === "undefined" ? null : value;},setItem: (key: string, value: string) => {- storage[key] = value;+ localStorageCache[key] = value;},removeItem: (key: string) => {- return delete storage[key];+ return delete localStorageCache[key];}};diff --git a/public/pages/Administration/components/SideMenu.scss b/public/pages/Administration/components/SideMenu.scssindex 7188138de..95ce0ca62 100644--- a/public/pages/Administration/components/SideMenu.scss+++ b/public/pages/Administration/components/SideMenu.scss@@ -18,7 +18,7 @@> div {width: 30px;height: 4px;- background-color: $text-color;+ background-color: $gray-darkest;margin: 4px 0;transition: 0.4s;}@@ -48,18 +48,18 @@display: block;padding: 12px;border-bottom: 1px solid rgba(34, 36, 38, .1);- color: $text-color;+ color: $gray-darkest;&:hover {- color: $text-color;- background-color: $gray-lightest;+ color: $gray-darkest;+ background-color: $gray-lighter;}&.m-active {color: $admin-color;border-left: 2px solid $admin-color;font-weight: 600;- background-color: $menu-color;+ background-color: $white;&:hover {color: $admin-color;}diff --git a/public/pages/Administration/pages/ManageMembers.page.tsx b/public/pages/Administration/pages/ManageMembers.page.tsxindex f7ec11d75..1d496a349 100644--- a/public/pages/Administration/pages/ManageMembers.page.tsx+++ b/public/pages/Administration/pages/ManageMembers.page.tsx@@ -50,6 +50,7 @@ const UserListItem = (props: UserListItemProps) => {className="l-user-actions"inline={true}highlightSelected={false}+ style="simple"items={[!blocked &&(!!collaborator || isVisitor) && { label: "Promote to Administrator", value: "to-administrator" },@@ -58,7 +59,7 @@ const UserListItem = (props: UserListItemProps) => {isVisitor && !blocked && { label: "Block User", value: "block" },isVisitor && !!blocked && { label: "Unblock User", value: "unblock" }]}- renderText={renderEllipsis}+ renderControl={renderEllipsis}onChange={actionSelected}/>)}diff --git a/public/pages/Home/Home.page.scss b/public/pages/Home/Home.page.scssindex 6127b63a5..1ca3d8599 100644--- a/public/pages/Home/Home.page.scss+++ b/public/pages/Home/Home.page.scss@@ -3,14 +3,53 @@#p-home {.welcome-message {- margin-bottom: 20px;+ margin-bottom: 10px;+ }++ .l-lonely {+ .c-hint {+ max-width: 500px;+ text-align: left;+ margin: 0 auto 10px auto;+ }+ }++ .l-welcome-col {+ @include media("sm") {+ background-color: $gray-lighter;+ box-shadow: 1px 2px 5px 1px $gray-light;+ border-radius: 3px;+ margin: 0px 10px 10px 10px;+ }}.l-filter-col {display: flex;align-items: center;@include media(">=md") {- padding-left: 65px;+ padding-left: 25px;+ }+ .c-form-field{+ > div {+ display: inline-block;+ .subtitle {+ display: inline-block;+ margin: 6px 0 0 0;+ }+ }+ }+ .c-dropdown {+ .c-dropdown-control {+ background-color: transparent;+ font-weight: bold;+ border: none;+ font-size: $font-size-tiny;+ text-transform: uppercase;+ padding: 5px 25px 5px 5px;+ &:hover {+ background-color: $gray-lighter;+ }+ }}}@@ -34,14 +73,4 @@}}}-- #input-title {- border: none;- border-bottom: 1px dashed $gray-darker;- background-color: transparent;- font-size: $font-size-big;- padding: 0px 0px 5px 0px;- font-weight: 600;- border-radius: 0;- }}\ No newline at end of filediff --git a/public/pages/Home/Home.page.tsx b/public/pages/Home/Home.page.tsxindex 756a15ddd..36579a679 100644--- a/public/pages/Home/Home.page.tsx+++ b/public/pages/Home/Home.page.tsx@@ -2,7 +2,7 @@ import "./Home.page.scss";import React from "react";import { Post, Tag, PostStatus } from "@fider/models";-import { MultiLineText } from "@fider/components";+import { MultiLineText, Hint } from "@fider/components";import { Fider } from "@fider/services";import { SimilarPosts } from "./components/SimilarPosts";import { FaRegLightbulb } from "react-icons/fa";@@ -21,7 +21,14 @@ export interface HomePageState {const Lonely = () => {return (- <div className="center">+ <div className="l-lonely center">+ <Hint+ permanentCloseKey="at-least-3-posts"+ condition={Fider.session.isAuthenticated && Fider.session.user.isAdministrator}+ >+ It's recommended that you post <strong>at least 3</strong> suggestions here before sharing this site. The+ initial content is key to start the interactions with your audience.+ </Hint><p><FaRegLightbulb /></p>@@ -63,7 +70,7 @@ export default class HomePage extends React.Component<HomePageProps, HomePageStareturn (<div id="p-home" className="page container"><div className="row">- <div className="col-md-4">+ <div className="l-welcome-col col-md-4"><MultiLineTextclassName="welcome-message"text={Fider.session.tenant.welcomeMessage || defaultWelcomeMessage}@@ -74,7 +81,7 @@ export default class HomePage extends React.Component<HomePageProps, HomePageStaonTitleChanged={this.setTitle}/></div>- <div className="col-md-8">+ <div className="l-posts-col col-md-8">{this.isLonely() ? (<Lonely />) : this.state.title ? (diff --git a/public/pages/Home/components/ListPosts.scss b/public/pages/Home/components/ListPosts.scssindex bc5935f9b..1be36e48c 100644--- a/public/pages/Home/components/ListPosts.scss+++ b/public/pages/Home/components/ListPosts.scss@@ -6,11 +6,12 @@border-top-width: 0.1px !important;.c-list-item-title {- color: $text-color;+ color: $gray-darkest;+ font-weight: 500;display: block;max-width: 85%;margin-bottom: 10px;- font-size: $font-size-big;+ font-size: $font-size-large;&:hover {color: $main-color;}@@ -30,7 +31,7 @@}.c-list-item-description {- color: $gray-darkest;+ color: $gray-darker;min-height: 20px;margin-bottom: 10px;}diff --git a/public/pages/Home/components/ListPosts.tsx b/public/pages/Home/components/ListPosts.tsxindex d677dc560..438f799cf 100644--- a/public/pages/Home/components/ListPosts.tsx+++ b/public/pages/Home/components/ListPosts.tsx@@ -25,7 +25,7 @@ const ListPostItem = (props: { post: Post; user?: CurrentUser; tags: Tag[] }) =>{props.post.title}</a><MultiLineText className="c-list-item-description" text={props.post.description} style="simple" />- <ShowPostResponse status={props.post.status} response={props.post.response} />+ <ShowPostResponse showUser={false} status={props.post.status} response={props.post.response} />{props.tags.map(tag => (<ShowTag key={tag.id} size="tiny" tag={tag} />))}diff --git a/public/pages/Home/components/PostFilter.scss b/public/pages/Home/components/PostFilter.scssindex 9543148ab..759d8ca4f 100644--- a/public/pages/Home/components/PostFilter.scss+++ b/public/pages/Home/components/PostFilter.scss@@ -1,11 +1,7 @@@import '~@fider/assets/styles/variables.scss';.l-post-filter {- .c-dropdown-text {- font-weight: bold;- cursor: pointer;- border-bottom: 1px dashed $gray-darker;- }+ vertical-align: middle;.c-dropdown-menu {max-height: -webkit-max-content;@@ -16,7 +12,7 @@.counter {font-size: 8px;background-color: $gray-lighter;- color: $text-color;+ color: $gray-darkest;display: inline-block;min-width: 15px;padding: 0px 5px;diff --git a/public/pages/Home/components/PostFilter.tsx b/public/pages/Home/components/PostFilter.tsxindex 7006a3a73..115c9900d 100644--- a/public/pages/Home/components/PostFilter.tsx+++ b/public/pages/Home/components/PostFilter.tsx@@ -16,10 +16,6 @@ export const PostFilter = (props: PostFilterProps) => {props.viewChanged(item.value as string);};- const renderText = (item?: DropDownItem) => {- return <>{item!.label.toLowerCase()}</>;- };-const options: DropDownItem[] = [{ value: "trending", label: "Trending" },{ value: "recent", label: "Recent" },@@ -47,17 +43,17 @@ export const PostFilter = (props: PostFilterProps) => {const activeView = viewExists ? props.activeView : "trending";return (- <>- Show{" "}+ <div>+ <span className="subtitle">View</span><DropDown- className="l-post-filter"header="What do you want to see?"+ className="l-post-filter"inline={true}+ style="simple"items={options}- renderText={renderText}defaultValue={activeView}onChange={handleChangeView}- />{" "}- </>+ />+ </div>);};diff --git a/public/pages/Home/components/PostInput.tsx b/public/pages/Home/components/PostInput.tsxindex ff6051852..b9636ac35 100644--- a/public/pages/Home/components/PostInput.tsx+++ b/public/pages/Home/components/PostInput.tsx@@ -1,7 +1,7 @@import React from "react";import { Button, ButtonClickEvent, Input, Form, TextArea } from "@fider/components";import { SignInModal } from "@fider/components";-import { cache, actions, Failure, Fider, device } from "@fider/services";+import { cache, actions, Failure, Fider } from "@fider/services";interface PostInputProps {placeholder: string;@@ -25,8 +25,8 @@ export class PostInput extends React.Component<PostInputProps, PostInputState> {constructor(props: PostInputProps) {super(props);this.state = {- title: (Fider.session.isAuthenticated && cache.get(CACHE_TITLE_KEY)) || "",- description: (Fider.session.isAuthenticated && cache.get(CACHE_DESCRIPTION_KEY)) || "",+ title: (Fider.session.isAuthenticated && cache.session.get(CACHE_TITLE_KEY)) || "",+ description: (Fider.session.isAuthenticated && cache.session.get(CACHE_DESCRIPTION_KEY)) || "",focused: false,showSignIn: false};@@ -36,12 +36,6 @@ export class PostInput extends React.Component<PostInputProps, PostInputState> {}}- public componentDidMount() {- if (Fider.session.isAuthenticated && this.title && !device.isTouch()) {- this.title.focus();- }- }-private handleTitleFocus = () => {if (!Fider.session.isAuthenticated && this.title) {this.title.blur();@@ -50,13 +44,13 @@ export class PostInput extends React.Component<PostInputProps, PostInputState> {};private setTitle = (title: string) => {- cache.set(CACHE_TITLE_KEY, title);+ cache.session.set(CACHE_TITLE_KEY, title);this.setState({ title });this.props.onTitleChanged(title);};private setDescription = (description: string) => {- cache.set(CACHE_DESCRIPTION_KEY, description);+ cache.session.set(CACHE_DESCRIPTION_KEY, description);this.setState({ description });};@@ -65,7 +59,7 @@ export class PostInput extends React.Component<PostInputProps, PostInputState> {const result = await actions.createPost(this.state.title, this.state.description);if (result.ok) {this.setState({ error: undefined });- cache.remove(CACHE_TITLE_KEY, CACHE_DESCRIPTION_KEY);+ cache.session.remove(CACHE_TITLE_KEY, CACHE_DESCRIPTION_KEY);location.href = `/posts/${result.data.number}/${result.data.slug}`;event.preventEnable();} else if (result.error) {diff --git a/public/pages/Home/components/PostsContainer.tsx b/public/pages/Home/components/PostsContainer.tsxindex e9d513055..38463e36b 100644--- a/public/pages/Home/components/PostsContainer.tsx+++ b/public/pages/Home/components/PostsContainer.tsx@@ -100,7 +100,7 @@ export class PostsContainer extends React.Component<PostsContainerProps, PostsCo<><div className="row">{!this.state.query && (- <div className="l-filter-col col-sm-7 col-md-8 col-lg-9 mb-2">+ <div className="l-filter-col col-7 col-md-8 col-lg-9 mb-2"><Field><PostFilteractiveView={this.state.view}@@ -115,7 +115,7 @@ export class PostsContainer extends React.Component<PostsContainerProps, PostsCo</Field></div>)}- <div className={!this.state.query ? `l-search-col col-sm-5 col-md-4 col-lg-3 mb-2` : "col-sm-12 mb-2"}>+ <div className={!this.state.query ? `l-search-col col-5 col-md-4 col-lg-3 mb-2` : "col-sm-12 mb-2"}><Inputfield="query"icon={this.state.query ? FaTimes : FaSearch}diff --git a/public/pages/Home/components/TagsFilter.scss b/public/pages/Home/components/TagsFilter.scssindex c106675a1..13cfccc78 100644--- a/public/pages/Home/components/TagsFilter.scss+++ b/public/pages/Home/components/TagsFilter.scss@@ -1,9 +1,5 @@@import '~@fider/assets/styles/variables.scss';.l-tags-filter {- .c-dropdown-text {- font-weight: 700;- cursor: pointer;- border-bottom: 1px dashed $gray-darker;- }+ vertical-align: middle;}\ No newline at end of filediff --git a/public/pages/Home/components/TagsFilter.tsx b/public/pages/Home/components/TagsFilter.tsxindex f55d2199a..55fc8e153 100644--- a/public/pages/Home/components/TagsFilter.tsx+++ b/public/pages/Home/components/TagsFilter.tsx@@ -66,17 +66,18 @@ export class TagsFilter extends React.Component<TagsFilterProps, TagsFilterState});return (- <>- with{" "}+ <div>+ <span className="subtitle">with</span><DropDownclassName="l-tags-filter"inline={true}+ style="simple"highlightSelected={false}items={items}- renderText={this.renderText}onChange={this.onChange}+ renderText={this.renderText}/>- </>+ </div>);}}diff --git a/public/pages/ShowPost/ShowPost.page.tsx b/public/pages/ShowPost/ShowPost.page.tsxindex 0510ca565..47fb4a34b 100644--- a/public/pages/ShowPost/ShowPost.page.tsx+++ b/public/pages/ShowPost/ShowPost.page.tsx@@ -102,7 +102,7 @@ export default class ShowPostPage extends React.Component<ShowPostPageProps, Sho)}<span className="info">- Shared <Moment date={this.props.post.createdAt} /> by <Gravatar user={this.props.post.user} />{" "}+ <Moment date={this.props.post.createdAt} /> · <Gravatar user={this.props.post.user} />{" "}<UserName user={this.props.post.user} /></span></div>@@ -115,14 +115,10 @@ export default class ShowPostPage extends React.Component<ShowPostPageProps, Sho<TextArea field="description" value={this.state.newDescription} onChange={this.setNewDescription} /></Form>) : (- <MultiLineText- className="description"- text={this.props.post.description || "No description provided."}- style="simple"- />+ <MultiLineText className="description" text={this.props.post.description} style="simple" />)}- <ShowPostResponse status={this.props.post.status} response={this.props.post.response} />+ <ShowPostResponse showUser={true} status={this.props.post.status} response={this.props.post.response} /></div><div className="action-col">diff --git a/public/pages/ShowPost/components/CommentInput.tsx b/public/pages/ShowPost/components/CommentInput.tsxindex c302902ce..743035d9e 100644--- a/public/pages/ShowPost/components/CommentInput.tsx+++ b/public/pages/ShowPost/components/CommentInput.tsx@@ -25,7 +25,7 @@ export class CommentInput extends React.Component<CommentInputProps, CommentInpusuper(props);this.state = {- content: (Fider.session.isAuthenticated && cache.get(this.getCacheKey())) || "",+ content: (Fider.session.isAuthenticated && cache.session.get(this.getCacheKey())) || "",showSignIn: false};}@@ -35,7 +35,7 @@ export class CommentInput extends React.Component<CommentInputProps, CommentInpu}private commentChanged = (content: string) => {- cache.set(this.getCacheKey(), content);+ cache.session.set(this.getCacheKey(), content);this.setState({ content });};@@ -46,7 +46,7 @@ export class CommentInput extends React.Component<CommentInputProps, CommentInpuconst result = await actions.createComment(this.props.post.number, this.state.content);if (result.ok) {- cache.remove(this.getCacheKey());+ cache.session.remove(this.getCacheKey());location.reload();} else {this.setState({diff --git a/public/pages/ShowPost/components/Comments.scss b/public/pages/ShowPost/components/Comments.scssindex 5f59949d7..1cfc6ea4a 100644--- a/public/pages/ShowPost/components/Comments.scss+++ b/public/pages/ShowPost/components/Comments.scss@@ -6,7 +6,7 @@}.c-avatar {- margin-right: 10px;+ margin-right: 5px;vertical-align: top;margin-top: 2px;}@@ -29,12 +29,6 @@}.l-more-actions {- cursor: pointer;- display: inline-block;- margin-left: 10px;- position: relative;- top: 2px;-.c-dropdown-menu {border-radius: 5px;width: 100px;diff --git a/public/pages/ShowPost/components/ModerationPanel.tsx b/public/pages/ShowPost/components/ModerationPanel.tsxindex d66570350..bb47733b8 100644--- a/public/pages/ShowPost/components/ModerationPanel.tsx+++ b/public/pages/ShowPost/components/ModerationPanel.tsx@@ -2,7 +2,6 @@ import React from "react";import { PostStatus, Post } from "@fider/models";import { actions, navigator, Failure, Fider } from "@fider/services";import { Form, Modal, Button, List, ListItem, TextArea } from "@fider/components";-import { FaTimes } from "react-icons/fa";interface ModerationPanelProps {post: Post;@@ -86,7 +85,7 @@ export class ModerationPanel extends React.Component<ModerationPanelProps, Moder<List><ListItem><Button color="danger" size="tiny" fluid={true} onClick={this.showModal}>- <FaTimes /> Delete+ Delete</Button></ListItem></List>diff --git a/public/pages/ShowPost/components/ShowComment.tsx b/public/pages/ShowPost/components/ShowComment.tsxindex 7966d7d79..d63e22aa9 100644--- a/public/pages/ShowPost/components/ShowComment.tsx+++ b/public/pages/ShowPost/components/ShowComment.tsx@@ -141,13 +141,15 @@ export class ShowComment extends React.Component<ShowCommentProps, ShowCommentSt<DropDownclassName="l-more-actions"direction="left"+ inline={true}+ style="simple"highlightSelected={false}items={[{ label: "Edit", value: "edit" },{ label: "Delete", value: "delete", render: <span style={{ color: "red" }}>Delete</span> }]}onChange={this.onActionSelected}- renderText={this.renderEllipsis}+ renderControl={this.renderEllipsis}/>)}<div className="c-comment-text">diff --git a/public/pages/UI/UIToolkit.page.scss b/public/pages/UI/UIToolkit.page.scssnew file mode 100644index 000000000..1ef32388c--- /dev/null+++ b/public/pages/UI/UIToolkit.page.scss@@ -0,0 +1,67 @@+@import '~@fider/assets/styles/variables.scss';++$color-box-size: 100px;++#p-ui-toolkit {+ .color-scale {+ margin-bottom: 10px;+ }+ .color {+ width: $color-box-size;+ height: $color-box-size;+ display: inline-block;+ margin: 0px 2px;+ border-radius: 5px;+ &:before {+ width: $color-box-size;+ height: $color-box-size;+ line-height: $color-box-size;+ text-align: center;+ display: block;+ }++ @each $name, $color in $gray-scale {+ &.gray-#{$name} {+ color: textColorFor($color);+ box-shadow: 0px 1px 1px 0px rgba(textColorFor($color), 0.2);+ background-color: $color;+ &:before {+ content: "#{$color}";+ }+ }+ }++ @each $name, $color in $green-scale {+ &.green-#{$name} {+ color: textColorFor($color);+ box-shadow: 0px 1px 1px 0px rgba(textColorFor($color), 0.2);+ background-color: $color;+ &:before {+ content: "#{$color}";+ }+ }+ }++ @each $name, $color in $red-scale {+ &.red-#{$name} {+ color: textColorFor($color);+ box-shadow: 0px 1px 1px 0px rgba(textColorFor($color), 0.2);+ background-color: $color;+ &:before {+ content: "#{$color}";+ }+ }+ }++ @each $name, $color in $blue-scale {+ &.blue-#{$name} {+ color: textColorFor($color);+ box-shadow: 0px 1px 1px 0px rgba(textColorFor($color), 0.2);+ background-color: $color;+ &:before {+ content: "#{$color}";+ }+ }+ }+ }+}\ No newline at end of filediff --git a/public/pages/UI/UIToolkit.page.tsx b/public/pages/UI/UIToolkit.page.tsxindex 378230a4b..708e6a4a5 100644--- a/public/pages/UI/UIToolkit.page.tsx+++ b/public/pages/UI/UIToolkit.page.tsx@@ -1,3 +1,5 @@+import "./UIToolkit.page.scss";+import React from "react";import { PostStatus, UserStatus } from "@fider/models";import {@@ -20,7 +22,10 @@ import {RadioButton,Select,Field,- SelectOption+ SelectOption,+ ButtonClickEvent,+ Message,+ Hint} from "@fider/components";import { User, UserRole, Tag } from "@fider/models";import { notify, Failure } from "@fider/services";@@ -71,6 +76,10 @@ export default class UIToolkitPage extends React.Component<{}, UIToolkitPageStat}};+ private showLoading = async (e: ButtonClickEvent) => {+ return e.preventEnable();+ };+private forceError = async () => {this.setState({error: {@@ -85,6 +94,13 @@ export default class UIToolkitPage extends React.Component<{}, UIToolkitPageStat};private renderText = (item?: DropDownItem) => {+ if (item) {+ return `${item.label} (value: ${item.value})`;+ }+ return <span>No country is selected</span>;+ };++ private renderControl = (item?: DropDownItem) => {if (item) {return item.render;}@@ -94,11 +110,49 @@ export default class UIToolkitPage extends React.Component<{}, UIToolkitPageStatpublic render() {return (<div id="p-ui-toolkit" className="page container">+ <div className="color-scale">+ <div className="color gray-darkest" />+ <div className="color gray-darker" />+ <div className="color gray-dark" />+ <div className="color gray-default" />+ <div className="color gray-light" />+ <div className="color gray-lighter" />+ <div className="color gray-lightest" />+ </div>+ <div className="color-scale">+ <div className="color green-darkest" />+ <div className="color green-darker" />+ <div className="color green-dark" />+ <div className="color green-default" />+ <div className="color green-light" />+ <div className="color green-lighter" />+ <div className="color green-lightest" />+ </div>+ <div className="color-scale">+ <div className="color red-darkest" />+ <div className="color red-darker" />+ <div className="color red-dark" />+ <div className="color red-default" />+ <div className="color red-light" />+ <div className="color red-lighter" />+ <div className="color red-lightest" />+ </div>+ <div className="color-scale">+ <div className="color blue-darkest" />+ <div className="color blue-darker" />+ <div className="color blue-dark" />+ <div className="color blue-default" />+ <div className="color blue-light" />+ <div className="color blue-lighter" />+ <div className="color blue-lightest" />+ </div>+<h1>Heading 1</h1><h2>Heading 2</h2><h3>Heading 3</h3><h4>Heading 4</h4><h5>Heading 5</h5>+ <h6>Heading 6</h6><p>General Text Paragraph</p><p className="info">Info Text</p>@@ -245,6 +299,19 @@ export default class UIToolkitPage extends React.Component<{}, UIToolkitPageStatDanger</Button></ListItem>++ <ListItem>+ <Button onClick={this.showLoading}>+ <FaRegLightbulb /> Loading+ </Button>+ <Button onClick={this.showLoading}>Loading</Button>+ <Button color="positive" onClick={this.showLoading}>+ Loading+ </Button>+ <Button color="danger" onClick={this.showLoading}>+ Loading+ </Button>+ </ListItem></List><h1>Toggle</h1>@@ -334,6 +401,18 @@ export default class UIToolkitPage extends React.Component<{}, UIToolkitPageStat<h1>Loader</h1><Loader />+ <h1>Message Box</h1>+ <Message showIcon={true} type="error">+ Something went wrong.+ </Message>+ <Message showIcon={true} type="success">+ Your order has been confirmed.+ </Message>++ <h1>Hints</h1>+ <Hint permanentCloseKey="ui-toolkip-example">Did you know that you can close this permanently?</Hint>+ <Hint>You can't close this one :)</Hint>+<h1>Form</h1><Form error={this.state.error}><Input label="Title" field="title">@@ -387,7 +466,20 @@ export default class UIToolkitPage extends React.Component<{}, UIToolkitPageStat/></Field>- <Field label="Color (custom render)">+ <Field label="Country (custom render text)">+ <DropDown+ items={[+ { label: "Brazil", value: "br" },+ { label: "United States", value: "us" },+ { label: "Ireland", value: "ie" }+ ]}+ defaultValue={"1"}+ renderText={this.renderText}+ placeholder="Select a number"+ />+ </Field>++ <Field label="Color (custom render control)"><DropDownitems={[{ label: "Green", value: "green", render: <span style={{ color: "green" }}>Green</span> },@@ -396,8 +488,9 @@ export default class UIToolkitPage extends React.Component<{}, UIToolkitPageStat]}placeholder="Select a color"inline={true}+ style="simple"header="What color do you like the most?"- renderText={this.renderText}+ renderControl={this.renderControl}/></Field>diff --git a/public/services/cache.spec.ts b/public/services/cache.spec.tsindex f92a1b310..0cb27d137 100644--- a/public/services/cache.spec.ts+++ b/public/services/cache.spec.ts@@ -1,16 +1,19 @@import { cache } from "./cache";test("cache starts empty", () => {- const value = cache.get("my-key");+ const value = cache.local.get("my-key");expect(value).toBeNull();++ expect(cache.local.has("my-key")).toBeFalsy();});test("can set, remove and get from cache", () => {- cache.set("my-key", "Hello World");- const value = cache.get("my-key");+ cache.local.set("my-key", "Hello World");+ const value = cache.local.get("my-key");expect(value).toBe("Hello World");+ expect(cache.local.has("my-key")).toBeTruthy();- cache.remove("my-key");- const newValue = cache.get("my-key");+ cache.local.remove("my-key");+ const newValue = cache.local.get("my-key");expect(newValue).toBeNull();});diff --git a/public/services/cache.ts b/public/services/cache.tsindex 4a13b3eb7..c13affdaa 100644--- a/public/services/cache.ts+++ b/public/services/cache.ts@@ -1,20 +1,58 @@-export const cache = {- set: (key: string, value: string): void => {- if (window.sessionStorage) {- window.sessionStorage.setItem(key, value);+const set = (storage: Storage, key: string, value: string): void => {+ if (storage) {+ storage.setItem(key, value);+ }+};++const get = (storage: Storage, key: string): string | null => {+ if (window.localStorage) {+ return storage.getItem(key);+ }+ return null;+};++const has = (storage: Storage, key: string): boolean => {+ if (storage) {+ return !!storage.getItem(key);+ }+ return false;+};++const remove = (storage: Storage, ...keys: string[]): void => {+ if (storage && keys) {+ for (const key of keys) {+ storage.removeItem(key);}- },- get: (key: string): string | null => {- if (window.sessionStorage) {- return window.sessionStorage.getItem(key);+ }+};++export const cache = {+ local: {+ set: (key: string, value: string): void => {+ set(window.localStorage, key, value);+ },+ get: (key: string): string | null => {+ return get(window.localStorage, key);+ },+ has: (key: string): boolean => {+ return has(window.localStorage, key);+ },+ remove: (...keys: string[]): void => {+ remove(window.localStorage, ...keys);}- return null;},- remove: (...keys: string[]): void => {- if (window.sessionStorage && keys) {- for (const key of keys) {- window.sessionStorage.removeItem(key);- }+ session: {+ set: (key: string, value: string): void => {+ set(window.sessionStorage, key, value);+ },+ get: (key: string): string | null => {+ return get(window.sessionStorage, key);+ },+ has: (key: string): boolean => {+ return has(window.sessionStorage, key);+ },+ remove: (...keys: string[]): void => {+ remove(window.sessionStorage, ...keys);}}};diff --git a/public/services/utils.spec.ts b/public/services/utils.spec.tsindex c0f139f1e..7f0f365c8 100644--- a/public/services/utils.spec.ts+++ b/public/services/utils.spec.ts@@ -77,6 +77,6 @@ test("Can convert file to base64", async () => {const favicon = new File([content], "favicon.ico");const base64 = await f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///AWf//xVa9/82Q+r/NkPq/3J78P/+/v7/cnJyagAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAd3d3AOTv//8Nbv//AWf//wFn//8BZ///AWb+/ypL7v87SOr/4uT8//T09PBqampiZmZmYGZmZmBmZmZgZmZmYGZmZmBmZmZgZmZmYGZmZmBmZmZgZmZmYGZmZmBmZmZgZmZmYGZmZmBmZmZgZmZmYGZmZmBaWlpUCwsLCgAAAAB3d3cAXZ7//wFn//8BZ///AWf//wFn//8BZ///DGD6/5Sc9P/////////////////////////////////////////////////////////////////////////////////////////////////////////////////AwMC4AQEBAnd3dwBCpf7/A4v+/wOL/v8Di/7/A4v+/wOL/v8EkP3/GeL9/xz9//8c/f//HP3//xz9//8c/f//K/rx/+uwS//1klX/9ZJV//WSVf/1klX/9ZJV/++SU/9opDf/ZbFJ/2WxSf9lsUn/ZbFJ/2WxSf9ksUr/dN61//////9aWlpSd3d3AM/o/v8Cj/7/AI///wCP//8Aj///AI7//wOt/P8Fwvv/Afn+/wH9//8B/f//Af3//wH9//+N33b//sIF//SKPP/0hUH/9IVB//SFQf/0hUH/l4oi/zaQAv9PpS7/U6g0/1OoNP9TqDT/U6g0/zG5X/8B0Zr/xPTn/+Tk5OCGhoYO/////2i7/v8Aj///AI///wCP//8Bmv3/Bbv7/wW8+/8E2fz/Af3//wH9//8B/f//KfTZ//nIB///xwH/+qwb//SFQf/0hUH/9IVB/9+GOv88jgL/NY8A/z+XEf9TqDT/U6g0/1OoNP9Nqzz/Bs6T/wDRmv8z2q7//P7+//Dw8Ib///+06/X+/xKW/v8Aj///AI/+/wS0+/8FvPv/Bbz7/wW9+/8C8/7/Af3//wH8/v+51kr//8cB///HAf/+xgH/9pI1//SFQf/0hUH/dosX/zWPAP81jwD/NY8A/0uhJ/9TqDT/U6g0/yLAcf8A0Zr/ANGa/wDR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