Skip to content

Commit

Permalink
Debug info (#313)
Browse files Browse the repository at this point in the history
* fix(Archived Messages): FIxes badge used for archived messages

* feat(Console): Debug info & warning
  • Loading branch information
Matt Wisniewski committed Nov 25, 2021
1 parent 2f8b877 commit bef9485
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions pages/auth/unlock/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,61 @@ export default Vue.extend({
},
},
mounted() {
// This information can be useful for users to help us find and report bugs.
console.clear()
console.log(
'%c⚠️ Do not share anything from console with others. Do not run commands sent by others online.',
'font-family: Space Mono; color:white; background: #e67e22; border-radius: 2px; padding: 0.5rem;border-right: none;',
)
console.log(
'%c🪲 The following info however can be useful for bug reporting. Click the tag below to show more details.',
'font-family: Space Mono; color:white; background: #2c3e50; border-radius: 2px; padding: 0.5rem;border-right: none;',
)
console.groupCollapsed('%c🛰 Satellite.im%cℹ',
'font-family: Space Mono; color:white; background: #34495e; border-radius: 2px 0 0 2px; padding: 0.1rem 0.5rem;border-right: none;',
'color:white; background: #3498db;border-radius: 0 2px 2px 0; padding: 0.1rem 0.5rem; border-left: none;',)
console.log(
`%c${this.$config.clientVersion} %cPre-Alpha`,
'font-family: Space Mono; color:white; background: #34495e; border-radius: 2px 0 0 2px; padding: 0.1rem 0.5rem;border-right: none;',
'color:white; background: #9b59b6;border-radius: 0 2px 2px 0; padding: 0.1rem 0.5rem; border-left: none;',
)
console.log(
`%cBrowser %c${navigator.vendor}, ${navigator.product}`,
'font-family: Space Mono; color:white; background: #34495e; border-radius: 2px 0 0 2px; padding: 0.1rem 0.5rem;border-right: none;',
'color:white; background: #9b59b6;border-radius: 0 2px 2px 0; padding: 0.1rem 0.5rem; border-left: none;',
)
console.log(
`%cLanguage%c${navigator.language}`,
'font-family: Space Mono; color:white; background: #34495e; border-radius: 2px 0 0 2px; padding: 0.1rem 0.5rem;border-right: none;',
'color:white; background: #9b59b6;border-radius: 0 2px 2px 0; padding: 0.1rem 0.5rem; border-left: none;',
)
console.log(
`%cPlatform%c${navigator.platform}`,
'font-family: Space Mono; color:white; background: #34495e; border-radius: 2px 0 0 2px; padding: 0.1rem 0.5rem;border-right: none;',
'color:white; background: #9b59b6;border-radius: 0 2px 2px 0; padding: 0.1rem 0.5rem; border-left: none;',
)
if (navigator.onLine) {
console.log(
`%cNetwork %cConnected`,
'font-family: Space Mono; color:white; background: #34495e; border-radius: 2px 0 0 2px; padding: 0.1rem 0.5rem;border-right: none;',
'color:white; background: #2ecc71; border-radius: 0 2px 2px 0; padding: 0.1rem 0.5rem; border-left: none;',
)
} else {
console.log(
`%cNetwork %cOffline`,
'font-family: Space Mono; color:white; background: #34495e; border-radius: 2px 0 0 2px; padding: 0.1rem 0.5rem;border-right: none;',
'color:white; background: #e74c3c; border-radius: 0 2px 2px 0; padding: 0.1rem 0.5rem; border-left: none;',
)
}
console.groupCollapsed(
`%c📦 Open State`,
'font-family: Space Mono; color: #222; background: #f1c40f; border-radius: 2px; padding: 0.1rem 0.5rem;border-right: none;',
)
console.log(this.$store.state)
console.groupEnd()
console.groupEnd()
this.$store.commit('accounts/lock')
this.$store.commit('prerequisites/resetState')
},
Expand Down

0 comments on commit bef9485

Please sign in to comment.