mirror of
https://github.com/flarum/core.git
synced 2025-08-27 10:05:47 +02:00
Compare commits
53 Commits
dw/drop-bo
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
5c901cfba8 | ||
|
be1b5713fa | ||
|
5045254c9f | ||
|
9b302a1029 | ||
|
97dfb50f17 | ||
|
6a940cd34f | ||
|
edd93dad77 | ||
|
2d18d37ba9 | ||
|
b58b3e2224 | ||
|
2c902c6563 | ||
|
a38dc889e9 | ||
|
851907b88c | ||
|
dfa3b47cf3 | ||
|
289ea49cc7 | ||
|
d769ee2b7b | ||
|
6e3051b36a | ||
|
c622070366 | ||
|
21d3e33613 | ||
|
b0d9f10280 | ||
|
d192185d13 | ||
|
6dba5c8e67 | ||
|
34c753040c | ||
|
7c4992c401 | ||
|
a7254773dd | ||
|
1217b11896 | ||
|
7a22527b72 | ||
|
bd4d53323c | ||
|
ad69cf84fe | ||
|
aa77df46ee | ||
|
19e48617f0 | ||
|
d8b83cc372 | ||
|
a04b420295 | ||
|
5f4b5c0841 | ||
|
beae75dab3 | ||
|
e304cf7cb5 | ||
|
9f87674626 | ||
|
54329d0827 | ||
|
a7aad46068 | ||
|
7551a14ae5 | ||
|
f4c29db182 | ||
|
a291134da1 | ||
|
c702f5e228 | ||
|
749e7e34f7 | ||
|
67821d95bd | ||
|
aa44677df3 | ||
|
3978efa533 | ||
|
687e1e2789 | ||
|
7cec4d1f42 | ||
|
fbe1a48bec | ||
|
17a8d2c9d8 | ||
|
85ee80659d | ||
|
af77214967 | ||
|
7c3b51fec0 |
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -14,5 +14,6 @@ js/dist/* -diff
|
|||||||
js/dist/* linguist-generated
|
js/dist/* linguist-generated
|
||||||
js/dist-typings/* linguist-generated
|
js/dist-typings/* linguist-generated
|
||||||
js/yarn.lock -diff
|
js/yarn.lock -diff
|
||||||
|
js/package-lock.json -diff
|
||||||
|
|
||||||
* text=auto eol=lf
|
* text=auto eol=lf
|
||||||
|
15
.github/workflows/backend.yml
vendored
Normal file
15
.github/workflows/backend.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
name: Core PHP
|
||||||
|
|
||||||
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
|
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
||||||
|
# This will break your current script.
|
||||||
|
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run:
|
||||||
|
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
||||||
|
with:
|
||||||
|
enable_backend_testing: true
|
||||||
|
|
||||||
|
backend_directory: .
|
23
.github/workflows/frontend.yml
vendored
Normal file
23
.github/workflows/frontend.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
name: Core JS
|
||||||
|
|
||||||
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
|
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
||||||
|
# This will break your current script.
|
||||||
|
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run:
|
||||||
|
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
||||||
|
with:
|
||||||
|
enable_bundlewatch: true
|
||||||
|
enable_prettier: true
|
||||||
|
enable_typescript: true
|
||||||
|
|
||||||
|
frontend_directory: ./js
|
||||||
|
backend_directory: .
|
||||||
|
js_package_manager: yarn
|
||||||
|
main_git_branch: master
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
137
.github/workflows/js.yml
vendored
137
.github/workflows/js.yml
vendored
@@ -1,137 +0,0 @@
|
|||||||
name: JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
env:
|
|
||||||
NODE_VERSION: 16
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
prettier:
|
|
||||||
name: Prettier
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: ${{ env.NODE_VERSION }}
|
|
||||||
cache: "yarn"
|
|
||||||
cache-dependency-path: js/yarn.lock
|
|
||||||
|
|
||||||
- name: Install JS dependencies
|
|
||||||
run: yarn install --immutable
|
|
||||||
working-directory: ./js
|
|
||||||
|
|
||||||
- name: Check JS formatting
|
|
||||||
run: yarn run format-check
|
|
||||||
working-directory: ./js
|
|
||||||
|
|
||||||
typecheck:
|
|
||||||
name: Typecheck
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: ${{ env.NODE_VERSION }}
|
|
||||||
cache: "yarn"
|
|
||||||
cache-dependency-path: js/yarn.lock
|
|
||||||
|
|
||||||
- name: Install JS dependencies
|
|
||||||
run: yarn --frozen-lockfile
|
|
||||||
working-directory: ./js
|
|
||||||
|
|
||||||
- name: Typecheck
|
|
||||||
run: yarn run check-typings
|
|
||||||
working-directory: ./js
|
|
||||||
|
|
||||||
type-coverage:
|
|
||||||
name: Type Coverage
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: ${{ env.NODE_VERSION }}
|
|
||||||
cache: "yarn"
|
|
||||||
cache-dependency-path: js/yarn.lock
|
|
||||||
|
|
||||||
- name: Install JS dependencies
|
|
||||||
run: yarn --frozen-lockfile
|
|
||||||
working-directory: ./js
|
|
||||||
|
|
||||||
- name: Check type coverage
|
|
||||||
run: yarn run check-typings-coverage
|
|
||||||
working-directory: ./js
|
|
||||||
|
|
||||||
build-prod:
|
|
||||||
name: Build and commit
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [prettier, typecheck, type-coverage]
|
|
||||||
|
|
||||||
# Only commit JS on push to master branch
|
|
||||||
# Remember to change in `build-test` job too
|
|
||||||
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: ${{ env.NODE_VERSION }}
|
|
||||||
cache: "yarn"
|
|
||||||
cache-dependency-path: js/yarn.lock
|
|
||||||
|
|
||||||
# Our action will install npm, cd into `./js`, run `npm run build` and
|
|
||||||
# `npm run build-typings`, then commit and upload any changes
|
|
||||||
- name: Build production JS
|
|
||||||
uses: flarum/action-build@2
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
build_script: build
|
|
||||||
package_manager: yarn
|
|
||||||
typings_script: build-typings
|
|
||||||
|
|
||||||
build-test:
|
|
||||||
name: Test build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [prettier, typecheck, type-coverage]
|
|
||||||
|
|
||||||
# Inverse check of `build-prod`
|
|
||||||
# Remember to change in `build-prod` job too
|
|
||||||
if: github.ref != 'refs/heads/master' || github.event_name != 'push'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: ${{ env.NODE_VERSION }}
|
|
||||||
cache: "yarn"
|
|
||||||
cache-dependency-path: js/yarn.lock
|
|
||||||
|
|
||||||
# Our action will install npm, cd into `./js`, run `npm run build` and
|
|
||||||
# `npm run build-typings`, then commit and upload any changes
|
|
||||||
- name: Build production JS
|
|
||||||
uses: flarum/action-build@2
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
build_script: build
|
|
||||||
package_manager: yarn
|
|
||||||
typings_script: build-typings
|
|
||||||
do_not_commit: true
|
|
45
.github/workflows/pr_size_change.yml
vendored
45
.github/workflows/pr_size_change.yml
vendored
@@ -1,45 +0,0 @@
|
|||||||
name: Bundle size checker
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- "js/**"
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- "js/**"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
bundlewatch:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
name: Bundlewatch
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: "14"
|
|
||||||
|
|
||||||
- name: Use npm v7
|
|
||||||
run: sudo npm install -g npm@7.x.x
|
|
||||||
|
|
||||||
- name: Install JS dependencies
|
|
||||||
# We need to use `npm install` here. If we don't, the workflow will fail.
|
|
||||||
run: npm install
|
|
||||||
working-directory: ./js
|
|
||||||
|
|
||||||
- name: Build production assets
|
|
||||||
run: npm run build
|
|
||||||
working-directory: ./js
|
|
||||||
|
|
||||||
- name: Check bundle size change
|
|
||||||
run: node_modules/.bin/bundlewatch --config .bundlewatch.config.json
|
|
||||||
working-directory: ./js
|
|
||||||
env:
|
|
||||||
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
||||||
CI_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
|
|
79
.github/workflows/test.yml
vendored
79
.github/workflows/test.yml
vendored
@@ -1,79 +0,0 @@
|
|||||||
name: Tests
|
|
||||||
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
php: [7.3, 7.4, '8.0', '8.1']
|
|
||||||
service: ['mysql:5.7', mariadb]
|
|
||||||
prefix: ['', flarum_]
|
|
||||||
|
|
||||||
include:
|
|
||||||
- service: 'mysql:5.7'
|
|
||||||
db: MySQL
|
|
||||||
- service: mariadb
|
|
||||||
db: MariaDB
|
|
||||||
- prefix: flarum_
|
|
||||||
prefixStr: (prefix)
|
|
||||||
|
|
||||||
exclude:
|
|
||||||
- php: 7.3
|
|
||||||
service: 'mysql:5.7'
|
|
||||||
prefix: flarum_
|
|
||||||
- php: 7.3
|
|
||||||
service: mariadb
|
|
||||||
prefix: flarum_
|
|
||||||
- php: 8.0
|
|
||||||
service: 'mysql:5.7'
|
|
||||||
prefix: flarum_
|
|
||||||
- php: 8.0
|
|
||||||
service: mariadb
|
|
||||||
prefix: flarum_
|
|
||||||
|
|
||||||
services:
|
|
||||||
mysql:
|
|
||||||
image: ${{ matrix.service }}
|
|
||||||
ports:
|
|
||||||
- 13306:3306
|
|
||||||
|
|
||||||
name: 'PHP ${{ matrix.php }} / ${{ matrix.db }} ${{ matrix.prefixStr }}'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Setup PHP
|
|
||||||
uses: shivammathur/setup-php@0b9d33cd0782337377999751fc10ea079fdd7104 # pin@v2
|
|
||||||
with:
|
|
||||||
php-version: ${{ matrix.php }}
|
|
||||||
coverage: xdebug
|
|
||||||
extensions: curl, dom, gd, json, mbstring, openssl, pdo_mysql, tokenizer, zip
|
|
||||||
tools: phpunit, composer:v2
|
|
||||||
|
|
||||||
# The authentication alter is necessary because newer mysql versions use the `caching_sha2_password` driver,
|
|
||||||
# which isn't supported prior to PHP7.4
|
|
||||||
# When we drop support for PHP7.3, we should remove this from the setup.
|
|
||||||
- name: Create MySQL Database
|
|
||||||
run: |
|
|
||||||
sudo systemctl start mysql
|
|
||||||
mysql -uroot -proot -e 'CREATE DATABASE flarum_test;' --port 13306
|
|
||||||
mysql -uroot -proot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';" --port 13306
|
|
||||||
|
|
||||||
- name: Install Composer dependencies
|
|
||||||
run: composer install
|
|
||||||
|
|
||||||
- name: Setup Composer tests
|
|
||||||
run: composer test:setup
|
|
||||||
env:
|
|
||||||
DB_PORT: 13306
|
|
||||||
DB_PASSWORD: root
|
|
||||||
DB_PREFIX: ${{ matrix.prefix }}
|
|
||||||
|
|
||||||
- name: Run Composer tests
|
|
||||||
run: composer test
|
|
||||||
env:
|
|
||||||
COMPOSER_PROCESS_TIMEOUT: 600
|
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,6 +1,7 @@
|
|||||||
/vendor
|
/vendor
|
||||||
composer.lock
|
composer.lock
|
||||||
composer.phar
|
composer.phar
|
||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
tests/.phpunit.result.cache
|
tests/.phpunit.result.cache
|
||||||
|
110
CHANGELOG.md
110
CHANGELOG.md
@@ -1,5 +1,115 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [1.2.0](https://github.com/flarum/core/compare/v1.1.1...v1.2.0)
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- View `README` documentation in extension pages (https://github.com/flarum/core/pull/3094).
|
||||||
|
- Declare & Use CSS Custom Properties (https://github.com/flarum/core/pull/3146).
|
||||||
|
- Lazy draw dropdowns to improve performance (https://github.com/flarum/core/pull/2925).
|
||||||
|
- Default Settings Extender (https://github.com/flarum/core/pull/3127).
|
||||||
|
- Add `textarea` setting type to admin pages (https://github.com/flarum/core/pull/3141).
|
||||||
|
- Allow registering settings as `Less` config vars through Settings Extender (https://github.com/flarum/core/pull/3011).
|
||||||
|
- Allow replacing of blade template namespaces via extender (https://github.com/flarum/core/pull/3167).
|
||||||
|
- Update to Webpack 5 (https://github.com/flarum/core/pull/3135).
|
||||||
|
- Introduce `Less` custom function extender with a `is-extension-enabled` function (https://github.com/flarum/core/pull/3190).
|
||||||
|
- Support for `few` in ICU Message syntax (https://github.com/flarum/core/pull/3122).
|
||||||
|
- ES6 local support for number formatting (https://github.com/flarum/core/pull/3099).
|
||||||
|
- Added dedicated endpoint for retrieving single groups (https://github.com/flarum/core/pull/3084).
|
||||||
|
- Callback `loadWhere` relation eager loading extender (https://github.com/flarum/core/pull/3116).
|
||||||
|
- Extensible document title driver implementation (https://github.com/flarum/core/pull/3109).
|
||||||
|
- Type checks, typescript coverage GH action (https://github.com/flarum/core/pull/3136).
|
||||||
|
- Add color indicator in appearance admin page instead of validating colors (https://github.com/flarum/core/pull/3140).
|
||||||
|
- Add typing files for our translator libraries (https://github.com/flarum/core/pull/3175).
|
||||||
|
- `StatusWidget` tools extensibility (https://github.com/flarum/core/pull/3189).
|
||||||
|
- Allow switching the `ImageManager` driver (https://github.com/flarum/core/pull/3195).
|
||||||
|
- Events for notification read/all read actions (https://github.com/flarum/core/pull/3203).
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Testing with php8.1 (https://github.com/flarum/core/pull/3102).
|
||||||
|
- Migrate fully to Yarn (https://github.com/flarum/core/pull/3155).
|
||||||
|
- Handle post rendering errors to avoid crashes (https://github.com/flarum/core/pull/3061).
|
||||||
|
- Added basic filtering, sorting, and pagination to groups endpoint (https://github.com/flarum/core/pull/3084).
|
||||||
|
- Pass IP address to API Client pipeline (https://github.com/flarum/core/pull/3124).
|
||||||
|
- Rename Extension Page "Uninstall" to "Purge" (https://github.com/flarum/core/pull/3123).
|
||||||
|
- [A11Y] Improve accessibility for discussion reply count on post stream (https://github.com/flarum/core/pull/3090).
|
||||||
|
- Improved post loading support (https://github.com/flarum/core/pull/3100).
|
||||||
|
- Rewrite SubtreeRetainer into Typescript (https://github.com/flarum/core/pull/3137).
|
||||||
|
- Rewrite ModalManager and state to Typescript (https://github.com/flarum/core/pull/3007).
|
||||||
|
- Rewrite frontend application files to Typescript (https://github.com/flarum/core/pull/3006).
|
||||||
|
- Allow extensions to modify the minimum search length in the Search component (https://github.com/flarum/core/pull/3130).
|
||||||
|
- Allow use of any tag in `listItems` helper (https://github.com/flarum/core/pull/3147).
|
||||||
|
- Replace `for ... in` with `Array.reduce` (https://github.com/flarum/core/pull/3149).
|
||||||
|
- Page title format is now implemented through translations (https://github.com/flarum/core/pull/3077, https://github.com/flarum/core/pull/3228)
|
||||||
|
- Add `aria-label` attribute to the navigation drawer button (https://github.com/flarum/core/pull/3157).
|
||||||
|
- Convert extend util to TypeScript (https://github.com/flarum/core/pull/2928).
|
||||||
|
- Better typings for DiscussionListState (https://github.com/flarum/core/pull/3132).
|
||||||
|
- Rewrite ItemList, update `ItemList` typings (https://github.com/flarum/core/pull/3005).
|
||||||
|
- Add priority order to discussion page controls (https://github.com/flarum/core/pull/3165).
|
||||||
|
- Use `@php` in Blade templates (https://github.com/flarum/core/pull/3172).
|
||||||
|
- Convert some common classes/utils to TS (https://github.com/flarum/core/pull/2929).
|
||||||
|
- Convert routes to Typescript (https://github.com/flarum/core/pull/3177).
|
||||||
|
- Move admin `colorItems` to an `ItemList` (https://github.com/flarum/core/pull/3186).
|
||||||
|
- Centralize pagination/canonical meta URL generation in Document (https://github.com/flarum/core/pull/3077).
|
||||||
|
- Use revision versioner to allow custom asset versioning (https://github.com/flarum/core/pull/3183).
|
||||||
|
- Split up application error handling (https://github.com/flarum/core/pull/3184).
|
||||||
|
- Make SlugManager available to blade template (https://github.com/flarum/core/pull/3194).
|
||||||
|
- Convert models to TS (https://github.com/flarum/core/pull/3174).
|
||||||
|
- Allow loading relations in other discussion endpoints (https://github.com/flarum/core/pull/3191).
|
||||||
|
- Improve selected text stylization (https://github.com/flarum/core/pull/2961).
|
||||||
|
- Extract notification `primaryControl` items to an ItemList (https://github.com/flarum/core/pull/3204).
|
||||||
|
- Frontend code housekeeping (#3214, #3213).
|
||||||
|
- Only retain scroll position if coming from discussion (https://github.com/flarum/core/pull/3229).
|
||||||
|
- Use `aria-live` regions to focus screenreader attention on alerts as they appear (https://github.com/flarum/core/pull/3237).
|
||||||
|
- Prevent unwarranted `a11y` warnings on custom Button subclasses (https://github.com/flarum/core/pull/3238).
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Missing locale text in the user editing modal (https://github.com/flarum/core/pull/3093).
|
||||||
|
- Dashes in table prefix prevent installation (https://github.com/flarum/core/pull/3089).
|
||||||
|
- Missing autocomplete attributes to input fields (https://github.com/flarum/core/pull/3088).
|
||||||
|
- Missing route parameters throwing an error (https://github.com/flarum/core/pull/3118).
|
||||||
|
- Mail settings select component never used (https://github.com/flarum/core/pull/3120).
|
||||||
|
- White avatar image throws javascript errors on the profile page (https://github.com/flarum/core/pull/3119).
|
||||||
|
- Unformatted avatar upload validation errors (https://github.com/flarum/core/pull/2946).
|
||||||
|
- Webkit input clear button shows up with the custom one (https://github.com/flarum/core/pull/3128).
|
||||||
|
- Media query breakpoints conflict with Windows display scaling (https://github.com/flarum/core/pull/3139).
|
||||||
|
- `typeof this` not recognized by some IDEs (https://github.com/flarum/core/pull/3142).
|
||||||
|
- `Model.save()` cannot save `null` `hasOne` relationship (https://github.com/flarum/core/pull/3131).
|
||||||
|
- Edit post `until reply` policy broken on PHP 8 (https://github.com/flarum/core/pull/3145).
|
||||||
|
- Inaccurate `Component.component` argument typings (https://github.com/flarum/core/pull/3148).
|
||||||
|
- Scrolling notification list infinitely repeats (https://github.com/flarum/core/pull/3159).
|
||||||
|
- Argument for INFO constant was assigned to `maxfiles` argument incorrectly (bfd81a83cfd0fa8125395a147ff0c9ce622f38e3).
|
||||||
|
- `Activated` event is sent every time an email is confirmed instead of just once (https://github.com/flarum/core/pull/3163).
|
||||||
|
- [A11Y] Modal close button missing accessible label (https://github.com/flarum/core/pull/3161).
|
||||||
|
- [A11Y] Auth modal inputs missing accessible labels (https://github.com/flarum/core/pull/3207).
|
||||||
|
- [A11Y] Triggering click on drawer button can cause layered backdrops (https://github.com/flarum/core/pull/3018).
|
||||||
|
- [A11Y] Focus can leave open nav drawer on mobile (https://github.com/flarum/core/pull/3018).
|
||||||
|
- [A11Y] Post action items not showing when focus is within the post (https://github.com/flarum/core/pull/3173).
|
||||||
|
- [A11Y] Missing accessible label for alert dismiss button (https://github.com/flarum/core/pull/3237).
|
||||||
|
- Error accessing the forum after saving a setting with more than 65k characters (https://github.com/flarum/core/pull/3162).
|
||||||
|
- Cannot restart queue from within (https://github.com/flarum/core/pull/3166).
|
||||||
|
- `Post--by-actor` not showing when comparing user instances (https://github.com/flarum/core/pull/3170).
|
||||||
|
- Incorrect typings for Modal `hide()` method (https://github.com/flarum/core/pull/3180).
|
||||||
|
- Avatar Upload throws errors with correct mimetype and incorrect extension (https://github.com/flarum/core/pull/3181).
|
||||||
|
- Clicking the dropdown button on a post opens all dropdowns in `Post-actions` (https://github.com/flarum/core/pull/3185).
|
||||||
|
- `getPlainContent()` causes external content to be fetched (https://github.com/flarum/core/pull/3193).
|
||||||
|
- `listItems` not accepting all `Mithril.Children` (https://github.com/flarum/core/pull/3176).
|
||||||
|
- Notifications mark as read option updates all notifications including the read ones (https://github.com/flarum/core/pull/3202).
|
||||||
|
- Post meta permalink not properly generated (https://github.com/flarum/core/pull/3216).
|
||||||
|
- Broken contribution link in README (https://github.com/flarum/core/pull/3211).
|
||||||
|
- `WelcomeHero` is displayed when content is empty (https://github.com/flarum/core/pull/3219).
|
||||||
|
- `last_activity_at, last_seen_at` updated on all API requests (https://github.com/flarum/core/pull/3231).
|
||||||
|
- `RememberMe` access token updated twice in API requests (https://github.com/flarum/core/pull/3233).
|
||||||
|
- Error in `funding` item in `composer.json` bricks the frontend (https://github.com/flarum/core/pull/3239).
|
||||||
|
- Escaped quotes in window title (https://github.com/flarum/core/pull/3264)
|
||||||
|
- `schedule:list` command fails due to missing timezone configuration.
|
||||||
|
|
||||||
|
### Deprecated
|
||||||
|
- Unused `evented` utility (https://github.com/flarum/core/pull/3125).
|
||||||
|
|
||||||
|
## [1.1.1](https://github.com/flarum/core/compare/v1.1.0...v1.1.1)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Performance issue with very large communities.
|
||||||
|
|
||||||
## [1.1.0](https://github.com/flarum/core/compare/v1.0.4...v1.1.0)
|
## [1.1.0](https://github.com/flarum/core/compare/v1.0.4...v1.1.0)
|
||||||
|
|
||||||
|
@@ -86,7 +86,7 @@
|
|||||||
"wikimedia/less.php": "^3.0"
|
"wikimedia/less.php": "^3.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"flarum/testing": "1.0@dev"
|
"flarum/testing": "^1.0.0"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
@@ -107,6 +107,28 @@
|
|||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.x-dev"
|
"dev-master": "1.x-dev"
|
||||||
|
},
|
||||||
|
"flarum-cli": {
|
||||||
|
"excludeScaffolding": [
|
||||||
|
"LICENSE.md",
|
||||||
|
"js/tsconfig.json",
|
||||||
|
"js/webpack.config.js"
|
||||||
|
],
|
||||||
|
"modules": {
|
||||||
|
"backendTesting": true,
|
||||||
|
"js": true,
|
||||||
|
"gitConf": true,
|
||||||
|
"githubActions": true,
|
||||||
|
"prettier": true,
|
||||||
|
"typescript": true,
|
||||||
|
"bundlewatch": true,
|
||||||
|
"editorConfig": true,
|
||||||
|
"styleci": true,
|
||||||
|
"admin": true,
|
||||||
|
"forum": true,
|
||||||
|
"jsCommon": true,
|
||||||
|
"css": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@@ -1,2 +1,2 @@
|
|||||||
export * from './src/common';
|
export * from './src/common';
|
||||||
export * from './src/forum';
|
export * from './src/admin';
|
@@ -1,4 +1,4 @@
|
|||||||
/// <reference path="../../../src/common/translator-icu-rich.d.ts" />
|
/// <reference path="../../@types/translator-icu-rich.d.ts" />
|
||||||
import Modal, { IInternalModalAttrs } from '../../common/components/Modal';
|
import Modal, { IInternalModalAttrs } from '../../common/components/Modal';
|
||||||
export interface ILoadingModalAttrs extends IInternalModalAttrs {
|
export interface ILoadingModalAttrs extends IInternalModalAttrs {
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/// <reference path="../../../src/common/translator-icu-rich.d.ts" />
|
/// <reference path="../../@types/translator-icu-rich.d.ts" />
|
||||||
import Modal, { IInternalModalAttrs } from '../../common/components/Modal';
|
import Modal, { IInternalModalAttrs } from '../../common/components/Modal';
|
||||||
import ExtensionReadme from '../models/ExtensionReadme';
|
import ExtensionReadme from '../models/ExtensionReadme';
|
||||||
import type Mithril from 'mithril';
|
import type Mithril from 'mithril';
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/// <reference path="../../../src/common/translator-icu-rich.d.ts" />
|
/// <reference path="../../@types/translator-icu-rich.d.ts" />
|
||||||
import type Mithril from 'mithril';
|
import type Mithril from 'mithril';
|
||||||
import type User from '../../common/models/User';
|
import type User from '../../common/models/User';
|
||||||
import ItemList from '../../common/utils/ItemList';
|
import ItemList from '../../common/utils/ItemList';
|
||||||
|
2
js/dist-typings/common/Translator.d.ts
vendored
2
js/dist-typings/common/Translator.d.ts
vendored
@@ -1,4 +1,4 @@
|
|||||||
/// <reference path="../../src/common/translator-icu-rich.d.ts" />
|
/// <reference path="../@types/translator-icu-rich.d.ts" />
|
||||||
import { RichMessageFormatter } from '@askvortsov/rich-icu-message-formatter';
|
import { RichMessageFormatter } from '@askvortsov/rich-icu-message-formatter';
|
||||||
import { pluralTypeHandler, selectTypeHandler } from '@ultraq/icu-message-formatter';
|
import { pluralTypeHandler, selectTypeHandler } from '@ultraq/icu-message-formatter';
|
||||||
declare type Translations = Record<string, string>;
|
declare type Translations = Record<string, string>;
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
import type Mithril from 'mithril';
|
import type Mithril from 'mithril';
|
||||||
import Component, { ComponentAttrs } from '../Component';
|
import Component, { ComponentAttrs } from '../Component';
|
||||||
export default class ColorPreviewInput extends Component {
|
export default class ColorPreviewInput extends Component {
|
||||||
value?: string;
|
|
||||||
view(vnode: Mithril.Vnode<ComponentAttrs, this>): JSX.Element;
|
view(vnode: Mithril.Vnode<ComponentAttrs, this>): JSX.Element;
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/// <reference path="../../../src/common/translator-icu-rich.d.ts" />
|
/// <reference path="../../@types/translator-icu-rich.d.ts" />
|
||||||
import Modal, { IInternalModalAttrs } from './Modal';
|
import Modal, { IInternalModalAttrs } from './Modal';
|
||||||
import ItemList from '../utils/ItemList';
|
import ItemList from '../utils/ItemList';
|
||||||
import Stream from '../utils/Stream';
|
import Stream from '../utils/Stream';
|
||||||
|
14
js/dist-typings/common/index.d.ts
vendored
14
js/dist-typings/common/index.d.ts
vendored
@@ -1,3 +1,13 @@
|
|||||||
import * as Extend from "./extend/index";
|
import 'expose-loader?exposes=$,jQuery!jquery';
|
||||||
import app from "./app";
|
import 'expose-loader?exposes=m!mithril';
|
||||||
|
import 'expose-loader?exposes=dayjs!dayjs';
|
||||||
|
import 'bootstrap/js/affix';
|
||||||
|
import 'bootstrap/js/dropdown';
|
||||||
|
import 'bootstrap/js/modal';
|
||||||
|
import 'bootstrap/js/tooltip';
|
||||||
|
import 'bootstrap/js/transition';
|
||||||
|
import 'jquery.hotkeys/jquery.hotkeys';
|
||||||
|
import * as Extend from './extend/index';
|
||||||
|
import app from './app';
|
||||||
export { Extend, app };
|
export { Extend, app };
|
||||||
|
import './utils/arrayFlatPolyfill';
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/// <reference path="../../../src/common/translator-icu-rich.d.ts" />
|
/// <reference path="../../@types/translator-icu-rich.d.ts" />
|
||||||
import Modal, { IInternalModalAttrs } from '../../common/components/Modal';
|
import Modal, { IInternalModalAttrs } from '../../common/components/Modal';
|
||||||
import Stream from '../../common/utils/Stream';
|
import Stream from '../../common/utils/Stream';
|
||||||
import Mithril from 'mithril';
|
import Mithril from 'mithril';
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/// <reference path="../../../src/common/translator-icu-rich.d.ts" />
|
/// <reference path="../../@types/translator-icu-rich.d.ts" />
|
||||||
import Modal, { IInternalModalAttrs } from '../../common/components/Modal';
|
import Modal, { IInternalModalAttrs } from '../../common/components/Modal';
|
||||||
import ItemList from '../../common/utils/ItemList';
|
import ItemList from '../../common/utils/ItemList';
|
||||||
import Stream from '../../common/utils/Stream';
|
import Stream from '../../common/utils/Stream';
|
||||||
|
1
js/dist-typings/forum/components/Search.d.ts
vendored
1
js/dist-typings/forum/components/Search.d.ts
vendored
@@ -104,6 +104,7 @@ export default class Search<T extends SearchAttrs = SearchAttrs> extends Compone
|
|||||||
selectableItems(): JQuery;
|
selectableItems(): JQuery;
|
||||||
/**
|
/**
|
||||||
* Get the position of the currently selected search result item.
|
* Get the position of the currently selected search result item.
|
||||||
|
* Returns zero if not found.
|
||||||
*/
|
*/
|
||||||
getCurrentNumericIndex(): number;
|
getCurrentNumericIndex(): number;
|
||||||
/**
|
/**
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/// <reference path="../../../src/common/translator-icu-rich.d.ts" />
|
/// <reference path="../../@types/translator-icu-rich.d.ts" />
|
||||||
import Modal, { IInternalModalAttrs } from '../../common/components/Modal';
|
import Modal, { IInternalModalAttrs } from '../../common/components/Modal';
|
||||||
import ItemList from '../../common/utils/ItemList';
|
import ItemList from '../../common/utils/ItemList';
|
||||||
import Stream from '../../common/utils/Stream';
|
import Stream from '../../common/utils/Stream';
|
||||||
|
2
js/dist-typings/forum/routes.d.ts
vendored
2
js/dist-typings/forum/routes.d.ts
vendored
@@ -10,7 +10,7 @@ export declare function makeRouteHelpers(app: ForumApplication): {
|
|||||||
/**
|
/**
|
||||||
* Generate a URL to a discussion.
|
* Generate a URL to a discussion.
|
||||||
*/
|
*/
|
||||||
discussion: (discussion: Discussion, near: number) => string;
|
discussion: (discussion: Discussion, near?: number | undefined) => string;
|
||||||
/**
|
/**
|
||||||
* Generate a URL to a post.
|
* Generate a URL to a post.
|
||||||
*/
|
*/
|
||||||
|
2
js/dist/admin.js
generated
vendored
2
js/dist/admin.js
generated
vendored
File diff suppressed because one or more lines are too long
2
js/dist/admin.js.LICENSE.txt
generated
vendored
2
js/dist/admin.js.LICENSE.txt
generated
vendored
@@ -48,7 +48,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* focus-trap 6.7.1
|
* focus-trap 6.7.2
|
||||||
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
2
js/dist/admin.js.map
generated
vendored
2
js/dist/admin.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
js/dist/forum.js
generated
vendored
2
js/dist/forum.js
generated
vendored
File diff suppressed because one or more lines are too long
2
js/dist/forum.js.LICENSE.txt
generated
vendored
2
js/dist/forum.js.LICENSE.txt
generated
vendored
@@ -48,7 +48,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* focus-trap 6.7.1
|
* focus-trap 6.7.2
|
||||||
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
2
js/dist/forum.js.map
generated
vendored
2
js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
|||||||
export * from './src/common';
|
export * from './src/common';
|
||||||
export * from './src/admin';
|
export * from './src/forum';
|
@@ -3,7 +3,7 @@
|
|||||||
"name": "@flarum/core",
|
"name": "@flarum/core",
|
||||||
"prettier": "@flarum/prettier-config",
|
"prettier": "@flarum/prettier-config",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@askvortsov/rich-icu-message-formatter": "^0.2.1",
|
"@askvortsov/rich-icu-message-formatter": "^0.2.4",
|
||||||
"@ultraq/icu-message-formatter": "^0.12.0",
|
"@ultraq/icu-message-formatter": "^0.12.0",
|
||||||
"bootstrap": "^3.4.1",
|
"bootstrap": "^3.4.1",
|
||||||
"clsx": "^1.1.1",
|
"clsx": "^1.1.1",
|
||||||
@@ -39,11 +39,12 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "webpack --mode development --watch",
|
"dev": "webpack --mode development --watch",
|
||||||
"build": "webpack --mode production",
|
"build": "webpack --mode production",
|
||||||
"analyze": "cross-env ANALYZER=true npm run build",
|
"analyze": "cross-env ANALYZER=true yarn run build",
|
||||||
"format": "prettier --write src",
|
"format": "prettier --write src",
|
||||||
"format-check": "prettier --check src",
|
"format-check": "prettier --check src",
|
||||||
"clean-typings": "npx rimraf dist-typings && mkdir dist-typings",
|
"clean-typings": "npx rimraf dist-typings && mkdir dist-typings",
|
||||||
"build-typings": "npm run clean-typings && cp -r src/@types dist-typings/@types && tsc",
|
"build-typings": "yarn run clean-typings && [ -e src/@types ] && cp -r src/@types dist-typings/@types && tsc && yarn run post-build-typings",
|
||||||
|
"post-build-typings": "find dist-typings -type f -name '*.d.ts' -print0 | xargs -0 sed -i 's,../src/@types,@types,g'",
|
||||||
"check-typings": "tsc --noEmit --emitDeclarationOnly false",
|
"check-typings": "tsc --noEmit --emitDeclarationOnly false",
|
||||||
"check-typings-coverage": "typescript-coverage-report"
|
"check-typings-coverage": "typescript-coverage-report"
|
||||||
},
|
},
|
||||||
|
26
js/src/@types/translator-icu-rich.d.ts
vendored
Normal file
26
js/src/@types/translator-icu-rich.d.ts
vendored
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
declare module '@askvortsov/rich-icu-message-formatter' {
|
||||||
|
type IValues = Record<string, any>;
|
||||||
|
|
||||||
|
type ITypeHandler = (
|
||||||
|
value: string,
|
||||||
|
matches: string,
|
||||||
|
locale: string,
|
||||||
|
values: IValues,
|
||||||
|
format: (message: string, values: IValues) => string
|
||||||
|
) => string;
|
||||||
|
type IRichHandler = (tag: any, values: IValues, contents: string) => any;
|
||||||
|
|
||||||
|
type ValueOrArray<T> = T | ValueOrArray<T>[];
|
||||||
|
type NestedStringArray = ValueOrArray<string>;
|
||||||
|
|
||||||
|
export class RichMessageFormatter {
|
||||||
|
locale: string | null;
|
||||||
|
constructor(locale: string | null, typeHandlers: Record<string, ITypeHandler>, richHandler: IRichHandler);
|
||||||
|
|
||||||
|
format(message: string, values: IValues): string;
|
||||||
|
process(message: string, values: IValues): NestedStringArray;
|
||||||
|
rich(message: string, values: IValues): NestedStringArray;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function mithrilRichHandler(tag: any, values: IValues, contents: string): any;
|
||||||
|
}
|
17
js/src/@types/translator-icu.d.ts
vendored
Normal file
17
js/src/@types/translator-icu.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
declare module '@ultraq/icu-message-formatter' {
|
||||||
|
export function pluralTypeHandler(
|
||||||
|
value: string,
|
||||||
|
matches: string,
|
||||||
|
locale: string,
|
||||||
|
values: Record<string, any>,
|
||||||
|
format: (text: string, values: Record<string, any>) => string
|
||||||
|
): string;
|
||||||
|
|
||||||
|
export function selectTypeHandler(
|
||||||
|
value: string,
|
||||||
|
matches: string,
|
||||||
|
locale: string,
|
||||||
|
values: Record<string, any>,
|
||||||
|
format: (text: string, values: Record<string, any>) => string
|
||||||
|
): string;
|
||||||
|
}
|
@@ -18,7 +18,7 @@ export default class EditCustomCssModal extends SettingsModal {
|
|||||||
})}
|
})}
|
||||||
</p>,
|
</p>,
|
||||||
<div className="Form-group">
|
<div className="Form-group">
|
||||||
<textarea className="FormControl" rows="30" bidi={this.setting('custom_less')} />
|
<textarea className="FormControl" rows="30" bidi={this.setting('custom_less')} spellcheck={false} />
|
||||||
</div>,
|
</div>,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@@ -547,7 +547,11 @@ export default class Application {
|
|||||||
|
|
||||||
console.group(`${method} ${url} ${status}`);
|
console.group(`${method} ${url} ${status}`);
|
||||||
|
|
||||||
console.error(...(formattedErrors || [e]));
|
if (formattedErrors.length) {
|
||||||
|
console.error(...formattedErrors);
|
||||||
|
} else {
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
|
|
||||||
console.groupEnd();
|
console.groupEnd();
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
import app from '../common/app';
|
import app from '../common/app';
|
||||||
import { FlarumRequestOptions } from './Application';
|
import { FlarumRequestOptions } from './Application';
|
||||||
|
import { fireDeprecationWarning } from './helpers/fireDebugWarning';
|
||||||
import Store, { ApiPayloadSingle, ApiResponseSingle, MetaInformation } from './Store';
|
import Store, { ApiPayloadSingle, ApiResponseSingle, MetaInformation } from './Store';
|
||||||
|
|
||||||
export interface ModelIdentifier {
|
export interface ModelIdentifier {
|
||||||
@@ -111,6 +112,19 @@ export default abstract class Model {
|
|||||||
|
|
||||||
if ('attributes' in data) {
|
if ('attributes' in data) {
|
||||||
this.data.attributes ||= {};
|
this.data.attributes ||= {};
|
||||||
|
|
||||||
|
// @deprecated
|
||||||
|
// Filter out relationships that got in by accident.
|
||||||
|
for (const key in data.attributes) {
|
||||||
|
const val = data.attributes[key];
|
||||||
|
if (val && val instanceof Model) {
|
||||||
|
fireDeprecationWarning('Providing models as attributes to `Model.pushData()` or `Model.pushAttributes()` is deprecated.', '3249');
|
||||||
|
delete data.attributes[key];
|
||||||
|
data.relationships ||= {};
|
||||||
|
data.relationships[key] = { data: Model.getIdentifier(val) };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Object.assign(this.data.attributes, data.attributes);
|
Object.assign(this.data.attributes, data.attributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -5,23 +5,20 @@ import classList from '../utils/classList';
|
|||||||
import icon from '../helpers/icon';
|
import icon from '../helpers/icon';
|
||||||
|
|
||||||
export default class ColorPreviewInput extends Component {
|
export default class ColorPreviewInput extends Component {
|
||||||
value?: string;
|
|
||||||
|
|
||||||
view(vnode: Mithril.Vnode<ComponentAttrs, this>) {
|
view(vnode: Mithril.Vnode<ComponentAttrs, this>) {
|
||||||
const { className, ...attrs } = this.attrs;
|
const { className, id, ...attrs } = this.attrs;
|
||||||
const value = attrs.bidi?.() || attrs.value;
|
|
||||||
|
|
||||||
attrs.type ||= 'text';
|
attrs.type ||= 'text';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="ColorInput">
|
<div className="ColorInput">
|
||||||
<input className={classList('FormControl', className)} {...attrs} />
|
<input className={classList('FormControl', className)} id={id} {...attrs} />
|
||||||
|
|
||||||
<span className="ColorInput-icon" role="presentation">
|
<span className="ColorInput-icon" role="presentation">
|
||||||
{icon('fas fa-exclamation-circle')}
|
{icon('fas fa-exclamation-circle')}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div className="ColorInput-preview" style={{ '--input-value': value }} role="presentation" />
|
<input className="ColorInput-preview" {...attrs} type="color" />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -61,7 +61,7 @@ export default class EditUserModal<CustomAttrs extends IEditUserModalAttrs = IEd
|
|||||||
fields() {
|
fields() {
|
||||||
const items = new ItemList();
|
const items = new ItemList();
|
||||||
|
|
||||||
if (app.session.user?.canEditCredentials()) {
|
if (this.attrs.user.canEditCredentials()) {
|
||||||
items.add(
|
items.add(
|
||||||
'username',
|
'username',
|
||||||
<div className="Form-group">
|
<div className="Form-group">
|
||||||
@@ -145,7 +145,7 @@ export default class EditUserModal<CustomAttrs extends IEditUserModalAttrs = IEd
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (app.session.user?.canEditGroups()) {
|
if (this.attrs.user.canEditGroups()) {
|
||||||
items.add(
|
items.add(
|
||||||
'groups',
|
'groups',
|
||||||
<div className="Form-group EditUserModal-groups">
|
<div className="Form-group EditUserModal-groups">
|
||||||
|
@@ -49,7 +49,7 @@ export default class ModalManager extends Component<IModalManagerAttrs> {
|
|||||||
// e.g. via ESC key or a click on the modal backdrop.
|
// e.g. via ESC key or a click on the modal backdrop.
|
||||||
this.$().on('hidden.bs.modal', this.attrs.state.close.bind(this.attrs.state));
|
this.$().on('hidden.bs.modal', this.attrs.state.close.bind(this.attrs.state));
|
||||||
|
|
||||||
this.focusTrap = createFocusTrap(this.element as HTMLElement);
|
this.focusTrap = createFocusTrap(this.element as HTMLElement, { allowOutsideClick: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
onupdate(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): void {
|
onupdate(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): void {
|
||||||
|
@@ -22,7 +22,7 @@ export default class RequestErrorModal<CustomAttrs extends IRequestErrorModalAtt
|
|||||||
|
|
||||||
// If the error is already formatted, just add line endings;
|
// If the error is already formatted, just add line endings;
|
||||||
// else try to parse it as JSON and stringify it with indentation
|
// else try to parse it as JSON and stringify it with indentation
|
||||||
if (formattedError) {
|
if (formattedError.length) {
|
||||||
responseText = formattedError.join('\n\n');
|
responseText = formattedError.join('\n\n');
|
||||||
} else if (error.response) {
|
} else if (error.response) {
|
||||||
responseText = JSON.stringify(error.response, null, 2);
|
responseText = JSON.stringify(error.response, null, 2);
|
||||||
|
@@ -30,6 +30,7 @@ import './utils/arrayFlatPolyfill';
|
|||||||
const tooltipGen = $.fn.tooltip;
|
const tooltipGen = $.fn.tooltip;
|
||||||
|
|
||||||
// Remove in a future version of Flarum.
|
// Remove in a future version of Flarum.
|
||||||
|
// @ts-ignore
|
||||||
$.fn.tooltip = function (options, caller) {
|
$.fn.tooltip = function (options, caller) {
|
||||||
// Show a warning when `$.tooltip` is used outside of the Tooltip component.
|
// Show a warning when `$.tooltip` is used outside of the Tooltip component.
|
||||||
// This functionality is deprecated and should not be used.
|
// This functionality is deprecated and should not be used.
|
@@ -49,7 +49,6 @@ export default class Drawer {
|
|||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
resizeHandler = ((e) => {
|
resizeHandler = ((e) => {
|
||||||
console.log(this, e);
|
|
||||||
if (!e.matches && this.isOpen()) {
|
if (!e.matches && this.isOpen()) {
|
||||||
// Drawer is open but we've made window bigger, so hide it.
|
// Drawer is open but we've made window bigger, so hide it.
|
||||||
this.hide();
|
this.hide();
|
||||||
|
@@ -101,7 +101,7 @@ export default class DiscussionComposer extends ComposerBody {
|
|||||||
.save(data)
|
.save(data)
|
||||||
.then((discussion) => {
|
.then((discussion) => {
|
||||||
this.composer.hide();
|
this.composer.hide();
|
||||||
app.discussions.refresh({ deferClear: true });
|
app.discussions.refresh();
|
||||||
m.route.set(app.route.discussion(discussion));
|
m.route.set(app.route.discussion(discussion));
|
||||||
}, this.loaded.bind(this));
|
}, this.loaded.bind(this));
|
||||||
}
|
}
|
||||||
|
@@ -53,7 +53,9 @@ export default class DiscussionPage<CustomAttrs extends IDiscussionPageAttrs = I
|
|||||||
// page, then we don't want Mithril to redraw the whole page – if it did,
|
// page, then we don't want Mithril to redraw the whole page – if it did,
|
||||||
// then the pane would redraw which would be slow and would cause problems with
|
// then the pane would redraw which would be slow and would cause problems with
|
||||||
// event handlers.
|
// event handlers.
|
||||||
if (app.discussions.hasItems()) {
|
// We will also enable the pane if the discussion list is empty but loading,
|
||||||
|
// because the DiscussionComposer refreshes the list and redirects to the new discussion at the same time.
|
||||||
|
if (app.discussions.hasItems() || app.discussions.isLoading()) {
|
||||||
app.pane?.enable();
|
app.pane?.enable();
|
||||||
app.pane?.hide();
|
app.pane?.hide();
|
||||||
}
|
}
|
||||||
@@ -210,7 +212,7 @@ export default class DiscussionPage<CustomAttrs extends IDiscussionPageAttrs = I
|
|||||||
record.relationships.discussion.data.id === discussionId
|
record.relationships.discussion.data.id === discussionId
|
||||||
)
|
)
|
||||||
.map((record) => app.store.getById<Post>('posts', record.id))
|
.map((record) => app.store.getById<Post>('posts', record.id))
|
||||||
.sort((a?: Post, b?: Post) => (a?.createdAt()?.getTime() ?? 0) - (b?.createdAt()?.getTime() ?? 0))
|
.sort((a?: Post, b?: Post) => (a?.number() ?? 0) - (b?.number() ?? 0))
|
||||||
.slice(0, 20);
|
.slice(0, 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -138,7 +138,7 @@ export default class Post extends Component {
|
|||||||
classes.push('Post--by-actor');
|
classes.push('Post--by-actor');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user?.id() === discussion.attribute('startUserId')) {
|
if (user && user?.id() === discussion.attribute('startUserId')) {
|
||||||
classes.push('Post--by-start-user');
|
classes.push('Post--by-start-user');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -161,6 +161,7 @@ export default class Search<T extends SearchAttrs = SearchAttrs> extends Compone
|
|||||||
className="Search-clear Button Button--icon Button--link"
|
className="Search-clear Button Button--icon Button--link"
|
||||||
onclick={this.clear.bind(this)}
|
onclick={this.clear.bind(this)}
|
||||||
aria-label={app.translator.trans('core.forum.header.search_clear_button_accessible_label')}
|
aria-label={app.translator.trans('core.forum.header.search_clear_button_accessible_label')}
|
||||||
|
type="button"
|
||||||
>
|
>
|
||||||
{icon('fas fa-times-circle')}
|
{icon('fas fa-times-circle')}
|
||||||
</button>
|
</button>
|
||||||
@@ -324,9 +325,10 @@ export default class Search<T extends SearchAttrs = SearchAttrs> extends Compone
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the position of the currently selected search result item.
|
* Get the position of the currently selected search result item.
|
||||||
|
* Returns zero if not found.
|
||||||
*/
|
*/
|
||||||
getCurrentNumericIndex(): number {
|
getCurrentNumericIndex(): number {
|
||||||
return this.selectableItems().index(this.getItem(this.index));
|
return Math.max(0, this.selectableItems().index(this.getItem(this.index)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -34,7 +34,7 @@ export function makeRouteHelpers(app: ForumApplication) {
|
|||||||
/**
|
/**
|
||||||
* Generate a URL to a discussion.
|
* Generate a URL to a discussion.
|
||||||
*/
|
*/
|
||||||
discussion: (discussion: Discussion, near: number) => {
|
discussion: (discussion: Discussion, near?: number) => {
|
||||||
return app.route(near && near !== 1 ? 'discussion.near' : 'discussion', {
|
return app.route(near && near !== 1 ? 'discussion.near' : 'discussion', {
|
||||||
id: discussion.slug(),
|
id: discussion.slug(),
|
||||||
near: near && near !== 1 ? near : undefined,
|
near: near && near !== 1 ? near : undefined,
|
||||||
|
@@ -289,7 +289,7 @@ class PostStreamState {
|
|||||||
|
|
||||||
if (loadIds.length) {
|
if (loadIds.length) {
|
||||||
return app.store.find('posts', loadIds).then((newPosts) => {
|
return app.store.find('posts', loadIds).then((newPosts) => {
|
||||||
return loaded.concat(newPosts).sort((a, b) => a.createdAt() - b.createdAt());
|
return loaded.concat(newPosts).sort((a, b) => a.number() - b.number());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -213,7 +213,7 @@ export default {
|
|||||||
* @return {Promise<void>}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
hideAction() {
|
hideAction() {
|
||||||
this.pushAttributes({ hiddenAt: new Date(), hiddenUser: app.session.user });
|
this.pushData({ attributes: { hiddenAt: new Date() }, relationships: { hiddenUser: app.session.user } });
|
||||||
|
|
||||||
return this.save({ isHidden: true });
|
return this.save({ isHidden: true });
|
||||||
},
|
},
|
||||||
@@ -224,7 +224,7 @@ export default {
|
|||||||
* @return {Promise<void>}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
restoreAction() {
|
restoreAction() {
|
||||||
this.pushAttributes({ hiddenAt: null, hiddenUser: null });
|
this.pushData({ attributes: { hiddenAt: null }, relationships: { hiddenUser: null } });
|
||||||
|
|
||||||
return this.save({ isHidden: false });
|
return this.save({ isHidden: false });
|
||||||
},
|
},
|
||||||
|
@@ -151,7 +151,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
hideAction() {
|
hideAction() {
|
||||||
if (!confirm(extractText(app.translator.trans('core.forum.post_controls.hide_confirmation')))) return;
|
if (!confirm(extractText(app.translator.trans('core.forum.post_controls.hide_confirmation')))) return;
|
||||||
this.pushAttributes({ hiddenAt: new Date(), hiddenUser: app.session.user });
|
this.pushData({ attributes: { hiddenAt: new Date() }, relationships: { hiddenUser: app.session.user } });
|
||||||
|
|
||||||
return this.save({ isHidden: true }).then(() => m.redraw());
|
return this.save({ isHidden: true }).then(() => m.redraw());
|
||||||
},
|
},
|
||||||
@@ -162,7 +162,7 @@ export default {
|
|||||||
* @return {Promise<void>}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
restoreAction() {
|
restoreAction() {
|
||||||
this.pushAttributes({ hiddenAt: null, hiddenUser: null });
|
this.pushData({ attributes: { hiddenAt: null }, relationships: { hiddenUser: null } });
|
||||||
|
|
||||||
return this.save({ isHidden: false }).then(() => m.redraw());
|
return this.save({ isHidden: false }).then(() => m.redraw());
|
||||||
},
|
},
|
||||||
|
1840
js/yarn.lock
1840
js/yarn.lock
File diff suppressed because it is too large
Load Diff
@@ -7,12 +7,26 @@
|
|||||||
bottom: 8px;
|
bottom: 8px;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
pointer-events: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&-preview {
|
&-preview {
|
||||||
background-color: var(--input-value);
|
display: inline-block;
|
||||||
border-radius: 15%;
|
border-radius: 15%;
|
||||||
|
padding: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
// Match both the wrapper div and the div with the background color
|
||||||
|
&, &::-webkit-color-swatch-wrapper, &::-webkit-color-swatch {
|
||||||
|
border: none;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// This has to be a separate entry so other browsers
|
||||||
|
// don't ignore the entire CSS rule. Thanks Firefox.
|
||||||
|
&::-moz-color-swatch {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&-icon {
|
&-icon {
|
||||||
|
@@ -41,18 +41,23 @@
|
|||||||
line-height: 1.5em;
|
line-height: 1.5em;
|
||||||
color: var(--secondary-color);
|
color: var(--secondary-color);
|
||||||
|
|
||||||
&, input, a {
|
&,
|
||||||
|
input,
|
||||||
|
a {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
input, a {
|
input,
|
||||||
|
a {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
input {
|
input {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
width: 500px;
|
width: 500px;
|
||||||
|
|
||||||
&, &[disabled], &:focus {
|
&,
|
||||||
|
&[disabled],
|
||||||
|
&:focus {
|
||||||
background: none;
|
background: none;
|
||||||
border: 0;
|
border: 0;
|
||||||
padding: 0 20px 0 0;
|
padding: 0 20px 0 0;
|
||||||
@@ -230,7 +235,8 @@
|
|||||||
height: 300px;
|
height: 300px;
|
||||||
transition: background 0.2s, box-shadow 0.2s;
|
transition: background 0.2s, box-shadow 0.2s;
|
||||||
|
|
||||||
&.active, &.fullScreen {
|
&.active,
|
||||||
|
&.fullScreen {
|
||||||
background: var(--body-bg);
|
background: var(--body-bg);
|
||||||
}
|
}
|
||||||
&.active:not(.fullScreen) {
|
&.active:not(.fullScreen) {
|
||||||
@@ -258,9 +264,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.ComposerBody-header {
|
.ComposerBody-header {
|
||||||
|
margin-right: 120px;
|
||||||
|
|
||||||
.fullScreen & {
|
.fullScreen & {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.minimized & {
|
||||||
|
overflow: hidden;
|
||||||
|
margin-right: 32px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.Composer-content {
|
.Composer-content {
|
||||||
padding: 20px 20px 0;
|
padding: 20px 20px 0;
|
||||||
@@ -279,7 +292,8 @@
|
|||||||
margin-bottom: -17px;
|
margin-bottom: -17px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.minimized &, .fullScreen & {
|
.minimized &,
|
||||||
|
.fullScreen & {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -287,14 +301,16 @@
|
|||||||
float: left;
|
float: left;
|
||||||
.Avatar--size(64px);
|
.Avatar--size(64px);
|
||||||
|
|
||||||
.minimized &, .fullScreen & {
|
.minimized &,
|
||||||
|
.fullScreen & {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.ComposerBody-content {
|
.ComposerBody-content {
|
||||||
margin-left: 85px;
|
margin-left: 85px;
|
||||||
|
|
||||||
.minimized &, .fullScreen & {
|
.minimized &,
|
||||||
|
.fullScreen & {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,7 +41,7 @@ class ListPostsController extends AbstractListController
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public $sortFields = ['createdAt'];
|
public $sortFields = ['number', 'createdAt'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var PostFilterer
|
* @var PostFilterer
|
||||||
|
@@ -132,7 +132,7 @@ class ShowDiscussionController extends AbstractShowController
|
|||||||
*/
|
*/
|
||||||
private function loadPostIds(Discussion $discussion, User $actor)
|
private function loadPostIds(Discussion $discussion, User $actor)
|
||||||
{
|
{
|
||||||
return $discussion->posts()->whereVisibleTo($actor)->orderBy('created_at')->pluck('id')->all();
|
return $discussion->posts()->whereVisibleTo($actor)->orderBy('number')->pluck('id')->all();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -186,7 +186,7 @@ class ShowDiscussionController extends AbstractShowController
|
|||||||
{
|
{
|
||||||
$query = $discussion->posts()->whereVisibleTo($actor);
|
$query = $discussion->posts()->whereVisibleTo($actor);
|
||||||
|
|
||||||
$query->orderBy('created_at')->skip($offset)->take($limit)->with($include);
|
$query->orderBy('number')->skip($offset)->take($limit)->with($include);
|
||||||
|
|
||||||
$posts = $query->get();
|
$posts = $query->get();
|
||||||
|
|
||||||
|
@@ -42,16 +42,29 @@ class DiscussionRepository
|
|||||||
/**
|
/**
|
||||||
* Get the IDs of discussions which a user has read completely.
|
* Get the IDs of discussions which a user has read completely.
|
||||||
*
|
*
|
||||||
|
* @deprecated 1.3 Use `getReadIdsQuery` instead
|
||||||
|
*
|
||||||
* @param User $user
|
* @param User $user
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getReadIds(User $user)
|
public function getReadIds(User $user)
|
||||||
|
{
|
||||||
|
return $this->getReadIdsQuery($user)
|
||||||
|
->all();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a query containing the IDs of discussions which a user has read completely.
|
||||||
|
*
|
||||||
|
* @param User $user
|
||||||
|
* @return Builder
|
||||||
|
*/
|
||||||
|
public function getReadIdsQuery(User $user): Builder
|
||||||
{
|
{
|
||||||
return Discussion::leftJoin('discussion_user', 'discussion_user.discussion_id', '=', 'discussions.id')
|
return Discussion::leftJoin('discussion_user', 'discussion_user.discussion_id', '=', 'discussions.id')
|
||||||
->where('discussion_user.user_id', $user->id)
|
->where('discussion_user.user_id', $user->id)
|
||||||
->whereColumn('last_read_post_number', '>=', 'last_post_number')
|
->whereColumn('last_read_post_number', '>=', 'last_post_number')
|
||||||
->pluck('id')
|
->select('id');
|
||||||
->all();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -61,7 +61,7 @@ class UnreadFilterGambit extends AbstractRegexGambit implements FilterInterface
|
|||||||
protected function constrain(Builder $query, User $actor, bool $negate)
|
protected function constrain(Builder $query, User $actor, bool $negate)
|
||||||
{
|
{
|
||||||
if ($actor->exists) {
|
if ($actor->exists) {
|
||||||
$readIds = $this->discussions->getReadIds($actor);
|
$readIds = $this->discussions->getReadIdsQuery($actor);
|
||||||
|
|
||||||
$query->where(function ($query) use ($readIds, $negate, $actor) {
|
$query->where(function ($query) use ($readIds, $negate, $actor) {
|
||||||
if (! $negate) {
|
if (! $negate) {
|
||||||
|
@@ -21,7 +21,7 @@ class Application
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
const VERSION = '1.2.0-dev';
|
const VERSION = '1.3.0-dev';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The IoC container for the Flarum application.
|
* The IoC container for the Flarum application.
|
||||||
|
@@ -159,6 +159,9 @@ class InstalledSite implements SiteInterface
|
|||||||
protected function getIlluminateConfig()
|
protected function getIlluminateConfig()
|
||||||
{
|
{
|
||||||
return new ConfigRepository([
|
return new ConfigRepository([
|
||||||
|
'app' => [
|
||||||
|
'timezone' => 'UTC'
|
||||||
|
],
|
||||||
'view' => [
|
'view' => [
|
||||||
'paths' => [],
|
'paths' => [],
|
||||||
'compiled' => $this->paths->storage.'/views',
|
'compiled' => $this->paths->storage.'/views',
|
||||||
@@ -174,7 +177,8 @@ class InstalledSite implements SiteInterface
|
|||||||
protected function registerLogger(Container $container)
|
protected function registerLogger(Container $container)
|
||||||
{
|
{
|
||||||
$logPath = $this->paths->storage.'/logs/flarum.log';
|
$logPath = $this->paths->storage.'/logs/flarum.log';
|
||||||
$handler = new RotatingFileHandler($logPath, 0, Logger::INFO);
|
$logLevel = $this->config->inDebugMode() ? Logger::DEBUG : Logger::INFO;
|
||||||
|
$handler = new RotatingFileHandler($logPath, 0, $logLevel);
|
||||||
$handler->setFormatter(new LineFormatter(null, null, true, true));
|
$handler->setFormatter(new LineFormatter(null, null, true, true));
|
||||||
|
|
||||||
$container->instance('log', new Logger('flarum', [$handler]));
|
$container->instance('log', new Logger('flarum', [$handler]));
|
||||||
|
33
src/Mail/FlarumLogTransport.php
Normal file
33
src/Mail/FlarumLogTransport.php
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Flarum.
|
||||||
|
*
|
||||||
|
* For detailed copyright and license information, please view the
|
||||||
|
* LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Flarum\Mail;
|
||||||
|
|
||||||
|
use Illuminate\Mail\Transport\LogTransport;
|
||||||
|
use Swift_Mime_SimpleMessage;
|
||||||
|
|
||||||
|
class FlarumLogTransport extends LogTransport
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null)
|
||||||
|
{
|
||||||
|
$this->beforeSendPerformed($message);
|
||||||
|
|
||||||
|
// Overriden to use info, so the log driver works in non-debug mode.
|
||||||
|
$this->logger->info($this->getMimeEntityString($message));
|
||||||
|
|
||||||
|
$this->sendPerformed($message);
|
||||||
|
|
||||||
|
return $this->numberOfRecipients($message);
|
||||||
|
}
|
||||||
|
}
|
@@ -11,7 +11,6 @@ namespace Flarum\Mail;
|
|||||||
|
|
||||||
use Flarum\Settings\SettingsRepositoryInterface;
|
use Flarum\Settings\SettingsRepositoryInterface;
|
||||||
use Illuminate\Contracts\Validation\Factory;
|
use Illuminate\Contracts\Validation\Factory;
|
||||||
use Illuminate\Mail\Transport\LogTransport;
|
|
||||||
use Illuminate\Support\MessageBag;
|
use Illuminate\Support\MessageBag;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
use Swift_Transport;
|
use Swift_Transport;
|
||||||
@@ -45,6 +44,6 @@ class LogDriver implements DriverInterface
|
|||||||
|
|
||||||
public function buildTransport(SettingsRepositoryInterface $settings): Swift_Transport
|
public function buildTransport(SettingsRepositoryInterface $settings): Swift_Transport
|
||||||
{
|
{
|
||||||
return new LogTransport($this->logger);
|
return new FlarumLogTransport($this->logger);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
0
tests/fixtures/.gitkeep
vendored
Normal file
0
tests/fixtures/.gitkeep
vendored
Normal file
@@ -19,6 +19,7 @@
|
|||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="Flarum Integration Tests">
|
<testsuite name="Flarum Integration Tests">
|
||||||
<directory suffix="Test.php">./integration</directory>
|
<directory suffix="Test.php">./integration</directory>
|
||||||
|
<exclude>./integration/tmp</exclude>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
0
tests/unit/.gitkeep
Normal file
0
tests/unit/.gitkeep
Normal file
Reference in New Issue
Block a user