Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: maintenance #41

Merged
merged 4 commits into from
May 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,19 @@
}
],
"require": {
"flarum/core": "^1.0.0"
"flarum/core": "^1.2.0"
},
"authors": [
{
"name": "Charlie K",
"email": "charlie.k@redevs.org",
"homepage": "https://redevs.org",
"role": "Developer"
},
{
"name": "IanM",
"email": "ian@blomstra.net",
"role": "Developer"
}
],
"autoload": {
Expand Down
3 changes: 2 additions & 1 deletion extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@
->modelPolicy(User::class, Access\UserPolicy::class),

(new Extend\Settings())
->serializeToForum('fof-user-bio.maxLength', 'fof-user-bio.maxLength', 'intVal'),
->serializeToForum('fof-user-bio.maxLength', 'fof-user-bio.maxLength', 'intVal')
->default('fof-user-bio.maxLength', 200),
];
9,437 changes: 2,233 additions & 7,204 deletions js/package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"autolink-js": "1.0.2",
"@flarum/prettier-config": "^1.0.0",
"flarum-tsconfig": "^1.0.2",
"flarum-webpack-config": "^1.0.0",
"webpack": "^4.44.2",
"webpack-cli": "^4.9.1"
"flarum-webpack-config": "^2.0.0",
"webpack": "^5.72.1",
"webpack-cli": "^4.9.2"
},
"devDependencies": {
"prettier": "^2.4.1"
"prettier": "^2.6.2"
},
"scripts": {
"dev": "webpack --mode development --watch",
Expand Down
1 change: 1 addition & 0 deletions js/src/admin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ app.initializers.add('fof-user-bio', () => {
label: app.translator.trans('fof-user-bio.admin.setting.bioLimit'),
setting: 'fof-user-bio.maxLength',
type: 'number',
placeholder: 200
});
});
2 changes: 1 addition & 1 deletion js/src/forum/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ app.initializers.add('fof-user-bio', () => {
return;
}

items.add('bio', <UserBio user={user} />);
items.add('bio', <UserBio user={user} />, -100);
});
});
8 changes: 2 additions & 6 deletions migrations/2021_01_17_000000_set_default_bio_length.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,10 @@

return [
'up' => function (Builder $schema) {
/**
* @var \Flarum\Settings\SettingsRepositoryInterface
*/
$settings = resolve('flarum.settings');

$settings->set('fof-user-bio.maxLength', 200);
// nothing required here.
},
'down' => function (Builder $schema) {
// remove the settings, if any were saved.
/**
* @var \Flarum\Settings\SettingsRepositoryInterface
*/
Expand Down