-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update for Flarum 1.0 and convert to typescript
- Loading branch information
1 parent
5672be0
commit 997a7fe
Showing
60 changed files
with
1,313 additions
and
1,122 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
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
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import Mithril from 'mithril'; | ||
import * as _dayjs from 'dayjs'; | ||
|
||
declare global { | ||
const m: Mithril.Static; | ||
const dayjs: typeof _dayjs; | ||
} | ||
|
||
import Fish from './src/forum/models/Fish'; | ||
import Round from './src/forum/models/Round'; | ||
|
||
declare module 'flarum/common/models/User' { | ||
export default interface User { | ||
catchTheFishBasket(): Fish[] | false | ||
} | ||
} | ||
|
||
declare module 'flarum/common/models/Forum' { | ||
export default interface Forum { | ||
catchTheFishActiveRounds(): Round[] | false | ||
|
||
catchTheFishCanModerate(): boolean | ||
|
||
catchTheFishCanSeeRankingsPage(): boolean | ||
|
||
catchTheFishCanSeeProfileRankings(): boolean | ||
|
||
catchTheFishAnimateFlip(): boolean | ||
} | ||
} |
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
5 changes: 2 additions & 3 deletions
5
js/src/forum/addFishBasket.js → js/src/forum/addFishBasket.ts
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,11 +1,10 @@ | ||
import {extend} from 'flarum/common/extend'; | ||
import ItemList from 'flarum/common/utils/ItemList'; | ||
import HeaderPrimary from 'flarum/forum/components/HeaderPrimary'; | ||
import Basket from './components/Basket'; | ||
|
||
/* global m */ | ||
|
||
export default function () { | ||
extend(HeaderPrimary.prototype, 'items', items => { | ||
extend(HeaderPrimary.prototype, 'items', function (items: ItemList) { | ||
items.add('catchthefish-basket', m(Basket)); | ||
}); | ||
} |
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
6 changes: 2 additions & 4 deletions
6
js/src/forum/addRoundAlert.js → js/src/forum/addRoundAlert.ts
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
7 changes: 3 additions & 4 deletions
7
js/src/forum/components/DropArea.js → js/src/forum/components/DropArea.ts
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.