mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-24 05:05:20 -04:00
recognise 1M celebration period
This commit is contained in:
parent
c3ed7427c9
commit
5d94095dc4
@ -21,6 +21,7 @@ interface Data {
|
||||
flagName: string | null;
|
||||
d: Day | null;
|
||||
forceShowFlagDyn: boolean;
|
||||
celebrate1M: boolean;
|
||||
}
|
||||
|
||||
export default Vue.extend({
|
||||
@ -35,9 +36,10 @@ export default Vue.extend({
|
||||
flagName: null,
|
||||
d: this.day,
|
||||
forceShowFlagDyn: false,
|
||||
celebrate1M: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
async mounted() {
|
||||
this.flagName = this.selectFlag();
|
||||
this.$eventHub.$on('calendar-select', (d: Day | null) => {
|
||||
this.forceShowFlagDyn = !!d;
|
||||
@ -47,6 +49,13 @@ export default Vue.extend({
|
||||
this.flagName = this.selectFlag();
|
||||
}
|
||||
});
|
||||
const stats = await this.$axios.$get('/admin/stats-public');
|
||||
if (stats && stats.overall.users >= 1_000_000 && stats.overall.users < 1_005_000) {
|
||||
this.celebrate1M = true;
|
||||
}
|
||||
if (process.env.NODE_ENV == 'development' || process.env.NODE_ENV == 'test') {
|
||||
this.celebrate1M = true;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectFlag(): string | null {
|
||||
|
Loading…
x
Reference in New Issue
Block a user