Permalink
Browse files

Add QRCode action for passing user / server name via qrcode to new mo…

…bile apps. Disabled by default.

(cherry picked from commit 558aeb1)
  • Loading branch information...
1 parent 9f0d594 commit e95102c5ac287c63309b1829133ad34ce99503bb @cdujeu cdujeu committed Jul 6, 2016
@@ -23,9 +23,26 @@
label="CONF_MESSAGE[Windows PydioSync URL]" description="CONF_MESSAGE[URL of the windows sync application]" default="https://pydio.com/en/products/downloads/pydiosync-desktop-app/"/>
<global_param name="URL_APP_SYNC_MAC" type="string" expose="true"
label="CONF_MESSAGE[Mac PydioSync URL]" description="CONF_MESSAGE[URL of the mac sync application]" default="https://pydio.com/en/products/downloads/pydiosync-desktop-app/"/>
-
+ <global_param name="DISPLAY_SERVER_QRCODE_ACTION" type="boolean" label="CONF_MESSAGE[Display Server QRCode]"
+ description="CONF_MESSAGE[Let users connect easily to the latest mobile applications by displaying a QRCode]" default="false"/>
</server_settings>
<registry_contributions>
+ <actions>
+ <action name="display-server-qrcode">
+ <gui src="folder.png" iconClass="mdi mdi-qrcode-scan" text="user_home.72" title="user_home.73">
+ <context actionBarGroup="utils" actionBar="true" dir="true" recycle="true" selection="false" ajxpWidgets="UserWidget::logging_string"/>
+ </gui>
+ <processing>
+ <clientCallback prepareModal="false"><![CDATA[
+ var dialog = new AjxpReactDialogLoader('WelcomeComponents', 'QRCodeDialogLoader', {});
+ dialog.openDialog('qrcode_dialog_form', true);
+ ]]></clientCallback>
+ <clientForm id="qrcode_dialog_form"><![CDATA[
+ <div id="qrcode_dialog_form" box_width="296" box_padding="0" class="react-mui-context SF_material"></div>
+ ]]></clientForm>
+ </processing>
+ </action>
+ </actions>
<client_configs>
<template_part theme="umbra" ajxpId="sidebar_splitter" ajxpClass="AjxpPane" ajxpOptions='{"fit":"height","fake":"option"}'><![CDATA[
<div id="folderPane" ajxpClass="FoldersTree" ajxpOptions='{"display":"dz","replaceScroller":true}' ajxpPaneHeader="363" ajxpPaneIcon="view_tree.png" style="margin:20px;"></div>
@@ -737,6 +737,22 @@ div.home_search span.suggest-search {
right: 380px;
top: 10px;
}
+.form-qrcode_dialog_form {
+ min-width: 296px;
+}
+.form-qrcode_dialog_form .dialogTitle {
+ display: none;
+}
+.form-qrcode_dialog_form .home-qrCode-desc {
+ padding: 0 20px;
+}
+.form-qrcode_dialog_form .home-qrCode {
+ text-align: center;
+}
+.form-qrcode_dialog_form .button-panel {
+ text-align: right;
+ padding: 10px;
+}
@media only screen and (max-width: 980px) {
#notifications_center div.notif_event_container {
width: 100px;
@@ -773,6 +773,23 @@ div.home_search{
}
+.form-qrcode_dialog_form{
+ min-width: 296px;
+ .dialogTitle{
+ display: none;
+ }
+ .home-qrCode-desc{
+ padding: 0 20px;
+ }
+ .home-qrCode{
+ text-align: center;
+ }
+ .button-panel{
+ text-align: right;
+ padding: 10px;
+ }
+}
+
@media only screen
and (max-width : 980px){
#notifications_center div.notif_event_container{
@@ -87,5 +87,8 @@
"69"=> "Download Sync Client for Mac OSX",
"70"=> "Native application for iOS devices",
"71"=> "Native application for Android Devices",
- "72"=> "Search all workspaces...",
+ "72" => "Server QRCode",
+ "73" => "Easily connect your mobile applications",
+ "74" => "Scan this QRCode with your mobile application to easily configure the connection",
+ "75"=> "Search all workspaces...",
);
@@ -84,5 +84,8 @@
"69"=> "Sync-Client für Mac OSX herunterladen",
"70"=> "App für iOS-Geräte",
"71"=> "App für Android-Geräte",
- "72"=> "Search all workspaces...",
+ "72" => "Server QRCode",
+ "73" => "Easily connect your mobile applications",
+ "74" => "Scan this QRCode with your mobile application to easily configure the connection",
+ "75"=> "Search all workspaces...",
);
@@ -84,5 +84,8 @@
"69"=> "Download Sync Client for Mac OSX",
"70"=> "Native application for iOS devices",
"71"=> "Native application for Android Devices",
-"72"=> "Search all workspaces...",
+"72" => "Server QRCode",
+"73" => "Easily connect your mobile applications",
+"74" => "Scan this QRCode with your mobile application to easily configure the connection",
+"75"=> "Search all workspaces...",
);
@@ -88,5 +88,8 @@
"69"=> "Download Sync Client for Mac OSX",
"70"=> "Native application for iOS devices",
"71"=> "Native application for Android Devices",
- "72"=> "Search all workspaces...",
+ "72" => "Server QRCode",
+ "73" => "Easily connect your mobile applications",
+ "74" => "Scan this QRCode with your mobile application to easily configure the connection",
+ "75"=> "Search all workspaces...",
);
@@ -83,5 +83,8 @@
"69"=> "Télécharger l'appli de synchro (Mac)",
"70"=> "Application pour smartphones iOS",
"71"=> "Application pour smartphones Android",
-"72"=> "Chercher dans tous les dépôts...",
+ "72" => "QRCode du serveur",
+ "73" => "Connexion aux applications mobiles",
+ "74" => "Scannez ce QRCode avec votre application mobile pour configurer facilement la connexion.",
+ "75"=> "Chercher dans tous les workspaces...",
);
@@ -87,5 +87,8 @@
"69"=> "Download Sync Client for Mac OSX",
"70"=> "Native application for iOS devices",
"71"=> "Native application for Android Devices",
- "72"=> "Search all workspaces...",
+ "72" => "Server QRCode",
+ "73" => "Easily connect your mobile applications",
+ "74" => "Scan this QRCode with your mobile application to easily configure the connection",
+ "75"=> "Search all workspaces...",
);
@@ -80,9 +80,12 @@
<li>Protezione dell'app attraverso un codice PIN</li>
<li>Uso dei segnalibri e del motore di ricerca</li></ul>",
"67"=> "Non sei %s, %logout",
- "68"=> "Download Sync Client for Windows",
- "69"=> "Download Sync Client for Mac OSX",
- "70"=> "Native application for iOS devices",
- "71"=> "Native application for Android Devices",
- "72"=> "Search all workspaces...",
+ "68"=> "Download Client Sync per Windows",
+ "69"=> "Download Client Sync per Mac OSX",
+ "70"=> "Applicazione nativa per dispositivi iOS",
+ "71"=> "Applicazione nativa per dispositivi Android",
+ "72" => "Server QRCode",
+ "73" => "Easily connect your mobile applications",
+ "74" => "Scan this QRCode with your mobile application to easily configure the connection",
+ "75"=> "Search all workspaces...",
);
@@ -84,6 +84,9 @@
"69"=> "Download Sync Client for Mac OSX",
"70"=> "Native application for iOS devices",
"71"=> "Native application for Android Devices",
- "72"=> "Search all workspaces...",
+ "72" => "Server QRCode",
+ "73" => "Easily connect your mobile applications",
+ "74" => "Scan this QRCode with your mobile application to easily configure the connection",
+ "75"=> "Search all workspaces...",
);
@@ -84,5 +84,8 @@
"69"=> "Download Sync Client for Mac OSX",
"70"=> "Native application for iOS devices",
"71"=> "Native application for Android Devices",
- "72"=> "Search all workspaces...",
+ "72" => "Server QRCode",
+ "73" => "Easily connect your mobile applications",
+ "74" => "Scan this QRCode with your mobile application to easily configure the connection",
+ "75"=> "Search all workspaces...",
);
@@ -84,5 +84,8 @@
"69"=> "Download Sync Client for Mac OSX",
"70"=> "Native application for iOS devices",
"71"=> "Native application for Android Devices",
- "72"=> "Search all workspaces...",
+ "72" => "Server QRCode",
+ "73" => "Easily connect your mobile applications",
+ "74" => "Scan this QRCode with your mobile application to easily configure the connection",
+ "75"=> "Search all workspaces...",
);
@@ -85,5 +85,8 @@
"69"=> "Download Sync Client for Mac OSX",
"70"=> "Native application for iOS devices",
"71"=> "Native application for Android Devices",
- "72"=> "Search all workspaces...",
+ "72" => "Server QRCode",
+ "73" => "Easily connect your mobile applications",
+ "74" => "Scan this QRCode with your mobile application to easily configure the connection",
+ "75"=> "Search all workspaces...",
);
@@ -708,9 +708,42 @@
});
+ var QRCodeDialogLoader = React.createClass({
+
+ closeClicked: function(){
+ this.props.closeAjxpDialog();
+ },
+
+ render: function(){
+
+ let jsonData = {
+ "server" : global.location.href.split('welcome').shift(),
+ "user" : global.pydio.user ? global.pydio.user.id : null
+ }
+
+ return (
+ <div>
+ <div className="home-qrCode-desc">
+ <h4>{global.pydio.MessageHash['user_home.72']}</h4>
+ <p>{global.pydio.MessageHash['user_home.74']}</p>
+ </div>
+ <div className="home-qrCode">
+ <ReactQRCode value={JSON.stringify(jsonData)} size={256}/>
+ <div className="button-panel">
+ <ReactMUI.FlatButton label="Close" onClick={this.closeClicked}/>
+ </div>
+ </div>
+ </div>
+ );
+
+ }
+
+ });
+
var WelcomeComponents = global.WelcomeComponents || {};
WelcomeComponents.UserDashboard = UserDashboard;
WelcomeComponents.TutorialPane = TutorialPane;
+ WelcomeComponents.QRCodeDialogLoader = QRCodeDialogLoader;
global.WelcomeComponents = WelcomeComponents;
})(window);
Oops, something went wrong.
@@ -163,3 +163,10 @@
content: "\f315";
}
+.mdi-qrcode:before {
+ content: "\f521";
+}
+
+.mdi-qrcode-scan:before {
+ content: "\f522";
+}

0 comments on commit e95102c

Please sign in to comment.