refactor: use alerts module

This commit is contained in:
Barış Soner Uşaklı
2021-12-06 12:45:35 -05:00
parent 8cbe0df2e5
commit 1980feed46
22 changed files with 112 additions and 96 deletions

View File

@@ -9,7 +9,8 @@ define('forum/topic/threadTools', [
'api',
'hooks',
'bootbox',
], function (components, translator, handleBack, posts, api, hooks, bootbox) {
'alerts',
], function (components, translator, handleBack, posts, api, hooks, bootbox, alerts) {
const ThreadTools = {};
ThreadTools.init = function (tid, topicContainer) {
@@ -149,7 +150,7 @@ define('forum/topic/threadTools', [
setFollowState(type);
app.alert({
alerts.alert({
alert_id: 'follow_thread',
message: message,
type: 'success',
@@ -158,7 +159,7 @@ define('forum/topic/threadTools', [
hooks.fire('action:topics.changeWatching', { tid: tid, type: type });
}, () => {
app.alert({
alerts.alert({
type: 'danger',
alert_id: 'topic_follow',
title: '[[global:please_log_in]]',