Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

Commit

Permalink
Merge pull request #3134 from withspectrum/2.3.0
Browse files Browse the repository at this point in the history
2.3.0
  • Loading branch information
brianlovin authored May 22, 2018
2 parents b08ae0a + 8657ae1 commit b0fd526
Show file tree
Hide file tree
Showing 194 changed files with 7,499 additions and 1,590 deletions.
4 changes: 2 additions & 2 deletions admin/src/components/globals/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ export const Tooltip = props => css`
&:hover:after,
&:hover:before {
opacity: 1;
transition: all 0.1s ease-in 0.1s;
transition: opacity 0.1s ease-in 0.1s;
}
`;

Expand Down Expand Up @@ -487,7 +487,7 @@ export const Onboarding = props => css`
&:after,
&:before {
opacity: 1;
transition: all 0.1s ease-in 0.1s;
transition: opacity 0.1s ease-in 0.1s;
}
`;

Expand Down
3 changes: 3 additions & 0 deletions analytics/utils/transformations.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type AnalyticsCommunity = {
id: ?string,
name: ?string,
slug: ?string,
isPrivate: boolean,
};

type AnalyticsChannelPermissions = {
Expand Down Expand Up @@ -134,12 +135,14 @@ export const analyticsCommunity = (
id: null,
name: null,
slug: null,
isPrivate: false,
};

return {
id: community.id,
name: community.name,
slug: community.slug,
isPrivate: community.isPrivate,
};
};

Expand Down
17 changes: 17 additions & 0 deletions api/migrations/20180517180716-enable-private-communities.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
exports.up = async (r, conn) => {
return r
.table('communities')
.update({
isPrivate: false,
})
.run(conn);
};

exports.down = function(r, conn) {
return r
.table('communities')
.update({
isPrivate: r.literal(),
})
.run(conn);
};
17 changes: 17 additions & 0 deletions api/migrations/20180517215503-add-ispending-to-userscommunities.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
exports.up = async (r, conn) => {
return r
.table('usersCommunities')
.update({
isPending: false,
})
.run(conn);
};

