Skip to content

Commit 2340c1c

Browse files
author
Leonix
committed
Webasyst Framework v.3.0.1
* Added a link, pointing to the Webasyst ID profile, to the user’s drop-down menu. * Made improvements to the Webasyst 2 interface and fixed a few found bugs. * Improved support for the latest PHP versions. * For developers: * Added a new template helper {$wa->headerSingleAppUser()} to be used instead of the default navigation menu helper {$wa->header()} in the single-app mode https://developers.webasyst.com/docs/cookbook/single-app-mode/
1 parent 2f72a15 commit 2340c1c

File tree

11 files changed

+41
-10
lines changed

11 files changed

+41
-10
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
'description' => 'Install new apps from the Webasyst Store',
55
'icon' => 'img/installer.svg',
66
'mobile' => false,
7-
'version' => '3.0.1', // developer preview
7+
'version' => '3.0.1',
88
'critical' => '3.0.1',
99
'system' => true,
1010
'vendor' => 'webasyst',

wa-content/css/wa/wa-2.0.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,9 +796,10 @@ input.state-caution, textarea.state-caution, select.state-caution, .wa-select.st
796796
#wa-header #wa-header-user-area #wa-userprofile { position: relative; border-bottom: 0 none;}
797797
#wa-header #wa-header-user-area #wa-userprofile.is-opened::before { position: absolute; top: 0; right: 0; bottom: 0; width: 115px; content: ''; }
798798
#wa-header #wa-header-user-area #wa-notifications-dropdown { z-index: 1;}
799-
#wa-header #wa-userprofile .dropdown-body { width: 300px; background: var(--background-color); }
799+
#wa-header #wa-userprofile .dropdown-body { width: 300px; background: var(--background-color); box-shadow: 0 10px 25px -10px var(--drawer-shadow-color); }
800800
#wa-header #wa-userprofile .dropdown-body .bricks > .brick { width: calc(33% - 2.25rem); text-align: center; font-size: 0.75rem; }
801801
#wa-header #wa-userprofile .dropdown-body .bricks > .brick > .icon { margin: 0.125em auto 0.25em; }
802+
#wa-header #wa-userprofile .dropdown-body .webasyst-id-button { color: var(--bricks-link-color-selected); background: var(--bricks-background-color-selected); border-radius: 0.75rem; }
802803

803804
#wa-nav ~ .wa-header-background { display: none;}
804805
#wa-nav.wa-nav-unfolded ~ .wa-header-background { display: block; position: fixed; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.2); top: 0; left: 0; z-index: 999; }

wa-content/js/jquery-wa/wa.header.singleapp.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
if (typeof WaHeaderSingleApp === 'undefined') {
2+
3+
window.WaHeaderSingleApp = (function() {
4+
15
class WaHeaderSingleApp {
26
constructor() {
37
// Variables
@@ -49,3 +53,9 @@ class WaHeaderSingleApp {
4953
});
5054
}
5155
}
56+
57+
return WaHeaderSingleApp;
58+
59+
}());
60+
61+
}

wa-system/design/templates/Design.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ <h3 class="dialog-header">[s`Upload theme`]</h3>
267267
}
268268

269269
function waDesignConfirm() {
270-
if ($("#wa-design-button").length && $('#wa-design-button').hasClass('yellow')) {
270+
if ($("#wa-design-button").length && $('#wa-design-button').hasClass('yellow') || $("#bb_submit").length && $('#bb_submit').hasClass('yellow') ) {
271271
if (!confirm("[s`Unsaved changes will be lost if you leave this page now. Are you sure?`]")) {
272272
return false;
273273
}

wa-system/plugin/templates/Plugins.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ <h5 class="heading custom-mt-12">[s`Installed`]</h5>
308308
let hash = $('.js-plugin-list').find('> li:first-child > a').attr('href');
309309
if (hash) {
310310
$.wa.setHash(hash);
311+
setTimeout(function() { $.plugins.dispatch(location.hash, true); }, 0);
311312
}
312313
return;
313314
}

wa-system/webasyst/lib/actions/backend/webasystBackend.actions.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public function defaultMobileAction()
2121
$this->view->assign('public_dashboards', $this->getPublicDashboards());
2222
$this->view->assign('counts', wa()->getStorage()->read('apps-count'));
2323
$this->view->assign($this->getCalendarData());
24+
$this->view->assign('is_user_connected_to_waid', !!(new waContactWaidModel())->get($this->getUserId()));
2425
$this->dashboardAction();
2526
}
2627

wa-system/webasyst/lib/actions/backend/webasystBackendHeader.action.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ public function execute()
123123
'current_domain' => $this->getCurrentDomain(),
124124
'app_info' => $app_info,
125125
'frontend_links' => $this->getFrontendLinks(),
126-
'custom_params' => $this->params['custom']
126+
'custom_params' => $this->params['custom'],
127+
'is_user_connected_to_waid' => !!(new waContactWaidModel())->get($user->getId()),
127128
] + $this->getCalendarData());
128129

