mirror of
https://github.com/HabitRPG/habitica.git
synced 2026-04-09 05:21:02 -05:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee5dd5842b | ||
|
|
074b8138de | ||
|
|
cd0b9c0a96 | ||
|
|
a09516944d | ||
|
|
b82660823d | ||
|
|
bf7fabb20a | ||
|
|
88a2f317d8 | ||
|
|
5a725fa4b0 | ||
|
|
7b687280d7 | ||
|
|
42b146d5d0 | ||
|
|
2bebaf2cf8 | ||
|
|
6181328ac1 |
@@ -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
11327
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -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",
|
||||
|
||||
@@ -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')}"`,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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') {
|
||||
|
||||
@@ -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'),
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user