Browse Source

lint and note

Olivier Massot 4 years ago
parent
commit
d243b20495

+ 1 - 1
components/Layout/Alert/Content.vue

@@ -10,7 +10,7 @@
     v-on:mouseover="onMouseOver"
     v-on:mouseout="onMouseOut"
   >
-    {{$t(alert.message)}}
+    {{ $t(alert.message) }}
   </v-alert>
 </template>
 

+ 3 - 3
components/Layout/Header.vue

@@ -23,7 +23,7 @@
     <v-btn
       elevation="2"
       color="ot_warning ot_white--text"
-    >{{$t('create')}}</v-btn>
+    >{{ $t('create') }}</v-btn>
 
     <v-tooltip bottom>
       <template v-slot:activator="{ on, attrs }">
@@ -35,7 +35,7 @@
           <a class="no-decoration" :href="properties.homeUrl + '/'"><v-icon class="ot_white--text" small>fa-home</v-icon></a>
         </v-btn>
       </template>
-      <span>{{$t('welcome')}}</span>
+      <span>{{ $t('welcome') }}</span>
     </v-tooltip>
 
 
@@ -52,7 +52,7 @@
     <LayoutHeaderMenu :menu="accountMenu" :avatar="true"></LayoutHeaderMenu>
 
     <a class="text-body pa-3 ml-2 ot_dark_grey ot_white--text text-decoration-none" href="https://support.opentalent.fr/" target="_blank">
-      <span class="d-none d-sm-none d-md-flex">{{$t('help_access')}}</span>
+      <span class="d-none d-sm-none d-md-flex">{{ $t('help_access') }}</span>
       <v-icon class="d-sm-flex d-md-none" color="white">fas fa-question-circle</v-icon>
     </a>
 

+ 2 - 2
components/Layout/Header/Menu.vue

@@ -22,10 +22,10 @@
                  v-on:click="click"
                  color=""
           >
-            <v-icon class="ot_white--text" small>{{menu.icon}}</v-icon>
+            <v-icon class="ot_white--text" small>{{ menu.icon }}</v-icon>
           </v-btn>
         </template>
-        <span>{{$t(menu.title)}}</span>
+        <span>{{ $t(menu.title) }}</span>
       </v-tooltip>
     </template>
     <v-list dense :subheader="true">

+ 1 - 1
components/Layout/Header/Notification.vue

@@ -10,7 +10,7 @@
             <v-icon class="ot_white--text" small>fa-bell</v-icon>
           </v-btn>
         </template>
-        <span>{{$t('notification')}}</span>
+        <span>{{ $t('notification') }}</span>
       </v-tooltip>
     </template>
     <v-list dense>

+ 2 - 2
components/Layout/SubHeader/ActivityYear.vue

@@ -1,6 +1,6 @@
 <template>
   <main class="d-flex">
-    <span class="mr-2 ot_dark_grey--text font-weight-bold">{{$t(label)}} : </span>
+    <span class="mr-2 ot_dark_grey--text font-weight-bold">{{ $t(label) }} : </span>
     <UiXeditableText
       class="activity-year-input"
       type="number"
@@ -8,7 +8,7 @@
       v-on:update="updateActivityYear">
       <template v-slot:xeditable.read="{inputValue}">
         <v-icon aria-hidden="false" class="ot_green--text" x-small>fas fa-edit</v-icon>
-        <strong class="ot_green--text"> {{inputValue}} <span v-if="yearPlusOne">/ {{ parseInt(inputValue) + 1}}</span></strong>
+        <strong class="ot_green--text"> {{ inputValue}} <span v-if="yearPlusOne">/ {{ parseInt(inputValue) + 1 }}</span></strong>
       </template>
     </UiXeditableText>
   </main>

+ 4 - 4
components/Layout/SubHeader/DataTiming.vue

@@ -1,7 +1,7 @@
 <template>
   <main class="d-flex align-baseline">
 
-    <span class="mr-2 ot_dark_grey--text font-weight-bold">{{$t('display_data')}} : </span>
+    <span class="mr-2 ot_dark_grey--text font-weight-bold">{{ $t('display_data') }} : </span>
 
     <v-btn-toggle
       v-model="historicalBtn"
