solomax commented on a change in pull request #164:
URL: https://github.com/apache/openmeetings/pull/164#discussion_r730433516
##########
File path:
openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/InfoWebService.java
##########
@@ -91,4 +98,38 @@ public Info getVersion() {
public Health getHealth() {
return Health.INSTANCE;
}
+
+ @WebMethod
+ @GET
+ @Path("/manifest.webmanifest")
+ @Produces({"application/manifest+json"})
+ public String getManifest() {
+ JSONObject manifest = new JSONObject();
+ manifest.put("name", OpenmeetingsVariables.getApplicationName()
+ " " + Version.getVersion());
+ manifest.put("short_name",
OpenmeetingsVariables.getApplicationName() + " " + Version.getVersion());
+ manifest.put("description", "Openmeetings provides video
conferencing, instant messaging, white board, collaborative document editing
and other groupware tools.");
+ manifest.put("start_url", "/" +
OpenmeetingsVariables.getApplicationName().toLowerCase(Locale.getDefault()) +
"/?pwa=true");
+ manifest.put("scope", "/");
+ manifest.put("background_color", "#ffffff");
+ manifest.put("theme_color", "#ffffff");
Review comment:
this 2 colors might be not in sync with bootstrap theme
##########
File path:
openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/InfoWebService.java
##########
@@ -91,4 +98,38 @@ public Info getVersion() {
public Health getHealth() {
return Health.INSTANCE;
}
+
+ @WebMethod
+ @GET
+ @Path("/manifest.webmanifest")
+ @Produces({"application/manifest+json"})
+ public String getManifest() {
+ JSONObject manifest = new JSONObject();
+ manifest.put("name", OpenmeetingsVariables.getApplicationName()
+ " " + Version.getVersion());
Review comment:
I would expect You'll put manifest file to the `public/` folder
nice solution :)
##########
File path:
openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/BasePage.html
##########
@@ -23,6 +23,35 @@
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="viewport" content="height=device-height, initial-scale=1,
width=device-width, initial-scale=1" />
+ <link rel="apple-touch-icon" href="images/icons/apple-icon-180.png">
+ <meta name="apple-mobile-web-app-capable" content="yes">
+ <link rel="apple-touch-startup-image"
href="images/icons/apple-splash-2048-2732.jpg" media="(device-width: 1024px)
and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and
(orientation: portrait)">
+ <link rel="apple-touch-startup-image"
href="images/icons/apple-splash-2732-2048.jpg" media="(device-width: 1024px)
and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and
(orientation: landscape)">
+ <link rel="apple-touch-startup-image"
href="images/icons/apple-splash-1668-2388.jpg" media="(device-width: 834px) and
(device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation:
portrait)">
+ <link rel="apple-touch-startup-image"
href="images/icons/apple-splash-2388-1668.jpg" media="(device-width: 834px) and
(device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation:
landscape)">
+ <link rel="apple-touch-startup-image"
href="images/icons/apple-splash-1536-2048.jpg" media="(device-width: 768px) and
(device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation:
portrait)">
+ <link rel="apple-touch-startup-image"
href="images/icons/apple-splash-2048-1536.jpg" media="(device-width: 768px) and
(device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation:
landscape)">
+ <link rel="apple-touch-startup-image"
href="images/icons/apple-splash-1668-2224.jpg" media="(device-width: 834px) and
(device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation:
portrait)">
+ <link rel="apple-touch-startup-image"
href="images/icons/apple-splash-2224-1668.jpg" media="(device-width: 834px) and
(device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation:
landscape)">
+ <link rel="apple-touch-startup-image"
href="images/icons/apple-splash-1620-2160.jpg" media="(device-width: 810px) and
(device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation:
portrait)">
+ <link rel="apple-touch-startup-image"
href="images/icons/apple-splash-2160-1620.jpg" media="(device-width: 810px) and
(device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation:
landscape)">
+ <link rel="apple-touch-startup-image"
href="images/icons/apple-splash-1284-2778.jpg" media="(device-width: 428px) and
(device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation:
portrait)">
+ <link rel="apple-touch-startup-image"
href="images/icons/apple-splash-2778-1284.jpg" media="(device-width: 428px) and
(device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation:
landscape)">
+ <link rel="apple-touch-startup-image"
href="images/icons/apple-splash-1170-2532.jpg" media="(device-width: 390px) and
(device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation:
portrait)">
+ <link rel="apple-touch-startup-image"
href="images/icons/apple-splash-2532-1170.jpg" media="(device-width: 390px) and
(device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation:
landscape)">
+ <link rel="apple-touch-startup-image"
href="images/icons/apple-splash-1125-2436.jpg" media="(device-width: 375px) and
(device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation:
portrait)">
+ <link rel="apple-touch-startup-image"
href="images/icons/apple-splash-2436-1125.jpg" media="(device-width: 375px) and
(device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation:
landscape)">
+ <link rel="apple-touch-startup-image"
href="images/icons/apple-splash-1242-2688.jpg" media="(device-width: 414px) and
(device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation:
portrait)">
+ <link rel="apple-touch-startup-image"
href="images/icons/apple-splash-2688-1242.jpg" media="(device-width: 414px) and
(device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation:
landscape)">
+ <link rel="apple-touch-startup-image"
href="images/icons/apple-splash-828-1792.jpg" media="(device-width: 414px) and
(device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation:
portrait)">
+ <link rel="apple-touch-startup-image"
href="images/icons/apple-splash-1792-828.jpg" media="(device-width: 414px) and
(device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation:
landscape)">
+ <link rel="apple-touch-startup-image"
href="images/icons/apple-splash-1242-2208.jpg" media="(device-width: 414px) and
(device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation:
portrait)">
+ <link rel="apple-touch-startup-image"
href="images/icons/apple-splash-2208-1242.jpg" media="(device-width: 414px) and
(device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation:
landscape)">
+ <link rel="apple-touch-startup-image"
href="images/icons/apple-splash-750-1334.jpg" media="(device-width: 375px) and
(device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation:
portrait)">
+ <link rel="apple-touch-startup-image"
href="images/icons/apple-splash-1334-750.jpg" media="(device-width: 375px) and
(device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation:
landscape)">
+ <link rel="apple-touch-startup-image"
href="images/icons/apple-splash-640-1136.jpg" media="(device-width: 320px) and
(device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation:
portrait)">
+ <link rel="apple-touch-startup-image"
href="images/icons/apple-splash-1136-640.jpg" media="(device-width: 320px) and
(device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation:
landscape)">
Review comment:
I have 2 questions:
1. why do we need all those icons?
2. Why are they not in `public/` folder?
I believe this is something unnecessary
It will complicate maintenance
##########
File path:
openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/InfoWebService.java
##########
@@ -91,4 +98,38 @@ public Info getVersion() {
public Health getHealth() {
return Health.INSTANCE;
}
+
+ @WebMethod
+ @GET
+ @Path("/manifest.webmanifest")
+ @Produces({"application/manifest+json"})
+ public String getManifest() {
+ JSONObject manifest = new JSONObject();
+ manifest.put("name", OpenmeetingsVariables.getApplicationName()
+ " " + Version.getVersion());
+ manifest.put("short_name",
OpenmeetingsVariables.getApplicationName() + " " + Version.getVersion());
+ manifest.put("description", "Openmeetings provides video
conferencing, instant messaging, white board, collaborative document editing
and other groupware tools.");
+ manifest.put("start_url", "/" +
OpenmeetingsVariables.getApplicationName().toLowerCase(Locale.getDefault()) +
"/?pwa=true");
Review comment:
this might be very inaccurate
for ex. `OpenmeetingsVariables.getApplicationName()` == `OpenMeetings - Next`
I believe it's better to use `application.base.url` for this
And since this is calculated I would create and pass variable or create
method for this
##########
File path:
openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/InfoWebService.java
##########
@@ -91,4 +98,38 @@ public Info getVersion() {
public Health getHealth() {
return Health.INSTANCE;
}
+
+ @WebMethod
+ @GET
+ @Path("/manifest.webmanifest")
+ @Produces({"application/manifest+json"})
+ public String getManifest() {
+ JSONObject manifest = new JSONObject();
+ manifest.put("name", OpenmeetingsVariables.getApplicationName()
+ " " + Version.getVersion());
+ manifest.put("short_name",
OpenmeetingsVariables.getApplicationName() + " " + Version.getVersion());
+ manifest.put("description", "Openmeetings provides video
conferencing, instant messaging, white board, collaborative document editing
and other groupware tools.");
+ manifest.put("start_url", "/" +
OpenmeetingsVariables.getApplicationName().toLowerCase(Locale.getDefault()) +
"/?pwa=true");
+ manifest.put("scope", "/");
+ manifest.put("background_color", "#ffffff");
+ manifest.put("theme_color", "#ffffff");
+ manifest.put("dir", "auto");
+ manifest.put("display", "standalone");
+ manifest.put("orientation", "landscape");
+ JSONArray icons = new JSONArray();
+ icons.put(generateIcon("manifest-icon-512.maskable.png",
"512x512", "maskable"));
+ icons.put(generateIcon("manifest-icon-192.maskable.png",
"192x192", "maskable"));
+ manifest.put("icons", icons);
+ manifest.put("prefer_related_applications", "false");
+ return manifest.toString(2);
+ }
+
+ private JSONObject generateIcon(String name, String dimension, String
purpose) {
+ JSONObject icon = new JSONObject();
+ icon.put("src", "/" +
OpenmeetingsVariables.getApplicationName().toLowerCase(Locale.getDefault()) +
"/images/icons/" + name);
+ icon.put("type", "image/png");
+ icon.put("sizes", dimension);
+ icon.put("purpose", purpose);
Review comment:
this one seems to be "maskable" only, should it be parameter?
##########
File path:
openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/InfoWebService.java
##########
@@ -91,4 +98,38 @@ public Info getVersion() {
public Health getHealth() {
return Health.INSTANCE;
}
+
+ @WebMethod
+ @GET
+ @Path("/manifest.webmanifest")
+ @Produces({"application/manifest+json"})
+ public String getManifest() {
+ JSONObject manifest = new JSONObject();
+ manifest.put("name", OpenmeetingsVariables.getApplicationName()
+ " " + Version.getVersion());
+ manifest.put("short_name",
OpenmeetingsVariables.getApplicationName() + " " + Version.getVersion());
+ manifest.put("description", "Openmeetings provides video
conferencing, instant messaging, white board, collaborative document editing
and other groupware tools.");
+ manifest.put("start_url", "/" +
OpenmeetingsVariables.getApplicationName().toLowerCase(Locale.getDefault()) +
"/?pwa=true");
+ manifest.put("scope", "/");
+ manifest.put("background_color", "#ffffff");
+ manifest.put("theme_color", "#ffffff");
+ manifest.put("dir", "auto");
+ manifest.put("display", "standalone");
+ manifest.put("orientation", "landscape");
+ JSONArray icons = new JSONArray();
+ icons.put(generateIcon("manifest-icon-512.maskable.png",
"512x512", "maskable"));
+ icons.put(generateIcon("manifest-icon-192.maskable.png",
"192x192", "maskable"));
Review comment:
I don't really like the idea of having multiple favicons ...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]