Browse Source

Remove the VisioLink and Onboarding popup and related code

pull/1356/head
Timothée Jaussoin 1 year ago
parent
commit
f74e431a94
  1. 1
      CHANGELOG.md
  2. 14
      app/Controllers/PopuptestController.php
  3. 3
      app/Views/popuptest.tpl
  4. 7
      app/Widgets/Onboarding/Onboarding.php
  5. 12
      app/Widgets/Onboarding/_onboarding_popups.tpl
  6. 5
      app/Widgets/Onboarding/locales.ini
  7. 4
      app/Widgets/Onboarding/onboarding.css
  8. 7
      app/Widgets/Onboarding/onboarding.js
  9. 9
      app/Widgets/Visio/Visio.php
  10. 25
      app/Widgets/VisioLink/VisioLink.php
  11. 4
      app/Widgets/VisioLink/visiolink.css
  12. 9
      app/Widgets/VisioLink/visiolink.js
  13. 163
      public/theme/img/popups.svg
  14. 2
      src/Movim/Bootstrap.php
  15. 1
      src/Movim/Route.php

1
CHANGELOG.md

@ -23,6 +23,7 @@ v0.26.1 (master)
* Upgrade the dependencies libraries
* Move the Movim configuration to a new movim:configuration node, use XEP-0004: Data Form to handle the data
* Add a missing cascade foreign key between the sessions and users table
* Remove the VisioLink and Onboarding popup and related code
v0.26
---------------------------

14
app/Controllers/PopuptestController.php

@ -1,14 +0,0 @@
<?php
namespace App\Controllers;
use Movim\Controller\Base;
class PopuptestController extends Base
{
public function load()
{
$this->unique = true;
$this->session_only = true;
}
}

3
app/Views/popuptest.tpl

@ -1,3 +0,0 @@
<script type="text/javascript">
window.close();
</script>

7
app/Widgets/Onboarding/Onboarding.php

@ -24,13 +24,6 @@ class Onboarding extends Base
}
}
public function ajaxAskPopups()
{
$tpl = $this->tpl();
Dialog::fill($tpl->draw('_onboarding_popups'));
$this->rpc('Onboarding.setPopups');
}
public function ajaxEnablePublic()
{
$this->user->setPublic();

12
app/Widgets/Onboarding/_onboarding_popups.tpl

@ -1,12 +0,0 @@
<section id="onboarding" class="popups">
<div class="placeholder">
<h3>{$c->__('onboarding.popups_title')}</h3>
<h4>{$c->__('onboarding.popups_text')}</h4>
<h4>{$c->__('onboarding.popups_text_second')}</h4>
</div>
</section>
<div class="no_bar">
<button onclick="Dialog_ajaxClear(); Onboarding.check();" class="button flat">
{$c->__('button.close')}
</button>
</div>

5
app/Widgets/Onboarding/locales.ini

@ -4,7 +4,4 @@ notifications_text = Movim can notify you when a new post is published or if yo
notifications_text_second = You can always disable them afterwards
public_title = Public profile
public_text = Make your profile public and allow other users to find you and make new contacts more easily
public_text_second = You can always disable this in the configuration afterwards
popups_title = Popups
popups_text = Movim is using popups for the video-conference feature, they are sometimes blocked by the browsers
popups_text_second = Please be sure that they are enabled to use this feature properly
public_text_second = You can always disable this in the configuration afterwards

4
app/Widgets/Onboarding/onboarding.css

@ -8,7 +8,3 @@
#onboarding.public .placeholder {
background-image: url(../theme/img/public.svg);
}
#onboarding.popups .placeholder {
background-image: url(../theme/img/popups.svg);
}

7
app/Widgets/Onboarding/onboarding.js

@ -2,18 +2,11 @@ var Onboarding = {
check: function() {
if (localStorage.getItem('onboardingPublic') === null) {
Onboarding_ajaxAskPublic();
} else if (localStorage.getItem('onboardingPopups') === null) {
Onboarding_ajaxAskPopups();
}
},
setPublic: function() {
localStorage.setItem('onboardingPublic', true);
},
setPopups: function() {
localStorage.setItem('onboardingPopups', true);
window.open(BASE_URI + 'popuptest', '', 'width=100,height=100,status=0,titlebar=0,toolbar=0,menubar=0');
}
}

9
app/Widgets/Visio/Visio.php

@ -102,19 +102,12 @@ class Visio extends Base
$this->rpc('Notif.incomingCall');
$withVideoParameter = $data['withVideo']
? 'true'
: 'false';
Notif::append(
'call',
$contact->truename,
$this->__('visio.calling'),
$contact->getPicture(),
5,
null,
null,
'VisioLink.openVisio(\''.echapJS($data['from']).'\', \''.$data['id'].'\', '.$withVideoParameter.'); Dialog_ajaxClear()'
5
);
}

25
app/Widgets/VisioLink/VisioLink.php

