diff options
| author | neobooru | 2019-07-24 16:42:37 +0200 |
|---|---|---|
| committer | neobooru | 2019-07-24 16:42:37 +0200 |
| commit | 0839dafd34bc96d9687a5e955153f66e2c464c23 (patch) | |
| tree | 2c93f72eb21b709d5486037fbd4c9bc329dfe9a4 | |
| parent | 9a9a47503730460b5c01707dbc0f91d3eb7af0d3 (diff) | |
client/auth: call tags.refreshCategoryColorMap() after login
When the tag category list permission is not anonymous the category colors fail to load if you are not logged in, and because the page doesn't reload (SPA) the tag colors are still broken after logging in. Manually calling refreshCategoryColorMap after logging in solves this issue.
| -rw-r--r-- | client/js/controllers/auth_controller.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/client/js/controllers/auth_controller.js b/client/js/controllers/auth_controller.js index 2838e53..bec4b7a 100644 --- a/client/js/controllers/auth_controller.js +++ b/client/js/controllers/auth_controller.js @@ -2,6 +2,7 @@ const router = require('../router.js'); const api = require('../api.js'); +const tags = require('../tags.js'); const uri = require('../util/uri.js'); const topNavigation = require('../models/top_navigation.js'); const LoginView = require('../views/login_view.js'); @@ -24,6 +25,8 @@ class LoginController { .then(() => { const ctx = router.show(uri.formatClientLink()); ctx.controller.showSuccess('Logged in'); + // reload tag category color map, this is required when `tag_categories:list` has a permission other than anonymous + tags.refreshCategoryColorMap(); }, error => { this._loginView.showError(error.message); this._loginView.enableForm(); |