Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

enhancement: replace semantic-ui with react icons (#631)

Guilherme Oenninge7cd2c1178df
diff --git a/README.md b/README.md
index 15f5764cd..50344845f 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
<p align="center">
- <a href="https://github.com/getfider/fider">
- <img src="public/assets/images/logo-small.png" />
+ <a href="https://getfider.com">
+ <img src="etc/logo-small.png" />
</a>
<h1 align="center">Fider</h1>
<div align="center">
diff --git a/app/pkg/web/renderer.go b/app/pkg/web/renderer.go
index 29c1001c3..644952dee 100644
--- a/app/pkg/web/renderer.go
+++ b/app/pkg/web/renderer.go
@@ -84,7 +84,6 @@ func (r *Renderer) Render(w io.Writer, name string, props Props, ctx *Context) {
r.assets["main.js"] = r.getBundle("/dist/js", "main", "js")
r.assets["vendor.js"] = r.getBundle("/dist/js", "vendor", "js")
r.assets["main.css"] = r.getBundle("/dist/css", "main", "css")
- r.assets["icons.woff2"] = r.getBundle("/dist/fonts", "icons", "woff2")
}
tmpl, ok := r.templates[name]
@@ -114,7 +113,6 @@ func (r *Renderer) Render(w io.Writer, name string, props Props, ctx *Context) {
m["__vendorBundle"] = ctx.GlobalAssetsURL("/assets/js/%s", r.assets["vendor.js"])
m["__jsBundle"] = ctx.GlobalAssetsURL("/assets/js/%s", r.assets["main.js"])
m["__cssBundle"] = ctx.GlobalAssetsURL("/assets/css/%s", r.assets["main.css"])
- m["__fontBundle"] = ctx.GlobalAssetsURL("/assets/fonts/%s", r.assets["icons.woff2"])
m["__logo"] = ctx.LogoURL()
m["__favicon"] = ctx.FaviconURL()
m["__contextID"] = ctx.ContextID()
diff --git a/public/assets/images/logo-small.png b/etc/logo-small.png
similarity index 100%
rename from public/assets/images/logo-small.png
rename to etc/logo-small.png
diff --git a/public/assets/images/logo.png b/etc/logo.png
similarity index 100%
rename from public/assets/images/logo.png
rename to etc/logo.png
diff --git a/main.go b/main.go
index edd8db8d1..3f86534ac 100644
--- a/main.go
+++ b/main.go
@@ -21,7 +21,7 @@ var (
// Use this for stable releases
// version = "x.y.z"
- version = "0.17.0" + buildnumber
+ version = "0.17.0-" + buildnumber
)
func main() {
diff --git a/package-lock.json b/package-lock.json
index c9c65ef8a..d275564d8 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -56,9 +56,9 @@
}
},
"@babel/runtime": {
- "version": "7.1.2",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.1.2.tgz",
- "integrity": "sha512-Y3SCjmhSupzFB6wcv1KmmFucH6gDVnI30WjOcicV10ju0cZjak3Jcs67YLIXBrmZYw1xCrVeJPbycFwrqNyxpg==",
+ "version": "7.1.5",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.1.5.tgz",
+ "integrity": "sha512-xKnPpXG/pvK1B90JkwwxSGii90rQGKtzcMt2gI5G6+M0REXaq6rOHsGC2ay6/d0Uje7zzvSzjEzfR3ENhFlrfA==",
"requires": {
"regenerator-runtime": "^0.12.0"
}
@@ -70,9 +70,9 @@
"dev": true
},
"@types/enzyme": {
- "version": "3.1.14",
- "resolved": "https://registry.npmjs.org/@types/enzyme/-/enzyme-3.1.14.tgz",
- "integrity": "sha512-jvAbagrpoSNAXeZw2kRpP10eTsSIH8vW1IBLCXbN0pbZsYZU8FvTPMMd5OzSWUKWTQfrbXFUY8e6un/W4NpqIA==",
+ "version": "3.1.15",
+ "resolved": "https://registry.npmjs.org/@types/enzyme/-/enzyme-3.1.15.tgz",
+ "integrity": "sha512-6b4JWgV+FNec1c4+8HauGbXg5gRc1oQK93t2+4W+bHjG/PzO+iPvagY6d6bXAZ+t+ps51Zb2F9LQ4vl0S0Epog==",
"dev": true,
"requires": {
"@types/cheerio": "*",
@@ -112,9 +112,9 @@
"dev": true
},
"@types/node": {
- "version": "10.12.2",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.2.tgz",
- "integrity": "sha512-53ElVDSnZeFUUFIYzI8WLQ25IhWzb6vbddNp8UHlXQyU0ET2RhV5zg0NfubzU7iNMh5bBXb0htCzfvrSVNgzaQ==",
+ "version": "10.12.5",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.5.tgz",
+ "integrity": "sha512-GzdHjq3t3eGLMv92Al90Iq+EoLL+86mPfQhuglbBFO7HiLdC/rkt+zrzJJumAiBF6nsrBWhou22rPW663AAyFw==",
"dev": true
},
"@types/prop-types": {
@@ -124,18 +124,18 @@
"dev": true
},
"@types/puppeteer": {
- "version": "1.9.1",
- "resolved": "https://registry.npmjs.org/@types/puppeteer/-/puppeteer-1.9.1.tgz",
- "integrity": "sha512-oEDHOxH398JxzMdSaylEVSsbI1F9cHUOuD+3Vk51F9/KQOPlO4cJAlDCHSNqG/bgAaaw0+T7iKvh0vHTeexf1A==",
+ "version": "1.10.0",
+ "resolved": "https://registry.npmjs.org/@types/puppeteer/-/puppeteer-1.10.0.tgz",
+ "integrity": "sha512-qrDx+mdV3jj5GYVW9rh8upVt+Hu6xUKerOJE5ko7bSm3aagqKybhwSsQvLqaZJzNs0vbyvtX0wTgs/H/ZvORCA==",
"dev": true,
"requires": {
"@types/node": "*"
}
},
"@types/react": {
- "version": "16.4.18",
- "resolved": "https://registry.npmjs.org/@types/react/-/react-16.4.18.tgz",
- "integrity": "sha512-eFzJKEg6pdeaukVLVZ8Xb79CTl/ysX+ExmOfAAqcFlCCK5TgFDD9kWR0S18sglQ3EmM8U+80enjUqbfnUyqpdA==",
+ "version": "16.7.2",
+ "resolved": "https://registry.npmjs.org/@types/react/-/react-16.7.2.tgz",
+ "integrity": "sha512-Z7gw8jYM+RYPU1sIiDYeICQXZwG+0PhCF3Jr0nFGuydUnPaQEno/4E8vzr19B2UGtL+2TPcSHMqdsP5JU/w4UA==",
"dev": true,
"requires": {
"@types/prop-types": "*",
@@ -193,9 +193,9 @@
}
},
"@types/webpack": {
- "version": "4.4.17",
- "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.4.17.tgz",
- "integrity": "sha512-f8fHYEhlrSQJ5BHaonyatL11MYwqQ7I6QDVCT41LqIyxR7j9B2uY4cQKxDoWFC9l2NbFGsIhiJBKZ6Y6LMBFLA==",
+ "version": "4.4.18",
+ "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.4.18.tgz",
+ "integrity": "sha512-BWm0KlzpZnKcnnuhcIxiGnBSgkOy9A2XpQTRYf5qZ1y2P2moLJ6jz+/smK/k3oT6vAVslBKVJAaOHE60sDvvjA==",
"dev": true,
"requires": {
"@types/node": "*",
@@ -426,9 +426,9 @@
},
"dependencies": {
"acorn": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.2.tgz",
- "integrity": "sha512-GXmKIvbrN3TV7aVqAzVFaMW8F8wzVX7voEBRO3bDA64+EX37YSayggRJP5Xig6HYHBkWKpFg9W5gg6orklubhg==",
+ "version": "6.0.4",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.4.tgz",
+ "integrity": "sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg==",
"dev": true
}
}
@@ -449,15 +449,15 @@
}
},
"ajv": {
- "version": "6.5.4",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.4.tgz",
- "integrity": "sha512-4Wyjt8+t6YszqaXnLDfMmG/8AlO5Zbcsy3ATHncCzjW/NoPzAId8AK6749Ybjmdt+kUY1gP60fCu46oDxPv/mg==",
+ "version": "5.5.2",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
+ "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
"dev": true,
"requires": {
- "fast-deep-equal": "^2.0.1",
+ "co": "^4.6.0",
+ "fast-deep-equal": "^1.0.0",
"fast-json-stable-stringify": "^2.0.0",
- "json-schema-traverse": "^0.4.1",
- "uri-js": "^4.2.2"
+ "json-schema-traverse": "^0.3.0"
}
},
"ajv-errors": {
@@ -480,7 +480,7 @@
},
"ansi-escapes": {
"version": "3.1.0",
- "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz",
+ "resolved": "http://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz",
"integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==",
"dev": true
},
@@ -576,7 +576,7 @@
},
"array-equal": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz",
+ "resolved": "http://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz",
"integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=",
"dev": true
},
@@ -811,7 +811,7 @@
"dependencies": {
"jsesc": {
"version": "1.3.0",
- "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
+ "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
"integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=",
"dev": true
},
@@ -1065,9 +1065,9 @@
}
},
"bluebird": {
- "version": "3.5.2",
- "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.2.tgz",
- "integrity": "sha512-dhHTWMI7kMx5whMQntl7Vr9C6BvV10lFXDAasnqnrMYhXVCzzk6IO9Fo2L75jXHT07WrOngL1WDXOp+yYS91Yg==",
+ "version": "3.5.3",
+ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.3.tgz",
+ "integrity": "sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw==",
"dev": true
},
"bn.js": {
@@ -1222,12 +1222,12 @@
}
},
"bs-logger": {
- "version": "0.2.5",
- "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.5.tgz",
- "integrity": "sha512-uFLE0LFMxrH8Z5Hd9QgivvRbrl/NFkOTHzGhlqQxsnmx5JBLrp4bc249afLL+GccyY/8hkcGi2LpVaOzaEY0nQ==",
+ "version": "0.2.6",
+ "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz",
+ "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==",
"dev": true,
"requires": {
- "fast-json-stable-stringify": "^2.0.0"
+ "fast-json-stable-stringify": "2.x"
}
},
"bser": {
@@ -1276,7 +1276,7 @@
},
"cacache": {
"version": "10.0.4",
- "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz",
+ "resolved": "http://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz",
"integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==",
"dev": true,
"requires": {
@@ -2251,29 +2251,30 @@
}
},
"enzyme-adapter-react-16": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.6.0.tgz",
- "integrity": "sha512-ay9eGFpChyUDnjTFMMJHzrb681LF3hPWJLEA7RoLFG9jSWAdAm2V50pGmFV9dYGJgh5HfdiqM+MNvle41Yf/PA==",
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.7.0.tgz",
+ "integrity": "sha512-rDr0xlnnFPffAPYrvG97QYJaRl9unVDslKee33wTStsBEwZTkESX1H7VHGT5eUc6ifNzPgOJGvSh2zpHT4gXjA==",
"dev": true,
"requires": {
- "enzyme-adapter-utils": "^1.8.0",
+ "enzyme-adapter-utils": "^1.9.0",
"function.prototype.name": "^1.1.0",
"object.assign": "^4.1.0",
"object.values": "^1.0.4",
"prop-types": "^15.6.2",
- "react-is": "^16.5.2",
+ "react-is": "^16.6.1",
"react-test-renderer": "^16.0.0-0"
}
},
"enzyme-adapter-utils": {
- "version": "1.8.1",
- "resolved": "https://registry.npmjs.org/enzyme-adapter-utils/-/enzyme-adapter-utils-1.8.1.tgz",
- "integrity": "sha512-s3QB3xQAowaDS2sHhmEqrT13GJC4+n5bG015ZkLv60n9k5vhxxHTQRIneZmQ4hmdCZEBrvUJ89PG6fRI5OEeuQ==",
+ "version": "1.9.0",
+ "resolved": "https://registry.npmjs.org/enzyme-adapter-utils/-/enzyme-adapter-utils-1.9.0.tgz",
+ "integrity": "sha512-uMe4xw4l/Iloh2Fz+EO23XUYMEQXj5k/5ioLUXCNOUCI8Dml5XQMO9+QwUq962hBsY5qftfHHns+d990byWHvg==",
"dev": true,
"requires": {
"function.prototype.name": "^1.1.0",
"object.assign": "^4.1.0",
- "prop-types": "^15.6.2"
+ "prop-types": "^15.6.2",
+ "semver": "^5.6.0"
}
},
"errno": {
@@ -2683,9 +2684,9 @@
"dev": true
},
"fast-deep-equal": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
- "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=",
+ "version": "1.1.0",
+ "resolved": "http://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
+ "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=",
"dev": true
},
"fast-diff": {
@@ -2730,16 +2731,6 @@
"pend": "~1.2.0"
}
},
- "file-loader": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-2.0.0.tgz",
- "integrity": "sha512-YCsBfd1ZGCyonOKLxPiKPdu+8ld9HAaMEvJewzz+b2eTF7uL5Zm/HdBF6FjCrpCMRq25Mi0U1gl4pwn2TlH7hQ==",
- "dev": true,
- "requires": {
- "loader-utils": "^1.0.2",
- "schema-utils": "^1.0.0"
- }
- },
"filename-regex": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz",
@@ -2848,9 +2839,9 @@
"dev": true
},
"fork-ts-checker-webpack-plugin": {
- "version": "0.4.14",
- "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-0.4.14.tgz",
- "integrity": "sha512-ADsMTixdrsbhedkF0MlgcAfrCbhVxh79qwLx075fCmReD5Txj/Dc5wdWHUaNg7vQgvjcmRd3mAn6jlCZpw36Qg==",
+ "version": "0.4.15",
+ "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-0.4.15.tgz",
+ "integrity": "sha512-qNYuygh2GxXehBvQZ5rI5YlQFn+7ZV6kmkyD9Sgs33dWl73NZdUOB5aCp8v0EXJn176AhPrZP8YCMT3h01fs+g==",
"dev": true,
"requires": {
"babel-code-frame": "^6.22.0",
@@ -3722,9 +3713,9 @@
}
},
"graceful-fs": {
- "version": "4.1.14",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.14.tgz",
- "integrity": "sha512-ns/IGcSmmGNPP085JCheg0Nombh1QPvSCnlx+2V+byQWRQEIL4ZB5jXJMNIHOFVS1roi85HIi5Ka0h43iWXfcQ==",
+ "version": "4.1.15",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz",
+ "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==",
"dev": true
},
"growly": {
@@ -3759,32 +3750,6 @@
"requires": {
"ajv": "^5.3.0",
"har-schema": "^2.0.0"
- },
- "dependencies": {
- "ajv": {
- "version": "5.5.2",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
- "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
- "dev": true,
- "requires": {
- "co": "^4.6.0",
- "fast-deep-equal": "^1.0.0",
- "fast-json-stable-stringify": "^2.0.0",
- "json-schema-traverse": "^0.3.0"
- }
- },
- "fast-deep-equal": {
- "version": "1.1.0",
- "resolved": "http://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
- "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=",
- "dev": true
- },
- "json-schema-traverse": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
- "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=",
- "dev": true
- }
}
},
"has": {
@@ -5782,11 +5747,6 @@
"merge-stream": "^1.0.1"
}
},
- "jquery": {
- "version": "3.3.1",
- "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.3.1.tgz",
- "integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg=="
- },
"js-base64": {
"version": "2.4.9",
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.9.tgz",
@@ -5850,7 +5810,7 @@
},
"jsesc": {
"version": "0.5.0",
- "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
+ "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
"integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
"dev": true
},
@@ -5867,9 +5827,9 @@
"dev": true
},
"json-schema-traverse": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
- "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
+ "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=",
"dev": true
},
"json-stringify-safe": {
@@ -6919,7 +6879,7 @@
},
"os-homedir": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
+ "resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
"dev": true
},
@@ -6936,7 +6896,7 @@
},
"os-tmpdir": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
+ "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
"dev": true
},
@@ -7115,7 +7075,7 @@
},
"path-is-absolute": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"dev": true
},
@@ -7315,9 +7275,9 @@
"dev": true
},
"prettier": {
- "version": "1.14.3",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.14.3.tgz",
- "integrity": "sha512-qZDVnCrnpsRJJq5nSsiHCE3BYMED2OtsI+cmzIzF1QIfqm5ALf8tEJcO27zV1gKNKRPdhjO0dNWnrzssDQ1tFg==",
+ "version": "1.15.1",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.15.1.tgz",
+ "integrity": "sha512-4rgV2hyc/5Pk0XHH4VjJWHRgVjgRbpMfLQjREAhHBtyW1UvTFkjJEsueGYNYYZd9mn97K+1qv0EBwm11zoaSgA==",
"dev": true
},
"pretty-format": {
@@ -7576,31 +7536,36 @@
}
},
"react": {
- "version": "16.6.0",
- "resolved": "https://registry.npmjs.org/react/-/react-16.6.0.tgz",
- "integrity": "sha512-zJPnx/jKtuOEXCbQ9BKaxDMxR0001/hzxXwYxG8septeyYGfsgAei6NgfbVgOhbY1WOP2o3VPs/E9HaN+9hV3Q==",
+ "version": "16.6.1",
+ "resolved": "https://registry.npmjs.org/react/-/react-16.6.1.tgz",
+ "integrity": "sha512-OtawJThYlvRgm9BXK+xTL7BIlDx8vv21j+fbQDjRRUyok6y7NyjlweGorielTahLZHYIdKUoK2Dp9ByVWuMqxw==",
"requires": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
"prop-types": "^15.6.2",
- "scheduler": "^0.10.0"
+ "scheduler": "^0.11.0"
}
},
"react-dom": {
- "version": "16.6.0",
- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.6.0.tgz",
- "integrity": "sha512-Stm2D9dXEUUAQdvpvhvFj/DEXwC2PAL/RwEMhoN4dvvD2ikTlJegEXf97xryg88VIAU22ZAP7n842l+9BTz6+w==",
+ "version": "16.6.1",
+ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.6.1.tgz",
+ "integrity": "sha512-zm+wBuEMGm009Wt1uE4Zw5KcXOW7qC4E/xW/fpJsCsbOco4U/R84u+DzzO/S4SYSdNBcqcaulcp4w3FXl8pImw==",
"requires": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
"prop-types": "^15.6.2",
- "scheduler": "^0.10.0"
+ "scheduler": "^0.11.0"
}
},
+ "react-icons": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-3.2.2.tgz",
+ "integrity": "sha512-0DiXTcECUNoMvze2zcFwYYrHAFgQ2rBM0+HIHfaECKRfE1NZYwfuUSbwyg9s1uVPuy7o/KqQKSwBGMWQFvdrhQ=="
+ },
"react-is": {
- "version": "16.6.0",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.6.0.tgz",
- "integrity": "sha512-q8U7k0Fi7oxF1HvQgyBjPwDXeMplEsArnKt2iYhuIF86+GBbgLHdAmokL3XUFjTd7Q363OSNG55FOGUdONVn1g==",
+ "version": "16.6.1",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.6.1.tgz",
+ "integrity": "sha512-wOKsGtvTMYs7WAscmwwdM8sfRRvE17Ym30zFj3n37Qx5tHRfhenPKEPILHaHob6WoLFADmQm1ZNrE5xMCM6sCw==",
"dev": true
},
"react-lifecycles-compat": {
@@ -7617,15 +7582,15 @@
}
},
"react-test-renderer": {
- "version": "16.6.0",
- "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-16.6.0.tgz",
- "integrity": "sha512-w+Y3YT7OX1LP5KO7HCd0YR34Ol1qmISHaooPNMRYa6QzmwtcWhEGuZPr34wO8UCBIokswuhyLQUq7rjPDcEtJA==",
+ "version": "16.6.1",
+ "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-16.6.1.tgz",
+ "integrity": "sha512-sgZwJZYIgQptRi2qk5+gB8FBQGk4gLSs0gmKZPMfhd3dLkdxIUwVLHteLN3Bnj4LokIZd3U+V2NEJUqeV2PT2w==",
"dev": true,
"requires": {
"object-assign": "^4.1.1",
"prop-types": "^15.6.2",
- "react-is": "^16.6.0",
- "scheduler": "^0.10.0"
+ "react-is": "^16.6.1",
+ "scheduler": "^0.11.0"
}
},
"react-textarea-autosize": {
@@ -7637,9 +7602,9 @@
}
},
"react-toastify": {
- "version": "4.4.0",
- "resolved": "https://registry.npmjs.org/react-toastify/-/react-toastify-4.4.0.tgz",
- "integrity": "sha512-nTp084SO1rapKggtiWKpN2DE/wgWpJRT3OqAjpi52CeymhybA0IElmWWdqg1sUCBV1lFb4LlmPUIe5XrVz8q0g==",
+ "version": "4.4.1",
+ "resolved": "https://registry.npmjs.org/react-toastify/-/react-toastify-4.4.1.tgz",
+ "integrity": "sha512-m/1oZXy+oT5wkRS+P/8v7q/9L/2KJIeRZOLiMXuOHdZf92RWf468WEzeq3Ymf2miHjvQ7rHv23hE9nhgPf1AZA==",
"requires": {
"classnames": "^2.2.6",
"prop-types": "^15.6.0",
@@ -8157,9 +8122,9 @@
"dev": true
},
"scheduler": {
- "version": "0.10.0",
- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.10.0.tgz",
- "integrity": "sha512-+TSTVTCBAA3h8Anei3haDc1IRwMeDmtI/y/o3iBe3Mjl2vwYF9DtPDt929HyRmV/e7au7CLu8sc4C4W0VOs29w==",
+ "version": "0.11.0",
+ "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.11.0.tgz",
+ "integrity": "sha512-MAYbBfmiEHxF0W+c4CxMpEqMYK+rYF584VP/qMKSiHM6lTkBKKYOJaDiSILpJHla6hBOsVd6GucPL46o2Uq3sg==",
"requires": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1"
@@ -8174,6 +8139,32 @@
"ajv": "^6.1.0",
"ajv-errors": "^1.0.0",
"ajv-keywords": "^3.1.0"
+ },
+ "dependencies": {
+ "ajv": {
+ "version": "6.5.5",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.5.tgz",
+ "integrity": "sha512-7q7gtRQDJSyuEHjuVgHoUa2VuemFiCMrfQc9Tc08XTAc4Zj/5U1buQJ0HU6i7fKjXU09SVgSmxa4sLvuvS8Iyg==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^2.0.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "fast-deep-equal": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
+ "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=",
+ "dev": true
+ },
+ "json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ }
}
},
"scss-tokenizer": {
@@ -8197,14 +8188,6 @@
}
}
},
- "semantic-ui-css": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/semantic-ui-css/-/semantic-ui-css-2.4.1.tgz",
- "integrity": "sha512-Pkp0p9oWOxlH0kODx7qFpIRYpK1T4WJOO4lNnpNPOoWKCrYsfHqYSKgk5fHfQtnWnsAKy7nLJMW02bgDWWFZFg==",
- "requires": {
- "jquery": "x.*"
- }
- },
"semver": {
"version": "5.6.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
@@ -8812,7 +8795,7 @@
},
"tar": {
"version": "2.2.1",
- "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz",
+ "resolved": "http://registry.npmjs.org/tar/-/tar-2.2.1.tgz",
"integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=",
"dev": true,
"requires": {
@@ -8932,12 +8915,12 @@
"dev": true
},
"through2": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
- "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=",
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
+ "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
"dev": true,
"requires": {
- "readable-stream": "^2.1.5",
+ "readable-stream": "~2.3.6",
"xtend": "~4.0.1"
},
"dependencies": {
@@ -9326,12 +9309,36 @@
"worker-farm": "^1.5.2"
},
"dependencies": {
+ "ajv": {
+ "version": "6.5.5",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.5.tgz",
+ "integrity": "sha512-7q7gtRQDJSyuEHjuVgHoUa2VuemFiCMrfQc9Tc08XTAc4Zj/5U1buQJ0HU6i7fKjXU09SVgSmxa4sLvuvS8Iyg==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^2.0.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ }
+ },
"commander": {
"version": "2.13.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz",
"integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==",
"dev": true
},
+ "fast-deep-equal": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
+ "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=",
+ "dev": true
+ },
+ "json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
"schema-utils": {
"version": "0.4.7",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz",
@@ -9619,9 +9626,9 @@
"dev": true
},
"webpack": {
- "version": "4.24.0",
- "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.24.0.tgz",
- "integrity": "sha512-Xur0l8nBETnW+DjpFqSGME1jNXxEPVETl30k1lWAsbnukVJdq330/i3PDOLPUtVl/E/cciiOp5uW098hFfQLQA==",
+ "version": "4.25.1",
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.25.1.tgz",
+ "integrity": "sha512-T0GU/3NRtO4tMfNzsvpdhUr8HnzA4LTdP2zd+e5zd6CdOH5vNKHnAlO+DvzccfhPdzqRrALOFcjYxx7K5DWmvA==",
"dev": true,
"requires": {
"@webassemblyjs/ast": "1.7.11",
@@ -9650,6 +9657,30 @@
"webpack-sources": "^1.3.0"
},
"dependencies": {
+ "ajv": {
+ "version": "6.5.5",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.5.tgz",
+ "integrity": "sha512-7q7gtRQDJSyuEHjuVgHoUa2VuemFiCMrfQc9Tc08XTAc4Zj/5U1buQJ0HU6i7fKjXU09SVgSmxa4sLvuvS8Iyg==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^2.0.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "fast-deep-equal": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
+ "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=",
+ "dev": true
+ },
+ "json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
"schema-utils": {
"version": "0.4.7",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz",
diff --git a/package.json b/package.json
index c8a3d7a85..50352a27a 100644
--- a/package.json
+++ b/package.json
@@ -5,36 +5,35 @@
"private": true,
"dependencies": {
"markdown-it": "8.4.2",
- "react": "16.6.0",
- "react-dom": "16.6.0",
+ "react": "16.6.1",
+ "react-dom": "16.6.1",
+ "react-icons": "^3.2.2",
"react-loadable": "^5.5.0",
"react-textarea-autosize": "7.0.4",
- "react-toastify": "4.4.0",
- "semantic-ui-css": "2.4.1",
+ "react-toastify": "4.4.1",
"tslib": "1.9.3"
},
"devDependencies": {
- "@types/enzyme": "3.1.14",
+ "@types/enzyme": "3.1.15",
"@types/enzyme-adapter-react-16": "1.0.3",
"@types/jest": "23.3.9",
"@types/jsdom": "12.2.0",
"@types/markdown-it": "0.0.6",
- "@types/node": "10.12.2",
- "@types/puppeteer": "1.9.1",
- "@types/react": "16.4.18",
+ "@types/node": "10.12.5",
+ "@types/puppeteer": "1.10.0",
+ "@types/react": "16.7.2",
"@types/react-dom": "16.0.9",
"@types/react-loadable": "^5.4.1",
"@types/react-textarea-autosize": "4.3.3",
"css-loader": "1.0.1",
"dotenv": "6.1.0",
"enzyme": "3.7.0",
- "enzyme-adapter-react-16": "1.6.0",
- "file-loader": "2.0.0",
- "fork-ts-checker-webpack-plugin": "0.4.14",
+ "enzyme-adapter-react-16": "1.7.0",
+ "fork-ts-checker-webpack-plugin": "0.4.15",
"jest": "23.6.0",
"mini-css-extract-plugin": "0.4.4",
"node-sass": "4.10.0",
- "prettier": "1.14.3",
+ "prettier": "1.15.1",
"puppeteer": "1.10.0",
"reflect-metadata": "0.1.12",
"sass-loader": "7.1.0",
@@ -45,7 +44,7 @@
"tslint-plugin-prettier": "2.0.1",
"tslint-react": "3.6.0",
"typescript": "3.1.6",
- "webpack": "4.24.0",
+ "webpack": "4.25.1",
"webpack-clean-obsolete-chunks": "0.4.0",
"webpack-cli": "3.1.2"
},
diff --git a/public/assets/styles/main.scss b/public/assets/styles/main.scss
index c6f2a990d..6492f270d 100644
--- a/public/assets/styles/main.scss
+++ b/public/assets/styles/main.scss
@@ -2,7 +2,6 @@
@import 'reset.scss';
@import 'grid.scss';
@import 'utility.scss';
-@import 'semantic.scss';
/*******************************
Site
@@ -18,7 +17,7 @@ body {
padding: 0px;
overflow-x: hidden;
min-width: 320px;
- font-size: 14px;
+ font-size: $font-size;
font-family: $font-site;
background-color: $bg-color;
color: $text-color;
@@ -27,6 +26,7 @@ body {
button, input, optgroup, select, textarea {
font-family: $font-site;
+ font-size: $font-size;
}
/*******************************
@@ -209,6 +209,13 @@ body, h1, h2, h3, h4, h5, .ui, input {
text-align: center;
}
+svg.icon {
+ display: inline-block;
+ opacity: 1;
+ width: 1.18em;
+ vertical-align: middle;
+}
+
.clickable {
cursor: pointer;
}
@@ -226,7 +233,7 @@ body, h1, h2, h3, h4, h5, .ui, input {
&:hover {
color: $main-color;
}
- i {
+ svg.icon {
float: right;
}
}
diff --git a/public/assets/styles/semantic.scss b/public/assets/styles/semantic.scss
deleted file mode 100644
index ba7a9489d..000000000
--- a/public/assets/styles/semantic.scss
+++ /dev/null
@@ -1,5 +0,0 @@
-@import 'variables.scss';
-
-.ui.dropdown .menu > .item {
- font-size: $font-size;
-}
\ No newline at end of file
diff --git a/public/components/ShowTag.scss b/public/components/ShowTag.scss
index 79cbca975..9b0d45027 100644
--- a/public/components/ShowTag.scss
+++ b/public/components/ShowTag.scss
@@ -10,8 +10,10 @@
border: 0;
box-shadow: inset 0 -1px 0 rgba(27,31,35,0.12);
- i.icon {
+ svg.icon {
font-size: $font-size-micro;
+ margin-top: -3px;
+ margin-right: 2px;
}
&:last-child {
diff --git a/public/components/ShowTag.tsx b/public/components/ShowTag.tsx
index 81f03a048..71d529f92 100644
--- a/public/components/ShowTag.tsx
+++ b/public/components/ShowTag.tsx
@@ -3,6 +3,7 @@ import "./ShowTag.scss";
import React from "react";
import { Tag } from "@fider/models";
import { classSet } from "@fider/services";
+import { FaLock } from "react-icons/fa";
interface TagProps {
tag: Tag;
@@ -44,7 +45,7 @@ export const ShowTag = (props: TagProps) => {
color: textColor(props.tag.color)
}}
>
- {!props.tag.isPublic && !props.circular && <i className="lock icon" />}
+ {!props.tag.isPublic && !props.circular && <FaLock />}
{props.circular ? "" : props.tag.name || "Tag"}
</div>
);
diff --git a/public/components/VoteCounter.scss b/public/components/VoteCounter.scss
index aab6d31cc..2f9791453 100644
--- a/public/components/VoteCounter.scss
+++ b/public/components/VoteCounter.scss
@@ -16,8 +16,9 @@
margin: 0 auto;
padding: 0 0;
- i.icon {
+ .icon {
color: #C4C9CD;
+ margin-bottom: -3px;
}
}
@@ -29,12 +30,12 @@
button.no-touch:hover {
color: $main-color;
- i.icon {
+ .icon {
color: lighten($main-color, 20%) !important;
}
}
- i.icon {
+ .icon {
margin: 0 auto;
display: block;
}
diff --git a/public/components/VoteCounter.spec.tsx b/public/components/VoteCounter.spec.tsx
index 671949413..7ac306227 100644
--- a/public/components/VoteCounter.spec.tsx
+++ b/public/components/VoteCounter.spec.tsx
@@ -34,7 +34,7 @@ describe("<VoteCounter />", () => {
post.votesCount = 9;
const wrapper = shallow(<VoteCounter post={post} />);
const button = wrapper.find("button");
- expect(button.text()).toBe("9");
+ expect(button.text()).toBe("<FaCaretUp />9");
expect(button.hasClass("m-voted")).toBe(true);
expect(button.hasClass("m-disabled")).toBe(false);
});
@@ -44,7 +44,7 @@ describe("<VoteCounter />", () => {
post.votesCount = 2;
const wrapper = shallow(<VoteCounter post={post} />);
const button = wrapper.find("button");
- expect(button.text()).toBe("2");
+ expect(button.text()).toBe("<FaCaretUp />2");
expect(button.hasClass("m-voted")).toBe(false);
expect(button.hasClass("m-disabled")).toBe(false);
});
@@ -53,7 +53,7 @@ describe("<VoteCounter />", () => {
post.status = PostStatus.Completed.value;
const wrapper = shallow(<VoteCounter post={post} />);
const button = wrapper.find("button");
- expect(button.text()).toBe("5");
+ expect(button.text()).toBe("<FaCaretUp />5");
expect(button.hasClass("m-voted")).toBe(false);
expect(button.hasClass("m-disabled")).toBe(true);
});
@@ -82,7 +82,7 @@ describe("<VoteCounter />", () => {
expect(mock.post).toHaveBeenCalledTimes(1);
await rerender(wrapper);
- expect(wrapper.find("button").text()).toBe("6");
+ expect(wrapper.find("button").text()).toBe("<FaCaretUp />6");
});
test("click when authenticated and hasVoted === true", async () => {
@@ -97,6 +97,6 @@ describe("<VoteCounter />", () => {
expect(mock.delete).toHaveBeenCalledTimes(1);
await rerender(wrapper);
- expect(wrapper.find("button").text()).toBe("4");
+ expect(wrapper.find("button").text()).toBe("<FaCaretUp />4");
});
});
diff --git a/public/components/VoteCounter.tsx b/public/components/VoteCounter.tsx
index d8fcd12c1..64d982ed8 100644
--- a/public/components/VoteCounter.tsx
+++ b/public/components/VoteCounter.tsx
@@ -4,6 +4,7 @@ import React from "react";
import { Post, PostStatus } from "@fider/models";
import { actions, device, classSet, Fider } from "@fider/services";
import { SignInModal } from "@fider/components";
+import { FaCaretUp } from "react-icons/fa";
interface VoteCounterProps {
post: Post;
@@ -53,14 +54,14 @@ export class VoteCounter extends React.Component<VoteCounterProps, VoteCounterSt
const vote = (
<button className={className} onClick={this.voteOrUndo}>
- <i className="caret up icon" />
+ <FaCaretUp />
{this.state.count}
</button>
);
const disabled = (
<button className={className}>
- <i className="caret up icon" />
+ <FaCaretUp />
{this.state.count}
</button>
);
diff --git a/public/components/common/Button.scss b/public/components/common/Button.scss
index f0eccddf3..dbfaf8088 100644
--- a/public/components/common/Button.scss
+++ b/public/components/common/Button.scss
@@ -14,6 +14,10 @@
text-align: left;
font-weight: 600;
+ .icon {
+ margin-top: -3px;
+ }
+
&.m-cancel {
color: $link-color;
background-color: transparent;
@@ -36,9 +40,11 @@
&.m-positive {
color: $white;
background-color: $green;
+ border: 1px solid $green;
&:hover {
background-color: $green-darker;
+ border-color: $green-darker;
}
}
diff --git a/public/components/common/Header.scss b/public/components/common/Header.scss
index e5b50e32b..1f4ba1e8b 100644
--- a/public/components/common/Header.scss
+++ b/public/components/common/Header.scss
@@ -102,6 +102,10 @@
min-width: 160px;
border-radius: 0px 0px 5px 5px;
+ span {
+ vertical-align: middle;
+ }
+
.c-menu-user-heading {
white-space: nowrap;
font-size: $font-size-mini;
@@ -112,6 +116,7 @@
font-weight: 600;
cursor: default;
}
+
.c-menu-user-item {
font-size: $font-size-small;
padding: 10px;
diff --git a/public/components/common/Header.tsx b/public/components/common/Header.tsx
index 6d543ca8d..aa8c9b2f9 100644
--- a/public/components/common/Header.tsx
+++ b/public/components/common/Header.tsx
@@ -3,6 +3,7 @@ import "./Header.scss";
import React from "react";
import { SignInModal, EnvironmentInfo, Gravatar, TenantLogo } from "@fider/components";
import { actions, Fider } from "@fider/services";
+import { FaUser, FaCog, FaCaretDown } from "react-icons/fa";
interface HeaderState {
showSignIn: boolean;
@@ -38,8 +39,7 @@ export class Header extends React.Component<{}, HeaderState> {
const items = Fider.session.isAuthenticated && (
<div className="c-menu-user">
<div className="c-menu-user-heading">
- <i className="user icon" />
- {Fider.session.user.name}
+ <FaUser /> <span>{Fider.session.user.name}</span>
</div>
<a href="/settings" className="c-menu-user-item">
Settings
@@ -51,8 +51,7 @@ export class Header extends React.Component<{}, HeaderState> {
<div className="c-menu-user-divider" />
{Fider.session.user.isCollaborator && [
<div key={1} className="c-menu-user-heading">
- <i className="setting icon" />
- Administration
+ <FaCog /> <span>Administration</span>
</div>,
<a key={2} href="/admin" className="c-menu-user-item">
Site Settings
@@ -81,7 +80,7 @@ export class Header extends React.Component<{}, HeaderState> {
{Fider.session.isAuthenticated && <Gravatar user={Fider.session.user} />}
{this.state.unreadNotifications > 0 && <div className="c-unread-dot" />}
{!Fider.session.isAuthenticated && <span>Sign in</span>}
- {Fider.session.isAuthenticated && <i className="dropdown icon" />}
+ {Fider.session.isAuthenticated && <FaCaretDown />}
{items}
</div>
)}
diff --git a/public/components/common/Heading.scss b/public/components/common/Heading.scss
index 3c0395c49..1fee28e9f 100644
--- a/public/components/common/Heading.scss
+++ b/public/components/common/Heading.scss
@@ -4,7 +4,7 @@
margin: 0px 0px 10px 0px;
.c-heading-content {
- display: table-cell;
+ display: inline-block;
vertical-align: middle;
.c-heading-subtitle {
@@ -24,8 +24,20 @@
@include media("sm") {
font-size: 20px;
}
- display: table-cell;
+ display: inline-block;
vertical-align: middle;
+ &.circular {
+ border-radius: 500em !important;
+ padding: 0.5em 0 !important;
+ -webkit-box-shadow: 0 0 0 0.1em rgba(0,0,0,0.1) inset;
+ box-shadow: 0 0 0 0.1em rgba(0,0,0,0.1) inset;
+ width: 2em !important;
+ height: 2em !important;
+ text-align: center;
+ .icon {
+ vertical-align: top;
+ }
+ }
}
&.m-dividing {
diff --git a/public/components/common/Heading.tsx b/public/components/common/Heading.tsx
index 00cb66882..ba2e9708e 100644
--- a/public/components/common/Heading.tsx
+++ b/public/components/common/Heading.tsx
@@ -2,12 +2,13 @@ import "./Heading.scss";
import React from "react";
import { classSet } from "@fider/services";
+import { IconType } from "react-icons";
interface HeadingLogo {
title: string;
dividing?: boolean;
size?: "normal" | "small";
- icon?: string;
+ icon?: IconType;
subtitle?: string;
className?: string;
}
@@ -25,14 +26,14 @@ export const Heading = (props: HeadingLogo) => {
const iconClassName = classSet({
"c-heading-icon": true,
- circular: level <= 2,
- [props.icon!]: props.icon,
- icon: true
+ circular: level <= 2
});
+ const icon = props.icon && <div className={iconClassName}>{React.createElement(props.icon)}</div>;
+
return (
<Tag className={className}>
- {props.icon && <i className={iconClassName} />}
+ {icon}
<div className="c-heading-content">
{props.title}
<div className="c-heading-subtitle">{props.subtitle}</div>
diff --git a/public/components/common/Message.scss b/public/components/common/Message.scss
index 3fc041dd7..a6a31c334 100644
--- a/public/components/common/Message.scss
+++ b/public/components/common/Message.scss
@@ -8,6 +8,15 @@
border-radius: 3px;
margin-bottom: 10px;
+ .icon {
+ margin-right: 5px;
+ height: 14px;
+ }
+
+ span {
+ vertical-align: middle;
+ }
+
&.m-success {
color: $green-darker;
border-color: $green-darker;
diff --git a/public/components/common/Message.tsx b/public/components/common/Message.tsx
index aee76f41d..c55efde8e 100644
--- a/public/components/common/Message.tsx
+++ b/public/components/common/Message.tsx
@@ -2,6 +2,7 @@ import "./Message.scss";
import React from "react";
import { classSet } from "@fider/services";
+import { FaBan, FaRegCheckCircle } from "react-icons/fa";
interface MessageProps {
type: "success" | "error";
@@ -14,12 +15,12 @@ export const Message: React.StatelessComponent<MessageProps> = props => {
[`m-${props.type}`]: true
});
- const icon = props.type === "error" ? "ban" : "check circle outline";
+ const icon = props.type === "error" ? <FaBan /> : <FaRegCheckCircle />;
return (
<div className={className}>
- {props.showIcon === true && <i className={`${icon} icon`} />}
- {props.children}
+ {props.showIcon === true && icon}
+ <span>{props.children}</span>
</div>
);
};
diff --git a/public/components/common/form/Form.scss b/public/components/common/form/Form.scss
index 98702cabf..23f282f69 100644
--- a/public/components/common/form/Form.scss
+++ b/public/components/common/form/Form.scss
@@ -74,14 +74,11 @@
opacity: .5;
width: 35px;
height: 100%;
+ padding: 12px 0px;
margin: 0;
top: 0;
right: 0;
- &::before {
- top: 10px;
- right: 12px;
- position: absolute;
- }
+ position: absolute;
&.link {
cursor: pointer;
diff --git a/public/components/common/form/Input.tsx b/public/components/common/form/Input.tsx
index 86851eba8..42912621a 100644
--- a/public/components/common/form/Input.tsx
+++ b/public/components/common/form/Input.tsx
@@ -2,6 +2,7 @@ import React from "react";
import { classSet } from "@fider/services";
import { ValidationContext } from "./Form";
import { DisplayError, hasError } from "./DisplayError";
+import { IconType } from "react-icons";
interface InputProps {
field: string;
@@ -9,7 +10,7 @@ interface InputProps {
className?: string;
autoFocus?: boolean;
afterLabel?: JSX.Element;
- icon?: string;
+ icon?: IconType;
maxLength?: number;
value?: string;
disabled?: boolean;
@@ -48,6 +49,13 @@ export class Input extends React.Component<InputProps, {}> {
this.props.suffix
);
+ const icon = !!this.props.icon
+ ? React.createElement(this.props.icon, {
+ onClick: this.props.onIconClick,
+ className: classSet({ link: !!this.props.onIconClick })
+ })
+ : undefined;
+
return (
<ValidationContext.Consumer>
{ctx => (
@@ -56,7 +64,7 @@ export class Input extends React.Component<InputProps, {}> {
"c-form-field": true,
"m-suffix": this.props.suffix,
"m-error": hasError(this.props.field, ctx.error),
- "m-icon": this.props.icon,
+ "m-icon": !!this.props.icon,
[`${this.props.className}`]: this.props.className
})}
>
@@ -80,16 +88,7 @@ export class Input extends React.Component<InputProps, {}> {
onKeyDown={this.props.onSubmit ? this.onKeyDown : undefined}
onChange={this.onChange}
/>
- {!!this.props.icon && (
- <i
- onClick={this.props.onIconClick}
- className={classSet({
- icon: true,
- [this.props.icon]: true,
- link: this.props.onIconClick
- })}
- />
- )}
+ {icon}
{suffix}
</div>
<DisplayError fields={[this.props.field]} error={ctx.error} />
diff --git a/public/index.tsx b/public/index.tsx
index 9e1d055ef..6ea45d165 100644
--- a/public/index.tsx
+++ b/public/index.tsx
@@ -5,9 +5,7 @@ import { Header, Footer } from "@fider/components/common";
import { ErrorBoundary } from "@fider/components";
import { classSet, Fider, actions, navigator } from "@fider/services";
import { ToastContainer, toast } from "react-toastify";
-
-import "semantic-ui-css/components/reset.min.css";
-import "semantic-ui-css/components/icon.min.css";
+import { IconContext } from "react-icons";
import "react-toastify/dist/ReactToastify.css";
import "@fider/assets/styles/main.scss";
@@ -53,10 +51,12 @@ window.addEventListener("error", (evt: ErrorEvent) => {
});
ReactDOM.render(
<ErrorBoundary onError={logProductionError}>
- <ToastContainer position={toast.POSITION.TOP_RIGHT} toastClassName="c-toast" />
- {config.showHeader && <Header />}
- {React.createElement(config.component, fider.session.props)}
- {config.showHeader && <Footer />}
+ <IconContext.Provider value={{ className: "icon" }}>
+ <ToastContainer position={toast.POSITION.TOP_RIGHT} toastClassName="c-toast" />
+ {config.showHeader && <Header />}
+ {React.createElement(config.component, fider.session.props)}
+ {config.showHeader && <Footer />}
+ </IconContext.Provider>
</ErrorBoundary>,
document.getElementById("root")
);
diff --git a/public/pages/Administration/components/AdminBasePage.tsx b/public/pages/Administration/components/AdminBasePage.tsx
index 63d33d462..e92741913 100644
--- a/public/pages/Administration/components/AdminBasePage.tsx
+++ b/public/pages/Administration/components/AdminBasePage.tsx
@@ -3,11 +3,12 @@ import "./AdminBasePage.scss";
import React from "react";
import { Heading } from "@fider/components";
import { SideMenu, SideMenuToggler } from "./";
+import { IconType } from "react-icons";
export abstract class AdminBasePage<P, S> extends React.Component<P, S> {
public abstract id: string;
public abstract name: string;
- public abstract icon: string;
+ public abstract icon: IconType;
public abstract title: string;
public abstract subtitle: string;
public abstract content(): JSX.Element;
diff --git a/public/pages/Administration/components/OAuthForm.tsx b/public/pages/Administration/components/OAuthForm.tsx
index 527346675..ef6fd7eb0 100644
--- a/public/pages/Administration/components/OAuthForm.tsx
+++ b/public/pages/Administration/components/OAuthForm.tsx
@@ -282,7 +282,7 @@ export class OAuthForm extends React.Component<OAuthFormProps, OAuthFormState> {
onChange={this.setJSONUserNamePath}
>
<p className="info">
- Path to extract user Display Name from the JSON. This is optional, but <strong>highly</strong>
+ Path to extract user Display Name from the JSON. This is optional, but <strong>highly</strong>{" "}
recommended. For the example below, the path would be <strong>profile.name</strong>.
</p>
</Input>
diff --git a/public/pages/Administration/components/TagListItem.tsx b/public/pages/Administration/components/TagListItem.tsx
index e1116e6e9..5811b2bb0 100644
--- a/public/pages/Administration/components/TagListItem.tsx
+++ b/public/pages/Administration/components/TagListItem.tsx
@@ -3,6 +3,7 @@ import { Tag } from "@fider/models";
import { ListItem, ShowTag, Button } from "@fider/components";
import { TagFormState, TagForm } from "./";
import { actions, Failure, Fider } from "@fider/services";
+import { FaTimes, FaEdit } from "react-icons/fa";
interface TagListItemProps {
tag: Tag;
@@ -93,12 +94,12 @@ export class TagListItem extends React.Component<TagListItemProps, TagListItemSt
private renderViewMode() {
const buttons = Fider.session.user.isAdministrator && [
- <Button key={0} onClick={this.startDelete} className="right">
- <i className="remove icon" />
+ <Button size="mini" key={0} onClick={this.startDelete} className="right">
+ <FaTimes />
Delete
</Button>,
- <Button key={1} onClick={this.startEdit} className="right">
- <i className="edit icon" />
+ <Button size="mini" key={1} onClick={this.startEdit} className="right">
+ <FaEdit />
Edit
</Button>
];
@@ -127,8 +128,8 @@ export class TagListItem extends React.Component<TagListItemProps, TagListItemSt
const view = this.state.isDeleting
? this.renderDeleteMode()
: this.state.isEditing
- ? this.renderEditMode()
- : this.renderViewMode();
+ ? this.renderEditMode()
+ : this.renderViewMode();
return <ListItem>{view}</ListItem>;
}
diff --git a/public/pages/Administration/components/UserListItem.tsx b/public/pages/Administration/components/UserListItem.tsx
index 75f6ee7e0..6f0f79fb2 100644
--- a/public/pages/Administration/components/UserListItem.tsx
+++ b/public/pages/Administration/components/UserListItem.tsx
@@ -37,13 +37,11 @@ export class UserListItem extends React.Component<UserListItemProps, {}> {
</div>
{this.props.removable && (
<Button size="tiny" color="danger" onClick={this.demote} className="right showover">
- <i className="remove icon" />
Remove
</Button>
)}
{this.props.addable && (
<Button size="tiny" color="positive" onClick={this.promote} className="right showover">
- <i className="add icon" />
Add
</Button>
)}
diff --git a/public/pages/Administration/pages/AdvancedSettings.page.tsx b/public/pages/Administration/pages/AdvancedSettings.page.tsx
index 4454349d2..a0dbe917a 100644
--- a/public/pages/Administration/pages/AdvancedSettings.page.tsx
+++ b/public/pages/Administration/pages/AdvancedSettings.page.tsx
@@ -5,6 +5,7 @@ import React from "react";
import { AdminBasePage } from "../components";
import { TextArea, Form, Button, ButtonClickEvent } from "@fider/components";
import { Failure, actions, Fider } from "@fider/services";
+import { FaStar } from "react-icons/fa";
interface AdvancedSettingsPageProps {
customCSS: string;
@@ -18,7 +19,7 @@ interface AdvancedSettingsPageState {
export class AdvancedSettingsPage extends AdminBasePage<AdvancedSettingsPageProps, AdvancedSettingsPageState> {
public id = "p-admin-advanced";
public name = "advanced";
- public icon = "star";
+ public icon = FaStar;
public title = "Advanced";
public subtitle = "Manage your site settings";
diff --git a/public/pages/Administration/pages/Export.page.tsx b/public/pages/Administration/pages/Export.page.tsx
index c492ffc76..d5bf4cc4f 100644
--- a/public/pages/Administration/pages/Export.page.tsx
+++ b/public/pages/Administration/pages/Export.page.tsx
@@ -2,11 +2,12 @@ import React from "react";
import { Button, Form, Field } from "@fider/components";
import { AdminBasePage } from "../components";
+import { FaRegFileExcel } from "react-icons/fa";
export class ExportPage extends AdminBasePage<{}, {}> {
public id = "p-admin-export";
public name = "export";
- public icon = "file excel outline";
+ public icon = FaRegFileExcel;
public title = "Export";
public subtitle = "Download your data";
diff --git a/public/pages/Administration/pages/GeneralSettings.page.tsx b/public/pages/Administration/pages/GeneralSettings.page.tsx
index 86ffbce7e..81a1f94a1 100644
--- a/public/pages/Administration/pages/GeneralSettings.page.tsx
+++ b/public/pages/Administration/pages/GeneralSettings.page.tsx
@@ -14,6 +14,7 @@ import {
} from "@fider/components/common";
import { actions, Failure, fileToBase64, Fider } from "@fider/services";
import { AdminBasePage } from "../components";
+import { FaCogs } from "react-icons/fa";
interface GeneralSettingsPageProps {
publicIP: string;
@@ -33,7 +34,7 @@ export class GeneralSettingsPage extends AdminBasePage<GeneralSettingsPageProps,
public id = "p-admin-general";
public name = "general";
- public icon = "settings";
+ public icon = FaCogs;
public title = "General";
public subtitle = "Manage your site settings";
diff --git a/public/pages/Administration/pages/Invitations.page.tsx b/public/pages/Administration/pages/Invitations.page.tsx
index 00f1f2221..750fd2953 100644
--- a/public/pages/Administration/pages/Invitations.page.tsx
+++ b/public/pages/Administration/pages/Invitations.page.tsx
@@ -3,6 +3,7 @@ import React from "react";
import { Button, ButtonClickEvent, TextArea, Form, Input, Field } from "@fider/components";
import { actions, notify, Failure, Fider } from "@fider/services";
import { AdminBasePage } from "../components";
+import { FaEnvelope } from "react-icons/fa";
interface InvitationsPageState {
subject: string;
@@ -16,7 +17,7 @@ interface InvitationsPageState {
export class InvitationsPage extends AdminBasePage<{}, InvitationsPageState> {
public id = "p-admin-invitations";
public name = "invitations";
- public icon = "envelope";
+ public icon = FaEnvelope;
public title = "Invitations";
public subtitle = "Invite people to share their feedback";
diff --git a/public/pages/Administration/pages/ManageAuthentication.page.tsx b/public/pages/Administration/pages/ManageAuthentication.page.tsx
index 81ac60ad4..baf645834 100644
--- a/public/pages/Administration/pages/ManageAuthentication.page.tsx
+++ b/public/pages/Administration/pages/ManageAuthentication.page.tsx
@@ -7,6 +7,7 @@ import { Segment, List, ListItem, Button, Heading, OAuthProviderLogo } from "@fi
import { OAuthConfig, OAuthProviderOption } from "@fider/models";
import { OAuthForm } from "../components/OAuthForm";
import { actions, notify, Fider } from "@fider/services";
+import { FaEdit, FaPlay, FaSignInAlt } from "react-icons/fa";
interface ManageAuthenticationPageProps {
providers: OAuthProviderOption[];
@@ -23,7 +24,7 @@ export class ManageAuthenticationPage extends AdminBasePage<
> {
public id = "p-admin-authentication";
public name = "authentication";
- public icon = "sign in alternate";
+ public icon = FaSignInAlt;
public title = "Authentication";
public subtitle = "Manage your site authentication";
@@ -89,13 +90,13 @@ export class ManageAuthenticationPage extends AdminBasePage<
{o.isCustomProvider && (
<>
{Fider.session.user.isAdministrator && (
- <Button onClick={this.edit.bind(this, o.provider)} className="right">
- <i className="edit icon" />
+ <Button onClick={this.edit.bind(this, o.provider)} size="mini" className="right">
+ <FaEdit />
Edit
</Button>
)}
- <Button onClick={this.startTest.bind(this, o.provider)} className="right">
- <i className="play icon" />
+ <Button onClick={this.startTest.bind(this, o.provider)} size="mini" className="right">
+ <FaPlay />
Test
</Button>
</>
diff --git a/public/pages/Administration/pages/ManageMembers.page.tsx b/public/pages/Administration/pages/ManageMembers.page.tsx
index 3827b2b9f..c63da08fc 100644
--- a/public/pages/Administration/pages/ManageMembers.page.tsx
+++ b/public/pages/Administration/pages/ManageMembers.page.tsx
@@ -5,6 +5,7 @@ import { Segment, List, Input, Form } from "@fider/components/common";
import { User, UserRole } from "@fider/models";
import { Fider } from "@fider/services";
import { AdminBasePage, UserListItem } from "../components";
+import { FaUsers } from "react-icons/fa";
interface ManageMembersPageState {
administrators: User[];
@@ -23,7 +24,7 @@ interface ManageMembersPageProps {
export class ManageMembersPage extends AdminBasePage<ManageMembersPageProps, ManageMembersPageState> {
public id = "p-admin-members";
public name = "members";
- public icon = "users";
+ public icon = FaUsers;
public title = "Members";
public subtitle = "Manage your site administrators and collaborators";
@@ -122,8 +123,9 @@ export class ManageMembersPage extends AdminBasePage<ManageMembersPageProps, Man
<List hover={true}>
{this.state.filteredNewAdministrators.map(x => this.showUser(x, UserRole.Administrator, true, false))}
</List>
- {this.state.newAdministratorFilter &&
- this.state.filteredNewAdministrators.length === 0 && <p className="info">No users to show.</p>}
+ {this.state.newAdministratorFilter && this.state.filteredNewAdministrators.length === 0 && (
+ <p className="info">No users to show.</p>
+ )}
</Form>
)}
</Segment>
@@ -148,8 +150,9 @@ export class ManageMembersPage extends AdminBasePage<ManageMembersPageProps, Man
<List hover={true}>
{this.state.filteredNewCollaborators.map(x => this.showUser(x, UserRole.Collaborator, true, false))}
</List>
- {this.state.newCollaboratorFilter &&
- this.state.filteredNewCollaborators.length === 0 && <p className="info">No users to show.</p>}
+ {this.state.newCollaboratorFilter && this.state.filteredNewCollaborators.length === 0 && (
+ <p className="info">No users to show.</p>
+ )}
</Form>
)}
</Segment>
diff --git a/public/pages/Administration/pages/ManageTags.page.tsx b/public/pages/Administration/pages/ManageTags.page.tsx
index 1ff8ca4a4..c3547f23d 100644
--- a/public/pages/Administration/pages/ManageTags.page.tsx
+++ b/public/pages/Administration/pages/ManageTags.page.tsx
@@ -6,6 +6,7 @@ import { AdminBasePage, TagForm, TagFormState, TagListItem } from "../components
import { Tag } from "@fider/models";
import { actions, Failure, Fider } from "@fider/services";
+import { FaTags } from "react-icons/fa";
interface ManageTagsPageProps {
tags: Tag[];
@@ -30,7 +31,7 @@ const tagSorter = (t1: Tag, t2: Tag) => {
export class ManageTagsPage extends AdminBasePage<ManageTagsPageProps, ManageTagsPageState> {
public id = "p-admin-tags";
public name = "tags";
- public icon = "tags";
+ public icon = FaTags;
public title = "Tags";
public subtitle = "Manage your site tags";
diff --git a/public/pages/Administration/pages/PrivacySettings.page.tsx b/public/pages/Administration/pages/PrivacySettings.page.tsx
index 73804429d..b6ec26a07 100644
--- a/public/pages/Administration/pages/PrivacySettings.page.tsx
+++ b/public/pages/Administration/pages/PrivacySettings.page.tsx
@@ -4,6 +4,7 @@ import React from "react";
import { Toggle, Form } from "@fider/components/common";
import { actions, notify, Fider } from "@fider/services";
import { AdminBasePage } from "../components";
+import { FaKey } from "react-icons/fa";
interface PrivacySettingsPageState {
isPrivate: boolean;
@@ -12,7 +13,7 @@ interface PrivacySettingsPageState {
export class PrivacySettingsPage extends AdminBasePage<{}, PrivacySettingsPageState> {
public id = "p-admin-privacy";
public name = "privacy";
- public icon = "key";
+ public icon = FaKey;
public title = "Privacy";
public subtitle = "Manage your site privacy";
diff --git a/public/pages/Error/Error.page.tsx b/public/pages/Error/Error.page.tsx
index 482e2a854..6f56299ef 100644
--- a/public/pages/Error/Error.page.tsx
+++ b/public/pages/Error/Error.page.tsx
@@ -32,13 +32,12 @@ export const ErrorPage: React.SFC<ErrorPageProps> = ({
<div className="content">
<h2>{title}</h2>
<p>{message}</p>
- {showError &&
- showError() && (
- <pre className="error">
- {error.toString()}
- {errorInfo.componentStack}
- </pre>
- )}
+ {showError && showError() && (
+ <pre className="error">
+ {error.toString()}
+ {errorInfo.componentStack}
+ </pre>
+ )}
</div>
</div>
);
diff --git a/public/pages/Home/Home.page.scss b/public/pages/Home/Home.page.scss
index 6d0119800..6127b63a5 100644
--- a/public/pages/Home/Home.page.scss
+++ b/public/pages/Home/Home.page.scss
@@ -22,11 +22,14 @@
.c-tag {
margin: 0 5px 0 0;
}
- i.check {
+ .icon {
+ height: 12px;
+ margin-right: 2px;
+ vertical-align: top;
color: transparent;
}
.selected-tag {
- i.check {
+ .icon {
color: $green;
}
}
diff --git a/public/pages/Home/Home.page.tsx b/public/pages/Home/Home.page.tsx
index dab1a436b..aa6ca58f0 100644
--- a/public/pages/Home/Home.page.tsx
+++ b/public/pages/Home/Home.page.tsx
@@ -6,6 +6,7 @@ import { MultiLineText } from "@fider/components";
import { PostInput, PostsContainer } from "./";
import { Fider } from "@fider/services";
import { SimilarPosts } from "./components/SimilarPosts";
+import { FaRegLightbulb } from "react-icons/fa";
export interface HomePageProps {
posts: Post[];
@@ -21,7 +22,7 @@ const Lonely = () => {
return (
<div className="center">
<p>
- <i className="icon lightbulb outline" aria-hidden="true" />
+ <FaRegLightbulb />
</p>
<p>It's lonely out here. Start by sharing a suggestion!</p>
</div>
diff --git a/public/pages/Home/components/ListPosts.scss b/public/pages/Home/components/ListPosts.scss
index f36f6ff58..bc5935f9b 100644
--- a/public/pages/Home/components/ListPosts.scss
+++ b/public/pages/Home/components/ListPosts.scss
@@ -23,6 +23,10 @@
.c-tag {
margin: 0 3px 3px 0;
}
+
+ svg.icon {
+ vertical-align: middle;
+ }
}
.c-list-item-description {
diff --git a/public/pages/Home/components/ListPosts.tsx b/public/pages/Home/components/ListPosts.tsx
index 78eebd284..85f4a7dc7 100644
--- a/public/pages/Home/components/ListPosts.tsx
+++ b/public/pages/Home/components/ListPosts.tsx
@@ -3,6 +3,7 @@ import "./ListPosts.scss";
import React from "react";
import { Post, Tag, CurrentUser } from "@fider/models";
import { ShowTag, ShowPostResponse, VoteCounter, MultiLineText, ListItem, List } from "@fider/components";
+import { FaRegComments } from "react-icons/fa";
interface ListPostsProps {
posts?: Post[];
@@ -17,7 +18,7 @@ const ListPostItem = (props: { post: Post; user?: CurrentUser; tags: Tag[] }) =>
<div className="c-list-item-content">
{props.post.commentsCount > 0 && (
<div className="info right">
- {props.post.commentsCount} <i className="comments outline icon" />
+ {props.post.commentsCount} <FaRegComments />
</div>
)}
<a className="c-list-item-title" href={`/posts/${props.post.number}/${props.post.slug}`}>
diff --git a/public/pages/Home/components/PostsContainer.tsx b/public/pages/Home/components/PostsContainer.tsx
index 6f27720d5..ede568a0f 100644
--- a/public/pages/Home/components/PostsContainer.tsx
+++ b/public/pages/Home/components/PostsContainer.tsx
@@ -5,6 +5,7 @@ import { ListPosts, TagsFilter, PostFilter } from "../";
import { Post, Tag, CurrentUser } from "@fider/models";
import { Loader, Field, Input } from "@fider/components";
import { actions, navigator, querystring } from "@fider/services";
+import { FaTimes, FaSearch } from "react-icons/fa";
interface PostsContainerProps {
user?: CurrentUser;
@@ -120,7 +121,7 @@ export class PostsContainer extends React.Component<PostsContainerProps, PostsCo
<div className={!this.state.query ? `l-search-col col-sm-5 col-md-4 col-lg-3 mb-2` : "col-sm-12 mb-2"}>
<Input
field="query"
- icon={this.state.query ? "cancel" : "search"}
+ icon={this.state.query ? FaTimes : FaSearch}
onIconClick={this.state.query ? this.clearSearch : undefined}
placeholder="Search..."
value={this.state.query}
diff --git a/public/pages/Home/components/SimilarPosts.tsx b/public/pages/Home/components/SimilarPosts.tsx
index fc2cadf31..ebe785cce 100644
--- a/public/pages/Home/components/SimilarPosts.tsx
+++ b/public/pages/Home/components/SimilarPosts.tsx
@@ -3,6 +3,7 @@ import { Post, Tag, CurrentUser } from "@fider/models";
import { Heading, Loader } from "@fider/components";
import { ListPosts } from "./ListPosts";
import { actions } from "@fider/services";
+import { FaRegLightbulb } from "react-icons/fa";
interface SimilarPostsProps {
title: string;
@@ -59,7 +60,7 @@ export class SimilarPosts extends React.Component<SimilarPostsProps, SimilarPost
<Heading
title="Similar posts"
subtitle="Consider voting on existing posts instead of posting a new one."
- icon="lightbulb outline"
+ icon={FaRegLightbulb}
size="small"
dividing={true}
/>
diff --git a/public/pages/Home/components/TagsFilter.tsx b/public/pages/Home/components/TagsFilter.tsx
index d9787d506..f55d2199a 100644
--- a/public/pages/Home/components/TagsFilter.tsx
+++ b/public/pages/Home/components/TagsFilter.tsx
@@ -4,6 +4,7 @@ import React from "react";
import { Tag } from "@fider/models";
import { ShowTag } from "@fider/components/ShowTag";
import { DropDown, DropDownItem } from "@fider/components";
+import { FaCheck } from "react-icons/fa";
interface TagsFilterProps {
tags: Tag[];
@@ -40,8 +41,8 @@ export class TagsFilter extends React.Component<TagsFilterProps, TagsFilterState
this.state.selected.length === 0
? "any tag"
: this.state.selected.length === 1
- ? "1 tag"
- : `${this.state.selected.length} tags`;
+ ? "1 tag"
+ : `${this.state.selected.length} tags`;
return <>{text}</>;
};
@@ -56,7 +57,7 @@ export class TagsFilter extends React.Component<TagsFilterProps, TagsFilterState
label: t.name,
render: (
<div className={this.state.selected.indexOf(t.slug) >= 0 ? "selected-tag" : ""}>
- <i className="icon check" />
+ <FaCheck />
<ShowTag tag={t} size="mini" circular={true} />
{t.name}
</div>
diff --git a/public/pages/MyNotifications/MyNotifications.page.tsx b/public/pages/MyNotifications/MyNotifications.page.tsx
index 57afb088f..485f53e63 100644
--- a/public/pages/MyNotifications/MyNotifications.page.tsx
+++ b/public/pages/MyNotifications/MyNotifications.page.tsx
@@ -5,6 +5,7 @@ import React from "react";
import { Notification } from "@fider/models";
import { MultiLineText, Moment, Heading, List, ListItem } from "@fider/components";
import { actions } from "@fider/services";
+import { FaBell } from "react-icons/fa";
interface MyNotificationsPageProps {
notifications: Notification[];
@@ -58,7 +59,7 @@ export class MyNotificationsPage extends React.Component<MyNotificationsPageProp
public render() {
return (
<div id="p-my-notifications" className="page container">
- <Heading title="Notifications" subtitle="Stay up to date with what's happening" icon="bell" />
+ <Heading title="Notifications" subtitle="Stay up to date with what's happening" icon={FaBell} />
<h4>
Unread
diff --git a/public/pages/MySettings/MySettings.page.tsx b/public/pages/MySettings/MySettings.page.tsx
index 18b4ef22c..10ae5193f 100644
--- a/public/pages/MySettings/MySettings.page.tsx
+++ b/public/pages/MySettings/MySettings.page.tsx
@@ -7,6 +7,7 @@ import { DangerZone, APIKeyForm, NotificationSettings } from "./";
import { UserSettings } from "@fider/models";
import { Failure, actions, Fider } from "@fider/services";
+import { FaRegAddressCard } from "react-icons/fa";
interface MySettingsPageState {
showModal: boolean;
@@ -109,7 +110,7 @@ export class MySettingsPage extends React.Component<MySettingsPageProps, MySetti
</Modal.Content>
</Modal.Window>
- <Heading title="Settings" subtitle="Manage your profile settings" icon="address card outline" />
+ <Heading title="Settings" subtitle="Manage your profile settings" icon={FaRegAddressCard} />
<div className="row">
<div className="col-lg-7">
diff --git a/public/pages/OAuthEcho/OAuthEcho.page.scss b/public/pages/OAuthEcho/OAuthEcho.page.scss
index aca43df01..28166f2c2 100644
--- a/public/pages/OAuthEcho/OAuthEcho.page.scss
+++ b/public/pages/OAuthEcho/OAuthEcho.page.scss
@@ -1,13 +1,17 @@
@import '~@fider/assets/styles/variables.scss';
#p-oauth-echo {
- i.times.icon {
+ .icon {
+ margin-right: 5px;
+ margin-bottom: 5px;
+ }
+ .icon.error {
color: $red;
}
- i.check.icon {
+ .icon.check {
color: $green;
}
- i.exclamation.icon {
+ .icon.warn {
color: $orange;
}
}
\ No newline at end of file
diff --git a/public/pages/OAuthEcho/OAuthEcho.page.tsx b/public/pages/OAuthEcho/OAuthEcho.page.tsx
index 335f43a6c..f7e9c46c9 100644
--- a/public/pages/OAuthEcho/OAuthEcho.page.tsx
+++ b/public/pages/OAuthEcho/OAuthEcho.page.tsx
@@ -3,6 +3,7 @@ import "./OAuthEcho.page.scss";
import React from "react";
import { navigator } from "@fider/services";
import { Segments, Segment } from "@fider/components";
+import { FaCheckCircle, FaTimesCircle, FaExclamationTriangle } from "react-icons/fa";
interface OAuthEchoPageProps {
err: string | undefined;
@@ -14,9 +15,9 @@ interface OAuthEchoPageProps {
};
}
-const ok = <i className="check circle icon" />;
-const error = <i className="times circle icon" />;
-const warn = <i className="exclamation triangle icon" />;
+const ok = <FaCheckCircle className="check" />;
+const error = <FaTimesCircle className="error" />;
+const warn = <FaExclamationTriangle className="warn" />;
export class OAuthEchoPage extends React.Component<OAuthEchoPageProps, {}> {
public componentDidMount() {
@@ -63,24 +64,24 @@ export class OAuthEchoPage extends React.Component<OAuthEchoPageProps, {}> {
<p>
{nameOk ? ok : warn}
<strong>Name:</strong> {this.props.profile && this.props.profile.name}
+ {!nameOk && (
+ <p className="info">
+ Name is required, if not found we'll use <strong>Anonymous</strong> as the name of every new user.
+ </p>
+ )}
</p>
- {!nameOk && (
- <p className="info">
- Name is required, if not found we'll use <strong>Anonymous</strong> as the name of every new user.
- </p>
- )}
</Segment>
<Segment>
<p>
{emailOk ? ok : warn}
<strong>Email:</strong> {this.props.profile && this.props.profile.email}
+ {!emailOk && (
+ <p className="info">
+ Email is not required, but highly recommended. If invalid or not found, new users won't be able to
+ receive notifications.
+ </p>
+ )}
</p>
- {!emailOk && (
- <p className="info">
- Email is not required, but highly recommended. If invalid or not found, new users won't be able to
- receive notifications.
- </p>
- )}
</Segment>
</Segments>
</>
diff --git a/public/pages/ShowPost/ShowPost.page.scss b/public/pages/ShowPost/ShowPost.page.scss
index 07df124a0..cc3ac588a 100644
--- a/public/pages/ShowPost/ShowPost.page.scss
+++ b/public/pages/ShowPost/ShowPost.page.scss
@@ -44,8 +44,12 @@
}
.c-tag-list {
- .icon.check {
- color: $green;
+ .m-selectable {
+ .icon {
+ height: 12px;
+ margin-right: 2px;
+ color: $green;
+ }
}
span {
margin-left: 5px;
@@ -59,7 +63,7 @@
text-align: center;
width: 50px;
display: inline-block;
- i {
+ .icon {
margin: 0;
}
}
diff --git a/public/pages/ShowPost/ShowPost.page.tsx b/public/pages/ShowPost/ShowPost.page.tsx
index 9eca04f25..f5b54ac0b 100644
--- a/public/pages/ShowPost/ShowPost.page.tsx
+++ b/public/pages/ShowPost/ShowPost.page.tsx
@@ -9,7 +9,6 @@ import { TagsPanel, DiscussionPanel, ResponseForm, NotificationsPanel, Moderatio
import {
VoteCounter,
ShowPostResponse,
- DisplayError,
Button,
UserName,
Gravatar,
@@ -21,6 +20,7 @@ import {
Form,
TextArea
} from "@fider/components";
+import { FaSave, FaTimes, FaEdit } from "react-icons/fa";
interface ShowPostPageProps {
post: Post;
@@ -131,12 +131,12 @@ export class ShowPostPage extends React.Component<ShowPostPageProps, ShowPostPag
<List key={1}>
<ListItem>
<Button className="save" color="positive" fluid={true} onClick={this.saveChanges}>
- <i className="save icon" /> Save
+ <FaSave /> Save
</Button>
</ListItem>
<ListItem>
<Button className="cancel" fluid={true} onClick={this.cancelEdit}>
- <i className="cancel icon" /> Cancel
+ <FaTimes /> Cancel
</Button>
</ListItem>
</List>
@@ -144,7 +144,7 @@ export class ShowPostPage extends React.Component<ShowPostPageProps, ShowPostPag
<List key={1}>
<ListItem>
<Button className="edit" fluid={true} onClick={this.startEdit}>
- <i className="edit icon" /> Edit
+ <FaEdit /> Edit
</Button>
</ListItem>
<ListItem>
diff --git a/public/pages/ShowPost/components/Comments.scss b/public/pages/ShowPost/components/Comments.scss
index eb41a7ccd..5f59949d7 100644
--- a/public/pages/ShowPost/components/Comments.scss
+++ b/public/pages/ShowPost/components/Comments.scss
@@ -40,19 +40,20 @@
width: 100px;
}
- .ellipsis.icon {
+ .icon {
color: $gray-dark;
+ font-size: 12px;
}
&:hover {
- .ellipsis.icon {
+ .icon {
color: $gray-darkest;
}
}
&.is-open {
display: inline-block !important;
- .ellipsis.icon {
+ .icon {
color: $gray-darkest;
}
}
diff --git a/public/pages/ShowPost/components/ModerationPanel.tsx b/public/pages/ShowPost/components/ModerationPanel.tsx
index 177fb4834..29c5c25ef 100644
--- a/public/pages/ShowPost/components/ModerationPanel.tsx
+++ b/public/pages/ShowPost/components/ModerationPanel.tsx
@@ -2,6 +2,7 @@ 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;
@@ -87,7 +88,7 @@ export class ModerationPanel extends React.Component<ModerationPanelProps, Moder
<List>
<ListItem>
<Button color="danger" size="tiny" fluid={true} onClick={this.showModal}>
- <i className="delete icon" /> Delete
+ <FaTimes /> Delete
</Button>
</ListItem>
</List>
diff --git a/public/pages/ShowPost/components/NotificationsPanel.tsx b/public/pages/ShowPost/components/NotificationsPanel.tsx
index d7f5fd199..7f280ae63 100644
--- a/public/pages/ShowPost/components/NotificationsPanel.tsx
+++ b/public/pages/ShowPost/components/NotificationsPanel.tsx
@@ -2,6 +2,7 @@ import React from "react";
import { Post } from "@fider/models";
import { Button, List, ListItem } from "@fider/components";
import { actions, Fider } from "@fider/services";
+import { FaVolumeOff, FaVolumeUp, FaVolumeMute } from "react-icons/fa";
interface NotificationsPanelProps {
post: Post;
@@ -38,11 +39,11 @@ export class NotificationsPanel extends React.Component<NotificationsPanelProps,
const button = this.state.subscribed ? (
<Button fluid={true} onClick={this.subscribeOrUnsubscribe}>
- <i className="volume off icon" /> Unsubscribe
+ <FaVolumeMute /> Unsubscribe
</Button>
) : (
<Button fluid={true} onClick={this.subscribeOrUnsubscribe}>
- <i className="volume up icon" /> Subscribe
+ <FaVolumeUp /> Subscribe
</Button>
);
diff --git a/public/pages/ShowPost/components/PostSearch.tsx b/public/pages/ShowPost/components/PostSearch.tsx
index 585bcfe05..b15602f74 100644
--- a/public/pages/ShowPost/components/PostSearch.tsx
+++ b/public/pages/ShowPost/components/PostSearch.tsx
@@ -2,6 +2,7 @@ import React from "react";
import { Post, PostStatus } from "@fider/models";
import { actions } from "@fider/services";
import { DropDown, DropDownItem } from "@fider/components";
+import { FaCaretUp } from "react-icons/fa";
interface PostSearchProps {
exclude?: number[];
@@ -55,7 +56,7 @@ export class PostSearch extends React.Component<PostSearchProps, PostSearchState
render: (
<>
<span className="votes">
- <i className="caret up icon" />
+ <FaCaretUp />
{p.votesCount}
</span>
<span className={`status-label status-${status.value}`}>{status.title}</span>
diff --git a/public/pages/ShowPost/components/ResponseForm.tsx b/public/pages/ShowPost/components/ResponseForm.tsx
index 78b13fd8c..d701ced02 100644
--- a/public/pages/ShowPost/components/ResponseForm.tsx
+++ b/public/pages/ShowPost/components/ResponseForm.tsx
@@ -5,6 +5,7 @@ import { Post, PostStatus } from "@fider/models";
import { PostSearch } from "../";
import { actions, Failure } from "@fider/services";
+import { FaBullhorn } from "react-icons/fa";
interface ResponseFormProps {
post: Post;
@@ -66,7 +67,7 @@ export class ResponseForm extends React.Component<ResponseFormProps, ResponseFor
public render() {
const button = (
<Button className="respond" fluid={true} onClick={this.showModal}>
- <i className="announcement icon" /> Respond
+ <FaBullhorn /> Respond
</Button>
);
diff --git a/public/pages/ShowPost/components/ShowComment.tsx b/public/pages/ShowPost/components/ShowComment.tsx
index e25b68439..7966d7d79 100644
--- a/public/pages/ShowPost/components/ShowComment.tsx
+++ b/public/pages/ShowPost/components/ShowComment.tsx
@@ -13,6 +13,7 @@ import {
Modal
} from "@fider/components";
import { formatDate, Failure, actions, Fider } from "@fider/services";
+import { FaEllipsisH } from "react-icons/fa";
interface ShowCommentProps {
post: Post;
@@ -73,7 +74,7 @@ export class ShowComment extends React.Component<ShowCommentProps, ShowCommentSt
};
private renderEllipsis = () => {
- return <i className="ellipsis horizontal icon" />;
+ return <FaEllipsisH />;
};
private closeModal = async () => {
@@ -120,14 +121,11 @@ export class ShowComment extends React.Component<ShowCommentProps, ShowCommentSt
public render() {
const c = this.state.comment;
- const editedMetadata = !!c.editedAt &&
- !!c.editedBy && (
- <div className="c-comment-metadata">
- <span title={`This comment has been edited by ${c.editedBy!.name} on ${formatDate(c.editedAt)}`}>
- · edited
- </span>
- </div>
- );
+ const editedMetadata = !!c.editedAt && !!c.editedBy && (
+ <div className="c-comment-metadata">
+ <span title={`This comment has been edited by ${c.editedBy!.name} on ${formatDate(c.editedAt)}`}>· edited</span>
+ </div>
+ );
return (
<div className="c-comment">
@@ -139,20 +137,19 @@ export class ShowComment extends React.Component<ShowCommentProps, ShowCommentSt
· <Moment date={c.createdAt} />
</div>
{editedMetadata}
- {!this.state.isEditing &&
- this.canEditComment(c) && (
- <DropDown
- className="l-more-actions"
- direction="left"
- highlightSelected={false}
- items={[
- { label: "Edit", value: "edit" },
- { label: "Delete", value: "delete", render: <span style={{ color: "red" }}>Delete</span> }
- ]}
- onChange={this.onActionSelected}
- renderText={this.renderEllipsis}
- />
- )}
+ {!this.state.isEditing && this.canEditComment(c) && (
+ <DropDown
+ className="l-more-actions"
+ direction="left"
+ highlightSelected={false}
+ items={[
+ { label: "Edit", value: "edit" },
+ { label: "Delete", value: "delete", render: <span style={{ color: "red" }}>Delete</span> }
+ ]}
+ onChange={this.onActionSelected}
+ renderText={this.renderEllipsis}
+ />
+ )}
<div className="c-comment-text">
{this.state.isEditing ? (
<Form error={this.state.error}>
diff --git a/public/pages/ShowPost/components/TagListItem.tsx b/public/pages/ShowPost/components/TagListItem.tsx
index c51294dc8..77f1861c9 100644
--- a/public/pages/ShowPost/components/TagListItem.tsx
+++ b/public/pages/ShowPost/components/TagListItem.tsx
@@ -1,6 +1,7 @@
import React from "react";
import { Tag } from "@fider/models";
import { ListItem, ShowTag } from "@fider/components";
+import { FaCheck } from "react-icons/fa";
interface TagListItemProps {
tag: Tag;
@@ -16,7 +17,7 @@ export class TagListItem extends React.Component<TagListItemProps, {}> {
public render() {
return (
<ListItem onClick={this.onClick}>
- <i className={`icon ${this.props.assigned && "check"}`} />
+ {this.props.assigned ? <FaCheck /> : <svg className="icon" />}
<ShowTag tag={this.props.tag} size="mini" circular={true} />
<span>{this.props.tag.name}</span>
</ListItem>
diff --git a/public/pages/ShowPost/components/TagsPanel.tsx b/public/pages/ShowPost/components/TagsPanel.tsx
index 9b28ee3f8..3bf1f2f86 100644
--- a/public/pages/ShowPost/components/TagsPanel.tsx
+++ b/public/pages/ShowPost/components/TagsPanel.tsx
@@ -3,6 +3,7 @@ import { Tag, Post } from "@fider/models";
import { actions, Fider } from "@fider/services";
import { ShowTag, List, ListItem } from "@fider/components";
import { TagListItem } from "./TagListItem";
+import { FaCheckCircle, FaCog } from "react-icons/fa";
interface TagsPanelProps {
post: Post;
@@ -83,9 +84,7 @@ export class TagsPanel extends React.Component<TagsPanelProps, TagsPanelState> {
);
const subtitleClasses = `subtitle ${this.state.canEdit && "active"}`;
- const icon =
- this.state.canEdit &&
- (this.state.isEditing ? <i className="check circle icon" /> : <i className="setting icon" />);
+ const icon = this.state.canEdit && (this.state.isEditing ? <FaCheckCircle /> : <FaCog />);
return (
<div>
diff --git a/public/pages/UI/UIToolkit.page.tsx b/public/pages/UI/UIToolkit.page.tsx
index 0502bf887..50804d911 100644
--- a/public/pages/UI/UIToolkit.page.tsx
+++ b/public/pages/UI/UIToolkit.page.tsx
@@ -25,6 +25,7 @@ import {
import { User, UserRole, Tag } from "@fider/models";
import { notify, Failure } from "@fider/services";
import { DropDown, DropDownItem } from "@fider/components";
+import { FaSearch, FaRegLightbulb, FaCogs } from "react-icons/fa";
const jonSnow: User = {
id: 0,
@@ -125,11 +126,11 @@ export class UIToolkitPage extends React.Component<{}, UIToolkitPageState> {
</ListItem>
</List>
- <Heading title="Page Heading" icon="settings" subtitle="This is a page heading" />
+ <Heading title="Page Heading" icon={FaCogs} subtitle="This is a page heading" />
<Heading
title="Section Heading"
- icon="lightbulb outline"
+ icon={FaRegLightbulb}
subtitle="This is a page heading"
size="small"
dividing={true}
@@ -138,6 +139,9 @@ export class UIToolkitPage extends React.Component<{}, UIToolkitPageState> {
<h1>Buttons</h1>
<List>
<ListItem>
+ <Button size="large">
+ <FaRegLightbulb /> Large Icon
+ </Button>
<Button size="large">Large Default</Button>
<Button color="positive" size="large">
Large Positive
@@ -151,6 +155,9 @@ export class UIToolkitPage extends React.Component<{}, UIToolkitPageState> {
</ListItem>
<ListItem>
+ <Button size="normal">
+ <FaRegLightbulb /> Normal Icon
+ </Button>
<Button size="normal">Normal Default</Button>
<Button color="positive" size="normal">
Normal Positive
@@ -164,6 +171,9 @@ export class UIToolkitPage extends React.Component<{}, UIToolkitPageState> {
</ListItem>
<ListItem>
+ <Button size="small">
+ <FaRegLightbulb /> Small Icon
+ </Button>
<Button size="small">Small Default</Button>
<Button color="positive" size="small">
Small Positive
@@ -177,6 +187,9 @@ export class UIToolkitPage extends React.Component<{}, UIToolkitPageState> {
</ListItem>
<ListItem>
+ <Button size="tiny">
+ <FaRegLightbulb /> Tiny Icon
+ </Button>
<Button size="tiny">Tiny Default</Button>
<Button color="positive" size="tiny">
Tiny Positive
@@ -190,6 +203,9 @@ export class UIToolkitPage extends React.Component<{}, UIToolkitPageState> {
</ListItem>
<ListItem>
+ <Button size="mini">
+ <FaRegLightbulb /> Mini Icon
+ </Button>
<Button size="mini">Mini Default</Button>
<Button color="positive" size="mini">
Mini Positive
@@ -203,6 +219,9 @@ export class UIToolkitPage extends React.Component<{}, UIToolkitPageState> {
</ListItem>
<ListItem>
+ <Button href="#">
+ <FaRegLightbulb /> Link
+ </Button>
<Button href="#">Link</Button>
<Button href="#" color="positive">
Link
@@ -213,6 +232,9 @@ export class UIToolkitPage extends React.Component<{}, UIToolkitPageState> {
</ListItem>
<ListItem>
+ <Button disabled={true}>
+ <FaRegLightbulb /> Default
+ </Button>
<Button disabled={true}>Default</Button>
<Button disabled={true} color="positive">
Positive
@@ -382,7 +404,7 @@ export class UIToolkitPage extends React.Component<{}, UIToolkitPageState> {
<Segment>
<h1>Search</h1>
- <Input field="search" placeholder="Search..." icon="search" />
+ <Input field="search" placeholder="Search..." icon={FaSearch} />
</Segment>
</div>
);
diff --git a/views/base.html b/views/base.html
index 99f3ce600..acf07d9a1 100644
--- a/views/base.html
+++ b/views/base.html
@@ -5,7 +5,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="icon" type="image/x-icon" href="{{ .__favicon }}">
- <link rel="preload" href="{{ .__fontBundle }}" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="stylesheet" href="{{ .__cssBundle }}" />
<title>{{ .__title }}</title>
<meta name="description" content="{{ .__description }}" />
diff --git a/webpack.config.js b/webpack.config.js
index 0254145e3..80fa9104f 100755
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -19,6 +19,9 @@ if (!isProduction) {
plugins.push(new CleanObsoleteChunks());
}
+// On Development Mode, we allow Assets to be up to 10 times bigger than on Prodution Mode
+const maxSizeFactor = isProduction ? 1 : 10;
+
module.exports = {
mode: process.env.NODE_ENV || "development",
entry: {
@@ -32,11 +35,16 @@ module.exports = {
},
devtool: "source-map",
resolve: {
- extensions: [".ts", ".tsx", ".js"],
+ extensions: [".mjs", ".ts", ".tsx", ".js"],
alias: {
"@fider": publicFolder
}
},
+ performance: {
+ maxEntrypointSize: 389120 * maxSizeFactor, // 380 KiB. Should ideally be ~240 KiB
+ maxAssetSize: 256000 * maxSizeFactor, // 250 KiB
+ hints: 'error'
+ },
module: {
rules: [
{
@@ -54,14 +62,6 @@ module.exports = {
options: {
transpileOnly: true
}
- },
- {
- test: /\.(eot|svg|ttf|woff|woff2)$/,
- use: "file-loader?name=fonts/[name].[hash].[ext]"
- },
- {
- test: /\.(png|gif|jpg|jpeg)$/,
- use: "file-loader?name=images/[name].[hash].[ext]"
}
]
},
@@ -69,10 +69,9 @@ module.exports = {
splitChunks: {
cacheGroups: {
vendor: {
- chunks: 'initial',
+ chunks: 'all',
name: 'vendor',
- test: 'vendor',
- enforce: true
+ test: 'vendor'
},
}
}