mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Various experiments with JS and React and what-not.
This commit is contained in:
parent
7aa5eee3aa
commit
17359c5e42
31
composer.lock
generated
31
composer.lock
generated
@ -591,16 +591,16 @@
|
||||
},
|
||||
{
|
||||
"name": "doctrine/dbal",
|
||||
"version": "v2.9.1",
|
||||
"version": "v2.9.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/dbal.git",
|
||||
"reference": "ec74d6e300d78fbc896669c3ca57ef9719adc9c6"
|
||||
"reference": "22800bd651c1d8d2a9719e2a3dc46d5108ebfcc9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/dbal/zipball/ec74d6e300d78fbc896669c3ca57ef9719adc9c6",
|
||||
"reference": "ec74d6e300d78fbc896669c3ca57ef9719adc9c6",
|
||||
"url": "https://api.github.com/repos/doctrine/dbal/zipball/22800bd651c1d8d2a9719e2a3dc46d5108ebfcc9",
|
||||
"reference": "22800bd651c1d8d2a9719e2a3dc46d5108ebfcc9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -669,7 +669,7 @@
|
||||
"php",
|
||||
"queryobject"
|
||||
],
|
||||
"time": "2018-12-14T04:51:13+00:00"
|
||||
"time": "2018-12-31T03:27:51+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/event-manager",
|
||||
@ -1758,16 +1758,16 @@
|
||||
},
|
||||
{
|
||||
"name": "league/commonmark",
|
||||
"version": "0.18.0",
|
||||
"version": "0.18.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/commonmark.git",
|
||||
"reference": "006af077d4b1b7eb1d9760964f9f984ba188632c"
|
||||
"reference": "e5029f74ba39e043ce4b3ca6c05dc719d8aafd94"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/006af077d4b1b7eb1d9760964f9f984ba188632c",
|
||||
"reference": "006af077d4b1b7eb1d9760964f9f984ba188632c",
|
||||
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/e5029f74ba39e043ce4b3ca6c05dc719d8aafd94",
|
||||
"reference": "e5029f74ba39e043ce4b3ca6c05dc719d8aafd94",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1816,14 +1816,14 @@
|
||||
"role": "Lead Developer"
|
||||
}
|
||||
],
|
||||
"description": "Markdown parser for PHP based on the CommonMark spec",
|
||||
"description": "PHP Markdown parser based on the CommonMark spec",
|
||||
"homepage": "https://github.com/thephpleague/commonmark",
|
||||
"keywords": [
|
||||
"commonmark",
|
||||
"markdown",
|
||||
"parser"
|
||||
],
|
||||
"time": "2018-09-18T13:13:55+00:00"
|
||||
"time": "2018-12-30T01:55:29+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/csv",
|
||||
@ -6474,12 +6474,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Roave/SecurityAdvisories.git",
|
||||
"reference": "38eddac85b7ea1891fc28aeb71c1e45fa01200ad"
|
||||
"reference": "5f3e0c82ada2d16fdd637b24e095888f4abac43f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/38eddac85b7ea1891fc28aeb71c1e45fa01200ad",
|
||||
"reference": "38eddac85b7ea1891fc28aeb71c1e45fa01200ad",
|
||||
"url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/5f3e0c82ada2d16fdd637b24e095888f4abac43f",
|
||||
"reference": "5f3e0c82ada2d16fdd637b24e095888f4abac43f",
|
||||
"shasum": ""
|
||||
},
|
||||
"conflict": {
|
||||
@ -6543,6 +6543,7 @@
|
||||
"la-haute-societe/tcpdf": "<6.2.22",
|
||||
"laravel/framework": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.42|>=5.6,<5.6.30",
|
||||
"laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10",
|
||||
"league/commonmark": ">=0.15.6,<0.18.1",
|
||||
"magento/magento1ce": "<1.9.4",
|
||||
"magento/magento1ee": ">=1.9,<1.14.4",
|
||||
"magento/product-community-edition": ">=2,<2.2.7",
|
||||
@ -6668,7 +6669,7 @@
|
||||
}
|
||||
],
|
||||
"description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it",
|
||||
"time": "2018-12-28T16:50:10+00:00"
|
||||
"time": "2018-12-30T13:00:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/code-unit-reverse-lookup",
|
||||
|
9400
package-lock.json
generated
9400
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@ -12,17 +12,21 @@
|
||||
"devDependencies": {
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
"axios": "^0.18",
|
||||
"babel-preset-react": "^6.23.0",
|
||||
"babel-preset-react": "^6.24.1",
|
||||
"bootstrap": "^4.0.0",
|
||||
"cross-env": "^5.1",
|
||||
"jquery": "^3.2",
|
||||
"laravel-mix": "^4.0.7",
|
||||
"lodash": "^4.17.5",
|
||||
"popper.js": "^1.12",
|
||||
"react": "^16.2.0",
|
||||
"react-dom": "^16.2.0",
|
||||
"react": "^16.7.0",
|
||||
"react-dom": "^16.7.0",
|
||||
"resolve-url-loader": "^2.3.1",
|
||||
"sass": "^1.15.2",
|
||||
"sass-loader": "^7.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"tabler-react": "^1.27.0",
|
||||
"font-awesome": "4.7.0"
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"/js/app.js": "/js/app.js",
|
||||
"/css/app.css": "/css/app.css"
|
||||
"/v2/assets/js/app.js": "/v2/assets/js/app.js",
|
||||
"/v2/assets/css/app.css": "/v2/assets/css/app.css"
|
||||
}
|
||||
|
25
resources/js/app.js
vendored
25
resources/js/app.js
vendored
@ -1,4 +1,24 @@
|
||||
|
||||
/*
|
||||
* app.js
|
||||
* Copyright (c) 2018 thegrumpydictator@gmail.com
|
||||
*
|
||||
* This file is part of Firefly III.
|
||||
*
|
||||
* Firefly III is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Firefly III is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* First we will load all of this project's JavaScript dependencies which
|
||||
* includes React and other helpers. It's a great starting point while
|
||||
@ -13,4 +33,7 @@ require('./bootstrap');
|
||||
* or customize the JavaScript scaffolding to fit your unique needs.
|
||||
*/
|
||||
|
||||
require('./components/Example');
|
||||
require('./components/Main');
|
||||
require('./components/TopMenu');
|
||||
|
||||
|
||||
|
23
resources/js/bootstrap.js
vendored
23
resources/js/bootstrap.js
vendored
@ -1,4 +1,24 @@
|
||||
|
||||
/*
|
||||
* bootstrap.js
|
||||
* Copyright (c) 2018 thegrumpydictator@gmail.com
|
||||
*
|
||||
* This file is part of Firefly III.
|
||||
*
|
||||
* Firefly III is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Firefly III is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
window._ = require('lodash');
|
||||
|
||||
/**
|
||||
@ -43,9 +63,6 @@ if (token) {
|
||||
* for events that are broadcast by Laravel. Echo and event broadcasting
|
||||
* allows your team to easily build robust real-time web applications.
|
||||
*/
|
||||
|
||||
// import Echo from 'laravel-echo'
|
||||
|
||||
// window.Pusher = require('pusher-js');
|
||||
|
||||
// window.Echo = new Echo({
|
||||
|
20
resources/js/components/Example.js
vendored
20
resources/js/components/Example.js
vendored
@ -1,3 +1,23 @@
|
||||
/*
|
||||
* Example.js
|
||||
* Copyright (c) 2018 thegrumpydictator@gmail.com
|
||||
*
|
||||
* This file is part of Firefly III.
|
||||
*
|
||||
* Firefly III is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Firefly III is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
|
||||
|
63
resources/js/components/Main.js
vendored
Normal file
63
resources/js/components/Main.js
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Main.js
|
||||
* Copyright (c) 2018 thegrumpydictator@gmail.com
|
||||
*
|
||||
* This file is part of Firefly III.
|
||||
*
|
||||
* Firefly III is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Firefly III is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import "tabler-react/dist/Tabler.css";
|
||||
import { Card, Button } from "tabler-react";
|
||||
|
||||
class MyCard extends Component {
|
||||
render() {
|
||||
return (
|
||||
<Card>
|
||||
<Card.Header>
|
||||
<Card.Title>Card Title</Card.Title>
|
||||
</Card.Header>
|
||||
<Card.Body>
|
||||
<Button color="primary">A Button</Button>
|
||||
</Card.Body>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/* An example React component */
|
||||
class Main extends Component {
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<h3>All Products</h3>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Main;
|
||||
|
||||
/* The if statement is required so as to Render the component on pages that have a div with an ID of "root";
|
||||
*/
|
||||
|
||||
if (document.getElementById('root')) {
|
||||
ReactDOM.render(<Main />, document.getElementById('root'));
|
||||
}
|
||||
|
||||
if (document.getElementById('root')) {
|
||||
ReactDOM.render(<MyCard />, document.getElementById('myCard'));
|
||||
}
|
49
resources/js/components/TopMenu.js
vendored
Normal file
49
resources/js/components/TopMenu.js
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* TopMenu.js
|
||||
* Copyright (c) 2018 thegrumpydictator@gmail.com
|
||||
*
|
||||
* This file is part of Firefly III.
|
||||
*
|
||||
* Firefly III is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Firefly III is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import ReactDOM from "react-dom";
|
||||
import {Nav} from "tabler-react";
|
||||
|
||||
|
||||
|
||||
|
||||
class TopMenu extends Component {
|
||||
render() {
|
||||
return (
|
||||
<Nav className="nav nav-tabs border-0 flex-column flex-lg-row">
|
||||
<Nav.Item active hasSubNav value="Dashboard" icon="zap">
|
||||
<Nav.SubItem value="Sub Item 1" />
|
||||
<Nav.SubItem>Sub Item 2</Nav.SubItem>
|
||||
<Nav.SubItem icon="globe">Sub Item 3</Nav.SubItem>
|
||||
</Nav.Item>
|
||||
<Nav.Item to="http://www.example.com">Page Two</Nav.Item>
|
||||
<Nav.Item value="Page Three" />
|
||||
<Nav.Item active icon="user">
|
||||
Page Four
|
||||
</Nav.Item>
|
||||
</Nav>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (document.getElementById('TopMenu')) {
|
||||
ReactDOM.render(<TopMenu />, document.getElementById('TopMenu'));
|
||||
}
|
20
resources/sass/_variables.scss
vendored
20
resources/sass/_variables.scss
vendored
@ -1,3 +1,23 @@
|
||||
/*!
|
||||
* _variables.scss
|
||||
* Copyright (c) 2018 thegrumpydictator@gmail.com
|
||||
*
|
||||
* This file is part of Firefly III.
|
||||
*
|
||||
* Firefly III is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Firefly III is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
// Body
|
||||
$body-bg: #f8fafc;
|
||||
|
27
resources/sass/app.scss
vendored
27
resources/sass/app.scss
vendored
@ -1,3 +1,23 @@
|
||||
/*!
|
||||
* app.scss
|
||||
* Copyright (c) 2018 thegrumpydictator@gmail.com
|
||||
*
|
||||
* This file is part of Firefly III.
|
||||
*
|
||||
* Firefly III is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Firefly III is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
// Fonts
|
||||
@import url('https://fonts.googleapis.com/css?family=Nunito');
|
||||
@ -8,7 +28,6 @@
|
||||
// Bootstrap
|
||||
@import '~bootstrap/scss/bootstrap';
|
||||
|
||||
.navbar-laravel {
|
||||
background-color: #fff;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
// Font awesome.
|
||||
// @import "node_modules/font-awesome/scss/font-awesome";
|
||||
@import "~font-awesome/scss/font-awesome";
|
4
webpack.mix.js
vendored
4
webpack.mix.js
vendored
@ -11,5 +11,5 @@ const mix = require('laravel-mix');
|
||||
|
|
||||
*/
|
||||
|
||||
mix.react('resources/js/app.js', 'public/js')
|
||||
.sass('resources/sass/app.scss', 'public/css');
|
||||
mix.react('resources/js/app.js', 'public/v2/assets/js')
|
||||
.sass('resources/sass/app.scss', 'public/v2/assets/css');
|
||||
|
Loading…
Reference in New Issue
Block a user