Skip to content
This repository has been archived by the owner on Jul 9, 2019. It is now read-only.

Commit

Permalink
Major Fixes Working
Browse files Browse the repository at this point in the history
  • Loading branch information
Davis committed Oct 23, 2016
1 parent e5b4d7b commit f7fe8ca
Show file tree
Hide file tree
Showing 36 changed files with 1,177 additions and 965 deletions.
52 changes: 35 additions & 17 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
{
"extends": "eslint-config-airbnb",
"rules": {
"import/no-unresolved": "off",
"import/no-extraneous-dependencies": "off",
"react/jsx-filename-extension": ["error", { "extensions": [".js", ".jsx"] }],
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"import/extensions": ["error", "never"]
},
"env": {
"jquery": true
},
"globals": {
"app": false,
"m": false
}
}
"extends": "eslint-config-airbnb",
"rules": {
"class-methods-use-this": "off",
"func-names": "off",
"no-param-reassign": "off",
"import/no-unresolved": "off",
"import/no-extraneous-dependencies": "off",
"import/extensions": ["error", "never"],
"react/jsx-filename-extension": ["error", { "extensions": [".js"] }],
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"react/sort-comp": ["error", {
"order": [
"/^constructor$/",
"/^init$/",
"/^initProps$/",
"static-methods",
"/^content$/",
"/^view$/",
"/^config$/",
"everything-else",
"/^onsubmit$/",
"/^onerror$/"
]
}]
},
"env": {
"jquery": true,
"browser": true
},
"globals": {
"app": false,
"m": false
}
}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/vendor
composer.phar
.DS_Store
Thumbs.db
bower_components
node_modules
*.js.old
3 changes: 2 additions & 1 deletion bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
return function (Dispatcher $events) {
$events->subscribe(Listeners\AddClientAssets::class);
$events->subscribe(Listeners\LoadSettingsFromDatabase::class);
$events->subscribe(Listeners\AddApiAttributes::class);
$events->subscribe(Listeners\AddUserProfileAttributes::class);
$events->subscribe(Listeners\UpdateProfileInDatabase::class);
};
58 changes: 28 additions & 30 deletions js/admin/dist/extension.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
System.register('davis/socialprofile/components/SocialProfileSettingsModal', ['flarum/components/SettingsModal'], function (_export) {
'use strict';
'use strict';

var SettingsModal, AnimatedTagSettingsModal;
System.register('Davis/SocialProfile/components/SocialProfileSettingsModal', ['flarum/components/SettingsModal'], function (_export, _context) {
"use strict";

var SettingsModal, SocialProfileSettingsModal;
return {
setters: [function (_flarumComponentsSettingsModal) {
SettingsModal = _flarumComponentsSettingsModal['default'];
SettingsModal = _flarumComponentsSettingsModal.default;
}],
execute: function () {
AnimatedTagSettingsModal = (function (_SettingsModal) {
babelHelpers.inherits(AnimatedTagSettingsModal, _SettingsModal);
SocialProfileSettingsModal = function (_SettingsModal) {
babelHelpers.inherits(SocialProfileSettingsModal, _SettingsModal);

function AnimatedTagSettingsModal() {
babelHelpers.classCallCheck(this, AnimatedTagSettingsModal);
babelHelpers.get(Object.getPrototypeOf(AnimatedTagSettingsModal.prototype), 'constructor', this).apply(this, arguments);
function SocialProfileSettingsModal() {
babelHelpers.classCallCheck(this, SocialProfileSettingsModal);
return babelHelpers.possibleConstructorReturn(this, (SocialProfileSettingsModal.__proto__ || Object.getPrototypeOf(SocialProfileSettingsModal)).apply(this, arguments));
}

babelHelpers.createClass(AnimatedTagSettingsModal, [{
babelHelpers.createClass(SocialProfileSettingsModal, [{
key: 'className',
value: function className() {
return 'AnimatedTagSettingsModal Modal--small';
return 'SocialProfileSettingsModal Modal--small';
}
}, {
key: 'title',
Expand All @@ -28,42 +30,38 @@ System.register('davis/socialprofile/components/SocialProfileSettingsModal', ['f
}, {
key: 'form',
value: function form() {
return [m(
return m(
'div',
{ className: 'Form-group' },
m(
'label',
null,
{ htmlFor: 'test' },
app.translator.trans('davis-socialprofile.admin.test')
),
m('input', { type: 'text', className: 'FormControl', bidi: this.setting('davis.socialprofile.test') })
)];
m('input', { name: 'test', type: 'text', className: 'FormControl', bidi: this.setting('davis.socialprofile.test') })
);
}
}]);
return AnimatedTagSettingsModal;
})(SettingsModal);
return SocialProfileSettingsModal;
}(SettingsModal);

_export('default', AnimatedTagSettingsModal);
_export('default', SocialProfileSettingsModal);
}
};
});;
System.register('davis/socialprofile/main', ['flarum/extend', 'flarum/app', 'davis/socialprofile/components/SocialProfileSettingsModal'], function (_export) {
'use strict';
'use strict';

System.register('Davis/SocialProfile/main', ['flarum/app'], function (_export, _context) {
"use strict";

var extend, app, SocialProfileSettingsModal;
var app;
return {
setters: [function (_flarumExtend) {
extend = _flarumExtend.extend;
}, function (_flarumApp) {
app = _flarumApp['default'];
}, function (_davisSocialprofileComponentsSocialProfileSettingsModal) {
SocialProfileSettingsModal = _davisSocialprofileComponentsSocialProfileSettingsModal['default'];
setters: [function (_flarumApp) {
app = _flarumApp.default;
}],
execute: function () {

app.initializers.add('davis-socialprofile', function (app) {
//app.extensionSettings['davis-socialprofile'] = () => app.modal.show(new SocialProfileSettingsModal());
});
app.initializers.add('Davis-SocialProfile', function () {});
}
};
});
6 changes: 3 additions & 3 deletions js/admin/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"devDependencies": {
"gulp": "^3.8.11",
"flarum-gulp": "^0.2.0"
"gulp": "^3.9.1",
"flarum-gulp": "dav-is/flarum-gulp#patch-1"
}
}
}
12 changes: 6 additions & 6 deletions js/admin/src/components/SocialProfileSettingsModal.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import SettingsModal from 'flarum/components/SettingsModal';

export default class AnimatedTagSettingsModal extends SettingsModal {
export default class SocialProfileSettingsModal extends SettingsModal {
className() {
return 'AnimatedTagSettingsModal Modal--small';
return 'SocialProfileSettingsModal Modal--small';
}

title() {
return app.translator.trans('davis-socialprofile.admin.test');
}

form() {
return [
return (
<div className="Form-group">
<label>{app.translator.trans('davis-socialprofile.admin.test')}</label>
<input type="text" className="FormControl" bidi={this.setting('davis.socialprofile.test')}></input>
<label htmlFor="test">{app.translator.trans('davis-socialprofile.admin.test')}</label>
<input name="test" type="text" className="FormControl" bidi={this.setting('davis.socialprofile.test')} />
</div>
];
);
}
}
6 changes: 2 additions & 4 deletions js/admin/src/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { extend } from 'flarum/extend';
import app from 'flarum/app';
import SocialProfileSettingsModal from 'Davis/SocialProfile/components/SocialProfileSettingsModal';

app.initializers.add('Davis-SocialProfile', app => {
//app.extensionSettings['davis-socialprofile'] = () => app.modal.show(new SocialProfileSettingsModal());
app.initializers.add('Davis-SocialProfile', () => {

});
Loading

0 comments on commit f7fe8ca

Please sign in to comment.