-
Notifications
You must be signed in to change notification settings - Fork 847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BASH-14 Set default server/team in settings #594
Conversation
2b08039
to
de3c4cc
Compare
https://circleci.com/gh/mattermost/desktop/1023#artifacts However at this time, you would not see any changes if the app is correctly implemented. |
Hm, that's correct. The settings would have to be specified before building the app. You enable/disable the display of URL hover before building and dist. @csduarte @dmeza Wondering your thoughts if this should be a setting controlled by the Mattermost server? I would see a benefit of having a default team at server-level. |
@jasonblais @csduarte the idea of this setting is to already have a default server and not even have to enter it like in this ticket |
@dmeza aah, got it. I was thinking of teams as "Mattermost teams" not "servers". Can you pre-configure more than one server? |
@jasonblais @csduarte: Yes, if you add more teams directly via the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to merging of #586, please rebase the branch.
@yuya-oc Once rebased, would you be able to help with a test build where |
@yuya-oc rebased and tested. |
@jasonblais Added https://example.com as the defaultTeam. https://circleci.com/gh/yuya-oc/desktop/420#artifacts As described in the first comment, please remove |
@@ -71,6 +71,12 @@ try { | |||
const spellCheckerLocale = SpellChecker.getSpellCheckerLocale(app.getLocale()); | |||
config = settings.loadDefault(null, spellCheckerLocale); | |||
console.log('Failed to read or upgrade config.json', e); | |||
if (!config.teams.length && config.defaultTeam) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yuya-oc Should we consider renaming the term "team" to a "server" to reduce confusion? I searched through the GitHub repo and realized we refer to servers as teams in many places. This is probably because of how multi-team support worked before the team sidebar was introduced a few months ago.
I could do a search and replace of the terms across our files after this PR and #600 are merged.
Let me know your thoughts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jasonblais Yeah, we should do that. However, "team" is already used in config.json
. So to avoid confusing, I don't think we need to do in v3.8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works great. Thanks all!
@jasonblais Added a issue to rename variables. #623 |
Description
This PR allows for a defaultTeam to be defined in the override.json file (src/common/config/override.json). When this value is defined and the config file does not contain any teams in the team’s array, the team defined in the defaultTeam property will be added to the team's array in the config.
npm run lint:js
for proper code formattingTest Cases
Add override values like this:
Remove the application support folder by running rm -rf /Users/{yourusername}/Library/Application Support/Mattermost
When the application starts the login for the defaultTeam will be shown.
notes
includes bash-20