Compare commits

..

12 Commits

Author SHA1 Message Date
Sabe Jones
ee5dd5842b 4.74.2 2018-11-28 16:18:20 -06:00
Sabe Jones
074b8138de Merge branch 'develop' into release 2018-11-28 16:18:10 -06:00
Sabe Jones
cd0b9c0a96 4.74.1 2018-11-28 15:57:54 -06:00
Sabe Jones
a09516944d fix(packages): revert package lock 2018-11-28 15:57:36 -06:00
Sabe Jones
b82660823d Merge branch 'release' into develop 2018-11-28 20:57:37 +00:00
Matteo Pagliazzi
bf7fabb20a fix(amazon): add new env variable to specify environment 2018-11-28 11:07:06 +01:00
Sabe Jones
88a2f317d8 Merge branch 'release' into develop 2018-11-27 19:46:39 -06:00
Matteo Pagliazzi
5a725fa4b0 update package-lock.json 2018-11-27 22:17:43 +01:00
Sabe Jones
7b687280d7 Merge branch 'release' into develop 2018-11-26 19:10:05 +00:00
Phillip Thelen
42b146d5d0 Attach client to chat messages (#10845)
* Attach client to chat messages

* Word

* Design tweaks

* Fix potential error
2018-11-26 10:45:42 +01:00
Nathan Zimmerman
2bebaf2cf8 Fixes issue #10857 ("Tags have extra space at the bottom when they should be centered") (#10861)
* Fix for #10857 centered category tag text

* Fixes #10857 and #10856 display tag markdown.
2018-11-26 10:44:41 +01:00
Matteo Pagliazzi
6181328ac1 feat(footer): always show expanded footer (#10862) 2018-11-26 10:37:29 +01:00
13 changed files with 5667 additions and 5729 deletions

View File

@@ -44,7 +44,8 @@
"SELLER_ID": "SELLER_ID",
"CLIENT_ID": "CLIENT_ID",
"MWS_KEY": "",
"MWS_SECRET": ""
"MWS_SECRET": "",
"MODE": "sandbox"
},
"FLAG_REPORT_EMAIL": "email@mod.com,email2@mod.com",
"EMAIL_SERVER": {

11327
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{
"name": "habitica",
"description": "A habit tracker app which treats your goals like a Role Playing Game.",
"version": "4.74.0",
"version": "4.74.2",
"main": "./website/server/index.js",
"dependencies": {
"@slack/client": "^3.8.1",

View File

@@ -19,6 +19,7 @@ setupNconf(configFile);
const AMAZON_SELLER_ID = nconf.get('AMAZON_PAYMENTS:SELLER_ID') || nconf.get('AMAZON_PAYMENTS_SELLER_ID');
const AMAZON_CLIENT_ID = nconf.get('AMAZON_PAYMENTS:CLIENT_ID') || nconf.get('AMAZON_PAYMENTS_CLIENT_ID');
const AMAZON_MODE = nconf.get('AMAZON_PAYMENTS:MODE') || nconf.get('AMAZON_PAYMENTS_MODE');
let env = {
NODE_ENV: '"production"',
@@ -26,6 +27,7 @@ let env = {
AMAZON_PAYMENTS: {
SELLER_ID: `"${AMAZON_SELLER_ID}"`,
CLIENT_ID: `"${AMAZON_CLIENT_ID}"`,
MODE: `"${AMAZON_MODE}"`,
},
EMAILS: {
COMMUNITY_MANAGER_EMAIL: `"${nconf.get('EMAILS:COMMUNITY_MANAGER_EMAIL')}"`,

View File

@@ -2,8 +2,8 @@
.row.footer-row
buy-gems-modal(v-if='user')
//modify-inventory(v-if="isUserLoaded")
footer.col-12(:class="{expanded: isExpandedFooter}")
.row(v-if="isExpandedFooter")
footer.col-12.expanded
.row
.col-12.col-md-2
h3
a(href='https://itunes.apple.com/us/app/habitica/id994882113?ls=1&mt=8', target='_blank') {{ $t('mobileIOS') }}
@@ -103,11 +103,6 @@
.col-12.col-md-2.text-center
.logo.svg-icon(v-html='icons.gryphon')
.col-12.col-md-5.text-right
template(v-if="!isExpandedFooter")
span
a(:href="getDataDisplayToolUrl", target='_blank') {{ $t('dataDisplayTool') }}
span.ml-4
a(target="_blanck", href="/static/community-guidelines") {{ $t('communityGuidelines') }}
span.ml-4
a(target="_blanck", href="/static/privacy") {{ $t('privacy') }}
span.ml-4
@@ -128,13 +123,6 @@
a {
color: #2995cd;
}
&:not(.expanded) {
hr {
margin-top: 0px;
margin-bottom: 7px;
}
}
}
h3 {
@@ -282,9 +270,6 @@ export default {
computed: {
...mapState({user: 'user.data'}),
...mapState(['isUserLoaded']),
isExpandedFooter () {
return this.$route.name === 'tasks' ? false : true;
},
getDataDisplayToolUrl () {
const base = 'https://oldgods.net/habitrpg/habitrpg_user_data_display.html';
if (!this.user) return;

View File

@@ -15,7 +15,8 @@ div
p.time
span.mr-1(v-if="msg.username") @{{ msg.username }}
span.mr-1(v-if="msg.username")
span(v-b-tooltip="", :title="msg.timestamp | date") {{ msg.timestamp | timeAgo }}
span(v-b-tooltip="", :title="msg.timestamp | date") {{ msg.timestamp | timeAgo }} 
span(v-if="msg.client && user.contributor.level >= 4") ({{ msg.client }})
.text(v-html='atHighlight(parseMarkdown(msg.text))')
hr
.d-flex(v-if='msg.id')

View File

@@ -94,7 +94,7 @@
.tags-popover
.d-flex.align-items-center.tags-container
.tags-popover-title(v-once) {{ `${$t('tags')}:` }}
.tag-label(v-for="tag in getTagsFor(task)") {{tag}}
.tag-label(v-for="tag in getTagsFor(task)", v-markdown="tag")
// Habits right side control
.right-control.d-flex.align-items-center.justify-content-center(v-if="task.type === 'habit'", :class="controlClass.down.bg")
@@ -490,6 +490,11 @@
white-space: nowrap;
margin-top: 3px;
margin-bottom: 3px;
// Applies to v-markdown generated p tag.
p {
margin-bottom: 0px;
}
}
}
</style>

View File

@@ -478,12 +478,17 @@
.category-label {
min-width: 68px;
overflow: hidden;
padding: .5em 1em;
text-overflow: ellipsis;
white-space: nowrap;
width: 68px;
word-wrap: break-word;
// Applies to v-markdown generated p tag.
p {
margin-bottom: 0px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-wrap: break-word;
}
}
}
}

View File

@@ -20,7 +20,7 @@ export function setup () {
let firstScript = document.getElementsByTagName('script')[0];
amazonScript.type = 'text/javascript';
amazonScript.async = true;
amazonScript.src = `https://static-na.payments-amazon.com/OffAmazonPayments/us/${(NODE_ENV === 'production' ? '' : 'sandbox/')}js/Widgets.js`;
amazonScript.src = `https://static-na.payments-amazon.com/OffAmazonPayments/us/${(AMAZON_PAYMENTS.MODE === 'sandbox' ? 'sandbox/' : '')}js/Widgets.js`;
firstScript.parentNode.insertBefore(amazonScript, firstScript);
// Stripe

View File

@@ -177,7 +177,11 @@ api.postChat = {
throw new NotAuthorized(res.t('messageGroupChatSpam'));
}
const newChatMessage = group.sendChat(req.body.message, user);
let client = req.headers['x-client'] || '3rd Party';
if (client) {
client = client.replace('habitica-', '');
}
const newChatMessage = group.sendChat(req.body.message, user, null, client);
let toSave = [newChatMessage.save()];
if (group.type === 'party') {

View File

@@ -22,10 +22,10 @@ import { model as Coupon } from '../../models/coupon';
// TODO better handling of errors
const i18n = common.i18n;
const IS_PROD = nconf.get('NODE_ENV') === 'production';
const IS_SANDBOX = nconf.get('AMAZON_PAYMENTS:MODE') === 'sandbox';
let amzPayment = amazonPayments.connect({
environment: amazonPayments.Environment[IS_PROD ? 'Production' : 'Sandbox'],
environment: amazonPayments.Environment[IS_SANDBOX ? 'Sandbox' : 'Production'],
sellerId: nconf.get('AMAZON_PAYMENTS:SELLER_ID'),
mwsAccessKey: nconf.get('AMAZON_PAYMENTS:MWS_KEY'),
mwsSecretKey: nconf.get('AMAZON_PAYMENTS:MWS_SECRET'),

View File

@@ -480,8 +480,8 @@ schema.methods.getMemberCount = async function getMemberCount () {
return await User.count(query).exec();
};
schema.methods.sendChat = function sendChat (message, user, metaData) {
let newMessage = messageDefaults(message, user);
schema.methods.sendChat = function sendChat (message, user, metaData, client) {
let newMessage = messageDefaults(message, user, client);
let newChatMessage = new Chat();
newChatMessage = Object.assign(newChatMessage, newMessage);
newChatMessage.groupId = this._id;

View File

@@ -19,6 +19,7 @@ const defaultSchema = () => ({
flags: {$type: mongoose.Schema.Types.Mixed, default: {}},
flagCount: {$type: Number, default: 0},
likes: {$type: mongoose.Schema.Types.Mixed},
client: String,
_meta: {$type: mongoose.Schema.Types.Mixed},
});
@@ -100,7 +101,7 @@ export function setUserStyles (newMessage, user) {
newMessage.markModified('userStyles');
}
export function messageDefaults (msg, user) {
export function messageDefaults (msg, user, client) {
const id = uuid();
const message = {
id,
@@ -110,6 +111,7 @@ export function messageDefaults (msg, user) {
likes: {},
flags: {},
flagCount: 0,
client,
};
if (user) {