Skip to content

Commit

Permalink
chore: moved the loading messages and added some more
Browse files Browse the repository at this point in the history
  • Loading branch information
Jabster28 committed Jul 13, 2020
1 parent a821d03 commit 22ac754
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 19 deletions.
11 changes: 1 addition & 10 deletions quasar.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,8 @@ module.exports = configure(function(ctx) {
iconSet: 'material-icons', // Quasar icon set
lang: 'en-us', // Quasar language pack
config: {
dark: true,
loading: {
message: [
'Loading...',
'Spinning up the hamster...',
'Engaging the flux capacitor...',
'The other load screen is quicker. Try that one next time.'
].find((_, i, ar) => Math.random() < 1 / (ar.length - i))
}
dark: true
},

// Possible values for "importStrategy":
// * 'auto' - (DEFAULT) Auto-import needed Quasar components & directives
// * 'all' - Manually specify what to import
Expand Down
46 changes: 46 additions & 0 deletions src/layouts/MainLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,52 @@ export default {
window.addEventListener('offline', this.checkConn);
},
watch: {
$route() {
this.$q.loading.setDefaults({
message: [
// some normal ones i thought of
'Loading...',
'Spinning up the hamster...',
'Engaging the flux capacitor...',
'The other load screen is quicker. Try that one next time.',
'The elves are running slowly today...',
'Wow, your internet is slow. I feel sorry for you.',
'Overclocking the particle accelerator...',
'You know, you could be doing something more productive right now.',
'Loading, Press Alt+F4 for a quick IQ test while you wait.',
// website tips
"TIP: If you're on a modern browser, you can access this website offline!",
"TIP: You can see your friends' most favourited anime by typing their name into the user box and sorting by ratings.",
// more dumb ones
'"Are we there yet?"',
'INSERT COIN',
"I know the data's around here somewhere...",
'Searching for brain cells...',
'Waiting for your friend to press start...',
// stupid facts i stole off the internet, might be fake idk and idrc
'The official pronunciation for a PNG file is "ping"',
'The average American spends about 2.5 days a year looking for lost items.',
'No number from 1 to 999 includes the letter "a" in its word form.',
'Golf balls tend to have 336 "dimples."',
"If you plug your nose, you can't tell the difference between an apple, a potato, and an onion.",
'The opposite sides of a 6-sided dice will always add to seven.',
'EDM and dubstep can scare off mosquitos.',
'A cubic inch of human bone can bear the weight of five standard pickup trucks.',
'The little dot above a lowercase "i" and "j" is called a tittle.',
'Pogonophobia is the fear of beards.',
'The average adult spends more time on the toilet than they do exercising.',
'Your fingernails grow faster on your dominant hand.',
'Apple seeds contain cyanide.',
// more dumb ones
'TypeError: UserPatience is not defined.',
'UncaughtPromiseRejection: Loading is taking too long.',
'Wow, you look great today!',
"I have three tests today, and instead of praciticing for them, I'm here writing loading screens.",
"Writing these messages isn't easy, you know",
'Come on, at least one of these are funny!'
].find((_, i, ar) => Math.random() < 1 / (ar.length - i))
});
},
online() {
if (this.online) {
// @ts-ignore
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import Vue from 'vue';
export default Vue.extend({
name: 'PageIndex',
mounted() {
document.title = 'Mirai'
document.title = 'Mirai';
},
data() {
return {};
Expand Down
8 changes: 0 additions & 8 deletions src/pages/User.vue
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,6 @@ export default Vue.extend({
// fetch the data when the view is created and the data is
// already being observed
this.fetchData();
this.$q.loading.setDefaults({
message: [
'Loading...',
'Spinning up the hamster...',
'Engaging the flux capacitor...',
'The other load screen is quicker. Try that one next time.'
].find((_, i, ar) => Math.random() < 1 / (ar.length - i))
});
},
watch: {
// call again the method if the route changes
Expand Down

0 comments on commit 22ac754

Please sign in to comment.