Skip to content

Commit

Permalink
More Updates for beta 15
Browse files Browse the repository at this point in the history
  • Loading branch information
SychO9 committed Dec 15, 2020
1 parent 36e399f commit 0e1ba71
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 218 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# GitHub Milestone
# GitHub Milestone Activity
[![latest version](https://img.shields.io/packagist/v/sycho/flarum-github-milestone.svg?style=flat-square)](https://packagist.org/packages/sycho/flarum-github-milestone)
![flarum version](https://img.shields.io/badge/flarum-%5E0.1.0--beta.14-%23e7742e?style=flat-square)
![mit license](https://img.shields.io/badge/license-MIT-green.svg?style=flat-square&color=green)
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
}
],
"require": {
"flarum/core": "^0.1.0-beta.14",
"fof/extend": ">=0.2.0",
"flarum/core": "^0.1.0-beta.15",
"sycho/flarum-uikit": "^0.1.0"
},
"autoload": {
Expand Down
7 changes: 4 additions & 3 deletions extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

new Extend\Locales(__DIR__.'/locale'),

(new FoF\Extend\Extend\ExtensionSettings())
->setPrefix('sycho-github-milestone.')
->addKeys(['repository', 'milestone_id', 'default_filter']),
(new Extend\Settings)
->serializeToForum('sycho-github-milestone.repository', 'sycho-github-milestone.repository')
->serializeToForum('sycho-github-milestone.milestone_id', 'sycho-github-milestone.milestone_id')
->serializeToForum('sycho-github-milestone.default_filter', 'sycho-github-milestone.default_filter'),
];
146 changes: 5 additions & 141 deletions js/dist/admin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/dist/admin.js.map

Large diffs are not rendered by default.

24 changes: 13 additions & 11 deletions js/dist/forum.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/dist/forum.js.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions js/src/admin/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import GithubMilestoneSettingsModal from './modals/GithubMilestoneSettingsModal';

app.initializers.add('sycho-github-milestone', (app) => {
app.extensionData
.for('sycho-github-milestone')
Expand Down
51 changes: 0 additions & 51 deletions js/src/admin/modals/GithubMilestoneSettingsModal.js

This file was deleted.

2 changes: 1 addition & 1 deletion js/src/forum/components/IssueList.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class IssueList extends Component {
this.allMergedPrs = false;
this.filters = {
state: {
value: app.data['sycho-github-milestone.default_filter'] || 'all',
value: app.forum.attribute('sycho-github-milestone.default_filter') || 'all',
options: ['all', 'closed', 'open'],
},
};
Expand Down
6 changes: 3 additions & 3 deletions js/src/forum/components/MilestonePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ export default class MilestonePage extends Page {
this.octokit = new Octokit();
this.settings = {
repository: {
owner: app.data['sycho-github-milestone.repository'].split('/')[0],
name: app.data['sycho-github-milestone.repository'].split('/')[1],
owner: app.forum.attribute('sycho-github-milestone.repository').split('/')[0],
name: app.forum.attribute('sycho-github-milestone.repository').split('/')[1],
},
milestone: app.data['sycho-github-milestone.milestone_id'],
milestone: app.forum.attribute('sycho-github-milestone.milestone_id'),
};
this.milestone = {};
this.progress = 0;
Expand Down
5 changes: 4 additions & 1 deletion js/src/forum/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import LinkButton from 'flarum/components/LinkButton';
import MilestonePage from './components/MilestonePage';

app.initializers.add('sycho-github-milestone', (app) => {
if (!app.data['sycho-github-milestone.repository'] || !app.data['sycho-github-milestone.milestone_id']) return;
const repository = app.data.resources[0].attributes['sycho-github-milestone.repository'];
const milestone_id = app.data.resources[0].attributes['sycho-github-milestone.milestone_id'];

if (!repository || !milestone_id) return;

app.routes.githubMilestone = {
path: '/milestone',
Expand Down

0 comments on commit 0e1ba71

Please sign in to comment.