Skip to content
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

Minimal ui changes and config #7

Merged
merged 4 commits into from
Mar 23, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 25 additions & 13 deletions config.sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
"default_server_config": {
"m.homeserver": {
"base_url": "https://matrix.i.tchap.gouv.fr",
"server_name": "Matrix Internes Preprod"
"server_name": "Internes - Preprod"
},
"m.identity_server": {
"base_url": "https://matrix.i.tchap.gouv.fr"
}
},
"disable_custom_urls": false,
"disable_guests": false,
"disable_custom_urls": true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"disable_custom_urls": true,
"disable_custom_urls": false,

On a besoin de changer de homeserver parce qu'il y en a plusieurs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, c'était vraiment configuré pour un PoC, avec volonté de changer plus tard

"disable_guests": true,
"disable_login_language_selector": false,
"disable_3pid_login": true,
"brand": "Element",
"brand": "Tchap",
"integrations_ui_url": "https://scalar.vector.im/",
"integrations_rest_url": "https://scalar.vector.im/api",
"integrations_widgets_urls": [
Expand All @@ -24,31 +24,43 @@
],
"bug_report_endpoint_url": "https://element.io/bugreports/submit",
"uisi_autorageshake_app": "element-auto-uisi",
"defaultCountryCode": "GB",
"defaultCountryCode": "FR",
"showLabsSettings": false,
"features": { },
"default_federate": true,
"default_theme": "light",
"default_theme": "custom-Tchap",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on peut l'appeler juste Tchap ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, contrainte technique pour éviter les conflits de noms

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mais ça apparait comme "Tchap" dans la sélection

