chore: Clarify usage of window fields in UIWindowRefer.js

/puter/src/UI/UIWindowRefer.js
  25:20  error  'gui_origin' is not defined  no-undef
  25:37  error  'user' is not defined        no-undef
  73:30  error  'socialLink' is not defined  no-undef
This commit is contained in:
Sam Atkins 2024-05-01 17:15:38 +01:00
parent 130b57b986
commit e5d4be6250

View File

@ -22,7 +22,7 @@ import UIPopover from './UIPopover.js'
async function UIWindowRefer(options){ async function UIWindowRefer(options){
let h = ''; let h = '';
const url = `${gui_origin}/?r=${user.referral_code}`; const url = `${window.gui_origin}/?r=${window.user.referral_code}`;
h += `<div>`; h += `<div>`;
h += `<div class="qr-code-window-close-btn generic-close-window-button disable-user-select"> &times; </div>`; h += `<div class="qr-code-window-close-btn generic-close-window-button disable-user-select"> &times; </div>`;
@ -70,7 +70,7 @@ async function UIWindowRefer(options){
$(el_window).find('.window-body .downloadable-link').val(url); $(el_window).find('.window-body .downloadable-link').val(url);
$(el_window).find('.window-body .share-copy-link-on-social').on('click', function(e){ $(el_window).find('.window-body .share-copy-link-on-social').on('click', function(e){
const social_links = socialLink({url: url, title: i18n('refer_friends_social_media_c2a'), description: i18n('refer_friends_social_media_c2a')}); const social_links = window.socialLink({url: url, title: i18n('refer_friends_social_media_c2a'), description: i18n('refer_friends_social_media_c2a')});
let social_links_html = ``; let social_links_html = ``;
social_links_html += `<div style="padding: 10px;">`; social_links_html += `<div style="padding: 10px;">`;