Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authordizzy <diosmosis@users.noreply.github.com>2022-08-17 11:27:43 +0300
committerGitHub <noreply@github.com>2022-08-17 11:27:43 +0300
commite3655d38f78b6a2a027c1f35f70ce4cbe29d101b (patch)
treed9e8b1831ab49489cbcdac82ea299dbca3728f3d /core
parenta9231fddb874d3794593fe27374f3e98139b1fd5 (diff)
[Vue] remove use of angularjs from TwoFactorAuth plugin (#19382)
* convert twig templates using directives to vue components, remove angularjs adapters and modify less styles that use directive attribute names * built vue files * move use of angularjs directives in TwoFactorAuth twig templates to new vue components and add vue component for Logins formErrors.twig template * built vue files * add missing translations * fixing UI tests * more UI test fixex * remove reference to nonexistant JS file * updated expected screenshots * fixing ui test failures * update expected screenshots * fixing ui test failures * fix select on focus use * fix placement of computed property * fixing ui test issues * prevent random failure * make sure Login plugin UMD is always loaded * formErrors is an object if supplied * compile vue entry components in reset API response and modify check for success * rebuild login * update expected screenshot * remove unneeded use of html_attr escape * remove use of html_attr and remove duplicate client side translation token entries * sort used js translations and remove duplicates * Update plugins/TwoFactorAuth/vue/src/LoginTwoFactorAuth/LoginTwoFactorAuth.vue Co-authored-by: Stefan Giehl <stefan@matomo.org> * Update plugins/TwoFactorAuth/vue/src/UserSettings/UserSettings.vue Co-authored-by: Stefan Giehl <stefan@matomo.org> * Update plugins/TwoFactorAuth/vue/src/ShowRecoveryCodes/ShowRecoveryCodesPage.vue Co-authored-by: Stefan Giehl <stefan@matomo.org> * Update plugins/TwoFactorAuth/vue/src/SetupFinished/SetupFinished.vue Co-authored-by: Stefan Giehl <stefan@matomo.org> * built vue files * adds missing sanitize * fix AssetManagerTest * try to fix issue with umd asset fetching if Login not loaded * cs * updates expected test files Co-authored-by: sgiehl <stefan@matomo.org>
Diffstat (limited to 'core')
-rw-r--r--core/AssetManager/UIAssetFetcher/PluginUmdAssetFetcher.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/core/AssetManager/UIAssetFetcher/PluginUmdAssetFetcher.php b/core/AssetManager/UIAssetFetcher/PluginUmdAssetFetcher.php
index bfd73ca039..c108c7197b 100644
--- a/core/AssetManager/UIAssetFetcher/PluginUmdAssetFetcher.php
+++ b/core/AssetManager/UIAssetFetcher/PluginUmdAssetFetcher.php
@@ -94,7 +94,7 @@ class PluginUmdAssetFetcher extends UIAssetFetcher
private function getAllPluginUmds()
{
- $plugins = self::orderPluginsByPluginDependencies($this->plugins, false);
+ $plugins = self::orderPluginsByPluginDependencies($this->getPluginsWithUmdsToUse(), false);
$allPluginUmds = [];
foreach ($plugins as $plugin) {
@@ -142,7 +142,8 @@ class PluginUmdAssetFetcher extends UIAssetFetcher
protected function retrieveFileLocations()
{
- if (empty($this->plugins)) {
+ $plugins = $this->getPluginsWithUmdsToUse();
+ if (empty($plugins)) {
return;
}
@@ -169,7 +170,7 @@ class PluginUmdAssetFetcher extends UIAssetFetcher
}
// either loadFilesIndividually = true, or being called w/ disable_merged_assets=1
- $this->addUmdFilesIfDetected($this->plugins);
+ $this->addUmdFilesIfDetected($this->getPluginsWithUmdsToUse());
}
private function addUmdFilesIfDetected($plugins)
@@ -309,4 +310,13 @@ class PluginUmdAssetFetcher extends UIAssetFetcher
{
return (int)(Config::getInstance()->General['assets_umd_chunk_count'] ?? 3);
}
+
+ private function getPluginsWithUmdsToUse()
+ {
+ $plugins = $this->plugins;
+ // Login UMDs must always be used, even if there's another login plugin being used
+ $plugins[] = 'Login';
+ $plugins = array_unique($plugins);
+ return $plugins;
+ }
} \ No newline at end of file