fix missing font-awesome

This commit is contained in:
Sebastian Sdorra
2018-08-30 08:49:28 +02:00
parent 4d62bbd329
commit 52f83f3b15
8 changed files with 3846 additions and 36 deletions

View File

@@ -5,6 +5,7 @@
"private": true,
"main": "src/index.js",
"dependencies": {
"@fortawesome/fontawesome-free": "^5.3.1",
"@scm-manager/ui-extensions": "^0.0.6",
"bulma": "^0.7.1",
"classnames": "^2.2.5",
@@ -27,13 +28,14 @@
"redux-thunk": "^2.3.0"
},
"scripts": {
"build-css": "node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/",
"watch-css": "npm run build-css && node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/ --watch --recursive",
"webfonts": "copyfiles -f node_modules/@fortawesome/fontawesome-free/webfonts/* target/styles/webfonts",
"build-css": "node-sass-chokidar --include-path ./styles --include-path ./node_modules styles/ -o target/styles",
"watch-css": "npm run build-css && node-sass-chokidar --include-path ./styles --include-path ./node_modules styles/ -o target/styles --watch --recursive",
"start-js": "ui-bundler serve",
"start": "npm-run-all -p watch-css build-vendor start-js",
"start": "npm-run-all -p webfonts watch-css build-vendor start-js",
"build-js": "ui-bundler bundle target/scm-ui.bundle.js",
"build-vendor": "ui-bundler vendor target/vendor.bundle.js",
"build": "npm-run-all build-css build-vendor build-js",
"build": "npm-run-all webfonts build-css build-vendor build-js",
"test": "ui-bundler test",
"test-ci": "ui-bundler test --ci",
"flow": "flow",
@@ -42,6 +44,7 @@
"devDependencies": {
"@scm-manager/ui-bundler": "^0.0.5",
"babel-eslint": "^8.2.6",
"copyfiles": "^2.0.0",
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.1.1",
"eslint": "^5.3.0",

View File

@@ -20,6 +20,9 @@
Learn how to configure a non-root public URL by running `npm run build`.
-->
<base href="/scm">
<link rel="stylesheet" type="text/css" href="/scm/styles/scm.css">
<title>SCM-Manager</title>
</head>
<body>

View File

@@ -2,62 +2,67 @@
import React from "react";
import { render, unmountComponentAtNode } from "react-dom";
import "./ConfirmAlert.css";
type Props = {
title:string,
title: string,
message: string,
buttons: array,
}
buttons: array
};
class ConfirmAlert extends React.Component<Props> {
handleClickButton = button => {
if (button.onClick) button.onClick()
this.close()
}
if (button.onClick) button.onClick();
this.close();
};
close = () => {
removeElementReconfirm()
}
removeElementReconfirm();
};
render () {
render() {
const { title, message, buttons } = this.props;
return (
<div className="react-confirm-alert-overlay">
<div className="react-confirm-alert">
{<div className="react-confirm-alert-body">
{
<div className="react-confirm-alert-body">
{title && <h1>{title}</h1>}
{message}
<div className="react-confirm-alert-button-group">
{buttons.map((button, i) => (
<button key={i} onClick={() => this.handleClickButton(button)}>
<button
key={i}
onClick={() => this.handleClickButton(button)}
>
{button.label}
</button>
))}
</div>
</div>}
</div>
}
</div>
</div>
)
);
}
}
function createElementReconfirm (properties) {
const divTarget = document.createElement('div')
divTarget.id = 'react-confirm-alert'
document.body.appendChild(divTarget)
render(<ConfirmAlert {...properties} />, divTarget)
function createElementReconfirm(properties) {
const divTarget = document.createElement("div");
divTarget.id = "react-confirm-alert";
document.body.appendChild(divTarget);
render(<ConfirmAlert {...properties} />, divTarget);
}
function removeElementReconfirm () {
const target = document.getElementById('react-confirm-alert')
unmountComponentAtNode(target)
target.parentNode.removeChild(target)
function removeElementReconfirm() {
const target = document.getElementById("react-confirm-alert");
unmountComponentAtNode(target);
target.parentNode.removeChild(target);
}
export function confirmAlert (properties) {
createElementReconfirm(properties)
export function confirmAlert(properties) {
createElementReconfirm(properties);
}
export default ConfirmAlert;

View File

@@ -11,10 +11,6 @@ import {
getFetchMeFailure
} from "../modules/auth";
import "./App.css";
// TODO ???
// import "font-awesome/css/font-awesome.css";
import "../components/modals/ConfirmAlert.css";
import { PrimaryNavigation } from "../components/navigation";
import Loading from "../components/Loading";
import ErrorPage from "../components/ErrorPage";

View File

@@ -45,7 +45,7 @@ class RepositoryEntry extends React.Component<Props> {
if (repository._links["changesets"]) {
return (
<RepositoryEntryLink
iconClass="fa-code-fork"
iconClass="fa-code-branch"
to={repositoryLink + "/changesets"}
/>
);

File diff suppressed because it is too large Load Diff

View File

@@ -46,3 +46,8 @@ $blue: #33B2E8;
box-shadow: $box-link-active-shadow;
}
}
@import "@fortawesome/fontawesome-free/scss/fontawesome.scss";
$fa-font-path: "webfonts";
@import "@fortawesome/fontawesome-free/scss/solid.scss";

View File

@@ -682,6 +682,10 @@
lodash "^4.17.10"
to-fast-properties "^2.0.0"
"@fortawesome/fontawesome-free@^5.3.1":
version "5.3.1"
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.3.1.tgz#5466b8f31c1f493a96754c1426c25796d0633dd9"
"@gimenete/type-writer@^0.1.3":
version "0.1.3"
resolved "https://registry.yarnpkg.com/@gimenete/type-writer/-/type-writer-0.1.3.tgz#2d4f26118b18d71f5b34ca24fdd6d1fd455c05b6"
@@ -2107,6 +2111,17 @@ copy-descriptor@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
copyfiles@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.0.0.tgz#bbd78bb78e8fd6db5c67adf54249317b24560f2a"
dependencies:
glob "^7.0.5"
minimatch "^3.0.3"
mkdirp "^0.5.1"
noms "0.0.0"
through2 "^2.0.1"
yargs "^11.0.0"
core-js@^1.0.0:
version "1.2.7"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636"
@@ -5887,6 +5902,13 @@ nomnom@~1.6.2:
colors "0.5.x"
underscore "~1.4.4"
noms@0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/noms/-/noms-0.0.0.tgz#da8ebd9f3af9d6760919b27d9cdc8092a7332859"
dependencies:
inherits "^2.0.1"
readable-stream "~1.0.31"
"nopt@2 || 3":
version "3.0.6"
resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9"
@@ -6782,7 +6804,7 @@ read-pkg@^3.0.0:
normalize-package-data "^2.3.2"
path-type "^3.0.0"
"readable-stream@>=1.0.33-1 <1.1.0-0":
"readable-stream@>=1.0.33-1 <1.1.0-0", readable-stream@~1.0.31:
version "1.0.34"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c"
dependencies:
@@ -7879,7 +7901,7 @@ throat@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a"
through2@2.0.x, through2@2.X, through2@^2.0.0, through2@^2.0.3:
through2@2.0.x, through2@2.X, through2@^2.0.0, through2@^2.0.1, through2@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be"
dependencies: