Skip to content

Commit

Permalink
⬆️ updating Meteor.js version to 1.10.1
Browse files Browse the repository at this point in the history
⬆️ regular package dependency updates
♻️ replacing chart.js with frappe-charts
🌐 improving the intialization of i18n
🐛 fixed the sort order of project/resource/customer dropdown
  • Loading branch information
faburem committed Mar 21, 2020
1 parent 324b56c commit 5313a1c
Show file tree
Hide file tree
Showing 22 changed files with 4,480 additions and 550 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: butlerlogic/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag_message: github.event.head_commit.message
tag_message: ${{ github.event.head_commit.message }}
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
Expand Down
10 changes: 5 additions & 5 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# but you can also edit it by hand.

[email protected] # Packages every Meteor app needs to have
mobile-experience@1.0.5 # Packages for a great mobile UX
mongo@1.8.0 # The database Meteor supports right now
mobile-experience@1.1.0 # Packages for a great mobile UX
mongo@1.9.0 # The database Meteor supports right now
[email protected] # Compile .html files into Meteor Blaze views
[email protected] # Reactive variable for tracker
[email protected] # Meteor's client-side reactive programming library
Expand All @@ -15,12 +15,12 @@ [email protected] # CSS minifier run for production mode
[email protected] # JS minifier run for production mode
[email protected] # ECMAScript 5 compatibility for older browsers.
[email protected] # Enable ECMAScript2015+ syntax in app code
shell-server@0.4.0 # Server-side component of the `meteor shell` command
shell-server@0.5.0 # Server-side component of the `meteor shell` command