129130
if ($this->single_app_mode) {
@@ -155,6 +156,7 @@ protected function executeSingleAppUserNavigation()
155156
'backend_url' => $backend_url,
156157
'request_uri' => $request_uri,
157158
'user' => $user,
159+
'is_user_connected_to_waid' => !!(new waContactWaidModel())->get($user->getId()),
158160
]);
159161

160162
$this->assignNotificationsData(['backend_header_notification' => $header_notification]);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
return array(
44
'name' => 'Webasyst',
55
'prefix' => 'webasyst',
6-
'version' => '3.0.1', // developer preview
6+
'version' => '3.0.1',
77
'critical' => '3.0.1',
88
'vendor' => 'webasyst',
99
'csrf' => true,
Binary file not shown.

wa-system/webasyst/locale/ru_RU/LC_MESSAGES/webasyst.po

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ msgid ""
22
msgstr ""
33
"Project-Id-Version: Webasyst\n"
44
"POT-Creation-Date: \n"
5-
"PO-Revision-Date: 2024-05-16 15:13+0300\n"
5+
"PO-Revision-Date: 2024-05-21 11:40+0300\n"
66
"Last-Translator: \n"
77
"Language-Team: \n"
88
"Language: ru_RU\n"
@@ -6963,3 +6963,9 @@ msgstr "Возникла неизвестная ошибка. Обновите
69636963

69646964
msgid "Plugins for %s"
69656965
msgstr "Плагины для %s"
6966+
6967+
msgid "https://www.webasyst.com/my/"
6968+
msgstr "https://www.webasyst.ru/my/"
6969+
6970+
msgid "My Webasyst ID"
6971+
msgstr "Мой Webasyst ID"

wa-system/webasyst/templates/actions/backend/BackendHeaderCurrentUser.inc.html

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,33 @@
5353
<div class="dropdown-body{if empty($dropdown_body_left)} right{/if}">
5454
<div class="bricks custom-mt-12">
5555
{if empty($without_link_profile)}
56-
<a class="brick" href="{$backend_url}?module=profile">
56+
<a class="brick selected" href="{$backend_url}?module=profile">
5757
<span class="icon"><i class="userpic size-24" style="background-image: url('{$user->getPhoto(96)}');"></i></span>
5858
<span>[s`Profile`]</span>
5959
</a>
6060
{/if}
61-
<a href="javascript:void(0)" class="brick" data-wa-mode-toggle>
61+
<a href="javascript:void(0)" class="brick selected" data-wa-mode-toggle>
6262
<span class="icon"><i class="fas fa-adjust"></i></span>
6363
<span>[s`Mode`]</span>
6464
</a>
65-
<a href="{$backend_url}?action=logout" class="brick">
65+
<a href="{$backend_url}?action=logout" class="brick selected">
6666
<span class="icon"><i class="fas fa-sign-out-alt"></i></span>
6767
<span>[s`Logout`]</span>
6868
</a>
6969
</div>
70+
71+
{if $is_user_connected_to_waid}
72+
<div class="custom-pb-12 custom-px-12">
73+
<a href="[s`https://www.webasyst.com/my/`]" target="_blank" class="button white full-width smaller webasyst-id-button"><i class="icon webasyst-magic-wand custom-mr-8"></i>[s`My Webasyst ID`]</a>
74+
</div>
75+
{/if}
76+
7077
{if $change_status_access}
7178
<div class="blank custom-pt-12 custom-pb-4">
72-
<h5 class="heading">{sprintf('[s`Status for %s`]', $smarty.now|wa_datetime:'humandate')}</h5>
79+
<h5 class="heading flexbox">
80+
<span class="wide nowrap">{sprintf('[s`Status for %s`]', $smarty.now|wa_datetime:'humandate')}</span>
81+
<a href="{$backend_url}team/calendar/" class="button smaller light-gray rounded bold">[s`Calendar`]</a>
82+
</h5>
7383
<ul id="js-user-dropdown-menu" class="menu custom-mb-0">
7484
<li class="{if !$current_status}hidden{/if}" data-action-id="delete">
7585
<a href="javascript:void(0)">

0 commit comments

Comments
 (0)