From 81ffcf9c1b623a56200d4678aeefa034c9676d7b Mon Sep 17 00:00:00 2001 From: Keith Holliday Date: Fri, 29 Jun 2018 11:35:22 -0500 Subject: [PATCH 1/4] Added login path for Spritely (#10484) --- website/client/components/settings/api.vue | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/website/client/components/settings/api.vue b/website/client/components/settings/api.vue index d9abca8c05..d161024313 100644 --- a/website/client/components/settings/api.vue +++ b/website/client/components/settings/api.vue @@ -85,6 +85,12 @@ export default { showApiToken: false, }; }, + mounted () { + window.addEventListener('message', this.receiveMessage, false); + }, + destroy () { + window.removeEventListener('message', this.receiveMessage); + }, computed: { ...mapState({user: 'user.data', credentials: 'credentials'}), apiToken () { @@ -92,6 +98,15 @@ export default { }, }, methods: { + receiveMessage (eventFrom) { + if (event.origin !== 'https://www.spritely.app') return; + + const creds = { + userId: this.user._id, + apiToken: this.credentials.API_TOKEN, + }; + eventFrom.source.postMessage(creds, event.origin); + }, async addWebhook (url) { let webhookInfo = { id: uuid(), From 573f2e473217f505717ceb5e1db7f6ed0c418c27 Mon Sep 17 00:00:00 2001 From: Matteo Pagliazzi Date: Fri, 29 Jun 2018 20:03:45 +0200 Subject: [PATCH 2/4] fix preening when history entries are null --- website/server/libs/preening.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/server/libs/preening.js b/website/server/libs/preening.js index 527cca6dff..34f769815d 100644 --- a/website/server/libs/preening.js +++ b/website/server/libs/preening.js @@ -41,6 +41,7 @@ export function preenHistory (history, isSubscribed, timezoneOffset = 0, dayStar // Keep uncompressed entries (modifies history and returns removed items) let newHistory = _.remove(history, entry => { + if (!entry) return true; // sometimes entries are `null` const entryDate = moment(entry.date).zone(timezoneOffset); if (entryDate.hour() < dayStart) entryDate.subtract(1, 'day'); return entryDate.isSame(cutOff) || entryDate.isAfter(cutOff); @@ -49,6 +50,7 @@ export function preenHistory (history, isSubscribed, timezoneOffset = 0, dayStar // Date after which to begin compressing data by year let monthsCutOff = cutOff.subtract(isSubscribed ? 12 : 10, 'months').startOf('day'); let aggregateByMonth = _.remove(history, entry => { + if (!entry) return true; // sometimes entries are `null` const entryDate = moment(entry.date).zone(timezoneOffset); if (entryDate.hour() < dayStart) entryDate.subtract(1, 'day'); return entryDate.isSame(monthsCutOff) || entryDate.isAfter(monthsCutOff); From cdfcc6419f6fe548d40dfba196f736121dc6b182 Mon Sep 17 00:00:00 2001 From: Sabe Jones Date: Fri, 29 Jun 2018 19:03:36 +0000 Subject: [PATCH 3/4] chore(i18n): update locales --- website/common/locales/pt/content.json | 2 +- website/common/locales/pt/front.json | 4 ++-- website/common/locales/pt/tasks.json | 2 +- website/common/locales/zh_TW/settings.json | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/website/common/locales/pt/content.json b/website/common/locales/pt/content.json index c2d05bc02c..3111a0d2be 100644 --- a/website/common/locales/pt/content.json +++ b/website/common/locales/pt/content.json @@ -195,7 +195,7 @@ "hatchingPotionFairy": "Fada", "hatchingPotionStarryNight": "Noite Estrelada", "hatchingPotionRainbow": "Arco-Íris", - "hatchingPotionGlass": "Glass", + "hatchingPotionGlass": " de Vidro", "hatchingPotionNotes": "Utilize isto num ovo, e ele chocará como um mascote <%= potText(locale) %>.", "premiumPotionAddlNotes": "Não utilizável nos ovos de mascote de missão.", "foodMeat": "Carne", diff --git a/website/common/locales/pt/front.json b/website/common/locales/pt/front.json index 6636fc8f98..ed321a6721 100644 --- a/website/common/locales/pt/front.json +++ b/website/common/locales/pt/front.json @@ -112,7 +112,7 @@ "marketing2Lead3Title": "Desafiem-se Uns aos Outros", "marketing2Lead3": "Os desafios permitem-te competir com amigos e desconhecidos. Quem tiver o melhor desempenho ao fim de um desafio ganha prémios especiais.", "marketing3Header": "Aplicações e Extensões", - "marketing3Lead1": "The **iPhone & Android** apps let you take care of business on the go. We realize that logging into the website to click buttons can be a drag.", + "marketing3Lead1": "As aplicações para **iPhone & Android** permitem-te tratar dos assuntos em movimento. Temos noção de que entrar no site para clicar em botões pode ser aborrecido.", "marketing3Lead2Title": "Integrações", "marketing3Lead2": "Other **3rd Party Tools** tie Habitica into various aspects of your life. Our API provides easy integration for things like the [Chrome Extension](https://chrome.google.com/webstore/detail/habitica/pidkmpibnnnhneohdgjclfdjpijggmjj?hl=en-US), for which you lose points when browsing unproductive websites, and gain points when on productive ones. [See more here](http://habitica.wikia.com/wiki/Extensions,_Add-Ons,_and_Customizations).", "marketing4Header": "Utilização Organizacional", @@ -139,7 +139,7 @@ "playButtonFull": "Entrar no Habitica", "presskit": "Pacote de Imprensa", "presskitDownload": "Baixar todas as imagens:", - "presskitText": "Thanks for your interest in Habitica! The following images can be used for articles or videos about Habitica. For more information, please contact us at <%= pressEnquiryEmail %>.", + "presskitText": "Obrigada pelo teu interesse no Habitica! As imagens seguintes podem ser usadas em artigos ou vídeos ou o Habitica. Para mais informações, por favor contacta-nos aqui: <%= pressEnquiryEmail %>.", "pkQuestion1": "O que inspirou o Habitica? Como é que começou?", "pkAnswer1": "If you’ve ever invested time in leveling up a character in a game, it’s hard not to wonder how great your life would be if you put all of that effort into improving your real-life self instead of your avatar. We starting building Habitica to address that question.
Habitica officially launched with a Kickstarter in 2013, and the idea really took off. Since then, it’s grown into a huge project, supported by our awesome open-source volunteers and our generous users.", "pkQuestion2": "Porque é que o Habitica funciona?", diff --git a/website/common/locales/pt/tasks.json b/website/common/locales/pt/tasks.json index e8a43cbc45..885bc37139 100644 --- a/website/common/locales/pt/tasks.json +++ b/website/common/locales/pt/tasks.json @@ -5,7 +5,7 @@ "sureDeleteCompletedTodos": "Tens a certeza de que queres apagar os teus Afazeres concluídos?", "lotOfToDos": "Os seus 30 Afazeres mais recentes são mostrados aqui. Pode ver os afazeres concluídos mais antigos de Dados > Ferramenta de Exibição de Dados ou Dados > Exportar Dados > Dados do Utilizador.", "deleteToDosExplanation": "Se carregar no botão abaixo, todos os seus Afazeres completos e arquivados serão permanentemente apagados, excepto Afazeres pertencentes a desafios correntemente ativos ou Planos de Grupo. Exporte-os primeiro se quiser manter um registo dos mesmos.", - "addMultipleTip": "Tip: To add multiple <%= taskType %>, separate each one using a line break (Shift + Enter) and then press \"Enter.\"", + "addMultipleTip": "Dica: Para adicionar <%= taskType %> em simultâneo, separa cada um usando um parágrafo (Shift + Enter) e no fim pressiona \"Enter\".", "addsingle": "Adicionar Único", "addATask": "Adicionar <%= type %>", "editATask": "Editar <%= type %>", diff --git a/website/common/locales/zh_TW/settings.json b/website/common/locales/zh_TW/settings.json index 27c921ed51..24c5ff1581 100644 --- a/website/common/locales/zh_TW/settings.json +++ b/website/common/locales/zh_TW/settings.json @@ -70,8 +70,8 @@ "APIv3": "API v3", "APIText": "這個是使用再第三方應用上面的。但是,你的 API Token 相當於密碼,請不要公開它。有時候別人可能會向你要UUID,但是永遠不要把你的 API token 分享給其他人,包括在 Github 上。", "APIToken": "API Token(這相當於密碼——注意看上面的警告!)", - "showAPIToken": "Show API Token", - "hideAPIToken": "Hide API Token", + "showAPIToken": "顯示API Token", + "hideAPIToken": "隱藏API Token", "APITokenWarning": "If you need a new API Token (e.g., if you accidentally shared it), email <%= hrefTechAssistanceEmail %> with your User ID and current Token. Once it is reset you will need to re-authorize everything by logging out of the website and mobile app and by providing the new Token to any other Habitica tools that you use.", "thirdPartyApps": "第三方應用程式", "dataToolDesc": "A webpage that shows you certain information from your Habitica account, such as statistics about your tasks, equipment, and skills.", @@ -105,7 +105,7 @@ "usernameOrEmail": "登入名稱或電子郵件", "email": "Email", "registerWithSocial": "使用<%= network %>註冊", - "registeredWithSocial": "Registered with <%= network %>", + "registeredWithSocial": "已使用<%= network %>註冊", "loginNameDescription": "This is what you use to log in to Habitica. To change it, use the form below. If instead you want to change the Display Name that appears on your avatar and in chat messages, go to the User Icon > Profile and click the Edit button.", "emailNotifications": "電子郵件通知", "wonChallenge": "你贏得一個挑戰!", From 0a8109e496c771e46f2813da83263b8e2f81493f Mon Sep 17 00:00:00 2001 From: Sabe Jones Date: Fri, 29 Jun 2018 19:05:53 +0000 Subject: [PATCH 4/4] 4.50.3 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index e79b2f1cf1..e0dc82ccb1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "habitica", - "version": "4.50.2", + "version": "4.50.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 4e57376b2a..00dfcdc508 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "habitica", "description": "A habit tracker app which treats your goals like a Role Playing Game.", - "version": "4.50.2", + "version": "4.50.3", "main": "./website/server/index.js", "dependencies": { "@slack/client": "^3.8.1",