diff --git a/app/routes/discourse.rb b/app/routes/discourse.rb index 0e3214f..f9fb23d 100644 --- a/app/routes/discourse.rb +++ b/app/routes/discourse.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true Discourse::Application.routes.append do - mount ::DiscourseChatIntegration::AdminEngine, at: '/admin/plugins/chat', constraints: AdminConstraint.new + mount ::DiscourseChatIntegration::AdminEngine, at: '/admin/plugins/chat-integration', constraints: AdminConstraint.new mount ::DiscourseChatIntegration::PublicEngine, at: '/chat-transcript/', as: 'chat-transcript' mount ::DiscourseChatIntegration::Provider::HookEngine, at: '/chat-integration/' diff --git a/assets/javascripts/admin/adapters/channel.js.es6 b/assets/javascripts/admin/adapters/channel.js.es6 index e100dde..2fe5f04 100644 --- a/assets/javascripts/admin/adapters/channel.js.es6 +++ b/assets/javascripts/admin/adapters/channel.js.es6 @@ -1,3 +1,3 @@ import buildPluginAdapter from "admin/adapters/build-plugin"; -export default buildPluginAdapter("chat"); +export default buildPluginAdapter("chat-integration"); diff --git a/assets/javascripts/admin/adapters/provider.js.es6 b/assets/javascripts/admin/adapters/provider.js.es6 index e100dde..2fe5f04 100644 --- a/assets/javascripts/admin/adapters/provider.js.es6 +++ b/assets/javascripts/admin/adapters/provider.js.es6 @@ -1,3 +1,3 @@ import buildPluginAdapter from "admin/adapters/build-plugin"; -export default buildPluginAdapter("chat"); +export default buildPluginAdapter("chat-integration"); diff --git a/assets/javascripts/admin/adapters/rule.js.es6 b/assets/javascripts/admin/adapters/rule.js.es6 index e100dde..2fe5f04 100644 --- a/assets/javascripts/admin/adapters/rule.js.es6 +++ b/assets/javascripts/admin/adapters/rule.js.es6 @@ -1,3 +1,3 @@ import buildPluginAdapter from "admin/adapters/build-plugin"; -export default buildPluginAdapter("chat"); +export default buildPluginAdapter("chat-integration"); diff --git a/assets/javascripts/admin/chat-route-map.js.es6 b/assets/javascripts/admin/chat-integration-route-map.js.es6 similarity index 75% rename from assets/javascripts/admin/chat-route-map.js.es6 rename to assets/javascripts/admin/chat-integration-route-map.js.es6 index 201c5b6..786a660 100644 --- a/assets/javascripts/admin/chat-route-map.js.es6 +++ b/assets/javascripts/admin/chat-integration-route-map.js.es6 @@ -2,7 +2,7 @@ export default { resource: "admin.adminPlugins", path: "/plugins", map() { - this.route("chat", function () { + this.route("chat-integration", function () { this.route("provider", { path: "/:provider" }); }); }, diff --git a/assets/javascripts/admin/controllers/admin-plugins-chat-provider.js.es6 b/assets/javascripts/admin/controllers/admin-plugins-chat-integration-provider.js.es6 similarity index 79% rename from assets/javascripts/admin/controllers/admin-plugins-chat-provider.js.es6 rename to assets/javascripts/admin/controllers/admin-plugins-chat-integration-provider.js.es6 index a2176db..0e5176b 100644 --- a/assets/javascripts/admin/controllers/admin-plugins-chat-provider.js.es6 +++ b/assets/javascripts/admin/controllers/admin-plugins-chat-integration-provider.js.es6 @@ -29,7 +29,7 @@ export default Ember.Controller.extend({ provider: this.get("model.provider"), }; - showModal("admin-plugins-chat-edit-channel", { + showModal("admin-plugins-chat-integration-edit-channel", { model, admin: true, }); @@ -43,7 +43,7 @@ export default Ember.Controller.extend({ provider: this.get("model.provider"), }; - showModal("admin-plugins-chat-edit-channel", { + showModal("admin-plugins-chat-integration-edit-channel", { model, admin: true, }); @@ -51,7 +51,7 @@ export default Ember.Controller.extend({ testChannel(channel) { this.set("modalShowing", true); - showModal("admin-plugins-chat-test", { + showModal("admin-plugins-chat-integration-test", { model: { channel }, admin: true, }); @@ -70,7 +70,10 @@ export default Ember.Controller.extend({ groups: this.get("model.groups"), }; - showModal("admin-plugins-chat-edit-rule", { model, admin: true }); + showModal("admin-plugins-chat-integration-edit-rule", { + model, + admin: true, + }); }, editRuleWithChannel(rule, channel) { @@ -83,13 +86,16 @@ export default Ember.Controller.extend({ groups: this.get("model.groups"), }; - showModal("admin-plugins-chat-edit-rule", { model, admin: true }); + showModal("admin-plugins-chat-integration-edit-rule", { + model, + admin: true, + }); }, showError(channel) { this.set("modalShowing", true); - showModal("admin-plugins-chat-channel-error", { + showModal("admin-plugins-chat-integration-channel-error", { model: channel, admin: true, }); diff --git a/assets/javascripts/admin/controllers/admin-plugins-chat.js.es6 b/assets/javascripts/admin/controllers/admin-plugins-chat-integration.js.es6 similarity index 100% rename from assets/javascripts/admin/controllers/admin-plugins-chat.js.es6 rename to assets/javascripts/admin/controllers/admin-plugins-chat-integration.js.es6 diff --git a/assets/javascripts/admin/controllers/modals/admin-plugins-chat-edit-channel.js.es6 b/assets/javascripts/admin/controllers/modals/admin-plugins-chat-integration-edit-channel.js.es6 similarity index 100% rename from assets/javascripts/admin/controllers/modals/admin-plugins-chat-edit-channel.js.es6 rename to assets/javascripts/admin/controllers/modals/admin-plugins-chat-integration-edit-channel.js.es6 diff --git a/assets/javascripts/admin/controllers/modals/admin-plugins-chat-edit-rule.js.es6 b/assets/javascripts/admin/controllers/modals/admin-plugins-chat-integration-edit-rule.js.es6 similarity index 100% rename from assets/javascripts/admin/controllers/modals/admin-plugins-chat-edit-rule.js.es6 rename to assets/javascripts/admin/controllers/modals/admin-plugins-chat-integration-edit-rule.js.es6 diff --git a/assets/javascripts/admin/controllers/modals/admin-plugins-chat-test.js.es6 b/assets/javascripts/admin/controllers/modals/admin-plugins-chat-integration-test.js.es6 similarity index 95% rename from assets/javascripts/admin/controllers/modals/admin-plugins-chat-test.js.es6 rename to assets/javascripts/admin/controllers/modals/admin-plugins-chat-integration-test.js.es6 index 3f93954..eaee5e2 100644 --- a/assets/javascripts/admin/controllers/modals/admin-plugins-chat-test.js.es6 +++ b/assets/javascripts/admin/controllers/modals/admin-plugins-chat-integration-test.js.es6 @@ -28,7 +28,7 @@ export default Ember.Controller.extend(ModalFunctionality, { } this.set("loading", true); - ajax("/admin/plugins/chat/test", { + ajax("/admin/plugins/chat-integration/test", { data: { channel_id: this.get("model.channel.id"), topic_id: this.get("model.topic_id"), diff --git a/assets/javascripts/admin/routes/admin-plugins-chat-index.js.es6 b/assets/javascripts/admin/routes/admin-plugins-chat-integration-index.js.es6 similarity index 82% rename from assets/javascripts/admin/routes/admin-plugins-chat-index.js.es6 rename to assets/javascripts/admin/routes/admin-plugins-chat-integration-index.js.es6 index a07721a..f530ff8 100644 --- a/assets/javascripts/admin/routes/admin-plugins-chat-index.js.es6 +++ b/assets/javascripts/admin/routes/admin-plugins-chat-integration-index.js.es6 @@ -4,7 +4,7 @@ export default DiscourseRoute.extend({ afterModel(model) { if (model.totalRows > 0) { this.transitionTo( - "adminPlugins.chat.provider", + "adminPlugins.chat-integration.provider", model.get("firstObject").name ); } diff --git a/assets/javascripts/admin/routes/admin-plugins-chat-provider.js.es6 b/assets/javascripts/admin/routes/admin-plugins-chat-integration-provider.js.es6 similarity index 94% rename from assets/javascripts/admin/routes/admin-plugins-chat-provider.js.es6 rename to assets/javascripts/admin/routes/admin-plugins-chat-integration-provider.js.es6 index 9f347a8..cbc1d85 100644 --- a/assets/javascripts/admin/routes/admin-plugins-chat-provider.js.es6 +++ b/assets/javascripts/admin/routes/admin-plugins-chat-integration-provider.js.es6 @@ -5,7 +5,7 @@ export default DiscourseRoute.extend({ model(params) { return Ember.RSVP.hash({ channels: this.store.findAll("channel", { provider: params.provider }), - provider: this.modelFor("admin-plugins-chat").findBy( + provider: this.modelFor("admin-plugins-chat-integration").findBy( "id", params.provider ), diff --git a/assets/javascripts/admin/routes/admin-plugins-chat.js.es6 b/assets/javascripts/admin/routes/admin-plugins-chat-integration.js.es6 similarity index 100% rename from assets/javascripts/admin/routes/admin-plugins-chat.js.es6 rename to assets/javascripts/admin/routes/admin-plugins-chat-integration.js.es6 diff --git a/assets/javascripts/admin/templates/modal/admin-plugins-chat-channel-error.hbs b/assets/javascripts/admin/templates/modal/admin-plugins-chat-integration-channel-error.hbs similarity index 100% rename from assets/javascripts/admin/templates/modal/admin-plugins-chat-channel-error.hbs rename to assets/javascripts/admin/templates/modal/admin-plugins-chat-integration-channel-error.hbs diff --git a/assets/javascripts/admin/templates/modal/admin-plugins-chat-edit-channel.hbs b/assets/javascripts/admin/templates/modal/admin-plugins-chat-integration-edit-channel.hbs similarity index 100% rename from assets/javascripts/admin/templates/modal/admin-plugins-chat-edit-channel.hbs rename to assets/javascripts/admin/templates/modal/admin-plugins-chat-integration-edit-channel.hbs diff --git a/assets/javascripts/admin/templates/modal/admin-plugins-chat-edit-rule.hbs b/assets/javascripts/admin/templates/modal/admin-plugins-chat-integration-edit-rule.hbs similarity index 100% rename from assets/javascripts/admin/templates/modal/admin-plugins-chat-edit-rule.hbs rename to assets/javascripts/admin/templates/modal/admin-plugins-chat-integration-edit-rule.hbs diff --git a/assets/javascripts/admin/templates/modal/admin-plugins-chat-test.hbs b/assets/javascripts/admin/templates/modal/admin-plugins-chat-integration-test.hbs similarity index 100% rename from assets/javascripts/admin/templates/modal/admin-plugins-chat-test.hbs rename to assets/javascripts/admin/templates/modal/admin-plugins-chat-integration-test.hbs diff --git a/assets/javascripts/discourse/templates/admin/plugins-chat-provider.hbs b/assets/javascripts/discourse/templates/admin/plugins-chat-integration-provider.hbs similarity index 100% rename from assets/javascripts/discourse/templates/admin/plugins-chat-provider.hbs rename to assets/javascripts/discourse/templates/admin/plugins-chat-integration-provider.hbs diff --git a/assets/javascripts/discourse/templates/admin/plugins-chat.hbs b/assets/javascripts/discourse/templates/admin/plugins-chat-integration.hbs similarity index 92% rename from assets/javascripts/discourse/templates/admin/plugins-chat.hbs rename to assets/javascripts/discourse/templates/admin/plugins-chat-integration.hbs index bc578dc..7c12bb7 100644 --- a/assets/javascripts/discourse/templates/admin/plugins-chat.hbs +++ b/assets/javascripts/discourse/templates/admin/plugins-chat-integration.hbs @@ -4,7 +4,7 @@