-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
58e1c3e
commit cb18008
Showing
21 changed files
with
1,385 additions
and
1,369 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,16 +7,21 @@ | |
"type": "flarum-extension", | ||
"license": "MIT", | ||
"require": { | ||
"flarum/core": ">=0.1.0-beta.10 <0.1.0-beta.14", | ||
"flarum/core": "^0.1.0-beta.16", | ||
"ext-json": "*" | ||
}, | ||
"authors": [ | ||
{ | ||
"name": "Clark Winkelmann", | ||
"email": "[email protected]", | ||
"homepage": "https://clarkwinkelmann.com/", | ||
"role": "Developer" | ||
} | ||
], | ||
"support": { | ||
"source": "https://github.com/clarkwinkelmann/flarum-ext-status", | ||
"forum": "https://discuss.flarum.org/d/21983" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"ClarkWinkelmann\\Status\\": "src/" | ||
|
@@ -25,6 +30,7 @@ | |
"extra": { | ||
"flarum-extension": { | ||
"title": "Status", | ||
"category": "feature", | ||
"icon": { | ||
"name": "fas fa-grin", | ||
"backgroundColor": "#684ba6", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
{ | ||
"name": "@clarkwinkelmann/flarum-ext-status", | ||
"version": "0.0.0", | ||
"private": true, | ||
"dependencies": { | ||
"flarum-webpack-config": "^0.1.0-beta.10", | ||
"simple-emoji-map": "^0.3.0", | ||
"webpack": "^4.26.0", | ||
"webpack-cli": "^3.0.7" | ||
}, | ||
"scripts": { | ||
"dev": "webpack --mode development --watch", | ||
"build": "webpack --mode production" | ||
} | ||
"name": "@clarkwinkelmann/status", | ||
"private": true, | ||
"dependencies": { | ||
"flarum": "^0.1.0-beta.16", | ||
"flarum-webpack-config": "^0.1.0-beta.10", | ||
"simple-emoji-map": "^0.3.0", | ||
"webpack": "^4.26.0", | ||
"webpack-cli": "^3.0.7" | ||
}, | ||
"scripts": { | ||
"dev": "webpack --mode development --watch", | ||
"build": "webpack --mode production" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,31 @@ | ||
import {extend} from 'flarum/extend'; | ||
import app from 'flarum/app'; | ||
import StatusSettingsModal from './components/StatusSettingsModal'; | ||
import PermissionGrid from 'flarum/components/PermissionGrid'; | ||
/* global app */ | ||
|
||
app.initializers.add('clarkwinkelmann/status', () => { | ||
app.extensionSettings['clarkwinkelmann-status'] = () => app.modal.show(new StatusSettingsModal()); | ||
|
||
extend(PermissionGrid.prototype, 'viewItems', items => { | ||
items.add('clarkwinkelmann-status-see', { | ||
app.initializers.add('clarkwinkelmann-status', () => { | ||
app.extensionData.for('clarkwinkelmann-status') | ||
.registerSetting({ | ||
setting: 'clarkwinkelmann-status.onlyCountries', | ||
type: 'switch', | ||
label: app.translator.trans('clarkwinkelmann-status.admin.settings.only-countries') | ||
}) | ||
.registerSetting({ | ||
setting: 'clarkwinkelmann-status.enableText', | ||
type: 'switch', | ||
label: app.translator.trans('clarkwinkelmann-status.admin.settings.enable-text') | ||
}) | ||
.registerPermission({ | ||
icon: 'fas fa-grin', | ||
label: app.translator.trans('clarkwinkelmann-status.admin.permissions.see'), | ||
permission: 'clarkwinkelmann-status.see', | ||
allowGuest: true, | ||
}); | ||
|
||
items.add('clarkwinkelmann-status-set', { | ||
}, 'view') | ||
.registerPermission({ | ||
icon: 'fas fa-grin', | ||
label: app.translator.trans('clarkwinkelmann-status.admin.permissions.set'), | ||
permission: 'clarkwinkelmann-status.set', | ||
}); | ||
|
||
items.add('clarkwinkelmann-status-mod', { | ||
}, 'view') | ||
.registerPermission({ | ||
icon: 'fas fa-grin', | ||
label: app.translator.trans('clarkwinkelmann-status.admin.permissions.mod'), | ||
permission: 'clarkwinkelmann-status.mod', | ||
}); | ||
}); | ||
}, 'view'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.