From 693e1f9eb7c348473702fbde450b17edffe50ca2 Mon Sep 17 00:00:00 2001 From: Ben Arc Date: Tue, 20 Apr 2021 14:36:59 +0100 Subject: [PATCH] localstorage paneltest --- .../copilot/templates/copilot/index.html | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lnbits/extensions/copilot/templates/copilot/index.html b/lnbits/extensions/copilot/templates/copilot/index.html index 94614aa1..f19cbfcc 100644 --- a/lnbits/extensions/copilot/templates/copilot/index.html +++ b/lnbits/extensions/copilot/templates/copilot/index.html @@ -75,9 +75,7 @@ size="xs" icon="apps" :color="($q.dark.isActive) ? 'grey-7' : 'grey-5'" - type="a" - :href="props.row.displayPanelUrl" - target="_blank" + @click="openCopilotPanel(props.row.id)" > Panel @@ -89,7 +87,7 @@ size="xs" icon="face" :color="($q.dark.isActive) ? 'grey-7' : 'grey-5'" - @click="opencopilotCompose(props.row.id)" + @click="openCopilotCompose(props.row.id)" > Compose window @@ -512,7 +510,7 @@ LNbits.utils.notifyApiError(error) }) }, - opencopilotCompose: function (copilot_id) { + openCopilotCompose: function (copilot_id) { localStorage.setItem( 'copilot', JSON.stringify(this.getCopilot(copilot_id)) @@ -521,7 +519,15 @@ 'scrollbars=no, resizable=no,status=no,location=no,toolbar=no,menubar=no,width=1722,height=972,left=200,top=200' open('../copilot/cp/', 'test', params) }, - + openCopilotPanel: function (copilot_id) { + localStorage.setItem( + 'copilot', + JSON.stringify(this.getCopilot(copilot_id)) + ) + let params = + 'scrollbars=no, resizable=no,status=no,location=no,toolbar=no,menubar=no,width=1722,height=972,left=200,top=200' + open('../copilot/pn/', 'test', params) + }, deleteCopilotLink: function (chargeId) { var self = this var link = _.findWhere(this.CopilotLinks, {id: chargeId})