From 3ed32900ead9f265c9ee5b36e59330414226543a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 26 Aug 2018 11:43:55 +0200 Subject: Use the search term as conversation name again Signed-off-by: Joas Schilling --- js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/app.js b/js/app.js index 15005a420..b68033ec7 100644 --- a/js/app.js +++ b/js/app.js @@ -87,7 +87,7 @@ itemId: 'new', shareTypes: [OC.Share.SHARE_TYPE_USER, OC.Share.SHARE_TYPE_GROUP] }; - }, + }.bind(this), results: function (response) { // TODO improve error case if (response.ocs.data === undefined) { -- cgit v1.2.3 From 67adca6307238c37608079909312299bb29256bf Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 26 Aug 2018 12:43:22 +0200 Subject: Make it clearer that the search term is being used Signed-off-by: Joas Schilling --- js/app.js | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/js/app.js b/js/app.js index b68033ec7..9c3bfe259 100644 --- a/js/app.js +++ b/js/app.js @@ -106,11 +106,27 @@ //Add custom entry to create a new empty group or public room if (OCA.SpreedMe.app._searchTerm === '') { - results.unshift({ id: "create-public-room", displayName: t('spreed', 'New public conversation'), type: "createPublicRoom"}); - results.unshift({ id: "create-group-room", displayName: t('spreed', 'New group conversation'), type: "createGroupRoom"}); + results.unshift({ + id: "create-public-room", + displayName: t('spreed', 'New public conversation'), + type: "createPublicRoom" + }); + results.unshift({ + id: "create-group-room", + displayName: t('spreed', 'New group conversation'), + type: "createGroupRoom" + }); } else { - results.push({ id: "create-group-room", displayName: t('spreed', 'New group conversation'), type: "createGroupRoom"}); - results.push({ id: "create-public-room", displayName: t('spreed', 'New public conversation'), type: "createPublicRoom"}); + results.push({ + id: "create-group-room", + displayName: t('spreed', 'Create "{name}"', { name: OCA.SpreedMe.app._searchTerm }), + type: "createGroupRoom" + }); + results.push({ + id: "create-public-room", + displayName: t('spreed', 'Create "{name}"', { name: OCA.SpreedMe.app._searchTerm }), + type: "createPublicRoom" + }); } return { -- cgit v1.2.3 From 7cb2775c02447d4d7b4484fa8fc42d42ebba0ff8 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 26 Aug 2018 12:43:54 +0200 Subject: Add a grey background around the icons Signed-off-by: Joas Schilling --- css/style.scss | 12 ++++++------ js/app.js | 8 ++++---- js/views/roomlistview.js | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/css/style.scss b/css/style.scss index ac36f077c..b614ab5eb 100644 --- a/css/style.scss +++ b/css/style.scss @@ -127,14 +127,14 @@ margin: 0 !important; } -.select2-result .icon-contacts-dark.avatar, -.select2-result .icon-add.avatar, -#app-navigation .icon-contacts-dark, -#app-navigation .app-navigation-entry-link .icon-public, -#app-navigation .icon-add { - border-radius: 0; +.select2-result .icon-contacts.avatar, +.select2-result .icon-public-white.avatar, +#app-navigation .icon-contacts, +#app-navigation .app-navigation-entry-link .icon-public-white { + border-radius: 50%; width: 32px; height: 32px; + background-color: var(--color-background-darker); } #app-navigation .favorite-mark { diff --git a/js/app.js b/js/app.js index 9c3bfe259..4c4b7f94d 100644 --- a/js/app.js +++ b/js/app.js @@ -139,12 +139,12 @@ callback({id: element.val()}); }, formatResult: function (element) { - if ((element.type === "createGroupRoom") || (element.type === "createPublicRoom")) { - return '
' + escapeHTML(element.displayName) + '
'; + if (element.type === "createPublicRoom") { + return '
' + escapeHTML(element.displayName) + '
'; } - if (element.type === 'group') { - return '
' + escapeHTML(element.displayName) + '
'; + if (element.type === "createGroupRoom" || element.type === 'group') { + return '
' + escapeHTML(element.displayName) + '
'; } return '
' + escapeHTML(element.displayName) + '
'; diff --git a/js/views/roomlistview.js b/js/views/roomlistview.js index d165673ac..0ad970e88 100644 --- a/js/views/roomlistview.js +++ b/js/views/roomlistview.js @@ -203,13 +203,13 @@ this.$el.find('.public-room').removeClass('public-room').addClass('private-room'); _.each(this.$el.find('.avatar'), function(a) { - $(a).removeClass('icon-public').addClass('icon-contacts-dark'); + $(a).removeClass('icon-public-white').addClass('icon-contacts'); }); } else if (this.model.get('type') === ROOM_TYPE_PUBLIC_CALL) { // Public room this.$el.find('.private-room').removeClass('private-room').addClass('public-room'); _.each(this.$el.find('.avatar'), function(a) { - $(a).removeClass('icon-contacts-dark').addClass('icon-public'); + $(a).removeClass('icon-contacts').addClass('icon-public-white'); }); } }, -- cgit v1.2.3 From be28b56d0a7524f0ffe40b5b0a2e65c4d35c15b9 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 27 Aug 2018 00:09:43 +0200 Subject: Shorter string Signed-off-by: Joas Schilling --- js/app.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/js/app.js b/js/app.js index 4c4b7f94d..a2210616f 100644 --- a/js/app.js +++ b/js/app.js @@ -117,14 +117,19 @@ type: "createGroupRoom" }); } else { + var shortenedName = OCA.SpreedMe.app._searchTerm; + if (OCA.SpreedMe.app._searchTerm.length > 25) { + shortenedName = shortenedName.substring(0, 25) + '…'; + } + results.push({ id: "create-group-room", - displayName: t('spreed', 'Create "{name}"', { name: OCA.SpreedMe.app._searchTerm }), + displayName: shortenedName, type: "createGroupRoom" }); results.push({ id: "create-public-room", - displayName: t('spreed', 'Create "{name}"', { name: OCA.SpreedMe.app._searchTerm }), + displayName: t('spreed', '{name} (public)', { name: shortenedName }), type: "createPublicRoom" }); } -- cgit v1.2.3 From efb30e25730441dce92beadccced585826163a55 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 27 Aug 2018 00:10:32 +0200 Subject: Increase version Signed-off-by: Joas Schilling --- appinfo/info.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index 9ba15706e..84ff56540 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -17,7 +17,7 @@ And in the works for the [coming versions](https://github.com/nextcloud/spreed/m ]]> - 3.99.11 + 3.99.12 agpl Daniel Calviño Sánchez -- cgit v1.2.3