"roomDirectory": {
"servers": [
"i.tchap.gouv.fr"
]
},
"piwik": {
"url": "https://piwik.riot.im/",
"whitelistedHSUrls": ["https://matrix.org"],
"whitelistedISUrls": ["https://vector.im", "https://matrix.org"],
"siteId": 1
},
"enable_presence_by_hs_url": {
"https://matrix.org": false,
"https://matrix-client.matrix.org": false
},
"settingDefaults": {
"breadcrumbs": true
"breadcrumbs": true,
"UIFeature.voip": false,
"UIFeature.shareSocial": false,
"custom_themes": [
{
"name": "Tchap",
"is_dark": false,
"colors": {
"accent": "#162d58"
}
}
]
},
"branding": {
"authHeaderLogoUrl": "themes/element/img/logos/tchap-logo.svg",
"authFooterLinks": []
},
"jitsi": {
"preferredDomain": "meet.element.io"
},
"desktopBuilds": {
"available": false
},
"map_style_url": "https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx"
}
6 changes: 3 additions & 3 deletions res/manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "Element",
"short_name": "Element",
"name": "Tchap",
"short_name": "Tchap",
"display": "standalone",
"theme_color": "#76CFA6",
"theme_color": "#162d58",
"start_url": "index.html",
"icons": [
{
Expand Down
21 changes: 21 additions & 0 deletions res/themes/element/img/logos/tchap-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/vector-icons/1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/vector-icons/120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/vector-icons/150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/vector-icons/152.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/vector-icons/180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/vector-icons/24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/vector-icons/300.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/vector-icons/44.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/vector-icons/50.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/vector-icons/76.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/vector-icons/88.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/vector-icons/apple-touch-icon-114.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/vector-icons/apple-touch-icon-120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/vector-icons/apple-touch-icon-144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/vector-icons/apple-touch-icon-152.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/vector-icons/apple-touch-icon-180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/vector-icons/apple-touch-icon-57.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/vector-icons/apple-touch-icon-60.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/vector-icons/apple-touch-icon-72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/vector-icons/apple-touch-icon-76.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/vector-icons/favicon.ico
Binary file not shown.
Binary file modified res/vector-icons/mstile-150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/vector-icons/mstile-310.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/vector-icons/mstile-310x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/vector-icons/mstile-70.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions res/welcome.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@

<div class="mx_Parent">
<a href="https://element.io" target="_blank" rel="noopener">
<img src="welcome/images/logo.svg" alt="" class="mx_Logo"/>
<img src="themes/element/img/logos/tchap-logo.svg" alt="" class="mx_Logo"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on peut mettre ce logo dans un dossier tchap plutot que dans le dossier element ? /res/themes/tchap

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pas de pb, juste dommage qu'on ai pas un settings pour choisir un dossier directement

</a>
<h1 class="mx_Header_title">_t("Welcome to Element")</h1>
<h1 class="mx_Header_title">_t("Welcome to Tchap")</h1>
<h4 class="mx_Header_subtitle">_t("Decentralised, encrypted chat &amp; collaboration powered by [matrix]")</h4>
<div class="mx_ButtonGroup">
<div class="mx_ButtonRow">
Expand Down
86 changes: 49 additions & 37 deletions scripts/make-icons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ set -x

tmpdir=`mktemp -d 2>/dev/null || mktemp -d -t 'icontmp'`

for i in 1024 512 310 256 192 180 152 150 144 128 120 114 96 76 72 70 64 60 57 48 36 32 24 16
for i in 1024 512 310 300 256 192 180 152 150 144 128 120 114 96 88 76 72 70 64 60 57 50 48 44 36 32 24 16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Est-ce que ca vaudrait pas le coup de faire une copie du script, make-tchap-icons.sh, vu qu'il y a plein de changements ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ce script est pas mis à jour depuis perpet, ils l'utilisent certainement plus à mon avis.Je peux aussi ne pas le commit du tout, c'est juste un helper à utiliser une fois

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ca serait bien de documenter les modifications, vite fait : ya des parties enlevées et rajoutées qui sont un peu mysterieuses pour moi.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C'est juste les tailles des icones générées. Il y a des tailles qui manquent par rapport aux icones présentes dans la version actuelle d'element et j'avais pas envie de les faire à la main. En gros le script génère plein de taille d'images, et selectionne ensuite les bonnes pour les renommer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J'ai viré des parties qui buguent, parce qu'on à pas de build electron

do
#convert -background none -density 1000 -resize $i -extent $i -gravity center "$1" "$tmpdir/$i.png"

Expand Down Expand Up @@ -59,22 +59,34 @@ cp "$tmpdir/512.png" "$tmpdir/Riot.iconset/[email protected]"
cp "$tmpdir/512.png" "$tmpdir/Riot.iconset/icon_512x512.png"
cp "$tmpdir/1024.png" "$tmpdir/Riot.iconset/[email protected]"

if [ -x "$(command -v iconutil)" ]; then
# available on macos
iconutil -c icns -o electron_app/build/icon.icns "$tmpdir/Riot.iconset"
elif [ -x "$(command -v png2icns)" ]; then
# available on linux
# png2icns is more finicky about its input than iconutil
# 1. it doesn't support a 64x64 (aka 32x32@2x)
# 2. it doesn't like duplicates (128x128@2x == 256x256)
rm "$tmpdir/Riot.iconset/[email protected]"
rm "$tmpdir/Riot.iconset/[email protected]"
rm "$tmpdir/Riot.iconset/[email protected]"
rm "$tmpdir/Riot.iconset/[email protected]"
png2icns electron_app/build/icon.icns "$tmpdir"/Riot.iconset/*png
else
echo "WARNING: Unsupported platform. Skipping icns build"
fi
#if [ -x "$(command -v iconutil)" ]; then
# # available on macos
# iconutil -c icns -o electron_app/build/icon.icns "$tmpdir/Riot.iconset"
#elif [ -x "$(command -v png2icns)" ]; then
# # available on linux
# # png2icns is more finicky about its input than iconutil
# # 1. it doesn't support a 64x64 (aka 32x32@2x)
# # 2. it doesn't like duplicates (128x128@2x == 256x256)
# rm "$tmpdir/Riot.iconset/[email protected]"
# rm "$tmpdir/Riot.iconset/[email protected]"
# rm "$tmpdir/Riot.iconset/[email protected]"
# rm "$tmpdir/Riot.iconset/[email protected]"
# png2icns electron_app/build/icon.icns "$tmpdir"/Riot.iconset/*png
#else
# echo "WARNING: Unsupported platform. Skipping icns build"
#fi

cp "$tmpdir/24.png" "res/vector-icons/24.png"
cp "$tmpdir/44.png" "res/vector-icons/44.png"
cp "$tmpdir/50.png" "res/vector-icons/50.png"
cp "$tmpdir/76.png" "res/vector-icons/76.png"
cp "$tmpdir/88.png" "res/vector-icons/88.png"
cp "$tmpdir/120.png" "res/vector-icons/120.png"
cp "$tmpdir/150.png" "res/vector-icons/150.png"
cp "$tmpdir/152.png" "res/vector-icons/152.png"
cp "$tmpdir/180.png" "res/vector-icons/180.png"
cp "$tmpdir/300.png" "res/vector-icons/300.png"
cp "$tmpdir/1024.png" "res/vector-icons/1024.png"

cp "$tmpdir/36.png" "res/vector-icons/android-chrome-36x36.png"
cp "$tmpdir/48.png" "res/vector-icons/android-chrome-48x48.png"
Expand All @@ -84,34 +96,34 @@ cp "$tmpdir/144.png" "res/vector-icons/android-chrome-144x144.png"
cp "$tmpdir/192.png" "res/vector-icons/android-chrome-192x192.png"
cp "$tmpdir/180.png" "res/vector-icons/apple-touch-icon.png"
cp "$tmpdir/180.png" "res/vector-icons/apple-touch-icon-precomposed.png"
cp "$tmpdir/57.png" "res/vector-icons/apple-touch-icon-57x57.png"
cp "$tmpdir/60.png" "res/vector-icons/apple-touch-icon-60x60.png"
cp "$tmpdir/72.png" "res/vector-icons/apple-touch-icon-72x72.png"
cp "$tmpdir/76.png" "res/vector-icons/apple-touch-icon-76x76.png"
cp "$tmpdir/114.png" "res/vector-icons/apple-touch-icon-114x114.png"
cp "$tmpdir/120.png" "res/vector-icons/apple-touch-icon-120x120.png"
cp "$tmpdir/144.png" "res/vector-icons/apple-touch-icon-144x144.png"
cp "$tmpdir/152.png" "res/vector-icons/apple-touch-icon-152x152.png"
cp "$tmpdir/180.png" "res/vector-icons/apple-touch-icon-180x180.png"
cp "$tmpdir/57.png" "res/vector-icons/apple-touch-icon-57.png"
cp "$tmpdir/60.png" "res/vector-icons/apple-touch-icon-60.png"
cp "$tmpdir/72.png" "res/vector-icons/apple-touch-icon-72.png"
cp "$tmpdir/76.png" "res/vector-icons/apple-touch-icon-76.png"
cp "$tmpdir/114.png" "res/vector-icons/apple-touch-icon-114.png"
cp "$tmpdir/120.png" "res/vector-icons/apple-touch-icon-120.png"
cp "$tmpdir/144.png" "res/vector-icons/apple-touch-icon-144.png"
cp "$tmpdir/152.png" "res/vector-icons/apple-touch-icon-152.png"
cp "$tmpdir/180.png" "res/vector-icons/apple-touch-icon-180.png"
cp "$tmpdir/16.png" "res/vector-icons/favicon-16x16.png"
cp "$tmpdir/32.png" "res/vector-icons/favicon-32x32.png"
cp "$tmpdir/96.png" "res/vector-icons/favicon-96x96.png"
cp "$tmpdir/70.png" "res/vector-icons/mstile-70x70.png"
cp "$tmpdir/144.png" "res/vector-icons/mstile-144x144.png"
cp "$tmpdir/150.png" "res/vector-icons/mstile-150x150.png"
cp "$tmpdir/310.png" "res/vector-icons/mstile-310x310.png"
cp "$tmpdir/70.png" "res/vector-icons/mstile-70.png"
cp "$tmpdir/144.png" "res/vector-icons/mstile-144.png"
cp "$tmpdir/150.png" "res/vector-icons/mstile-150.png"
cp "$tmpdir/310.png" "res/vector-icons/mstile-310.png"
cp "$tmpdir/310x150.png" "res/vector-icons/mstile-310x150.png"
cp "$tmpdir/180.png" "electron_app/img/riot.png"
#cp "$tmpdir/180.png" "electron_app/img/riot.png"

convert "$tmpdir/16.png" "$tmpdir/32.png" "$tmpdir/64.png" "$tmpdir/128.png" "$tmpdir/256.png" "res/vector-icons/favicon.ico"

cp "res/vector-icons/favicon.ico" "electron_app/build/icon.ico"
cp "res/vector-icons/favicon.ico" "electron_app/img/riot.ico"
#cp "res/vector-icons/favicon.ico" "electron_app/build/icon.ico"
#cp "res/vector-icons/favicon.ico" "electron_app/img/riot.ico"

# https://github.com/electron-userland/electron-builder/blob/3f97b86993d4ea5172e562b182230a194de0f621/src/targets/LinuxTargetHelper.ts#L127
for i in 24 96 16 48 64 128 256 512
do
cp "$tmpdir/$i.png" "electron_app/build/icons/${i}x${i}.png"
done
#for i in 24 96 16 48 64 128 256 512
#do
# cp "$tmpdir/$i.png" "electron_app/build/icons/${i}x${i}.png"
#done

rm -r "$tmpdir"
2 changes: 1 addition & 1 deletion src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"I understand the risks and wish to continue": "I understand the risks and wish to continue",
"Go to element.io": "Go to element.io",
"Failed to start": "Failed to start",
"Welcome to Element": "Welcome to Element",
"Welcome to Tchap": "Welcome to Tchap",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

j'ai réfléchi, pour l'organisation des translations, est-ce qu'on peut mettre tous nos changements en bas du fichier, pour keep track ? (rappelle-toi les problemes de merge sur v2...)

Ici je propose de rajouter "Welcome to Tchap" en bas et de laisser "Welcome to Element" tel quel.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point is it should be a var here, like it is done elsewhere. I'll PR this to Element later

"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Decentralised, encrypted chat &amp; collaboration powered by [matrix]",
"Sign In": "Sign In",
"Create Account": "Create Account",
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/strings/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"powered by Matrix": "propulsé par Matrix",
"Unknown device": "Appareil inconnu",
"You need to be using HTTPS to place a screen-sharing call.": "Vous devez utiliser HTTPS pour effectuer un appel avec partage d’écran.",
"Welcome to Element": "Bienvenue sur Element",
"Welcome to Tchap": "Bienvenue sur Tchap",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idem

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Messagerie et collaboration décentralisées et chiffrées, propulsées par [matrix]",
"Sign In": "Se connecter",
"Create Account": "Créer un compte",
Expand Down
8 changes: 4 additions & 4 deletions src/vector/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en" style="height: 100%;">
<head>
<meta charset="utf-8">
<title>Element</title>
<title>Tchap</title>
<link rel="apple-touch-icon" sizes="57x57" href="<%= require('../../res/vector-icons/apple-touch-icon-57.png') %>">
<link rel="apple-touch-icon" sizes="60x60" href="<%= require('../../res/vector-icons/apple-touch-icon-60.png') %>">
<link rel="apple-touch-icon" sizes="72x72" href="<%= require('../../res/vector-icons/apple-touch-icon-72.png') %>">
Expand All @@ -16,8 +16,8 @@
<meta name="referrer" content="no-referrer">
<link rel="shortcut icon" href="<%= require('../../res/vector-icons/favicon.ico') %>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-title" content="Element">
<meta name="application-name" content="Element">
<meta name="apple-mobile-web-app-title" content="Tchap">
<meta name="application-name" content="Tchap">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-TileImage" content="<%= require('../../res/vector-icons/mstile-150.png') %>">
<meta name="msapplication-config" content="<%= require('../../res/vector-icons/browserconfig.xml') %>">
Expand Down Expand Up @@ -59,7 +59,7 @@

</head>
<body style="height: 100%; margin: 0;">
<noscript>Sorry, Element requires JavaScript to be enabled.</noscript> <!-- TODO: Translate this? -->
<noscript>Sorry, Tchap requires JavaScript to be enabled.</noscript> <!-- TODO: Translate this? -->
<section id="matrixchat" style="height: 100%;" class="notranslate"></section>
<script src="<%= htmlWebpackPlugin.files.js.find(entry => entry.includes("bundle.js")) %>"></script>

Expand Down