@@ -11,15 +11,15 @@
       multiple
     >
       <v-btn max-height="25" class="font-weight-normal text-caption">
-        {{$t('past')}}
+        {{ $t('past') }}
       </v-btn>
 
       <v-btn max-height="25" class="font-weight-normal text-caption">
-        {{$t('present')}}
+        {{ $t('present') }}
       </v-btn>
 
       <v-btn max-height="25" class="font-weight-normal text-caption">
-        {{$t('future')}}
+        {{ $t('future') }}
       </v-btn>
 
     </v-btn-toggle>

+ 2 - 2
components/Layout/SubHeader/DataTimingRange.vue

@@ -2,7 +2,7 @@
   <main class="d-flex align-baseline">
 
     <div v-if="show" class="d-flex align-baseline">
-      <span class="mr-2 ot_dark_grey--text font-weight-bold">{{$t('period_choose')}}</span>
+      <span class="mr-2 ot_dark_grey--text font-weight-bold">{{ $t('period_choose') }}</span>
       <UiInputDatePicker
         class="time-range"
         label="date_choose"
@@ -28,7 +28,7 @@
           <v-icon color="ot_grey" class="font-weight-normal" x-small>fas fa-history</v-icon>
         </v-btn>
       </template>
-      <span>{{$t('history_help')}}</span>
+      <span>{{ $t('history_help') }}</span>
     </v-tooltip>
 
   </main>

+ 1 - 1
components/Layout/SubHeader/PersonnalizedList.vue

@@ -13,7 +13,7 @@
           v-on="on"
           class="ot_green--text"
         >
-          {{$t('my_list')}}
+          {{ $t('my_list') }}
         </span>
       </template>
       <v-list>

+ 4 - 4
components/Ui/Button/Delete.vue

@@ -9,19 +9,19 @@
     >
       <template v-slot:dialogText>
         <v-card-title class="text-h5 grey lighten-2">
-          {{$t('attention')}}
+          {{ $t('attention') }}
         </v-card-title>
         <v-card-text>
           <br>
-          <p>{{$t('confirm_to_delete')}}</p>
+          <p>{{ $t('confirm_to_delete') }}</p>
         </v-card-text>
       </template>
       <template v-slot:dialogBtn>
         <v-btn class="mr-4 submitBtn ot_grey ot_white--text" @click="closeDialog">
-          {{$t('cancel')}}
+          {{ $t('cancel') }}
         </v-btn>
         <v-btn class="mr-4 submitBtn ot_danger ot_white--text" @click="deleteItem">
-          {{$t('delete')}}
+          {{ $t('delete') }}
         </v-btn>
       </template>
     </lazy-LayoutDialog>

+ 1 - 1
components/Ui/DataTable.vue

@@ -13,7 +13,7 @@
 
         <template v-for="header in headersWithItem" v-slot:[header.item]="props">
           <slot :name="header.item" v-bind="props">
-            {{props.item[header.value]}}
+            {{ props.item[header.value] }}
           </slot>
         </template>
 

+ 2 - 2
components/Ui/ExpansionPanel.vue

@@ -1,8 +1,8 @@
 <template>
      <v-expansion-panel :id="id" >
        <v-expansion-panel-header class="ot_light_grey">
-         <v-icon class="ot_white--text ot_green icon">{{icon}}</v-icon>
-         {{$t(id)}}
+         <v-icon class="ot_white--text ot_green icon">{{ icon }}</v-icon>
+         {{ $t(id) }}
        </v-expansion-panel-header>
        <v-expansion-panel-content>
         <slot></slot>

+ 7 - 7
components/Ui/Form.vue

@@ -11,7 +11,7 @@
           <v-col cols="12" sm="12">
             <slot name="form.button"></slot>
             <v-btn v-if="!readOnly" class="mr-4 ot_green ot_white--text" @click="submit">
-              {{$t('save')}}
+              {{ $t('save') }}
             </v-btn>
           </v-col>
         </v-row>
