зеркало из https://github.com/nextcloud/spreed.git
Automatically close the sidebar when opening changelog conversation
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Родитель
1ed7363602
Коммит
f6aba7057a
|
@ -406,7 +406,9 @@
|
|||
// happens it will overlap with the content area (the narrower the
|
||||
// window the larger the overlap). Due to this the sidebar is opened
|
||||
// automatically only if it will not overlap with the content area.
|
||||
if ($(window).width() > 1111) {
|
||||
if (this.activeRoom.get('type') === this.ROOM_TYPE_CHANGELOG) {
|
||||
this._sidebarView.close();
|
||||
} else if (this.activeRoom.get('type') !== this.ROOM_TYPE_CHANGELOG && $(window).width() > 1111) {
|
||||
this._sidebarView.open();
|
||||
}
|
||||
|
||||
|
|
|
@ -148,7 +148,8 @@
|
|||
|
||||
initialize: function() {
|
||||
var nameAttribute = 'name';
|
||||
if (this.model.get('objectType') === 'share:password') {
|
||||
if (this.model.get('objectType') === 'share:password' ||
|
||||
this.model.get('type') === OCA.SpreedMe.app.ROOM_TYPE_CHANGELOG) {
|
||||
nameAttribute = 'displayName';
|
||||
}
|
||||
|
||||
|
@ -271,9 +272,12 @@
|
|||
// This has to be added below the "enable/disableEdition" calls as
|
||||
// those calls render the view if needed, while the setters expect
|
||||
// the view to be already rendered.
|
||||
if (this.model.get('type') === 1) {
|
||||
if (this.model.get('type') === OCA.SpreedMe.app.ROOM_TYPE_ONE_TO_ONE) {
|
||||
this._nameEditableTextLabel.setModelAttribute(undefined);
|
||||
this._nameEditableTextLabel.setLabelPlaceholder(t('spreed', 'Conversation with {name}', {name: this.model.get('displayName')}));
|
||||
} else if (this.model.get('type') === OCA.SpreedMe.app.ROOM_TYPE_CHANGELOG) {
|
||||
this._nameEditableTextLabel.setModelAttribute(undefined);
|
||||
this._nameEditableTextLabel.setLabelPlaceholder(this.model.get('displayName'));
|
||||
} else {
|
||||
this._nameEditableTextLabel.setModelAttribute('name');
|
||||
this._nameEditableTextLabel.setLabelPlaceholder(t('spreed', 'Conversation name'));
|
||||
|
|
Загрузка…
Ссылка в новой задаче