Skip to content

Commit e530775

Browse files
author
Leonid Vakulenko
committed
Webasyst Framework v.3.8.2 (developer preview)
1 parent b79a7f6 commit e530775

File tree

12 files changed

+89
-27
lines changed

12 files changed

+89
-27
lines changed

wa-apps/installer/lib/config/app.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
'description' => 'Install new apps from the Webasyst Store',
55
'icon' => 'img/installer.svg',
66
'mobile' => false,
7-
'version' => '3.8.1',
8-
'critical' => '3.8.1',
7+
'version' => '3.8.2', // developer preview
8+
'critical' => '3.8.2',
99
'system' => true,
1010
'vendor' => 'webasyst',
1111
'csrf' => true,

wa-content/js/jquery-wa/wa.elrte.ace.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ function waEditorAceInit(options)
154154
$(window).resize(function() {
155155
wa_editor.resize();
156156
});
157+
158+
return wa_editor;
157159
}
158160

159161
function waEditorUpdateSource(options) {

wa-content/js/jquery-wa/wa.js

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2391,7 +2391,7 @@
23912391
that.is_click = that.options.trigger === 'click' || that.$wrapper.getAttribute('data-wa-tooltip-trigger') === 'click' || false;
23922392
that.icon = that.options.icon || that.$wrapper.getAttribute('data-wa-tooltip-icon') || false;
23932393
that.template = that.options.template || that.$wrapper.getAttribute('data-wa-tooltip-template') || false
2394-
2394+
that.tippy = {};
23952395
that.wa_url = window.wa_url || '/';
23962396

23972397
//
@@ -2400,15 +2400,24 @@
24002400
that.options.allowHTML = true;
24012401
}
24022402

2403+
that._promise = new Promise((resolve, reject) => {
2404+
that._resolve = resolve;
2405+
that._reject = reject;
2406+
});
2407+
24032408
// INIT
24042409
if (window.Popper && window.tippy) {
24052410
that.init()
24062411
} else {
24072412
// DYNAMIC LOAD SOURCE
24082413
(async () => {
2409-
await import(`${that.wa_url}wa-content/js/tippy/popper.min.js`).then((async () => {
2410-
await import(`${that.wa_url}wa-content/js/tippy/wa.tooltip.js`).then(() => that.init())
2411-
}))
2414+
try {
2415+
await import(`${that.wa_url}wa-content/js/tippy/popper.min.js`)
2416+
await import(`${that.wa_url}wa-content/js/tippy/wa.tooltip.js`)
2417+
that.init()
2418+
} catch (error) {
2419+
that._reject(error);
2420+
}
24122421
})()
24132422
}
24142423
}
@@ -2419,6 +2428,8 @@
24192428
that.options.onCreate = function (tooltip) {
24202429
that.setIcon(tooltip);
24212430
that.setClass(tooltip);
2431+
2432+
that.tippy = tooltip;
24222433
}
24232434

24242435
that.setContent();
@@ -2428,10 +2439,13 @@
24282439

24292440
/* remove tooltip without text*/
24302441
if (!tooltip.popper.innerText) {
2431-
tooltip.destroy()
2442+
tooltip.destroy();
2443+
return;
24322444
}
24332445

2434-
that.$wrapper.dataset.tooltip = tooltip;
2446+
that.tippy = tooltip;
2447+
2448+
that._resolve(that.tippy);
24352449
};
24362450