fourseven:[email protected]
accounts-password@1.5.2
accounts-password@1.6.0
[email protected]
random@1.1.0
random@1.2.0
[email protected]
ostrio:loggerconsole
faburem:client-server-logger
Expand Down
2 changes: 1 addition & 1 deletion .meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
METEOR@1.9.2
METEOR@1.10.1
26 changes: 13 additions & 13 deletions .meteor/versions
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
accounts-base@1.5.0
accounts-password@1.5.3
accounts-base@1.6.0
accounts-password@1.6.0
[email protected]
[email protected]
[email protected]
Expand All @@ -9,7 +9,7 @@ [email protected]
[email protected]
[email protected]
[email protected]
boilerplate-generator@1.6.0
boilerplate-generator@1.7.0
brettle:[email protected]
brettle:[email protected]
brettle:[email protected]
Expand Down Expand Up @@ -44,35 +44,35 @@ [email protected]
[email protected]
[email protected]
[email protected]
[email protected].0
[email protected].1
[email protected]
launch-screen@1.1.1
launch-screen@1.2.0
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
minimongo@1.4.5
mobile-experience@1.0.5
mobile-status-bar@1.0.14
minimongo@1.5.0
mobile-experience@1.1.0
mobile-status-bar@1.1.0
[email protected]
[email protected]
[email protected]
mongo@1.8.1
mongo@1.9.0
[email protected]
[email protected]
[email protected]
[email protected]
npm-mongo@3.3.0
npm-mongo@3.7.0
[email protected]
[email protected]
ostrio:[email protected]
ostrio:[email protected]
ostrio:[email protected]
[email protected]
random@1.1.0
random@1.2.0
[email protected]
[email protected]
[email protected]
Expand All @@ -81,7 +81,7 @@ [email protected]
[email protected]
[email protected]
[email protected]
shell-server@0.4.0
shell-server@0.5.0
[email protected]
[email protected]
[email protected]
Expand All @@ -97,5 +97,5 @@ tunguska:[email protected]
[email protected]
[email protected]
[email protected]
webapp@1.8.2
webapp@1.9.0
[email protected]
21 changes: 19 additions & 2 deletions imports/startup/client/startup.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ Meteor.startup(() => {
if (getUserSetting('language')) {
language = getUserSetting('language') === 'auto' ? navigator.language.substring(0, 2) : getUserSetting('language')
}
loadLanguage(language)
if (!i18nextReady.get() || i18next.language !== language) {
loadLanguage(language)
}
import('popper.js').then((Popper) => {
// window.Tether = Tether.default
window.Popper = Popper.default
Expand All @@ -105,7 +107,9 @@ Meteor.startup(() => {
})
})
} else if (!Meteor.user() && !Meteor.loggingIn()) {
loadLanguage(language)
if (!i18nextReady.get()) {
loadLanguage(language)
}
}
if (i18nextReady.get()) {
import('sweetalert2/dist/sweetalert2.js').then((Swal) => {
Expand Down Expand Up @@ -210,6 +214,19 @@ Template.registerHelper('timeunit', () => {
}
return false
})
Template.registerHelper('timeunitVerbose', () => {
if (!Meteor.loggingIn() && Meteor.user() && Meteor.user().profile && i18nextReady.get()) {
switch (getUserSetting('timeunit')) {
case 'h':
return i18next.t('globals.hour_plural')
case 'd':
return i18next.t('globals.day_plural')
default:
return i18next.t('globals.hour_plural')
}
}
return false
})
Template.registerHelper('timetrackview', () => {
if (!Meteor.loggingIn() && Meteor.user() && Meteor.user().profile) {
return getUserSetting('timetrackview') ? getUserSetting('timetrackview') : getGlobalSetting('timetrackview')
Expand Down
29 changes: 0 additions & 29 deletions imports/startup/client/useraccounts-configuration.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,3 @@
// import i18next from 'i18next'
// import { AccountsTemplates } from 'meteor/useraccounts:core'
//
// AccountsTemplates.configure({
// defaultLayout: 'appLayout',
// defaultLayoutRegions: {},
// defaultContentRegion: 'main',
// showForgotPasswordLink: true,
// overrideLoginErrors: true,
// enablePasswordChange: true,
// negativeValidation: true,
// positiveValidation: true,
// negativeFeedback: false,
// positiveFeedback: true,
// texts: {
// errors: {
// // mustBeLoggedIn: i18next.t('login.login_or_signup'),
// // loginForbidden: i18next.t('login.login_failed'),
// },
// },
// })
// AccountsTemplates.addField({
// _id: 'name',
// type: 'text',
// placeholder: {
// // signUp: i18next.t('fullname_placholder'),
// },
// required: true,
// })
import { FlowRouter } from 'meteor/ostrio:flow-router-extra'

Accounts.onResetPasswordLink((token, done) => {
Expand Down
23 changes: 8 additions & 15 deletions imports/ui/components/allprojectschart.html
Original file line number Diff line number Diff line change
@@ -1,30 +1,23 @@
<template name="allprojectschart">
<div class="row">
<div class="col-12 col-md-4">
<!-- {{#if allTeamMembers}} Team: {{allTeamMembers}}<br/> {{/if}} -->
{{t "overview.total_time_tracked"}} <br/>
{{timeInUserUnit(totalHours)}} ({{timeunit}})<br/>
{{timeInUserUnit(totalHours)}} ({{timeunitVerbose}})<br/>
</div>
<div class="d-none d-md-block col-md-3 text-center">
{{#if topTasks}}
<p>{{t "overview.top_tasks"}}</p>
<span>{{t "overview.top_tasks"}}</span>
{{else}}
<p>&nbsp;</p>
<span>&nbsp;</span>
{{/if}}
<div class="js-pie-chart-container">
<div style="margin:auto; width:122px; height:122px; border-radius:50%; background-color: rgba(0,0,0,0.1);"></div>
<div class="js-pie-chart-container" style="max-height: 160px;">
<div class="my-2" style="margin:auto; width:144px; height:144px; border-radius:50%; background-color: rgba(0,0,0,0.1);"></div>
</div>
<!-- <ol>
{{#each topTasks}}
<li><span class="d-block text-truncate" style="max-width:100%;" data-toggle="tooltip" data-placement="top" title="{{_id}}">{{_id}}</span></li>
{{/each}}
</ol> -->
<!-- Top tasks: {{topTasks}} -->
</div>
<div class="d-none d-md-block col-md-5 text-center">
<p>{{t "overview.three_month_history"}}</p>
<div class="js-chart-container">
<div style="margin:auto; width:428px; height:132px; background-color:rgba(0,0,0,0.1);"></div>
<span>{{t "overview.three_month_history"}}</span>
<div class="js-chart-container" style="max-height: 160px;">
<div class="my-2" style="margin:auto; width:240px; height:135px; background-color:rgba(0,0,0,0.1);"></div>
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit 5313a1c

Please sign in to comment.