Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug info #313

Merged
merged 3 commits into from
Nov 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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