@ -1,25 +0,0 @@
<?php
namespace App\Widgets\VisioLink;
use Movim\Widget\Base;
use Moxl\Xec\Action\Jingle\SessionReject;
class VisioLink extends Base
{
public function load()
{
$this->addjs('visiolink.js');
$this->addcss('visiolink.css');
}
public function ajaxReject($to, $id)
{
$this->rpc('Notification.incomingAnswer');
$reject = new SessionReject;
$reject->setTo($to)
->setId($id)
->request();
}
}

4
app/Widgets/VisioLink/visiolink.css

@ -1,4 +0,0 @@
#visio_dialog img {
border-radius: 100%;
margin: 2rem 0;
}

9
app/Widgets/VisioLink/visiolink.js

@ -1,9 +0,0 @@
var VisioLink = {
openVisio: function(from, id, withVideo) {
Notif.incomingAnswer();
var idUrl = id ? '/' + id : '';
var page = withVideo ? 'visio' : 'visioaudio';
VisioLink.window = window.open(BASE_URI + page + '/' + btoa(from) + idUrl, '', 'width=600,height=400,status=0,titlebar=0,toolbar=0,menubar=0');
}
}

163
public/theme/img/popups.svg

@ -1,163 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="500"
height="500"
viewBox="0 0 132.29166 132.29167"
version="1.1"
id="svg8"
inkscape:version="0.92.0 r15299"
sodipodi:docname="popup.svg">
<defs
id="defs2">
<filter
inkscape:collect="always"
style="color-interpolation-filters:sRGB"
id="filter4781"
x="-0.051472343"
width="1.1029447"
y="-0.06538378"
height="1.1307676">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="1.3335"
id="feGaussianBlur4783" />
</filter>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.8"
inkscape:cx="110.29032"
inkscape:cy="282.84172"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1080"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
showguides="true">
<inkscape:grid
type="xygrid"
id="grid4552" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-164.70832)">
<path
inkscape:connector-curvature="0"
style="opacity:1;fill:#b3b3b3;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 26.458336,220.29149 c -1.46579,0 -2.645833,1.18004 -2.645833,2.64583 v 43.82162 a 55.5625,55.5625 0 0 0 42.39999,19.74505 55.5625,55.5625 0 0 0 52.850007,-38.50928 v -25.05739 c 0,-1.46579 -1.18004,-2.64583 -2.64583,-2.64583 z"
id="path4562-7" />
<circle
style="opacity:0.1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4562"
cx="66.212654"
cy="230.92097"
r="55.5625" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2.51660657;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4680"
width="75.406258"
height="5.291647"
x="26.458324"
y="222.91666"
ry="1.7638807" />
<circle
style="opacity:1;fill:#689f38;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4684"
cx="105.82998"
cy="225.56248"
r="1.3229166" />
<circle
style="opacity:1;fill:#ff9800;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4686"
cx="109.79873"
cy="225.56248"
r="1.3229166" />
<circle
style="opacity:1;fill:#f44336;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4688"
cx="113.76748"
cy="225.56248"
r="1.3229166" />
<rect
style="opacity:0.53299997;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.99999988;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4781)"
id="rect4678-7-6"
width="62.177078"
height="48.947918"
x="7.9375057"
y="197.78123"
ry="1.7638868"
transform="matrix(1.1621621,0,0,1.1621621,-1.2871624,-32.072617)" />
<rect
style="opacity:1;fill:#333333;fill-opacity:1;stroke:none;stroke-width:2.32432413;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4678-7"
width="72.259842"
height="56.88541"
x="7.9375057"
y="197.78123"
ry="2.0499225" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:3.4864862;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4707"
width="64.822914"
height="46.30209"
x="11.90625"
y="204.39581"
ry="8.1487542e-06" />
<circle
style="opacity:1;fill:#689f38;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4684-7"
cx="67.471252"
cy="201.10078"
r="1.3229166" />
<circle
style="opacity:1;fill:#ff9800;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4686-4"
cx="71.440018"
cy="201.10078"
r="1.3229166" />
<circle
style="opacity:1;fill:#f44336;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4688-0"
cx="75.408768"
cy="201.10078"
r="1.3229166" />
<path
style="fill:none;fill-rule:evenodd;stroke:#689f38;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 27.11979,227.98589 10.583333,10.58333 23.8125,-23.8125"
id="path4785"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" />
</g>
</svg>

2
src/Movim/Bootstrap.php

@ -267,7 +267,7 @@ class Bootstrap
'ContactData','ContactHeader','ContactSubscriptions','Dialog','Drawer','EmojisConfig',
'Location','Login','Menu','Navigation','Notif', 'Notifications','NewsNav','Post',
'PostActions','Presence','Publish','Rooms','RoomsExplore', 'RoomsUtils', 'Stickers',
'Toast','Upload','Vcard4','Visio','VisioLink'];
'Toast','Upload','Vcard4','Visio'];
}
/**

1
src/Movim/Route.php

@ -43,7 +43,6 @@ class Route extends Base
'news' => false,
'post' => ['s', 'n', 'i'],
'picture' => ['url'],
'popuptest' => false,
'publish' => ['s', 'n', 'i', 'rs', 'rn', 'ri'],
'room' => ['r'],
'share' => ['url'],

Loading…
Cancel
Save