fablabbcn / smartcitizen-web

The Smart Citizen Kit platform
https://smartcitizen.me
GNU Affero General Public License v3.0
13 stars 7 forks source link

Button re-styling using Font Awesome library & Custom Palette #393

Closed tuengominh closed 5 years ago

tuengominh commented 5 years ago

Hi @viktorsmari @pral2a @marcelirodriguez

Here's the new pull request to closes issue #378

About bringing the SD Card to the user profile view, I found a condition here in src/app/core/constructors/kit/previewKit.constructor.js

Screen Shot 2019-06-03 at 3 41 45 PM

From what I understand the condition object.kid_id means the kit is not an Unknown kit.

Please help me review again and let me know if I should bring the SD card button to the user profile view without the condition.

Thanks

pral2a commented 5 years ago

From what I understand the condition object.kid_id means the kit is not an Unknown kit.

Exactly that ensures the kit type is known or otherwise data can't be uploaded. This is done as sometimes the kit type (AKA kit_id) is not defined at creation time.

pral2a commented 5 years ago

Thanks for the work. I will check it later!

pral2a commented 5 years ago

With the new subdomain across cookies log in doesn't work in localhost. Temporary comment this two lines on the app.route.js

      /* Allow cookies across *.smartcitizen.me Apps */
      $cookiesProvider.defaults.path = '/';
      $cookiesProvider.defaults.domain = '.smartcitizen.me';
pral2a commented 5 years ago

Update the showKit.html section like:

<section flex-gt-xs="50" class="info kit_details_notAuth">
  <div class="kit_details_manage" ng-if="vm.kitBelongsToUser">
    <h4>What you want to do?</h4>
    <div class="kit_details_manage_buttons">
      <md-button class="md-primary md-raised" ui-sref="layout.kitEdit({id: vm.kit.id})" aria-label=""><md-icon style="margin-right:5px" md-font-icon="fa fa-pencil"></md-icon><span>EDIT</span></md-button>
      <md-button class="md-primary md-raised" ng-click="vm.downloadData(vm.kit)">
      <md-icon style="margin-right:5px" 15px class="md-primary md-raised kit_detailed_icon_content" md-font-icon="fa fa-download" ng-click="vm.downloadData(vm.kit)"> </md-icon>
      Download CSV
      </md-button>
      <md-button class="md-primary md-raised" ng-if="vm.kit.setupAvailable" ui-sref="layout.kitEdit({step: 2, id: vm.kit.id})" aria-label="">
      <md-icon style="margin-right:5px" md-font-icon="fa fa-wrench"><span>SET UP</span></md-button>
      <md-button class="md-primary md-raised" ng-if="vm.kit.version" ui-sref="layout.kitUpload({id: vm.kit.id})" aria-label="">
      <span>SD CARD UPLOAD</span></md-button>
      <md-button class="md-primary md-raised" ng-click="vm.removeKit()" aria-label=""> <md-icon style="margin-right:5px" md-font-icon="fa fa-trash"></md-icon><span>DELETE</span></md-button>
    </div>
  </div>
  <div ng-if="!vm.kitBelongsToUser">
    <h4>People looking for a better city</h4>
    <p>Smart Citizen is a a platform to generate participatory processes of the people in the cities. Connecting data, people and knowledge, the objective of the platform is to serve as a node for building productive open indicators and distributed tools, and thereafter the collective construction of the city for its own inhabitants.</p>
    <md-button style="margin: 0px;" class="btn-blue" ng-click="vm.showStore()">GET YOUR KIT AND JOIN US</md-button>
  </div>
</section>
pral2a commented 5 years ago

Also check the kit status on kitList.html

Check the status actually matches the real kit status and the colors are ok.

Ask Marcel if you have any question about the colors

Screenshot 2019-06-06 18 40 15

tuengominh commented 5 years ago

Hello @pral2a

I updated with the latest commits and it works on my local machine :) (The SD card is not here because I logged in with my account and I have a kit with type Unknown"

Screen Shot 2019-06-07 at 9 36 31 AM Screen Shot 2019-06-07 at 9 36 51 AM Screen Shot 2019-06-07 at 9 37 08 AM Screen Shot 2019-06-07 at 9 48 44 AM

Please help me to check, thank you!