diff --git a/customize.dist/contact.html b/customize.dist/contact.html index 11c4dd5ff..ac533a682 100644 --- a/customize.dist/contact.html +++ b/customize.dist/contact.html @@ -10,7 +10,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later CryptPad: Collaboration suite, encrypted and open-source - + diff --git a/customize.dist/images/forum.svg b/customize.dist/images/forum.svg new file mode 100644 index 000000000..0eb00a9d6 --- /dev/null +++ b/customize.dist/images/forum.svg @@ -0,0 +1,63 @@ + + + + + + image/svg+xml + + + + + + + + + + diff --git a/customize.dist/images/forum.svg.license b/customize.dist/images/forum.svg.license new file mode 100644 index 000000000..1cea3b60d --- /dev/null +++ b/customize.dist/images/forum.svg.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: Font Awesome by Dave Gandy + +SPDX-License-Identifier: CC-BY-SA-3.0 diff --git a/customize.dist/images/irc.svg b/customize.dist/images/irc.svg deleted file mode 100644 index 58a9e707d..000000000 --- a/customize.dist/images/irc.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/customize.dist/images/irc.svg.license b/customize.dist/images/irc.svg.license deleted file mode 100644 index ff0da3695..000000000 --- a/customize.dist/images/irc.svg.license +++ /dev/null @@ -1,3 +0,0 @@ -SPDX-FileCopyrightText: 2023 XWiki CryptPad Team and contributors - -SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/customize.dist/images/issue.svg b/customize.dist/images/issue.svg deleted file mode 100644 index 27d5276c7..000000000 --- a/customize.dist/images/issue.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - diff --git a/customize.dist/images/issue.svg.license b/customize.dist/images/issue.svg.license deleted file mode 100644 index ff0da3695..000000000 --- a/customize.dist/images/issue.svg.license +++ /dev/null @@ -1,3 +0,0 @@ -SPDX-FileCopyrightText: 2023 XWiki CryptPad Team and contributors - -SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/customize.dist/images/twiitter.svg b/customize.dist/images/twiitter.svg deleted file mode 100644 index 785e36cc2..000000000 --- a/customize.dist/images/twiitter.svg +++ /dev/null @@ -1,69 +0,0 @@ - -image/svg+xml - - - - - - - diff --git a/customize.dist/images/twiitter.svg.license b/customize.dist/images/twiitter.svg.license deleted file mode 100644 index ff0da3695..000000000 --- a/customize.dist/images/twiitter.svg.license +++ /dev/null @@ -1,3 +0,0 @@ -SPDX-FileCopyrightText: 2023 XWiki CryptPad Team and contributors - -SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/customize.dist/messages.js b/customize.dist/messages.js index a28190005..bb5bd6a80 100755 --- a/customize.dist/messages.js +++ b/customize.dist/messages.js @@ -134,7 +134,8 @@ define(req, function(AppConfig, Default, Language) { } }; - + Messages.contact_mastodon = 'Mastodon'; // XXX + Messages.contact_forum = 'Forum'; // XXX return Messages; diff --git a/customize.dist/pages/contact.js b/customize.dist/pages/contact.js index ec7001e81..36f1b401f 100644 --- a/customize.dist/pages/contact.js +++ b/customize.dist/pages/contact.js @@ -19,10 +19,38 @@ define([ ].indexOf(Config.adminEmail) === -1; var adminMailbox = Config.supportMailbox && LocalStore.isLoggedIn(); + let contacts = [ + { + name: Msg.contact_chat || "Chat", + image: "/customize/images/sayhi.svg", + href: "https://matrix.to/#/#cryptpad:matrix.xwiki.com", + }, + { + name: Msg.contact_mastodon || "Mastodon", + image: "/customize/images/mastodon.svg", + href: "https://social.xwiki.com/@CryptPad", + }, + { + name: Msg.contact_bug || "Bug report", + image: "/customize/images/github.svg", + href: "https://github.com/cryptpad/cryptpad/issues/", + }, + { + name: Msg.contact_forum || "Forum", + image: "/customize/images/forum.svg", + href: "https://forum.cryptpad.org/", + }, + { + name: Msg.contact_email || "Email", + image: "/customize/images/email.svg", + href: 'mailto:' + developerEmail, + }, + ]; + return h('div#cp-main', [ Pages.infopageTopbar(), h('div.container.cp-container', [ - h('div.row.cp-page-title',[ + h('div.row.cp-page-title', [ h('div.col-12.text-center', h('h1', Msg.contact)), ]), (adminEmail || adminMailbox) ? h('div.row.cp-iconCont.align-items-center', [ @@ -64,76 +92,22 @@ define([ Pages.setHTML(h('h2.text-center'), Msg.contact_dev), h('p.center', Msg.contact_devHint) ), + ].concat(contacts.map(item => h('div', - h('a.card-small', {href : "https://matrix.to/#/#cryptpad:matrix.xwiki.com"}, + h('a.card-small', { href: item.href }, h('div.card-body', h('p', [ h('img', { - src: '/customize/images/sayhi.svg', + src: item.image, alt: '', 'aria-hidden': 'true' }), - Msg.contact_chat || 'Chat' + item.name ]) ) ) - ), - h('div', - h('a.card-small', {href : "https://social.xwiki.com/@CryptPad"}, - h('div.card-body', - h('p', [ - h('img', { - src: '/customize/images/mastodon.svg', - alt: '', - 'aria-hidden': 'true' - }), - 'Mastodon' - ]) - ) - ) - ), - h('div', - h('a.card-small', {href : "https://twitter.com/cryptpad"}, - h('div.card-body', - h('p', [ - // this is not a typo. adblock plus blocks images with src *twitter* apparently - h('img', { - src: '/customize/images/twiitter.svg', - alt: '', - 'aria-hidden': 'true'}), - 'Twitter' - ]) - ) - ) - ), - h('div', - h('a.card-small', {href : "https://github.com/cryptpad/cryptpad/issues/"}, - h('div.card-body', - h('p', [ - h('img', { - src: '/customize/images/github.svg', - alt: '', - 'aria-hidden': 'true'}), - Msg.contact_bug || 'Bug report' - ]) - ) - ) - ), - h('div', - h('a.card-small', {href : "mailto:" + developerEmail}, - h('div.card-body', - h('p', [ - h('img', { - src: '/customize/images/email.svg', - alt: '', - 'aria-hidden': 'true' - }), - Msg.contact_email || 'Email' - ]) - ) - ) - ), - ]), + ) + ))), ]), Pages.infopageFooter(), ]);