Skip to content

Commit

Permalink
Added language option, changed settings button.
Browse files Browse the repository at this point in the history
  • Loading branch information
MrGoumX committed Jan 5, 2020
1 parent 411decd commit ea6adc4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ secondary_logo_url: 'https://www.dept.aueb.gr/schools_department_photos/cs.png'
background_color: '#46484a'
navbar_background_color: '#762124'
navbar_color: '#ffffff'
language: 'el'
4 changes: 3 additions & 1 deletion src/components/Login/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
<ErrorPopup ref="error"/>
</div>
<Settings v-if="showSet"/>
<button class="btn btn-dark setbut" v-on:click="changeSet">{{$t("message.adminBarSettings")}}</button>
<button class="btn btn-light setbut" v-on:click="changeSet">
<i class="fas fa-sliders-h"></i> {{$t("message.adminBarSettings")}}
</button>
</div>
</template>

Expand Down
4 changes: 3 additions & 1 deletion src/components/Settings/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<SimpleFormGroup label="Background color" v-model="form.background_color" :model-data="form.background_color" />
<SimpleFormGroup label="NavBar Background color" v-model="form.navbar_background_color" :model-data="form.navbar_background_color"/>
<SimpleFormGroup label="NavBar color" v-model="form.navbar_color" :model-data="form.navbar_color"/>
<SimpleFormGroup label="Language" v-model="form.language" :model-data="form.language"/>
<button type="submit" class="btn btn-primary float-right mb-4">{{$t("message.settingsSave")}}</button>
</form>
</div>
Expand Down Expand Up @@ -37,7 +38,8 @@
secondary_logo_url: config.secondary_logo_url,
background_color: config.background_color,
navbar_background_color: config.navbar_background_color,
navbar_color: config.navbar_color
navbar_color: config.navbar_color,
language: config.language
}
}
},
Expand Down
4 changes: 3 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ Vue.use(VueRouter);

window.sideOpen = false;

const config = require('electron').remote.getGlobal('config');

const i18n = new VueI18n({
locale: 'el',
locale: config.language,
messages,
});

Expand Down

0 comments on commit ea6adc4

Please sign in to comment.