Remove Dolphin specific i18n record, rename url setting to be consistent with existing pattern

pull/5984/head
Aaron Ogle 9 years ago
parent 426ab280e0
commit 03994ea68d
No known key found for this signature in database
GPG Key ID: 9DE7F8BEE517326A
  1. 14
      packages/rocketchat-dolphin/common.coffee
  2. 2
      packages/rocketchat-dolphin/startup.coffee
  3. 1
      packages/rocketchat-i18n/i18n/en.i18n.json

@ -20,22 +20,22 @@ class DolphinOnCreateUser
if Meteor.isServer
Meteor.startup ->
RocketChat.models.Settings.find({ _id: 'API_Dolphin_URL' }).observe
RocketChat.models.Settings.find({ _id: 'Accounts_OAuth_Dolphin_URL' }).observe
added: (record) ->
config.serverURL = RocketChat.settings.get 'API_Dolphin_URL'
config.serverURL = RocketChat.settings.get 'Accounts_OAuth_Dolphin_URL'
Dolphin.configure config
changed: (record) ->
config.serverURL = RocketChat.settings.get 'API_Dolphin_URL'
config.serverURL = RocketChat.settings.get 'Accounts_OAuth_Dolphin_URL'
Dolphin.configure config
if RocketChat.settings.get 'API_Dolphin_URL'
if RocketChat.settings.get 'Accounts_OAuth_Dolphin_URL'
data =
buttonLabelText: RocketChat.settings.get 'Accounts_OAuth_Dolphin_button_label_text'
buttonColor: RocketChat.settings.get 'Accounts_OAuth_Dolphin_button_color'
buttonLabelColor: RocketChat.settings.get 'Accounts_OAuth_Dolphin_button_label_color'
clientId: RocketChat.settings.get 'Accounts_OAuth_Dolphin_id'
secret: RocketChat.settings.get 'Accounts_OAuth_Dolphin_secret'
serverURL: RocketChat.settings.get 'API_Dolphin_URL'
serverURL: RocketChat.settings.get 'Accounts_OAuth_Dolphin_URL'
loginStyle: RocketChat.settings.get 'Accounts_OAuth_Dolphin_login_style'
ServiceConfiguration.configurations.upsert {service: 'dolphin'}, $set: data
@ -44,6 +44,6 @@ if Meteor.isServer
else
Meteor.startup ->
Tracker.autorun ->
if RocketChat.settings.get 'API_Dolphin_URL'
config.serverURL = RocketChat.settings.get 'API_Dolphin_URL'
if RocketChat.settings.get 'Accounts_OAuth_Dolphin_URL'
config.serverURL = RocketChat.settings.get 'Accounts_OAuth_Dolphin_URL'
Dolphin.configure config

@ -1,4 +1,4 @@
RocketChat.settings.add 'API_Dolphin_URL', '', { type: 'string', group: 'OAuth', public: true, section: 'Dolphin', i18nLabel: 'Accounts_OAuth_Dolphin_Url' }
RocketChat.settings.add 'Accounts_OAuth_Dolphin_URL', '', { type: 'string', group: 'OAuth', public: true, section: 'Dolphin', i18nLabel: 'URL' }
RocketChat.settings.add 'Accounts_OAuth_Dolphin', false, { type: 'boolean', group: 'OAuth', section: 'Dolphin', i18nLabel: 'Accounts_OAuth_Custom_Enable' }
RocketChat.settings.add 'Accounts_OAuth_Dolphin_id', '', { type: 'string', group: 'OAuth', section: 'Dolphin', i18nLabel: 'Accounts_OAuth_Custom_id' }
RocketChat.settings.add 'Accounts_OAuth_Dolphin_secret', '', { type: 'string', group: 'OAuth', section: 'Dolphin', i18nLabel: 'Accounts_OAuth_Custom_Secret' }

@ -62,7 +62,6 @@
"Accounts_OAuth_Custom_Token_Path": "Token Path",
"Accounts_OAuth_Custom_Token_Sent_Via": "Token Sent Via",
"Accounts_OAuth_Custom_Username_Field": "Username field",
"Accounts_OAuth_Dolphin_Url": "Dolphin URL",
"Accounts_OAuth_Facebook": "Facebook Login",
"Accounts_OAuth_Facebook_callback_url": "Facebook Callback URL",
"Accounts_OAuth_Facebook_id": "Facebook App Id",

Loading…
Cancel
Save