24372451
Tooltip.prototype.setContent = function () {

wa-system/auth/adapters/vkontakteAuth.class.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<?php
22

33
/**
4-
* @see https://id.vk.com/about/business/go/docs/ru/vkid/latest/vk-id/connection/api-integration/api-description
4+
* @see https://id.vk.ru/about/business/go/docs/ru/vkid/latest/vk-id/connection/api-integration/api-description
55
*/
66
class vkontakteAuth extends waOAuth2Adapter
77
{
8-
const OAUTH_URL = "https://id.vk.com/";
8+
const OAUTH_URL = "https://id.vk.ru/";
99

1010
protected $check_state = true;
1111

1212
/**
1313
* @return string
14-
* @see http://vk.com/dev/oauth_dialog
14+
* @see http://vk.ru/dev/oauth_dialog
1515
*/
1616
public function getRedirectUri()
1717
{
@@ -122,7 +122,7 @@ public function getUserData($token)
122122

123123
public function getName()
124124
{
125-
return wa()->getLocale() == 'en_US' ? 'VK' : 'ВКонтакте';
125+
return wa()->getLocale() == 'en_US' ? 'VK' : 'VK';
126126
}
127127

128128
protected function generateCodeChallenge()

wa-system/contact/data/fields.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,23 +71,24 @@
7171
'multi' => true,
7272
'type' => 'IM',
7373
'ext' => array(
74-
'whatsapp' => 'WhatsApp',
74+
'vk' => 'VK Messenger',
7575
'telegram' => 'Telegram',
76-
'skype' => 'Skype',
76+
'max' => 'MAX',
77+
'whatsapp' => 'WhatsApp',
7778
'viber' => 'Viber',
7879
'facebook' => 'Facebook Messenger',
79-
'discord' => 'Discord',
80-
'slack' => 'Slack',
8180
'wechat' => 'WeChat',
81+
'qq' => 'QQ',
82+
'line' => 'Line',
8283
'signal' => 'Signal',
84+
'skype' => 'Skype',
85+
'discord' => 'Discord',
86+
'slack' => 'Slack',
8387
'imessage' => 'iMessage',
84-
'line' => 'Line',
85-
'qq' => 'QQ',
86-
'icq' => 'ICQ'
8788
),
8889
'formats' => array(
89-
'top' => new waContactIMTopFormatter(),
90-
'js' => new waContactIMJSFormatter()
90+
'top' => new waContactIMTopFormatter(),
91+
'js' => new waContactIMJSFormatter()
9192
),
9293
'top' => true
9394
)),

wa-system/design/templates/DesignEdit.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ <h4 class="custom-my-0">
255255
options.height = h;
256256
}
257257

258-
waEditorAceInit(options);
258+
const wa_editor = waEditorAceInit(options);
259259

260260
const $design_form = $("#wa-design-form");
261261

wa-system/exception/waDbException.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function __construct($message = '', $code = 500, $previous = null)
1919
{
2020
$this->real_message = $new_message = $message;
2121
if (!waSystemConfig::isDebug() && !defined('WA_TEST_ENVIRONMENT')) {
22-
$new_message = "Database error. See log for details.";
22+
$new_message = _ws('Database error. See log files for details.');
2323
}
2424
parent::__construct($new_message, $code, $previous);
2525
if (!waConfig::get('disable_exception_log')) {

wa-system/view/waViewHelper.class.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,15 @@ function gtag(){dataLayer.push(arguments);}
322322
$html .= $this->getCachedFrontAnnouncements();
323323
}
324324

325+
if ($this->getEnv() == 'frontend') {
326+
$params = ['domain' => $domain];
327+
$event_result = wa()->event([wa()->getApp(), 'wa.frontend_head'], $params);
328+
foreach ($event_result as $_result) {
329+
$html .= $_result;
330+
}
331+
unset($_result);
332+
}
333+
325334
return $html;
326335
}
327336

wa-system/webasyst/lib/config/app.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
return array(
44
'name' => 'Webasyst',
55
'prefix' => 'webasyst',
6-
'version' => '3.8.1',
7-
'critical' => '3.8.1',
6+
'version' => '3.8.2', // developer preview
7+
'critical' => '3.8.2',
88
'vendor' => 'webasyst',
99
'csrf' => true,
1010
'header_items' => array(
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
$_im_field = waContactFields::get('im');
4+
if ($_im_field instanceof waContactStringField) {
5+
$_ext_variants = $_im_field->getParameter('ext');
6+
if (is_array($_ext_variants)) {
7+
$_ext_variants = array_merge([
8+
'vk' => 'VK Messenger',
9+
'telegram' => 'Telegram',
10+
'max' => 'MAX',
11+
'whatsapp' => 'WhatsApp',
12+
'viber' => 'Viber',
13+
'facebook' => 'Facebook Messenger',
14+
'wechat' => 'WeChat',
15+
'qq' => 'QQ',
16+
'line' => 'Line',
17+
'signal' => 'Signal',
18+
'skype' => 'Skype',
19+
'discord' => 'Discord',
20+
'slack' => 'Slack',
21+
], $_ext_variants);
22+
$_ext_variants['vk'] = 'VK Messenger';
23+
$_im_field->setParameter('ext', $_ext_variants);
24+
try {
25+
waContactFields::updateField($_im_field);
26+
} catch (waException $e) {
27+
waLog::log($e->getMessage());
28+
}
29+
}
30+
}

0 commit comments

Comments
 (0)