exports.down = function(r, conn) {
return r
.table('usersCommunities')
.update({
isPending: r.literal(),
})
.run(conn);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
exports.up = async (r, conn) => {
return r
.table('communitySettings')
.update({
joinSettings: {
tokenJoinEnabled: false,
token: null,
},
})
.run(conn);
};

exports.down = function(r, conn) {
return r
.table('communitySettings')
.update({
joinSettings: r.literal(),
})
.run(conn);
};
13 changes: 13 additions & 0 deletions api/migrations/seed/default/channels.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const {
SPECTRUM_COMMUNITY_ID,
PAYMENTS_COMMUNITY_ID,
DELETED_COMMUNITY_ID,
PRIVATE_COMMUNITY_ID,
SPECTRUM_GENERAL_CHANNEL_ID,
SPECTRUM_PRIVATE_CHANNEL_ID,
PAYMENTS_GENERAL_CHANNEL_ID,
Expand All @@ -13,6 +14,7 @@ const {
SPECTRUM_DELETED_CHANNEL_ID,
DELETED_COMMUNITY_DELETED_CHANNEL_ID,
MODERATOR_CREATED_CHANNEL_ID,
PRIVATE_GENERAL_CHANNEL_ID,
} = constants;

module.exports = [
Expand Down Expand Up @@ -106,4 +108,15 @@ module.exports = [
isPrivate: false,
isDefault: false,
},

{
id: PRIVATE_GENERAL_CHANNEL_ID,
communityId: PRIVATE_COMMUNITY_ID,
createdAt: new Date(DATE),
name: 'General',
description: 'General',
slug: 'private-general',
isPrivate: false,
isDefault: false,
},
];
17 changes: 17 additions & 0 deletions api/migrations/seed/default/communities.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ const {
SPECTRUM_COMMUNITY_ID,
PAYMENTS_COMMUNITY_ID,
DELETED_COMMUNITY_ID,
PRIVATE_COMMUNITY_ID,
} = constants;

module.exports = [
{
id: SPECTRUM_COMMUNITY_ID,
createdAt: new Date(DATE),
isPrivate: false,
name: 'Spectrum',
description: 'The future of communities',
website: 'https://spectrum.chat',
Expand All @@ -23,6 +25,7 @@ module.exports = [
{
id: PAYMENTS_COMMUNITY_ID,
createdAt: new Date(DATE),
isPrivate: false,
name: 'Payments',
description: 'Where payments are tested',
website: 'https://spectrum.chat',
Expand All @@ -36,6 +39,7 @@ module.exports = [
id: DELETED_COMMUNITY_ID,
createdAt: new Date(DATE),
deletedAt: new Date(DATE),
isPrivate: false,
name: 'Deleted',
description: 'Things didnt work out',
website: 'https://spectrum.chat',
Expand All @@ -45,4 +49,17 @@ module.exports = [
'https://spectrum.imgix.net/communities/-Kh6RfPYjmSaIWbkck8i/Twitter Header.png.0.3303118636071434',
slug: 'deleted',
},
{
id: PRIVATE_COMMUNITY_ID,
createdAt: new Date(DATE),
isPrivate: true,
name: 'Private community',
description: 'Private community',
website: 'https://spectrum.chat',
profilePhoto:
'https://spectrum.imgix.net/communities/-Kh6RfPYjmSaIWbkck8i/Twitter Profile.png.0.6225566835336693',
coverPhoto:
'https://spectrum.imgix.net/communities/-Kh6RfPYjmSaIWbkck8i/Twitter Header.png.0.3303118636071434',
slug: 'private',
},
];
4 changes: 4 additions & 0 deletions api/migrations/seed/default/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const COMMUNITY_MODERATOR_USER_ID = '9';
const SPECTRUM_COMMUNITY_ID = '1';
const PAYMENTS_COMMUNITY_ID = '2';
const DELETED_COMMUNITY_ID = '3';
const PRIVATE_COMMUNITY_ID = '4';

// channels
const SPECTRUM_GENERAL_CHANNEL_ID = '1';
Expand All @@ -32,6 +33,7 @@ const SPECTRUM_ARCHIVED_CHANNEL_ID = '5';
const SPECTRUM_DELETED_CHANNEL_ID = '6';
const DELETED_COMMUNITY_DELETED_CHANNEL_ID = '7';
const MODERATOR_CREATED_CHANNEL_ID = '8';
const PRIVATE_GENERAL_CHANNEL_ID = '9';

module.exports = {
DATE,
Expand All @@ -47,6 +49,7 @@ module.exports = {
SPECTRUM_COMMUNITY_ID,
PAYMENTS_COMMUNITY_ID,
DELETED_COMMUNITY_ID,
PRIVATE_COMMUNITY_ID,
SPECTRUM_GENERAL_CHANNEL_ID,
SPECTRUM_PRIVATE_CHANNEL_ID,
PAYMENTS_GENERAL_CHANNEL_ID,
Expand All @@ -55,4 +58,5 @@ module.exports = {
SPECTRUM_DELETED_CHANNEL_ID,
DELETED_COMMUNITY_DELETED_CHANNEL_ID,
MODERATOR_CREATED_CHANNEL_ID,
PRIVATE_GENERAL_CHANNEL_ID,
};
38 changes: 33 additions & 5 deletions api/migrations/seed/default/threads.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@ const {
BRIAN_ID,
MAX_ID,
BRYN_ID,
CHANNEL_MODERATOR_USER_ID,
SPECTRUM_GENERAL_CHANNEL_ID,
PRIVATE_GENERAL_CHANNEL_ID,
SPECTRUM_PRIVATE_CHANNEL_ID,
PAYMENTS_GENERAL_CHANNEL_ID,
PAYMENTS_PRIVATE_CHANNEL_ID,
SPECTRUM_DELETED_CHANNEL_ID,
DELETED_COMMUNITY_DELETED_CHANNEL_ID,
MODERATOR_CREATED_CHANNEL_ID,
DELETED_COMMUNITY_ID,
SPECTRUM_COMMUNITY_ID,
PAYMENTS_COMMUNITY_ID,
PRIVATE_COMMUNITY_ID,
SPECTRUM_ARCHIVED_CHANNEL_ID,
} = constants;

Expand Down Expand Up @@ -385,4 +382,35 @@ module.exports = [
lastActive: new Date(DATE + 2),
// deletedAt is missing intentionally
},

{
id: 'thread-13',
createdAt: new Date(DATE + 2),
creatorId: MAX_ID,
channelId: PRIVATE_GENERAL_CHANNEL_ID,
communityId: PRIVATE_COMMUNITY_ID,
isPublished: true,
isLocked: false,
type: 'DRAFTJS',
content: {
title: 'Yet another thread',
body: JSON.stringify(
toJSON(fromPlainText('This is just another thread'))
),
},
attachments: [],
edits: [
{
timestamp: new Date(DATE + 2),
content: {
title: 'Yet another thread',
body: JSON.stringify(
toJSON(fromPlainText('This is just another thread'))
),
},
},
],
modifiedAt: new Date(DATE + 2),
lastActive: new Date(DATE + 2),
},
];
14 changes: 13 additions & 1 deletion api/migrations/seed/default/usersChannels.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ const {
MAX_ID,
BRYN_ID,
BLOCKED_USER_ID,
PENDING_USER_ID,
PREVIOUS_MEMBER_USER_ID,
CHANNEL_MODERATOR_USER_ID,
COMMUNITY_MODERATOR_USER_ID,
SPECTRUM_GENERAL_CHANNEL_ID,
PRIVATE_GENERAL_CHANNEL_ID,
SPECTRUM_ARCHIVED_CHANNEL_ID,
SPECTRUM_PRIVATE_CHANNEL_ID,
DELETED_COMMUNITY_DELETED_CHANNEL_ID,
Expand Down Expand Up @@ -384,4 +384,16 @@ module.exports = [
isPending: false,
receiveNotifications: false,
},
{
id: '31',
createdAt: new Date(DATE),
userId: MAX_ID,
channelId: PRIVATE_GENERAL_CHANNEL_ID,
isOwner: true,
isModerator: false,
isMember: true,
isBlocked: false,
isPending: false,
receiveNotifications: false,
},
];
Loading

0 comments on commit b0fd526

Please sign in to comment.