@@ -24,7 +24,7 @@
           <v-col cols="12" sm="12">
             <slot name="form.button"></slot>
             <v-btn v-if="!readOnly" class="mr-4 ot_green ot_white--text" @click="submit">
-              {{$t('save')}}
+              {{ $t('save') }}
             </v-btn>
           </v-col>
         </v-row>
@@ -36,22 +36,22 @@
     >
       <template v-slot:dialogText>
         <v-card-title class="text-h5 grey lighten-2">
-          {{$t('attention')}}
+          {{ $t('attention') }}
         </v-card-title>
         <v-card-text>
           <br>
-          <p>{{$t('quit_without_saving_warning')}}</p>
+          <p>{{ $t('quit_without_saving_warning') }}</p>
         </v-card-text>
       </template>
       <template v-slot:dialogBtn>
         <v-btn class="mr-4 submitBtn ot_green ot_white--text" @click="closeDialog">
-          {{$t('back_to_form')}}
+          {{ $t('back_to_form') }}
         </v-btn>
         <v-btn class="mr-4 submitBtn ot_green ot_white--text" @click="saveAndQuit">
-          {{$t('save_and_quit')}}
+          {{ $t('save_and_quit') }}
         </v-btn>
         <v-btn class="mr-4 submitBtn ot_danger ot_white--text" @click="goEvenUnsavedData">
-          {{$t('quit_form')}}
+          {{ $t('quit_form') }}
         </v-btn>
       </template>
     </lazy-LayoutDialog>

+ 1 - 1
components/Ui/Map.vue

@@ -10,7 +10,7 @@
       </l-map>
 
       <v-btn class="mr-4 ot_green ot_white--text" @click="updateMap">
-        {{$t('updateMap')}}
+        {{ $t('updateMap') }}
       </v-btn>
 
     </client-only>

+ 4 - 4
config/nuxtConfig/build.js

@@ -1,10 +1,10 @@
 import webpack from 'webpack'
 
 export default {
-  // Disable server-side rendering (https://go.nuxtjs.dev/ssr-mode)
+  // Enable server-side rendering (https://go.nuxtjs.dev/ssr-mode)
   ssr: true,
 
-  // // Auto import components (https://go.nuxtjs.dev/config-components)
+  // Auto import components (https://go.nuxtjs.dev/config-components)
   components: true,
 
   loading: '~/components/Layout/Loading.vue',
@@ -23,13 +23,13 @@ export default {
     ]
   },
 
-  //Port and local host
+  // Port and local host
   server: {
     port: 3002,
     host: '0.0.0.0', // default: localhost,
   },
 
-  //Poll for hot reloading with docker
+  // Poll for hot reloading with docker
   watchers: {
     webpack: {
       aggregateTimeout: 300,

+ 7 - 6
config/nuxtConfig/head.js

@@ -4,19 +4,20 @@ export default {
     titleTemplate: '%s - admin',
     title: 'admin',
     meta: [
-      {charset: 'utf-8'},
-      {name: 'viewport', content: 'width=device-width, initial-scale=1'},
-      {hid: 'description', name: 'description', content: ''}
+      { charset: 'utf-8' },
+      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
+      { hid: 'description', name: 'description', content: '' }
     ],
     link: [
-      {rel: 'icon', type: 'image/x-icon', href: '/favicon.ico'}
+      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
     ]
   },
 
   // Global CSS (https://go.nuxtjs.dev/config-css)
+  // (https://nuxtjs.org/docs/2.x/features/configuration#the-css-property)
   css: [
-    '@/assets/css/import.scss',
-    '@/assets/css/global.scss',
+    '~/assets/css/import.scss',
+    '~/assets/css/global.scss',
     '@fortawesome/fontawesome-free/css/all.css'
   ]
 }

+ 8 - 0
notes_relecture.md

@@ -0,0 +1,8 @@
+
+
+
+# Config
+
+* config de l'host et du port: la doc mentionne que ce n'est pas conseillé 
+  de les définir ici, en tout cas pour la prod <https://nuxtjs.org/docs/2.x/features/configuration#edit-host-and-port>
+*