Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
shrpne committed Jun 15, 2023
1 parent 42efc93 commit 26921a9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion middleware/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function({app, store, route, redirect, error}) {
}
}
if (urlPublic) {
console.log('-- allow: embed');
console.log('-- allow: public');
return Promise.resolve();
}
if (urlHasPreview) {
Expand Down
2 changes: 2 additions & 0 deletions plugins/telegram-web-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {TWA_SCRIPT_URL, TWA_SCRIPT_HASH} from '~/assets/variables.js';
import {sendAddress as _sendAddress} from '~/api/telegram.js';

export default ({ app, store }) => {
console.log(window.location.hash);
const isTWA = !!window.parent?.TelegramWebviewProxy;
// const isIframe = window.parent != null && window !== window.parent && window.parent.location.hostname !== 'honee.app';
if (!isTWA) {
Expand All @@ -24,6 +25,7 @@ export default ({ app, store }) => {
document.body.appendChild(script);

function init() {
console.log(window.location.hash);
console.log(window.Telegram.WebApp);
console.log(JSON.stringify(window.Telegram.WebApp));
resolveLoad(window.Telegram.WebApp);
Expand Down
1 change: 1 addition & 0 deletions plugins/telegram.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {IS_SUBAPP_MEGAGAMER} from '~/assets/variables.js';

export default ({ app, store }) => {
store.subscribe((mutation) => {
console.log('mutation', mutation.type);
if (mutation.type === 'LOGOUT') {
// remove old data on logout
store.dispatch('telegram/reset');
Expand Down

0 comments on commit 26921a9

Please sign in to comment.