Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Add QRCode action for passing user / server name via qrcode to new mo…
Browse files Browse the repository at this point in the history
…bile apps. Disabled by default.

(cherry picked from commit 558aeb1)
  • Loading branch information
cdujeu committed Jul 12, 2016
1 parent 9f0d594 commit e95102c
Show file tree
Hide file tree
Showing 17 changed files with 140 additions and 17 deletions.
19 changes: 18 additions & 1 deletion core/src/plugins/access.ajxp_home/manifest.xml
Expand Up @@ -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>
Expand Down
16 changes: 16 additions & 0 deletions core/src/plugins/access.ajxp_home/res/home.css
Expand Up @@ -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;
Expand Down
17 changes: 17 additions & 0 deletions core/src/plugins/access.ajxp_home/res/home.less
Expand Up @@ -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{
Expand Down
5 changes: 4 additions & 1 deletion core/src/plugins/access.ajxp_home/res/i18n/ca.php
Expand Up @@ -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...",
);
5 changes: 4 additions & 1 deletion core/src/plugins/access.ajxp_home/res/i18n/de.php
Expand Up @@ -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...",
);
5 changes: 4 additions & 1 deletion core/src/plugins/access.ajxp_home/res/i18n/en.php
Expand Up @@ -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...",
);
5 changes: 4 additions & 1 deletion core/src/plugins/access.ajxp_home/res/i18n/es.php
Expand Up @@ -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...",
);
5 changes: 4 additions & 1 deletion core/src/plugins/access.ajxp_home/res/i18n/fr.php
Expand Up @@ -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...",
);
5 changes: 4 additions & 1 deletion core/src/plugins/access.ajxp_home/res/i18n/hu.php
Expand Up @@ -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...",
);
13 changes: 8 additions & 5 deletions core/src/plugins/access.ajxp_home/res/i18n/it.php
Expand Up @@ -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...",
);
5 changes: 4 additions & 1 deletion core/src/plugins/access.ajxp_home/res/i18n/nl.php
Expand Up @@ -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...",
);

5 changes: 4 additions & 1 deletion core/src/plugins/access.ajxp_home/res/i18n/pt.php
Expand Up @@ -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...",
);
5 changes: 4 additions & 1 deletion core/src/plugins/access.ajxp_home/res/i18n/ru.php
Expand Up @@ -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...",
);
5 changes: 4 additions & 1 deletion core/src/plugins/access.ajxp_home/res/i18n/si.php
Expand Up @@ -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...",
);
33 changes: 33 additions & 0 deletions core/src/plugins/access.ajxp_home/res/react/WelcomeComponents.js
Expand Up @@ -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);
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/themes/orbit/css/allz.css

Large diffs are not rendered by default.

Expand Up @@ -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.