conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
// Netherlight Crucible Traits
darkSorrows: DarkSorrows,
tormentTheWeak: TormentTheWeak,
chaoticDarkness: ChaoticDarkness,
shadowbind: Shadowbind,
lightsEmbrace: LightsEmbrace,
infusionOfLight: InfusionOfLight,
secureInTheLight: SecureInTheLight,
shocklight: Shocklight,
refractiveShell: RefractiveShell,
murderousIntent: MurderousIntent,
nlcTraits: NLCTraits,
=======
infernalCinders: InfernalCinders,
umbralMoonglaives: UmbralMoonglaives,
>>>>>>>
// Netherlight Crucible Traits
darkSorrows: DarkSorrows,
tormentTheWeak: TormentTheWeak,
chaoticDarkness: ChaoticDarkness,
shadowbind: Shadowbind,
lightsEmbrace: LightsEmbrace,
infusionOfLight: InfusionOfLight,
secureInTheLight: SecureInTheLight,
shocklight: Shocklight,
refractiveShell: RefractiveShell,
murderousIntent: MurderousIntent,
nlcTraits: NLCTraits,
infernalCinders: InfernalCinders,
umbralMoonglaives: UmbralMoonglaives, |
<<<<<<<
date: new Date('2018-11-09'),
changes: <>Added <SpellLink id={SPELLS.POISON_BOMB_TALENT.id} /> module and updated <SpellLink id={SPELLS.ELABORATE_PLANNING_TALENT.id} /> and <SpellLink id={SPELLS.BLINDSIDE_TALENT.id} /> modules.</>,
contributors: [Gebuz],
},
{
=======
date: new Date('2018-11-11'),
changes: <>Added suggestion for <SpellLink id={SPELLS.SHARPENED_BLADES.id} /> stack wastage.</>,
contributors: [Aelexe],
},
{
>>>>>>>
date: new Date('2018-11-09'),
changes: <>Added <SpellLink id={SPELLS.POISON_BOMB_TALENT.id} /> module and updated <SpellLink id={SPELLS.ELABORATE_PLANNING_TALENT.id} /> and <SpellLink id={SPELLS.BLINDSIDE_TALENT.id} /> modules.</>,
contributors: [Gebuz],
},
{
date: new Date('2018-11-11'),
changes: <>Added suggestion for <SpellLink id={SPELLS.SHARPENED_BLADES.id} /> stack wastage.</>,
contributors: [Aelexe],
},
{ |
<<<<<<<
db.collection(conn).find(searchObject, options).sort(sortOrder).toArray(function (error, result) {
db.close();
=======
db.collection(conn).find(searchObject).sort(sortOrder).toArray(function (error, result) {
>>>>>>>
db.collection(conn).find(searchObject, options).sort(sortOrder).toArray(function (error, result) { |
<<<<<<<
if (!req.user.member.isAdmin) {
memberOfRequest.nickname = member.nickname;
}
saveMember(memberOfRequest, req, res, next);
=======
memberOfRequest.nickname = member.nickname;
saveMember(memberOfRequest, member, req, res, next);
>>>>>>>
if (!req.user.member.isAdmin) {
memberOfRequest.nickname = member.nickname;
}
saveMember(memberOfRequest, member, req, res, next);
<<<<<<<
saveMember(memberForNew(req), req, res, next);
=======
saveMember(memberOfRequest, null, req, res, next);
>>>>>>>
saveMember(memberForNew(req), null, req, res, next); |
<<<<<<<
useApp(app, 'images', beans.get('imagesApp'));
=======
useApp(app, 'payment', beans.get('paymentApp'));
>>>>>>>
useApp(app, 'payment', beans.get('paymentApp'));
useApp(app, 'images', beans.get('imagesApp')); |
<<<<<<<
26-09-2017 - Resto Druid: Updated display of flourish. (By blazyb)
=======
26-09-2017 - Resto Druid: Added suggestions on Soul of the forest/archdruid on WG usage. (Blazyb)
>>>>>>>
26-09-2017 - Resto Druid: Updated display of flourish. (By blazyb)
26-09-2017 - Resto Druid: Added suggestions on Soul of the forest/archdruid on WG usage. (Blazyb) |
<<<<<<<
var sympaClient;
//Just checking if remote has been configured
if (conf.get('swkTrustedAppName') || conf.get('swkTrustedAppPwd')) {
sympaClient = require('./sympa')(conf);
}
else {
sympaClient = require('./sympaStub')({});
}
var groupstore = require('../groups/groupstore');
=======
var sympaClient = require('./sympa')(conf);
var groupstore = require('../groups/groupstore')(conf);
>>>>>>>
var sympaClient;
//Just checking if remote has been configured
if (conf.get('swkTrustedAppName') || conf.get('swkTrustedAppPwd')) {
sympaClient = require('./sympa')(conf);
}
else {
sympaClient = require('./sympaStub')({});
}
var groupstore = require('../groups/groupstore')(conf); |
<<<<<<<
import LivelySpirit from './Modules/Items/AzeriteTraits/LivelySpirit';
=======
import SynergisticGrowth from './Modules/Items/AzeriteTraits/SynergisticGrowth';
>>>>>>>
import LivelySpirit from './Modules/Items/AzeriteTraits/LivelySpirit';
import SynergisticGrowth from './Modules/Items/AzeriteTraits/SynergisticGrowth';
<<<<<<<
livelySpirit: LivelySpirit,
=======
synergisticGrowth: SynergisticGrowth,
>>>>>>>
livelySpirit: LivelySpirit,
synergisticGrowth: SynergisticGrowth, |
<<<<<<<
sinon.stub(activitystore, 'getActivity', function (id, callback) { callback(new Error('error')); });
sinon.stub(membersAPI, 'getMember', function (nickname, callback) { callback(null, new Member({id: 'memberId', nickname: 'hansdampf'})); });
=======
sinon.stub(activitystore, 'getActivity', function (id, callback) { callback(new Error("error")); });
sinon.stub(memberstore, 'getMember', function (nickname, callback) { callback(null, new Member({id: 'memberId', nickname: 'hansdampf'})); });
>>>>>>>
sinon.stub(activitystore, 'getActivity', function (id, callback) { callback(new Error('error')); });
sinon.stub(memberstore, 'getMember', function (nickname, callback) { callback(null, new Member({id: 'memberId', nickname: 'hansdampf'})); });
<<<<<<<
sinon.stub(membersAPI, 'getMember', function (id, callback) { callback(new Error('error')); });
=======
sinon.stub(memberstore, 'getMember', function (id, callback) { callback(new Error("error")); });
>>>>>>>
sinon.stub(memberstore, 'getMember', function (id, callback) { callback(new Error('error')); });
<<<<<<<
sinon.stub(activitystore, 'getActivity', function (id, callback) { callback(new Error('error')); });
sinon.stub(membersAPI, 'getMember', function (nickname, callback) { callback(null, new Member({id: 'memberId', nickname: 'hansdampf'})); });
=======
sinon.stub(activitystore, 'getActivity', function (id, callback) { callback(new Error("error")); });
sinon.stub(memberstore, 'getMember', function (nickname, callback) { callback(null, new Member({id: 'memberId', nickname: 'hansdampf'})); });
>>>>>>>
sinon.stub(activitystore, 'getActivity', function (id, callback) { callback(new Error('error')); });
sinon.stub(memberstore, 'getMember', function (nickname, callback) { callback(null, new Member({id: 'memberId', nickname: 'hansdampf'})); });
<<<<<<<
sinon.stub(membersAPI, 'getMember', function (id, callback) { callback(new Error('error')); });
=======
sinon.stub(memberstore, 'getMember', function (id, callback) { callback(new Error("error")); });
>>>>>>>
sinon.stub(memberstore, 'getMember', function (id, callback) { callback(new Error('error')); }); |
<<<<<<<
import DarkTransformationAndWounds from './Modules/Features/DarkTransformationAndWounds';
=======
import VirulentPlagueEfficiency from './Modules/Features/VirulentPlagueEfficiency';
>>>>>>>
import DarkTransformationAndWounds from './Modules/Features/DarkTransformationAndWounds';
import VirulentPlagueEfficiency from './Modules/Features/VirulentPlagueEfficiency';
<<<<<<<
darkTransformationAndWounds: DarkTransformationAndWounds,
=======
virulentPlagueEfficiency: VirulentPlagueEfficiency,
>>>>>>>
darkTransformationAndWounds: DarkTransformationAndWounds,
virulentPlagueEfficiency: VirulentPlagueEfficiency, |
<<<<<<<
it('provides the style sheet', function (done) {
var stylesheet_uri = base_uri + '/stylesheets/style.css';
=======
it('has events app', function (done) {
httpRequest({uri: base_uri + '/events'}, function (req, res) {
res.statusCode.should.equal(200);
res.headers['content-type'].should.contain('text/html');
res.body.should.contain('events');
done();
});
});
it('provides the bootstrap style sheet', function (done) {
var stylesheet_uri = base_uri + '/stylesheets/bootstrap.css';
>>>>>>>
it('provides the bootstrap style sheet', function (done) {
var stylesheet_uri = base_uri + '/stylesheets/bootstrap.css'; |
<<<<<<<
var conf = require('nconf');
var passport = require('passport');
var OpenIDStrategy = require('passport-openid').Strategy;
var GitHubStrategy = require('passport-github').Strategy;
var path = require('path');
var ensureLoggedIn = require('connect-ensure-login').ensureLoggedIn('/auth/login');
var membersAPI = conf.get('beans').get('membersAPI');
var urlPrefix = conf.get('publicUrlPrefix');
var securedByLoginURLRegex = new RegExp(conf.get('securedByLoginURLPattern'));
=======
var passport = require('passport'),
OpenIDStrategy = require('passport-openid').Strategy,
GitHubStrategy = require('passport-github').Strategy,
ensureLoggedIn = require('connect-ensure-login').ensureLoggedIn('/auth/login'),
membersAPI = require('../members/membersAPI.js'),
conf = require('nconf'),
urlPrefix = conf.get('publicUrlPrefix'),
securedByLoginURLRegex = new RegExp(conf.get('securedByLoginURLPattern'));
>>>>>>>
var conf = require('nconf');
var passport = require('passport');
var OpenIDStrategy = require('passport-openid').Strategy;
var GitHubStrategy = require('passport-github').Strategy;
var ensureLoggedIn = require('connect-ensure-login').ensureLoggedIn('/auth/login');
var membersAPI = conf.get('beans').get('membersAPI');
var urlPrefix = conf.get('publicUrlPrefix');
var securedByLoginURLRegex = new RegExp(conf.get('securedByLoginURLPattern')); |
<<<<<<<
import { withTranslation } from 'react-i18next';
import { DEVICE_TYPE } from '@/utils/constants';
=======
import { DEVICE_LARGE } from '@/utils/deviceConstants';
>>>>>>>
import { withTranslation } from 'react-i18next';
import { DEVICE_LARGE } from '@/utils/deviceConstants';
<<<<<<<
const { photo, name, connectionDate, style, t } = this.props;
const imageSource = photo?.filename
? {
uri: `file://${RNFS.DocumentDirectoryPath}/photos/${photo?.filename}`,
}
: require('@/static/default_profile.jpg');
=======
const { photo, name, connectionDate, style } = this.props;
const imageSource =
photo?.filename && !this.state.imgErr
? {
uri: `file://${photoDirectory()}/${photo?.filename}`,
}
: require('@/static/default_profile.jpg');
>>>>>>>
const { photo, name, connectionDate, style, t } = this.props;
const imageSource =
photo?.filename && !this.state.imgErr
? {
uri: `file://${photoDirectory()}/${photo?.filename}`,
}
: require('@/static/default_profile.jpg'); |
<<<<<<<
const { t } = useTranslation();
=======
const [imgErr, setImgErr] = useState(false);
>>>>>>>
const [imgErr, setImgErr] = useState(false);
const { t } = useTranslation(); |
<<<<<<<
const { ipcRenderer, remote } = require('electron')
const spellcheck = require('browser/lib/spellcheck')
const buildEditorContextMenu = require('browser/lib/contextMenuBuilder')
=======
const { ipcRenderer } = require('electron')
import normalizeEditorFontFamily from 'browser/lib/normalizeEditorFontFamily'
>>>>>>>
const { ipcRenderer, remote } = require('electron')
import normalizeEditorFontFamily from 'browser/lib/normalizeEditorFontFamily'
const spellcheck = require('browser/lib/spellcheck')
const buildEditorContextMenu = require('browser/lib/contextMenuBuilder') |
<<<<<<<
import backupApi from '../../api/backupService';
=======
import { DEVICE_LARGE, ORANGE } from '@/utils/constants';
import backupApi from '../../Api/BackupApi';
>>>>>>>
import { DEVICE_LARGE, ORANGE } from '@/utils/constants';
import backupApi from '../../api/backupService'; |
<<<<<<<
title: t('common.photoActionSheet.title'),
// message: `Flagging ${name} will negatively effect their BrightID score, and this flag might be shown to other users.`,
=======
title: 'Select photo',
>>>>>>>
title: t('common.photoActionSheet.title'),
<<<<<<<
const EditName = () => {
const dispatch = useDispatch();
const name = useSelector((state) => state.user.name);
const [displayName, setDisplayName] = useState(name);
const { t } = useTranslation();
useFocusEffect(
useCallback(() => {
setDisplayName(name);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []),
);
=======
const EditName = ({ nextName, setNextName }) => {
>>>>>>>
const EditName = ({ nextName, setNextName }) => {
const { t } = useTranslation();
<<<<<<<
export const EditProfileScreen = function () {
const { t } = useTranslation();
=======
export const EditProfileScreen = ({ navigation }) => {
const dispatch = useDispatch();
// const navigation = useNavigation();
>>>>>>>
export const EditProfileScreen = ({ navigation }) => {
const dispatch = useDispatch();
const { t } = useTranslation();
// const navigation = useNavigation(); |
<<<<<<<
import { useRef, useState, useEffect } from 'react';
import { useTranslation } from 'react-i18next';
=======
import { useState, useEffect } from 'react';
>>>>>>>
import { useTranslation } from 'react-i18next';
import { useState, useEffect } from 'react';
<<<<<<<
const { t } = useTranslation();
=======
const { showActionSheetWithOptions } = useActionSheet();
>>>>>>>
const { t } = useTranslation();
const { showActionSheetWithOptions } = useActionSheet();
<<<<<<<
{flagged ? <Text style={styles.flagged}>{t('common.tag.flagged')}</Text> : null}
=======
{flagged ? <Text style={styles.flagged}>(reported)</Text> : null}
>>>>>>>
{flagged ? <Text style={styles.flagged}>{t('common.tag.reported')}</Text> : null}
<<<<<<<
{contextActions.length > 0 && (
<ActionSheet
ref={actionSheetRef}
title={t('common.actionSheet.title')}
options={contextActions}
cancelButtonIndex={contextActions.indexOf(ACTION_CANCEL)}
destructiveButtonIndex={contextActions.indexOf(ACTION_DISMISS)}
onPress={performAction}
/>
)}
=======
>>>>>>> |
<<<<<<<
import { withTranslation } from 'react-i18next';
import { DEVICE_TYPE, ORANGE, DEVICE_LARGE } from '@/utils/constants';
=======
import { ORANGE } from '@/utils/constants';
import { DEVICE_LARGE, DEVICE_TYPE } from '@/utils/deviceConstants';
>>>>>>>
import { withTranslation } from 'react-i18next';
import { ORANGE } from '@/utils/constants';
import { DEVICE_LARGE, DEVICE_TYPE } from '@/utils/deviceConstants'; |
<<<<<<<
import AddGroup from '@/components/Icons/AddGroup';
import AddPerson from '@/components/Icons/AddPerson';
import Certificate from '@/components/Icons/Certificate';
import PhoneLock from '@/components/Icons/PhoneLock';
=======
import { useTranslation } from 'react-i18next';
import groups from '@/static/add_group.svg';
import connections from '@/static/add_person.svg';
import misc from '@/static/trusted_connections.svg';
>>>>>>>
import AddGroup from '@/components/Icons/AddGroup';
import AddPerson from '@/components/Icons/AddPerson';
import Certificate from '@/components/Icons/Certificate';
import PhoneLock from '@/components/Icons/PhoneLock';
import { useTranslation } from 'react-i18next'; |
<<<<<<<
import { groupsTransformer, userTransformer } from './transform';
import { migrate } from './migrations';
=======
import {groupsTransformer, qrDataTransformer, userTransformer} from './transform';
>>>>>>>
import { migrate } from './migrations';
import {
groupsTransformer,
qrDataTransformer,
userTransformer,
} from './transform';
<<<<<<<
transforms: [userTransformer, groupsTransformer],
version: 5,
migrate,
=======
transforms: [userTransformer, groupsTransformer, qrDataTransformer],
version: 4,
>>>>>>>
transforms: [userTransformer, groupsTransformer, qrDataTransformer],
version: 5,
migrate, |
<<<<<<<
flaggers,
verifications,
=======
flaggers = {},
>>>>>>>
verifications,
flaggers = {},
<<<<<<<
flagged: flaggers && Object.keys(flaggers).length > 0,
verifications,
=======
flagged:
Object.keys(flaggers).length / connections.length >= FLAG_PERCENTAGE,
>>>>>>>
verifications,
flagged:
Object.keys(flaggers).length / connections.length >= FLAG_PERCENTAGE, |
<<<<<<<
import { useTranslation } from 'react-i18next';
import { RatingButton } from './RatingButton';
import { connection_levels, DEVICE_LARGE } from '../../utils/constants';
=======
import { connection_levels } from '@/utils/constants';
import { DEVICE_LARGE } from '@/utils/deviceConstants';
>>>>>>>
import { useTranslation } from 'react-i18next';
import { connection_levels } from '@/utils/constants';
import { DEVICE_LARGE } from '@/utils/deviceConstants';
<<<<<<<
<>
<View>
<Text style={styles.ratingHeader}>
{t('pendingConnections.label.rating')}
</Text>
</View>
<View style={styles.rateButtonContainer}>
<RatingButton
color={connectionLevelColors[connection_levels.SUSPICIOUS]}
label={connectionLevelStrings[connection_levels.SUSPICIOUS]}
handleClick={() => setLevelHandler(connection_levels.SUSPICIOUS)}
testID={`${connection_levels.SUSPICIOUS}Btn`}
/>
<RatingButton
color={connectionLevelColors[connection_levels.JUST_MET]}
label={connectionLevelStrings[connection_levels.JUST_MET]}
handleClick={() => setLevelHandler(connection_levels.JUST_MET)}
testID={`${connection_levels.JUST_MET}Btn`}
/>
<RatingButton
color={connectionLevelColors[connection_levels.ALREADY_KNOWN]}
label={connectionLevelStrings[connection_levels.ALREADY_KNOWN]}
handleClick={() => setLevelHandler(connection_levels.ALREADY_KNOWN)}
testID={`${connection_levels.ALREADY_KNOWN}Btn`}
/>
</View>
<View>
<Text style={styles.ratingFooter}>
{t('pendingConnections.text.rating')}
</Text>
</View>
</>
=======
<View style={styles.container}>
<Text style={styles.ratingHeader}>
How well do you know this connection?
</Text>
<RatingButton
color={connectionLevelColors[connection_levels.SUSPICIOUS]}
label={connectionLevelStrings[connection_levels.SUSPICIOUS]}
handleClick={() => setLevelHandler(connection_levels.SUSPICIOUS)}
testID={`${connection_levels.SUSPICIOUS}Btn`}
/>
<RatingButton
color={connectionLevelColors[connection_levels.JUST_MET]}
label={connectionLevelStrings[connection_levels.JUST_MET]}
handleClick={() => setLevelHandler(connection_levels.JUST_MET)}
testID={`${connection_levels.JUST_MET}Btn`}
/>
<RatingButton
color={connectionLevelColors[connection_levels.ALREADY_KNOWN]}
label={connectionLevelStrings[connection_levels.ALREADY_KNOWN]}
handleClick={() => setLevelHandler(connection_levels.ALREADY_KNOWN)}
testID={`${connection_levels.ALREADY_KNOWN}Btn`}
/>
<Text style={styles.ratingFooter}>
Your answer will help us prevent attacks
</Text>
</View>
>>>>>>>
<View style={styles.container}>
<Text style={styles.ratingHeader}>
{t('pendingConnections.label.rating')}
</Text>
<RatingButton
color={connectionLevelColors[connection_levels.SUSPICIOUS]}
label={connectionLevelStrings[connection_levels.SUSPICIOUS]}
handleClick={() => setLevelHandler(connection_levels.SUSPICIOUS)}
testID={`${connection_levels.SUSPICIOUS}Btn`}
/>
<RatingButton
color={connectionLevelColors[connection_levels.JUST_MET]}
label={connectionLevelStrings[connection_levels.JUST_MET]}
handleClick={() => setLevelHandler(connection_levels.JUST_MET)}
testID={`${connection_levels.JUST_MET}Btn`}
/>
<RatingButton
color={connectionLevelColors[connection_levels.ALREADY_KNOWN]}
label={connectionLevelStrings[connection_levels.ALREADY_KNOWN]}
handleClick={() => setLevelHandler(connection_levels.ALREADY_KNOWN)}
testID={`${connection_levels.ALREADY_KNOWN}Btn`}
/>
<Text style={styles.ratingFooter}>
{t('pendingConnections.text.rating')}
</Text>
</View> |
<<<<<<<
import { useTranslation } from 'react-i18next';
import { setPhoto, setName, setActiveNotification } from '@/actions';
import { chooseImage, takePhoto } from '@/utils/images';
import { saveImage, retrieveImage } from '@/utils/filesystem';
import { DEVICE_LARGE, DEVICE_IOS } from '@/utils/constants';
=======
import { setActiveNotification } from '@/actions';
import { retrieveImage } from '@/utils/filesystem';
import { DEVICE_LARGE } from '@/utils/constants';
>>>>>>>
import { useTranslation } from 'react-i18next';
import { setActiveNotification } from '@/actions';
import { retrieveImage } from '@/utils/filesystem';
import { DEVICE_LARGE } from '@/utils/constants';
<<<<<<<
accessibilityLabel={t('common.accessibilityLabel.editPhoto')}
>
<Image
source={{
uri: profilePhoto,
}}
style={styles.photo}
resizeMode="cover"
onError={(e) => {
console.log(e.error);
}}
accessible={true}
accessibilityLabel={('common.accessibilityLabel.userPhoto')}
/>
</TouchableOpacity>
=======
accessibilityLabel="profile photo"
/>
>>>>>>>
accessibilityLabel={t('common.accessibilityLabel.profilePhoto')}
/>
<<<<<<<
{isEditing ? (
<TextInput
testID="EditNameInput"
value={displayName}
style={styles.name}
onChangeText={setDisplayName}
onBlur={() => {
if (displayName.length >= 2) {
dispatch(setName(displayName));
setIsEditing(false);
} else {
setIsEditing(false);
setName(name);
}
}}
blurOnSubmit={true}
/>
) : (
<TouchableWithoutFeedback
onPress={() => setIsEditing(true)}
accessibilityLabel={t('common.accessibilityLabel.editName')}
>
<Text testID="EditNameBtn" style={styles.name}>
{name}
</Text>
</TouchableWithoutFeedback>
)}
=======
<Text testID="EditNameBtn" style={styles.name}>
{name}
</Text>
>>>>>>>
<Text testID="EditNameBtn" style={styles.name}>
{name}
</Text>
<<<<<<<
<ActionSheet
testID="PhotoActionSheet"
ref={(o) => {
photoSheetRef = o;
}}
title={t('common.photoActionSheet.title')}
options={[t('common.photoActionSheet.takePhoto'), t('common.photoActionSheet.choosePhoto'), t('common.actionSheet.cancel')]}
cancelButtonIndex={2}
onPress={(index) => {
if (index === 0) {
getPhotoFromCamera();
} else if (index === 1) {
getPhotoFromLibrary();
}
}}
/>
=======
>>>>>>> |
<<<<<<<
import { saveImage } from '@/utils/filesystem';
import { strToUint8Array, uInt8ArrayToB64 } from '@/utils/encoding';
import { obtainKeys } from '@/utils/keychain';
import api from '@/Api/BrightId';
import { addConnection } from '@/actions';
import { encryptAndUploadLocalData } from './encryptData';
=======
import { saveImage } from '../../../utils/filesystem';
import { strToUint8Array, uInt8ArrayToB64 } from '../../../utils/encoding';
import api from '../../../Api/BrightId';
>>>>>>>
import { saveImage } from '@/utils/filesystem';
import { strToUint8Array, uInt8ArrayToB64 } from '@/utils/encoding';
import { obtainKeys } from '@/utils/keychain';
import api from '@/Api/BrightId';
import { addConnection } from '@/actions';
<<<<<<<
=======
import { addConnection } from '../../../actions';
import { encryptAndUploadProfile } from './profile';
>>>>>>>
import { encryptAndUploadProfile } from './profile'; |
<<<<<<<
import VerifiedBadge from '@/components/Icons/VerifiedBadge';
=======
import { useTranslation } from 'react-i18next';
import verificationSticker from '@/static/verification-sticker.svg';
>>>>>>>
import VerifiedBadge from '@/components/Icons/VerifiedBadge';
import { useTranslation } from 'react-i18next'; |
<<<<<<<
export const QR_TYPE_RESPONDER = 'responder';
// theme colors
export const ORANGE = '#ED7A5D';
=======
export const QR_TYPE_RESPONDER = 'responder';
export const MAX_WAITING_SECONDS = 60;
>>>>>>>
export const QR_TYPE_RESPONDER = 'responder';
// theme colors
export const ORANGE = '#ED7A5D';
export const MAX_WAITING_SECONDS = 60; |
<<<<<<<
import { useNavigation } from '@react-navigation/native';
import { useTranslation } from 'react-i18next';
=======
>>>>>>>
import { useTranslation } from 'react-i18next';
<<<<<<<
const { pendingConnectionId, ratingHandler, index } = props;
const { t } = useTranslation();
const pendingConnection = useSelector(
(state) =>
selectPendingConnectionById(state, pendingConnectionId) ?? {
state: pendingConnection_states.EXPIRED,
},
(a, b) => a?.state === b?.state,
);
const alreadyExists = useSelector(
(state) =>
state.connections.connections.some(
(conn) => conn.id === pendingConnection.brightId,
) && pendingConnection.state === pendingConnection_states.UNCONFIRMED,
);
const navigation = useNavigation();
const brightidVerified = pendingConnection.verifications?.includes(
'BrightID',
);
const buttonHandler = (level: ConnectionLevel) => {
ratingHandler(pendingConnection.id, level, index);
};
=======
const {
pendingConnection,
setLevelHandler,
brightIdVerified,
photoTouchHandler,
} = props;
>>>>>>>
const { t } = useTranslation();
const {
pendingConnection,
setLevelHandler,
brightIdVerified,
photoTouchHandler,
} = props;
<<<<<<<
ratingView = (
<>
<View>
<Text style={styles.ratingHeader}>
{t('pendingConnections.label.rating')}
</Text>
</View>
<View style={styles.rateButtonContainer}>
<RatingButton
color="red"
label={'🤔 ' + t('pendingConnections.button.suspicious')}
level={connection_levels.SUSPICIOUS}
handleClick={buttonHandler}
testID={`${connection_levels.SUSPICIOUS}Btn`}
/>
<RatingButton
color="yellow"
label={'👋 ' + t('pendingConnections.button.justMet')}
level={connection_levels.JUST_MET}
handleClick={buttonHandler}
testID={`${connection_levels.JUST_MET}Btn`}
/>
<RatingButton
color="green"
label={'😎 ' + t('pendingConnections.button.alreadyKnow')}
level={connection_levels.ALREADY_KNOW}
handleClick={buttonHandler}
testID={`${connection_levels.ALREADY_KNOW}Btn`}
/>
</View>
<View>
<Text style={styles.ratingFooter}>
{t('pendingConnections.text.rating')}
</Text>
</View>
</>
);
=======
ratingView = <RatingView setLevelHandler={setLevelHandler} />;
>>>>>>>
ratingView = <RatingView setLevelHandler={setLevelHandler} />;
<<<<<<<
<View style={styles.previewContainer} testID="previewConnectionScreen">
<TouchableOpacity
style={styles.cancelButton}
onPress={() => {
navigation.goBack();
}}
>
<SvgXml height={DEVICE_LARGE ? '22' : '20'} xml={backArrow} />
</TouchableOpacity>
<View style={styles.titleContainer}>
<Text style={styles.titleText}>
{alreadyExists ? t('pendingConnections.title.reconnectWith') : t('pendingConnections.title.connectionRequest')}
</Text>
=======
<>
<View testID="previewConnectionScreen" style={styles.titleContainer}>
<Text style={styles.titleText}>Connection Request </Text>
>>>>>>>
<>
<View testID="previewConnectionScreen" style={styles.titleContainer}>
<Text style={styles.titleText}>{t('pendingConnections.title.connectionRequest')} </Text>
<<<<<<<
{alreadyExists ? (
<Text style={styles.flagged}>{t('pendingConnections.tag.alreadyConnected')}</Text>
) : (
<Text style={styles.connectedText}>
{pendingConnection.connectionDate}
</Text>
)}
=======
>>>>>>>
<<<<<<<
<View>
<Text style={styles.countsNumberText}>
{pendingConnection.connections}
</Text>
<Text style={styles.countsDescriptionText}>{t('pendingConnections.label.connections')}</Text>
</View>
<View>
<Text style={styles.countsNumberText}>
{pendingConnection.groups}
</Text>
<Text style={styles.countsDescriptionText}>{t('pendingConnections.label.groups')}</Text>
</View>
<View>
<Text style={styles.countsNumberText}>
{pendingConnection.mutualConnections}
</Text>
<Text style={styles.countsDescriptionText}>{t('pendingConnections.label.mutualConnections')}</Text>
</View>
=======
<ConnectionStats
numConnections={pendingConnection.connections}
numGroups={pendingConnection.groups}
numMutualConnections={pendingConnection.mutualConnections}
/>
>>>>>>>
<ConnectionStats
numConnections={pendingConnection.connections}
numGroups={pendingConnection.groups}
numMutualConnections={pendingConnection.mutualConnections}
/> |
<<<<<<<
<View style={styles.container}>
<FlatList
contentContainerStyle={{ paddingBottom: 50, flexGrow: 1 }}
data={notifications}
keyExtractor={({ inviteId, msg }, index) => (inviteId || msg) + index}
showsHorizontalScrollIndicator={false}
showsVerticalScrollIndicator={false}
refreshControl={
<RefreshControl
refreshing={this.state.refreshing}
onRefresh={this.onRefresh}
/>
}
ListEmptyComponent={
<EmptyList
title="Nothing here, come back later.."
iconType="bell-off-outline"
/>
}
renderItem={({ item }) =>
item.inviteId ? (
<InviteCard invite={item} />
) : (
<NotificationCard
navigation={navigation}
msg={item.msg}
icon={item.icon}
=======
<>
<View style={styles.orangeTop} />
<View style={styles.container}>
<FlatList
contentContainerStyle={{ paddingBottom: 50, flexGrow: 1 }}
data={notificationData}
keyExtractor={({ inviteId, msg }, index) =>
(inviteId || msg) + index
}
showsHorizontalScrollIndicator={false}
showsVerticalScrollIndicator={false}
refreshControl={
<RefreshControl
refreshing={this.state.refreshing}
onRefresh={this.onRefresh}
>>>>>>>
<>
<View style={styles.orangeTop} />
<View style={styles.container}>
<FlatList
contentContainerStyle={{ paddingBottom: 50, flexGrow: 1 }}
data={notifications}
keyExtractor={({ inviteId, msg }, index) =>
(inviteId || msg) + index
}
showsHorizontalScrollIndicator={false}
showsVerticalScrollIndicator={false}
refreshControl={
<RefreshControl
refreshing={this.state.refreshing}
onRefresh={this.onRefresh} |
<<<<<<<
const reported = pendingConnection.reports.length / (pendingConnection.connectionsNum || 1) >= REPORTED_PERCENTAGE;
const brightIdVerified = pendingConnection.verifications.map(v => v.name).includes('BrightID');
=======
const { t } = useTranslation();
>>>>>>>
const { t } = useTranslation();
const reported = pendingConnection.reports.length / (pendingConnection.connectionsNum || 1) >= REPORTED_PERCENTAGE;
const brightIdVerified = pendingConnection.verifications.map(v => v.name).includes('BrightID');
<<<<<<<
Last connected{' '}
{moment(parseInt(pendingConnection.connectedAt, 10)).fromNow()}
=======
{t('connections.tag.lastConnected', {date: moment(parseInt(existingConnection.createdAt, 10)).fromNow()})}
>>>>>>>
{t('connections.tag.lastConnected', {date: moment(parseInt(pendingConnection.connectedAt, 10)).fromNow()})} |
<<<<<<<
import { BACKUP_URL, ORANGE } from '@/utils/constants';
=======
import emitter from '@/emitter';
import { BACKUP_URL } from '@/utils/constants';
>>>>>>>
import { BACKUP_URL } from '@/utils/constants';
<<<<<<<
<Spinner
isVisible={true}
size={DEVICE_LARGE ? 80 : 65}
type="Wave"
color={ORANGE}
/>
</View>
)}
</View>
</Container>
</>
);
};
=======
)}
<TextInput
style={styles.invisibleUsername}
placeholder="Username"
textContentType="username"
autoCompleteType="username"
value={this.props.id}
/>
<TextInput
onChangeText={(pass) => this.setState({ pass1: pass })}
value={pass1}
placeholder={t('common.placeholder.password')}
placeholderTextColor={GREY}
style={styles.textInput}
autoCorrect={false}
textContentType="newPassword"
passwordRules="required: lower; required: upper; required: digit; required: [-]; minlength: 20;"
autoCompleteType="password"
underlineColorAndroid="transparent"
secureTextEntry={true}
onFocus={this.handleTextFocus}
/>
<TextInput
onChangeText={(pass) => this.setState({ pass2: pass })}
value={pass2}
placeholder={t('backup.placeholder.confirmPassword')}
textContentType="newPassword"
placeholderTextColor={GREY}
style={styles.textInput}
autoCorrect={false}
autoCompleteType="password"
underlineColorAndroid="transparent"
secureTextEntry={true}
onBlur={this.handleTextBlur}
onFocus={this.handleTextFocus}
blurOnSubmit={true}
/>
</View>
<View style={styles.buttonContainer}>
{!this.state.backupInProgress ? (
<TouchableOpacity
style={[
styles.startBackupButton,
!this.state.pass1 && styles.disabledButton,
]}
onPress={this.startBackup}
disabled={!this.state.pass1}
>
<Text style={styles.buttonInnerText}>
{t('backup.button.startBackup')}
</Text>
</TouchableOpacity>
) : (
<View style={styles.loader}>
<Text style={styles.textInfo}>
{t('common.text.uploadingData')}
</Text>
<Text style={styles.textInfo}>
{t('common.text.progress', {
completed: this.state.completed,
total: this.state.total,
})}
</Text>
<Spinner
isVisible={true}
size={DEVICE_LARGE ? 80 : 65}
type="Wave"
color={LIGHT_BLACK}
/>
</View>
)}
</View>
</Container>
</>
);
}
}
>>>>>>>
<Spinner
isVisible={true}
size={DEVICE_LARGE ? 80 : 65}
type="Wave"
color={ORANGE}
/>
</View>
)}
</View>
</Container>
</>
);
}; |
<<<<<<<
import React, { useCallback, useEffect, useRef, useState } from 'react';
=======
import React, { useCallback, useEffect, useState, useRef } from 'react';
>>>>>>>
import React, { useCallback, useEffect, useRef, useState } from 'react';
<<<<<<<
const [verified, setVerified] = useState(false);
const {
status,
connectionDate,
id,
name,
photo,
hiddenFlag,
index,
verifications,
} = props;
=======
const { status, connectionDate, id, name, photo, hiddenFlag, index } = props;
const [imgErr, setImgErr] = useState(false);
>>>>>>>
const [verified, setVerified] = useState(false);
const { status, connectionDate, id, name, photo, hiddenFlag, index } = props;
const [imgErr, setImgErr] = useState(false); |
<<<<<<<
import { useTranslation } from 'react-i18next';
import { INVITE_ACTIVE, DEVICE_LARGE } from '@/utils/constants';
=======
import { INVITE_ACTIVE } from '@/utils/constants';
import { DEVICE_LARGE } from '@/utils/deviceConstants';
>>>>>>>
import { useTranslation } from 'react-i18next';
import { INVITE_ACTIVE } from '@/utils/constants';
import { DEVICE_LARGE } from '@/utils/deviceConstants'; |
<<<<<<<
const { t } = useTranslation();
=======
const { showActionSheetWithOptions } = useActionSheet();
>>>>>>>
const { t } = useTranslation();
const { showActionSheetWithOptions } = useActionSheet();
<<<<<<<
const handleLeaveGroup = () => {
const buttons = [
{
text: t('common.alert.cancel'),
style: 'cancel',
},
{
text: t('common.alert.ok'),
onPress: async () => {
try {
await api.leaveGroup(groupID);
await dispatch(leaveGroup(group));
navigation.goBack();
} catch (err) {
Alert.alert(t('groups.alert.title.errorLeaveGroup'), err.message);
}
},
},
];
Alert.alert(
t('groups.alert.title.leaveGroup'),
t('groups.alert.text.leaveGroup'),
buttons,
{
cancelable: true,
},
);
};
const handleInvite = () => {
navigation.navigate('InviteList', {
group,
});
};
=======
>>>>>>>
<<<<<<<
{contextActions.length > 0 && (
<ActionSheet
ref={actionSheetRef}
title={t('common.actionSheet.title')}
options={contextActions}
cancelButtonIndex={contextActions.indexOf(ACTION_CANCEL)}
destructiveButtonIndex={contextActions.indexOf(ACTION_LEAVE)}
onPress={performAction}
/>
)}
=======
>>>>>>> |
<<<<<<<
import SoulConduit from './SoulConduit';
=======
import SoulHarvestTalent from './SoulHarvestTalent';
>>>>>>>
import SoulConduit from './SoulConduit';
import SoulHarvestTalent from './SoulHarvestTalent';
<<<<<<<
fnb: FireAndBrimstone,
entropy: ReverseEntropy,
roaringBlaze: RoaringBlaze,
shadowburn: Shadowburn,
soulConduit: SoulConduit,
=======
>>>>>>>
soulConduit: SoulConduit,
<<<<<<<
{this.soulConduit.active && this.soulConduit.subStatistic()}
=======
{this.shadowburn.active && this.shadowburn.subStatistic()}
{this.roaringBlaze.active && this.roaringBlaze.subStatistic()}
>>>>>>>
{this.shadowburn.active && this.shadowburn.subStatistic()}
{this.roaringBlaze.active && this.roaringBlaze.subStatistic()} |
<<<<<<<
date: new Date('2018-11-16'),
changes: <>Added <SpellLink id={SPELLS.SOUL_CONDUIT_TALENT.id} /> and <SpellLink id={SPELLS.INNER_DEMONS_TALENT.id} /> modules. Fixed the Pet Timeline if it encounters an unknown pet.</>,
contributors: [Chizu],
},
{
=======
date: new Date('2018-11-16'),
changes: <>Added talent modules for <SpellLink id={SPELLS.FROM_THE_SHADOWS_TALENT.id} />, <SpellLink id={SPELLS.SOUL_STRIKE_TALENT.id} /> and <SpellLink id={SPELLS.SUMMON_VILEFIEND_TALENT.id} />.</>,
contributors: [Chizu],
},
{
date: new Date('2018-11-15'),
changes: <>Added <SpellLink id={SPELLS.POWER_SIPHON_TALENT.id} /> talent module and modified <SpellLink id={SPELLS.DOOM_TALENT.id} /> module to also show damage done by the talent.</>,
contributors: [Chizu],
},
{
>>>>>>>
date: new Date('2018-11-16'),
changes: <>Added <SpellLink id={SPELLS.SOUL_CONDUIT_TALENT.id} /> and <SpellLink id={SPELLS.INNER_DEMONS_TALENT.id} /> modules. Fixed the Pet Timeline if it encounters an unknown pet.</>,
contributors: [Chizu],
},
{
date: new Date('2018-11-16'),
changes: <>Added talent modules for <SpellLink id={SPELLS.FROM_THE_SHADOWS_TALENT.id} />, <SpellLink id={SPELLS.SOUL_STRIKE_TALENT.id} /> and <SpellLink id={SPELLS.SUMMON_VILEFIEND_TALENT.id} />.</>,
contributors: [Chizu],
},
{
date: new Date('2018-11-15'),
changes: <>Added <SpellLink id={SPELLS.POWER_SIPHON_TALENT.id} /> talent module and modified <SpellLink id={SPELLS.DOOM_TALENT.id} /> module to also show damage done by the talent.</>,
contributors: [Chizu],
},
{ |
<<<<<<<
function checkCreateLog(log, holder, assetId, operator, data) {
log.event.should.be.eq('Create')
log.args.holder.should.be.equal(holder)
log.args.assetId.should.be.bignumber.equal(assetId)
log.args.operator.should.be.equal(operator)
log.args.data.should.be.equal(data)
}
function checkDestroyLog(log, holder, assetId, operator) {
log.event.should.be.eq('Destroy')
log.args.holder.should.be.equal(holder)
log.args.assetId.should.be.bignumber.equal(assetId)
log.args.operator.should.be.equal(operator)
}
=======
function checkUpdateLog(log, assetId, holder, operator) {
log.event.should.be.eq('Update')
log.args.assetId.should.be.bignumber.equal(assetId)
log.args.holder.should.be.equal(holder)
log.args.operator.should.be.equal(operator)
}
>>>>>>>
function checkUpdateLog(log, assetId, holder, operator) {
log.event.should.be.eq('Update')
log.args.assetId.should.be.bignumber.equal(assetId)
log.args.holder.should.be.equal(holder)
log.args.operator.should.be.equal(operator)
}
function checkCreateLog(log, holder, assetId, operator, data) {
log.event.should.be.eq('Create')
log.args.holder.should.be.equal(holder)
log.args.assetId.should.be.bignumber.equal(assetId)
log.args.operator.should.be.equal(operator)
log.args.data.should.be.equal(data)
}
function checkDestroyLog(log, holder, assetId, operator) {
log.event.should.be.eq('Destroy')
log.args.holder.should.be.equal(holder)
log.args.assetId.should.be.bignumber.equal(assetId)
log.args.operator.should.be.equal(operator)
}
<<<<<<<
=======
describe('update', () => {
it('updates the asset with new data if the sender is the holder', async () => {
await registry.update(0, 'new data')
const data = await registry.assetData(0)
data.should.equal('new data')
})
it('updates the asset with new data for a different operator', async () => {
await registry.authorizeOperator(user, true)
const {logs} = await registry.update(0, 'new data', sentByUser)
const data = await registry.assetData(0)
data.should.equal('new data')
})
it('reverts if the sender is not authorized', async () => {
await registry.generate(3, CONTENT_DATA, sentByUser)
await assertRevert(registry.update(3, 'new data'))
})
it('reverts for an inexsistent asset', async () => {
await assertRevert(registry.update(10, 'new data'))
})
it('emits an Update event', async () => {
const {logs} = await registry.update(0, 'new data')
logs.length.should.be.equal(1)
checkUpdateLog(logs[0], 0, creator, creator)
})
it('emits an Update event for a different operator', async () => {
await registry.authorizeOperator(user, true)
const {logs} = await registry.update(0, 'new data', sentByUser)
logs.length.should.be.equal(1)
checkUpdateLog(logs[0], 0, creator, user)
})
})
>>>>>>>
describe('update', () => {
it('updates the asset with new data if the sender is the holder', async () => {
await registry.update(0, 'new data')
const data = await registry.assetData(0)
data.should.equal('new data')
})
it('updates the asset with new data for a different operator', async () => {
await registry.authorizeOperator(user, true)
const {logs} = await registry.update(0, 'new data', sentByUser)
const data = await registry.assetData(0)
data.should.equal('new data')
})
it('reverts if the sender is not authorized', async () => {
await registry.generate(3, CONTENT_DATA, sentByUser)
await assertRevert(registry.update(3, 'new data'))
})
it('reverts for an inexsistent asset', async () => {
await assertRevert(registry.update(10, 'new data'))
})
it('emits an Update event', async () => {
const {logs} = await registry.update(0, 'new data')
logs.length.should.be.equal(1)
checkUpdateLog(logs[0], 0, creator, creator)
})
it('emits an Update event for a different operator', async () => {
await registry.authorizeOperator(user, true)
const {logs} = await registry.update(0, 'new data', sentByUser)
logs.length.should.be.equal(1)
checkUpdateLog(logs[0], 0, creator, user)
})
}) |
<<<<<<<
describe('exists', () => {
it('ensures the asset exists after created', async () => {
const output = await registry.exists(1)
output.should.be.true
})
it('ensures does return an assets if it does not exist', async () => {
const output = await registry.exists(100)
output.should.be.false
})
it('throws is not valid id', async () => {
return Promise.all([
registry.exists(true).should.be.rejected
])
})
it('throws is not id is provided', async () => {
return Promise.all([
registry.exists().should.be.rejected
])
})
})
describe('holderOf', () => {
it('should match the holder of the asset', async () => {
const one = '0xdf08f82de32b8d460adbe8d72043e3a7e25a3b39'
const two = '0x0000000000000000000000000000000000000000'
const outputOne = await registry.holderOf(1)
const outputTwo = await registry.holderOf(2)
outputOne.should.be.equal(one)
outputTwo.should.be.equal(two)
})
it('throws is not valid id', async () => {
return Promise.all([
registry.holderOf(true).should.be.rejected
])
})
it('throws is not id is provided', async () => {
return Promise.all([
registry.holderOf().should.be.rejected
])
})
})
describe('assetData', async () => {
it ('should returns the proper data', async () => {
const output = await registry.assetData(0)
output.should.be.equal(CONTENT_DATA)
})
it('throws is not valid id', async () => {
return Promise.all([
registry.assetData(true).should.be.rejected
])
})
it('throws is not id is provided', async () => {
return Promise.all([
registry.assetData().should.be.rejected
])
})
})
=======
describe('assetCount', () => {
it('has an amount of assets equivalent to the created assets', async () => {
const assetCount = await registry.assetsCount(creator)
assetCount.should.be.bignumber.equal(2)
})
xit('has an amount of assets equivalent to the amount sent to the beneficiary', async () => {
await registry.generate(3, user, '', sentByCreator)
const assetCount = await registry.assetsCount(user)
assetCount.should.be.bignumber.equal(1)
})
it('should consider destroyed assets', async () => {
await registry.destroy(1)
const assetCount = await registry.assetsCount(creator)
assetCount.should.be.bignumber.equal(1)
})
it('should return 0 for an inexistent address', async () => {
const assetCount = await registry.assetsCount(NONE)
assetCount.should.be.bignumber.equal(0)
})
})
describe('assetByIndex', () => {
it('returns the id for the first asset of the holder', async () => {
const assets = await registry.assetByIndex(creator, 0)
assets.should.be.bignumber.equal(0)
})
it('reverts if the index is out of bounds', async () => {
await assertRevert(registry.assetByIndex(creator, 10))
})
it('reverts if the index is out of bounds (negative)', async () => {
await assertRevert(registry.assetByIndex(creator, -10))
})
it('reverts for an inexistent address', async () => {
await assertRevert(registry.assetByIndex(NONE, 0))
})
})
describe('assetsOf', () => {
it('returns the created assets', async () => {
const assets = await registry.assetsOf(creator)
const convertedAssets = assets.map(big => big.toString())
convertedAssets.should.have.all.members(['0', '1'])
})
it('returns an empty array for an address with no assets', async () => {
const assets = await registry.assetsOf(user)
const convertedAssets = assets.map(big => big.toString())
convertedAssets.should.have.all.members([])
})
it('returns an empty array for an inexistent address', async () => {
const assets = await registry.assetsOf(NONE)
const convertedAssets = assets.map(big => big.toString())
convertedAssets.should.have.all.members([])
})
})
>>>>>>>
describe('exists', () => {
it('ensures the asset exists after created', async () => {
const output = await registry.exists(1)
output.should.be.true
})
it('ensures does return an assets if it does not exist', async () => {
const output = await registry.exists(100)
output.should.be.false
})
it('throws is not valid id', async () => {
return Promise.all([
registry.exists(true).should.be.rejected
])
})
it('throws is not id is provided', async () => {
return Promise.all([
registry.exists().should.be.rejected
])
})
})
describe('holderOf', () => {
it('should match the holder of the asset', async () => {
const one = '0xdf08f82de32b8d460adbe8d72043e3a7e25a3b39'
const two = '0x0000000000000000000000000000000000000000'
const outputOne = await registry.holderOf(1)
const outputTwo = await registry.holderOf(2)
outputOne.should.be.equal(one)
outputTwo.should.be.equal(two)
})
it('throws is not valid id', async () => {
return Promise.all([
registry.holderOf(true).should.be.rejected
])
})
it('throws is not id is provided', async () => {
return Promise.all([
registry.holderOf().should.be.rejected
])
})
})
describe('assetData', async () => {
it ('should returns the proper data', async () => {
const output = await registry.assetData(0)
output.should.be.equal(CONTENT_DATA)
})
it('throws is not valid id', async () => {
return Promise.all([
registry.assetData(true).should.be.rejected
])
})
it('throws is not id is provided', async () => {
return Promise.all([
registry.assetData().should.be.rejected
])
})
})
describe('assetCount', () => {
it('has an amount of assets equivalent to the created assets', async () => {
const assetCount = await registry.assetsCount(creator)
assetCount.should.be.bignumber.equal(2)
})
xit('has an amount of assets equivalent to the amount sent to the beneficiary', async () => {
await registry.generate(3, user, '', sentByCreator)
const assetCount = await registry.assetsCount(user)
assetCount.should.be.bignumber.equal(1)
})
it('should consider destroyed assets', async () => {
await registry.destroy(1)
const assetCount = await registry.assetsCount(creator)
assetCount.should.be.bignumber.equal(1)
})
it('should return 0 for an inexistent address', async () => {
const assetCount = await registry.assetsCount(NONE)
assetCount.should.be.bignumber.equal(0)
})
})
describe('assetByIndex', () => {
it('returns the id for the first asset of the holder', async () => {
const assets = await registry.assetByIndex(creator, 0)
assets.should.be.bignumber.equal(0)
})
it('reverts if the index is out of bounds', async () => {
await assertRevert(registry.assetByIndex(creator, 10))
})
it('reverts if the index is out of bounds (negative)', async () => {
await assertRevert(registry.assetByIndex(creator, -10))
})
it('reverts for an inexistent address', async () => {
await assertRevert(registry.assetByIndex(NONE, 0))
})
})
describe('assetsOf', () => {
it('returns the created assets', async () => {
const assets = await registry.assetsOf(creator)
const convertedAssets = assets.map(big => big.toString())
convertedAssets.should.have.all.members(['0', '1'])
})
it('returns an empty array for an address with no assets', async () => {
const assets = await registry.assetsOf(user)
const convertedAssets = assets.map(big => big.toString())
convertedAssets.should.have.all.members([])
})
it('returns an empty array for an inexistent address', async () => {
const assets = await registry.assetsOf(NONE)
const convertedAssets = assets.map(big => big.toString())
convertedAssets.should.have.all.members([])
})
}) |
<<<<<<<
function checkAuthorizationLog(log, operator, holder, authorized) {
log.event.should.be.eq('AuthorizeOperator')
log.args.operator.should.be.bignumber.equal(operator)
log.args.holder.should.be.equal(holder)
log.args.authorized.should.be.equal(authorized)
}
=======
function checkUpdateLog(log, assetId, holder, operator) {
log.event.should.be.eq('Update')
log.args.assetId.should.be.bignumber.equal(assetId)
log.args.holder.should.be.equal(holder)
log.args.operator.should.be.equal(operator)
}
>>>>>>>
function checkAuthorizationLog(log, operator, holder, authorized) {
log.event.should.be.eq('AuthorizeOperator')
log.args.operator.should.be.bignumber.equal(operator)
log.args.holder.should.be.equal(holder)
log.args.authorized.should.be.equal(authorized)
}
function checkUpdateLog(log, assetId, holder, operator) {
log.event.should.be.eq('Update')
log.args.assetId.should.be.bignumber.equal(assetId)
log.args.holder.should.be.equal(holder)
log.args.operator.should.be.equal(operator)
}
<<<<<<<
describe('Authorizations Getters', () => {
it('is authorized', async () => {
const authorized = true
await registry.authorizeOperator(user, authorized)
const isAuthorized = await registry.isOperatorAuthorizedFor(user, creator)
isAuthorized.should.equal(authorized)
})
it('emits AuthorizeOperator events', async () => {
const authorized = true
const { logs } = await registry.authorizeOperator(user, authorized)
logs.length.should.be.equal(1)
checkAuthorizationLog(logs[0], user, creator, authorized)
})
it('is not authorized after setting the operator as false', async () => {
await registry.authorizeOperator(user, true)
await registry.authorizeOperator(user, false)
const isAuthorized = await registry.isOperatorAuthorizedFor(user, creator)
isAuthorized.should.equal(false)
})
it('is not authorized even if the holder is not set as operator', async () => {
const isAuthorized = await registry.isOperatorAuthorizedFor(creator, creator)
isAuthorized.should.equal(false)
})
it('is not authorized', async () => {
const isAuthorized = await registry.isOperatorAuthorizedFor(creator, user)
isAuthorized.should.equal(false)
})
it('reverts when removing a un-existing operator', async () => {
const authorized = false
await assertRevert(registry.authorizeOperator(user, authorized))
})
it('reverts when trying to add an existing operator', async () => {
const authorized = true
await registry.authorizeOperator(user, authorized)
await assertRevert(registry.authorizeOperator(user, authorized))
})
it('reverts when removing a previous removed operator', async () => {
const authorized = true
await registry.authorizeOperator(user, authorized)
await registry.authorizeOperator(user, !authorized)
await assertRevert(registry.authorizeOperator(user, !authorized))
})
})
=======
describe('update', () => {
it('updates the asset with new data if the sender is the holder', async () => {
await registry.update(0, 'new data')
const data = await registry.assetData(0)
data.should.equal('new data')
})
it('updates the asset with new data for a different operator', async () => {
await registry.authorizeOperator(user, true)
const {logs} = await registry.update(0, 'new data', sentByUser)
const data = await registry.assetData(0)
data.should.equal('new data')
})
it('reverts if the sender is not authorized', async () => {
await registry.generate(3, CONTENT_DATA, sentByUser)
await assertRevert(registry.update(3, 'new data'))
})
it('reverts for an inexsistent asset', async () => {
await assertRevert(registry.update(10, 'new data'))
})
it('emits an Update event', async () => {
const {logs} = await registry.update(0, 'new data')
logs.length.should.be.equal(1)
checkUpdateLog(logs[0], 0, creator, creator)
})
it('emits an Update event for a different operator', async () => {
await registry.authorizeOperator(user, true)
const {logs} = await registry.update(0, 'new data', sentByUser)
logs.length.should.be.equal(1)
checkUpdateLog(logs[0], 0, creator, user)
})
})
>>>>>>>
describe('Authorizations Getters', () => {
it('is authorized', async () => {
const authorized = true
await registry.authorizeOperator(user, authorized)
const isAuthorized = await registry.isOperatorAuthorizedFor(user, creator)
isAuthorized.should.equal(authorized)
})
it('emits AuthorizeOperator events', async () => {
const authorized = true
const { logs } = await registry.authorizeOperator(user, authorized)
logs.length.should.be.equal(1)
checkAuthorizationLog(logs[0], user, creator, authorized)
})
it('is not authorized after setting the operator as false', async () => {
await registry.authorizeOperator(user, true)
await registry.authorizeOperator(user, false)
const isAuthorized = await registry.isOperatorAuthorizedFor(user, creator)
isAuthorized.should.equal(false)
})
it('is not authorized even if the holder is not set as operator', async () => {
const isAuthorized = await registry.isOperatorAuthorizedFor(creator, creator)
isAuthorized.should.equal(false)
})
it('is not authorized', async () => {
const isAuthorized = await registry.isOperatorAuthorizedFor(creator, user)
isAuthorized.should.equal(false)
})
it('reverts when removing a un-existing operator', async () => {
const authorized = false
await assertRevert(registry.authorizeOperator(user, authorized))
})
it('reverts when trying to add an existing operator', async () => {
const authorized = true
await registry.authorizeOperator(user, authorized)
await assertRevert(registry.authorizeOperator(user, authorized))
})
it('reverts when removing a previous removed operator', async () => {
const authorized = true
await registry.authorizeOperator(user, authorized)
await registry.authorizeOperator(user, !authorized)
await assertRevert(registry.authorizeOperator(user, !authorized))
})
})
describe('update', () => {
it('updates the asset with new data if the sender is the holder', async () => {
await registry.update(0, 'new data')
const data = await registry.assetData(0)
data.should.equal('new data')
})
it('updates the asset with new data for a different operator', async () => {
await registry.authorizeOperator(user, true)
const {logs} = await registry.update(0, 'new data', sentByUser)
const data = await registry.assetData(0)
data.should.equal('new data')
})
it('reverts if the sender is not authorized', async () => {
await registry.generate(3, CONTENT_DATA, sentByUser)
await assertRevert(registry.update(3, 'new data'))
})
it('reverts for an inexsistent asset', async () => {
await assertRevert(registry.update(10, 'new data'))
})
it('emits an Update event', async () => {
const {logs} = await registry.update(0, 'new data')
logs.length.should.be.equal(1)
checkUpdateLog(logs[0], 0, creator, creator)
})
it('emits an Update event for a different operator', async () => {
await registry.authorizeOperator(user, true)
const {logs} = await registry.update(0, 'new data', sentByUser)
logs.length.should.be.equal(1)
checkUpdateLog(logs[0], 0, creator, user)
})
}) |
<<<<<<<
import FeastOfSouls from './Modules/Talents/FeastOfSouls';
=======
import AgonizingFlames from './Modules/Talents/AgonizingFlames';
>>>>>>>
import FeastOfSouls from './Modules/Talents/FeastOfSouls';
import AgonizingFlames from './Modules/Talents/AgonizingFlames';
<<<<<<<
feastOfSouls: FeastOfSouls,
=======
agonizingFlames: AgonizingFlames,
>>>>>>>
feastOfSouls: FeastOfSouls,
agonizingFlames: AgonizingFlames, |
<<<<<<<
export default connect(mapStateToProps, mapDispatchToProps)(translate(null, { wait: false })(ColorPaletteHeader));
=======
export default connect(null, mapDispatchToProps)(withTranslation(null, { wait: false })(ColorPaletteHeader));
>>>>>>>
export default connect(mapStateToProps, mapDispatchToProps)(withTranslation(null, { wait: false })(ColorPaletteHeader)); |
<<<<<<<
isDesktop() ? 'groupOverlay' : ''
=======
isDesktop() ? 'toolsOverlay' : '',
>>>>>>>
isDesktop() ? 'groupOverlay' : ''
<<<<<<<
<React.Fragment>
<div className="App" onMouseDown={this.onMouseDown} onClick={this.onClick} onScroll={this.onScroll}>
<Accessibility />
=======
<>
<div
className="App"
onMouseDown={this.onMouseDown}
onClick={this.onClick}
onScroll={this.onScroll}
>
>>>>>>>
<>
<div
className="App"
onMouseDown={this.onMouseDown}
onClick={this.onClick}
onScroll={this.onScroll}
>
<Accessibility /> |
<<<<<<<
serverUrl = documentId ? `${serverUrl}?did=${documentId}` : serverUrl;
fetch(serverUrl, {
cache: 'no-store',
=======
fetch(serverUrl, {
>>>>>>>
serverUrl = documentId ? `${serverUrl}?did=${documentId}` : serverUrl;
fetch(serverUrl, { |
<<<<<<<
state.viewer.disabledElements[dataElement] &&
state.viewer.disabledElements[dataElement].disabled;
export const isElementOpen = (state, dataElement) => {
if (state.viewer.disabledElements[dataElement]) {
return (
state.viewer.openElements[dataElement] &&
!state.viewer.disabledElements[dataElement].disabled
);
}
return state.viewer.openElements[dataElement];
};
=======
state.viewer.disabledElements[dataElement]?.disabled;
export const isElementOpen = (state, dataElement) =>
state.viewer.openElements[dataElement] &&
!state.viewer.disabledElements[dataElement]?.disabled;
>>>>>>>
state.viewer.disabledElements[dataElement]?.disabled;
export const isElementOpen = (state, dataElement) =>
state.viewer.openElements[dataElement] &&
!state.viewer.disabledElements[dataElement]?.disabled;
<<<<<<<
export const getActiveHeaderItems = state => state.viewer.header;
=======
export const allButtonsInGroupDisabled = (state, toolGroup) => {
const toolButtonObjects = getToolButtonObjects(state);
const dataElements = Object.values(toolButtonObjects)
.filter(({ group }) => group === toolGroup)
.map(({ dataElement }) => dataElement);
return dataElements.every(dataElement => isElementDisabled(state, dataElement));
};
export const getActiveHeaderItems = state =>
state.viewer.headers[state.viewer.activeHeaderGroup];
>>>>>>>
export const allButtonsInGroupDisabled = (state, toolGroup) => {
const toolButtonObjects = getToolButtonObjects(state);
const dataElements = Object.values(toolButtonObjects)
.filter(({ group }) => group === toolGroup)
.map(({ dataElement }) => dataElement);
return dataElements.every(dataElement =>
isElementDisabled(state, dataElement),
);
};
export const getActiveHeaderItems = state =>
state.viewer.headers[state.viewer.activeHeaderGroup];
<<<<<<<
state.viewer.disabledElements[dataElement] &&
state.viewer.disabledElements[dataElement].priority;
export const getToolButtonObjects = state =>
state.viewer && state.viewer.toolButtonObjects;
export const getAnnotationToolNames = state =>
Object.keys(state.viewer.toolButtonObjects).filter(
toolButtonName =>
state.viewer.toolButtonObjects[toolButtonName].annotationCheck,
);
export const getGroupName = (state, toolName) => {
const defaultHeader = state.viewer.header.filter(
toolObject => toolObject.children,
);
for (let i = 0; i < defaultHeader.length; i++) {
const childrenToolNames = defaultHeader[i].children.map(
object => object.toolName,
);
if (childrenToolNames.includes(toolName)) {
return defaultHeader[i].toolGroup;
}
for (let j = 0; j < defaultHeader[i].children.length; j++) {
if (defaultHeader[i].children[j].children) {
const grandchildrenToolNames = defaultHeader[i].children[
j
].children.map(object => object.toolName);
if (grandchildrenToolNames.includes(toolName)) {
return defaultHeader[i].children[j].toolGroup;
}
}
}
}
};
export const getToolButtonDataElements = (state, toolNames) =>
toolNames
.filter(toolName => getHeaderItemByToolName(state, toolName))
.map(toolName => getHeaderItemByToolName(state, toolName).dataElement);
=======
state.viewer.disabledElements[dataElement]?.priority;
export const getToolButtonObjects = state => state.viewer.toolButtonObjects;
export const getToolButtonDataElements = (state, toolNames) =>
toolNames
.map(toolName => state.viewer.toolButtonObjects[toolName]?.dataElement)
.filter(Boolean);
>>>>>>>
state.viewer.disabledElements[dataElement]?.priority;
export const getToolButtonObjects = state => state.viewer.toolButtonObjects;
export const getToolButtonDataElements = (state, toolNames) =>
toolNames
.map(toolName => state.viewer.toolButtonObjects[toolName]?.dataElement)
.filter(Boolean);
<<<<<<<
state.viewer && state.viewer.toolButtonObjects[toolName];
=======
state.viewer.toolButtonObjects[toolName];
>>>>>>>
state.viewer.toolButtonObjects[toolName];
<<<<<<<
(getHeaderItemByToolName(state, toolName)
? getHeaderItemByToolName(state, toolName).dataElement
: '');
export const getToolButtonIcon = (state, toolName) =>
(getHeaderItemByToolName(state, toolName)
? getHeaderItemByToolName(state, toolName).img
: '');
=======
state.viewer.toolButtonObjects[toolName]?.dataElement;
>>>>>>>
state.viewer.toolButtonObjects[toolName]?.dataElement;
<<<<<<<
state.viewer.header
.filter(toolButtonObject => toolButtonObject.toolGroup)
.find(toolButtonObject => toolButtonObject.toolGroup === toolGroup)
.children.map(buttonObject => buttonObject.toolName);
=======
Object.keys(state.viewer.toolButtonObjects).filter(
name => state.viewer.toolButtonObjects[name].group === toolGroup,
);
>>>>>>>
Object.keys(state.viewer.toolButtonObjects).filter(
name => state.viewer.toolButtonObjects[name].group === toolGroup,
);
<<<<<<<
export const getActiveDataElement = state =>
(getHeaderItemByToolName(state, state.viewer.activeToolName)
? getHeaderItemByToolName(state, state.viewer.activeToolName).dataElement
: '');
export const getListIndex = (state, panel) => {
if (state.viewer.listIndex[panel] === undefined) {
return null;
}
return state.viewer.listIndex[panel];
};
=======
>>>>>>>
<<<<<<<
=======
export const getColorMap = state => state.viewer.colorMap;
export const getCursorOverlayData = state => state.viewer.cursorOverlay;
>>>>>>>
export const getColorMap = state => state.viewer.colorMap;
export const getCursorOverlayData = state => state.viewer.cursorOverlay;
<<<<<<<
export const getAvailablePalettes = (state, activeToolName) =>
state.viewer.toolButtonObjects[activeToolName] &&
state.viewer.toolButtonObjects[activeToolName].availablePalettes;
export const getCurrentPalette = (state, activeToolName) =>
state.viewer.toolButtonObjects[activeToolName] &&
state.viewer.toolButtonObjects[activeToolName].currentPalette;
export const getIconColor = (state, activeToolName) =>
state.viewer.toolButtonObjects[activeToolName] &&
state.viewer.toolButtonObjects[activeToolName].iconColor;
=======
export const getCurrentPalette = (state, colorMapKey) =>
state.viewer.colorMap[colorMapKey]?.currentPalette;
export const getIconColor = (state, colorMapKey) =>
state.viewer.colorMap[colorMapKey]?.iconColor;
export const getCustomNoteFilter = state => state.viewer.customNoteFilter;
>>>>>>>
export const getCurrentPalette = (state, colorMapKey) =>
state.viewer.colorMap[colorMapKey]?.currentPalette;
export const getIconColor = (state, colorMapKey) =>
state.viewer.colorMap[colorMapKey]?.iconColor;
export const getCustomNoteFilter = state => state.viewer.customNoteFilter;
<<<<<<<
state.viewer.warning && state.viewer.warning.confirmBtnText;
export const getWarningCancelEvent = state =>
state.viewer.warning && state.viewer.warning.onCancel;
export const isAccessibleMode = state => state.viewer.isAccessibleMode;
=======
state.viewer.warning?.confirmBtnText;
export const getWarningCancelEvent = state => state.viewer.warning?.onCancel;
>>>>>>>
state.viewer.warning?.confirmBtnText;
export const getWarningCancelEvent = state => state.viewer.warning?.onCancel;
export const isAccessibleMode = state => state.viewer.isAccessibleMode;
<<<<<<<
export const getLayers = state => state.document.layers;
=======
>>>>>>>
export const getLayers = state => state.document.layers; |
<<<<<<<
const numberOfColumns = this.getNumberOfColumns();
this.listRef.current?.scrollToRow(Math.round((pageNumber) / numberOfColumns) - 1);
}
getNumberOfColumns = () => {
// const desktopBreakPoint = 640;
// const { innerWidth } = window;
// let numberOfColumns;
// if (innerWidth >= desktopBreakPoint) {
// numberOfColumns = 1;
// // TODO: use forwardRef to get the width of the thumbnail div instead of using the magic 20px
// } else if (innerWidth >= 3 * (THUMBNAIL_SIZE + 20)) {
// numberOfColumns = 3;
// } else if (innerWidth >= 2 * (THUMBNAIL_SIZE + 20)) {
// numberOfColumns = 2;
// } else {
// numberOfColumns = 1;
// }
// return numberOfColumns;
const numberOfColumns = Math.min(3, Math.max(1, Math.floor(this.state.width / 160)));
=======
this.listRef.current?.scrollToRow(pageNumber - 1);
};
getNumberOfColumns = width => {
const numberOfColumns = Math.min(3, Math.max(1, Math.floor(width / 160)));
>>>>>>>
const numberOfColumns = this.getNumberOfColumns();
this.listRef.current?.scrollToRow(Math.round((pageNumber) / numberOfColumns) - 1);
}
getNumberOfColumns = width => {
// const desktopBreakPoint = 640;
// const { innerWidth } = window;
// let numberOfColumns;
// if (innerWidth >= desktopBreakPoint) {
// numberOfColumns = 1;
// // TODO: use forwardRef to get the width of the thumbnail div instead of using the magic 20px
// } else if (innerWidth >= 3 * (THUMBNAIL_SIZE + 20)) {
// numberOfColumns = 3;
// } else if (innerWidth >= 2 * (THUMBNAIL_SIZE + 20)) {
// numberOfColumns = 2;
// } else {
// numberOfColumns = 1;
// }
// return numberOfColumns;
const numberOfColumns = Math.min(3, Math.max(1, Math.floor(width / 160)));
<<<<<<<
const { isThumbnailReorderingEnabled, isThumbnailMergingEnabled, selectedPageIndexes } = this.props;
const { thumbs } = this;
const numberOfColumns = this.getNumberOfColumns();
=======
const numberOfColumns = this.getNumberOfColumns(width);
const {
isThumbnailReorderingEnabled,
isThumbnailMergingEnabled,
selectedPageIndexes,
} = this.props;
>>>>>>>
const { isThumbnailReorderingEnabled, isThumbnailMergingEnabled, selectedPageIndexes } = this.props;
const { thumbs } = this;
const numberOfColumns = this.getNumberOfColumns(); |
<<<<<<<
const { currentPalette, style, isTool, activeToolName } = this.props;
=======
const { currentPalette, style, colorMapKey } = this.props;
>>>>>>>
const { currentPalette, style, activeToolName } = this.props;
<<<<<<<
const isMeasurement = activeToolName.includes('Measurement');
=======
const { Scale, Precision } = style;
>>>>>>>
const { Scale, Precision } = style; |
<<<<<<<
const { currentPalette, style, colorMapKey, onStyleChange, toolName, isMobile } = this.props;
=======
const { isColorPaletteDisabled, currentPalette, style, colorMapKey, onStyleChange } = this.props;
>>>>>>>
const { isColorPaletteDisabled, currentPalette, style, colorMapKey, onStyleChange, toolName, isMobile } = this.props;
<<<<<<<
<div className={className} data-element="stylePopup">
{currentPalette && (
<div className="color-palette-container">
<ColorPaletteHeader
colorPalette={currentPalette}
colorMapKey={colorMapKey}
style={style}
toolName={toolName}
/>
{this.renderColorPalette()}
=======
<div
className="Popup StylePopup"
data-element="stylePopup"
>
{currentPalette && !isColorPaletteDisabled && (
<div className="colors-container" data-element="colorPalette">
<div className="inner-wrapper">
<ColorPaletteHeader
colorPalette={currentPalette}
colorMapKey={colorMapKey}
style={style}
/>
{this.renderColorPalette()}
</div>
>>>>>>>
<div className={className} data-element="stylePopup">
{currentPalette && !isColorPaletteDisabled && (
<div className="color-palette-container">
<ColorPaletteHeader
colorPalette={currentPalette}
colorMapKey={colorMapKey}
style={style}
toolName={toolName}
/>
{this.renderColorPalette()} |
<<<<<<<
change(date(2020, 10, 3), 'Added dispel to filterable type for EventTab.', Moonrabbit),
=======
change(date(2020, 10, 2), 'Added Castle Nathria boss configs and updated the default report header image.', Sharrq),
change(date(2020, 10, 2), 'Added pet tracking to the Cooldown tab.', Abelito75),
>>>>>>>
change(date(2020, 10, 3), 'Added dispel to filterable type for EventTab.', Moonrabbit),
change(date(2020, 10, 2), 'Added Castle Nathria boss configs and updated the default report header image.', Sharrq),
change(date(2020, 10, 2), 'Added pet tracking to the Cooldown tab.', Abelito75), |
<<<<<<<
const closeMenuOverlay = useCallback(e => {
const menuButton = document.querySelector('[data-element="menuButton"]');
const clickedMenuButton = menuButton?.contains(e.target);
if (!clickedMenuButton) {
closeElements(['menuOverlay']);
}
}, [closeElements]);
useOnClickOutside(overlayRef, closeMenuOverlay);
=======
>>>>>>>
const closeMenuOverlay = useCallback(e => {
const menuButton = document.querySelector('[data-element="menuButton"]');
const clickedMenuButton = menuButton?.contains(e.target);
if (!clickedMenuButton) {
closeElements(['menuOverlay']);
}
}, [closeElements]);
useOnClickOutside(overlayRef, closeMenuOverlay); |
<<<<<<<
import { getSortStrategies } from 'constants/sortStrategies';
import getLatestActivityDate from 'helpers/getLatestActivityDate';
=======
>>>>>>>
import { getSortStrategies } from 'constants/sortStrategies';
import getLatestActivityDate from 'helpers/getLatestActivityDate';
<<<<<<<
import actions from 'actions';
import mod from 'helpers/modulus';
import debounce from 'lodash/debounce';
=======
import { getSortStrategies } from 'constants/sortStrategies';
import getLatestActivityDate from 'helpers/getLatestActivityDate';
>>>>>>>
import actions from 'actions';
import mod from 'helpers/modulus';
import debounce from 'lodash/debounce';
<<<<<<<
<React.Fragment
key={note.Id + getLatestActivityDate(note)}
>
=======
<React.Fragment key={note.Id + getLatestActivityDate(note)}>
>>>>>>>
<React.Fragment key={note.Id + getLatestActivityDate(note)}>
<<<<<<<
<Note
index={i}
visible={this.isVisibleNote(note)}
annotation={note}
searchInput={this.state.searchInput}
rootContents={note.getContents()}
willFocus={selectionIndex !== null && mod(selectionIndex, notes.length) === i}
/>
=======
<Note visible={this.isVisibleNote(note)} annotation={note} replies={note.getReplies()} searchInput={this.state.searchInput} rootContents={note.getContents()} />
>>>>>>>
<Note
index={i}
visible={this.isVisibleNote(note)}
annotation={note}
replies={note.getReplies()}
searchInput={this.state.searchInput}
rootContents={note.getContents()}
willFocus={selectionIndex !== null && mod(selectionIndex, notes.length) === i}
/> |
<<<<<<<
<svg data-element="slider" onMouseDown={this.onMouseDown} onTouchStart={this.onTouchStart} ref={this.sliderSvg}>
<line x1={getCircleRadius(this.props.isMobile)} y1="50%" x2={circleCenter} y2="50%" strokeWidth="2" stroke="#00a5e4" strokeLinecap="round" />
<line x1={circleCenter} y1="50%" x2={this.lineLength + getCircleRadius(this.props.isMobile)} y2="50%" strokeWidth="2" stroke="#e0e0e0" strokeLinecap="round" />
<circle cx={circleCenter} cy="50%" r={getCircleRadius(this.props.isMobile)} fill="#00a5e4" />
=======
<svg data-element={dataElement} onMouseDown={this.onMouseDown} onTouchStart={this.onTouchStart} ref={this.sliderSvg}>
<line x1={circleRadius} y1="50%" x2={circleCenter} y2="50%" strokeWidth="2" stroke="#00a5e4" strokeLinecap="round" />
<line x1={circleCenter} y1="50%" x2={this.lineLength + circleRadius} y2="50%" strokeWidth="2" stroke="#e0e0e0" strokeLinecap="round" />
<circle cx={circleCenter} cy="50%" r={circleRadius} fill="#00a5e4" />
>>>>>>>
<svg data-element={dataElement} onMouseDown={this.onMouseDown} onTouchStart={this.onTouchStart} ref={this.sliderSvg}>
<line x1={getCircleRadius(this.props.isMobile)} y1="50%" x2={circleCenter} y2="50%" strokeWidth="2" stroke="#00a5e4" strokeLinecap="round" />
<line x1={circleCenter} y1="50%" x2={this.lineLength + getCircleRadius(this.props.isMobile)} y2="50%" strokeWidth="2" stroke="#e0e0e0" strokeLinecap="round" />
<circle cx={circleCenter} cy="50%" r={getCircleRadius(this.props.isMobile)} fill="#00a5e4" /> |
<<<<<<<
import getLatestActivityDate from 'helpers/getLatestActivityDate';
import selectors from 'selectors';
import debounce from 'lodash/debounce';
=======
>>>>>>>
import getLatestActivityDate from 'helpers/getLatestActivityDate';
import selectors from 'selectors';
import debounce from 'lodash/debounce';
<<<<<<<
class NotesPanel extends React.PureComponent {
static propTypes = {
isDisabled: PropTypes.bool,
display: PropTypes.string.isRequired,
sortStrategy: PropTypes.string.isRequired,
pageLabels: PropTypes.array.isRequired,
customNoteFilter: PropTypes.func,
t: PropTypes.func.isRequired
}
constructor() {
super();
this.state = {
notesToRender: [],
searchInput: ''
=======
const propTypes = {
isDisabled: PropTypes.bool,
isLeftPanelOpen: PropTypes.bool,
display: PropTypes.string.isRequired,
sortStrategy: PropTypes.string.isRequired,
pageLabels: PropTypes.array.isRequired,
customNoteFilter: PropTypes.func,
t: PropTypes.func.isRequired
};
const NotesPanel = ({
isDisabled,
isLeftPanelOpen,
display,
sortStrategy,
pageLabels,
customNoteFilter,
t
}) => {
const [notes, setNotes] = useState([]);
const [searchInput, setSearchInput] = useState('');
const isFirstTimeOpenRef = useRef(true);
useEffect(() => {
const onDocumentUnloaded = () => {
setNotes([]);
setSearchInput('');
>>>>>>>
class NotesPanel extends React.PureComponent {
static propTypes = {
isDisabled: PropTypes.bool,
display: PropTypes.string.isRequired,
sortStrategy: PropTypes.string.isRequired,
pageLabels: PropTypes.array.isRequired,
customNoteFilter: PropTypes.func,
t: PropTypes.func.isRequired
}
constructor() {
super();
this.state = {
notesToRender: [],
searchInput: ''
<<<<<<<
this.visibleNoteIds = new Set();
this.rootAnnotations = [];
this.updatePanelOnInput = debounce(this.updatePanelOnInput.bind(this), 500);
}
componentDidMount() {
core.addEventListener('documentUnloaded', this.onDocumentUnloaded);
core.addEventListener('annotationChanged', this.onAnnotationChanged);
core.addEventListener('annotationHidden', this.onAnnotationChanged);
}
componentDidUpdate(prevProps) {
if (prevProps.customNoteFilter !== this.props.customNoteFilter) {
const notesToRender = this.filterAnnotations(this.rootAnnotations, this.state.searchInput);
this.setVisibleNoteIds(notesToRender);
this.setState({ notesToRender });
}
}
componentWillUnmount() {
core.removeEventListener('documentUnloaded', this.onDocumentUnloaded);
core.removeEventListener('annotationChanged', this.onAnnotationChanged);
core.removeEventListener('annotationHidden', this.onAnnotationChanged);
}
onDocumentUnloaded = () => {
this.visibleNoteIds.clear();
this.rootAnnotations = [];
this.setState({ notesToRender: [] });
}
onAnnotationChanged = () => {
this.rootAnnotations = this.getRootAnnotations();
const notesToRender = this.filterAnnotations(this.rootAnnotations, this.state.searchInput);
const visibleNotes = notesToRender.filter(a => !a.Hidden);
=======
>>>>>>>
this.visibleNoteIds = new Set();
this.rootAnnotations = [];
this.updatePanelOnInput = debounce(this.updatePanelOnInput.bind(this), 500);
}
componentDidMount() { |
<<<<<<<
if (this.state.isChanged) {
core.setNoteContents(this.props.annotation, this.textInput.current.value);
if (this.props.annotation instanceof window.Annotations.FreeTextAnnotation) {
core.drawAnnotationsFromList([ this.props.annotation ]);
=======
const { annotation, closeEditing } = this.props;
const content = this.textInput.current.value.trim();
if (content) {
core.setNoteContents(annotation, this.textInput.current.value);
if (annotation instanceof window.Annotations.FreeTextAnnotation) {
core.drawAnnotationsFromList([ annotation ]);
>>>>>>>
const { annotation, closeEditing } = this.props;
if (this.state.isChanged) {
core.setNoteContents(annotation, this.textInput.current.value);
if (annotation instanceof window.Annotations.FreeTextAnnotation) {
core.drawAnnotationsFromList([ annotation ]); |
<<<<<<<
import context from 'browser/lib/context'
import i18n from 'browser/lib/i18n'
import fs from 'fs'
import path from 'path'
import uri2path from 'file-uri-to-path'
import { remote, shell } from 'electron'
import attachmentManagement from '../main/lib/dataApi/attachmentManagement'
import filenamify from 'filenamify'
=======
>>>>>>>
import i18n from 'browser/lib/i18n'
import path from 'path'
import { remote, shell } from 'electron'
import attachmentManagement from '../main/lib/dataApi/attachmentManagement'
import filenamify from 'filenamify'
<<<<<<<
=======
const markdownStyle = require('!!css!stylus?sourceMap!./markdown.styl')[0][1]
const appPath = fileUrl(
process.env.NODE_ENV === 'production' ? app.getAppPath() : path.resolve()
)
const CSS_FILES = [
`${appPath}/node_modules/katex/dist/katex.min.css`,
`${appPath}/node_modules/codemirror/lib/codemirror.css`,
`${appPath}/node_modules/react-image-carousel/lib/css/main.min.css`
]
/**
* @param {Object} opts
* @param {String} opts.fontFamily
* @param {Numberl} opts.fontSize
* @param {String} opts.codeBlockFontFamily
* @param {String} opts.theme
* @param {Boolean} [opts.lineNumber] Should show line number
* @param {Boolean} [opts.scrollPastEnd]
* @param {Boolean} [opts.allowCustomCSS] Should add custom css
* @param {String} [opts.customCSS] Will be added to bottom, only if `opts.allowCustomCSS` is truthy
* @returns {String}
*/
function buildStyle(opts) {
const {
fontFamily,
fontSize,
codeBlockFontFamily,
lineNumber,
scrollPastEnd,
theme,
allowCustomCSS,
customCSS,
RTL
} = opts
return `
@font-face {
font-family: 'Lato';
src: url('${appPath}/resources/fonts/Lato-Regular.woff2') format('woff2'), /* Modern Browsers */
url('${appPath}/resources/fonts/Lato-Regular.woff') format('woff'), /* Modern Browsers */
url('${appPath}/resources/fonts/Lato-Regular.ttf') format('truetype');
font-style: normal;
font-weight: normal;
text-rendering: optimizeLegibility;
}
@font-face {
font-family: 'Lato';
src: url('${appPath}/resources/fonts/Lato-Black.woff2') format('woff2'), /* Modern Browsers */
url('${appPath}/resources/fonts/Lato-Black.woff') format('woff'), /* Modern Browsers */
url('${appPath}/resources/fonts/Lato-Black.ttf') format('truetype');
font-style: normal;
font-weight: 700;
text-rendering: optimizeLegibility;
}
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: local('Material Icons'),
local('MaterialIcons-Regular'),
url('${appPath}/resources/fonts/MaterialIcons-Regular.woff2') format('woff2'),
url('${appPath}/resources/fonts/MaterialIcons-Regular.woff') format('woff'),
url('${appPath}/resources/fonts/MaterialIcons-Regular.ttf') format('truetype');
}
${markdownStyle}
body {
font-family: '${fontFamily.join("','")}';
font-size: ${fontSize}px;
${
scrollPastEnd
? `
padding-bottom: 90vh;
box-sizing: border-box;
`
: ''
}
${RTL ? 'direction: rtl;' : ''}
${RTL ? 'text-align: right;' : ''}
}
@media print {
body {
padding-bottom: initial;
}
}
code {
font-family: '${codeBlockFontFamily.join("','")}';
background-color: rgba(0,0,0,0.04);
text-align: left;
direction: ltr;
}
p code,
li code,
td code
{
padding: 2px;
border-width: 1px;
border-style: solid;
border-radius: 5px;
}
[data-theme="default"] p code,
[data-theme="default"] li code,
[data-theme="default"] td code
{
background-color: #F4F4F4;
border-color: #d9d9d9;
color: inherit;
}
[data-theme="white"] p code,
[data-theme="white"] li code,
[data-theme="white"] td code
{
background-color: #F4F4F4;
border-color: #d9d9d9;
color: inherit;
}
[data-theme="dark"] p code,
[data-theme="dark"] li code,
[data-theme="dark"] td code
{
background-color: #444444;
border-color: #555;
color: #FFFFFF;
}
[data-theme="dracula"] p code,
[data-theme="dracula"] li code,
[data-theme="dracula"] td code
{
background-color: #444444;
border-color: #555;
color: #FFFFFF;
}
[data-theme="monokai"] p code,
[data-theme="monokai"] li code,
[data-theme="monokai"] td code
{
background-color: #444444;
border-color: #555;
color: #FFFFFF;
}
[data-theme="nord"] p code,
[data-theme="nord"] li code,
[data-theme="nord"] td code
{
background-color: #444444;
border-color: #555;
color: #FFFFFF;
}
[data-theme="solarized-dark"] p code,
[data-theme="solarized-dark"] li code,
[data-theme="solarized-dark"] td code
{
background-color: #444444;
border-color: #555;
color: #FFFFFF;
}
[data-theme="vulcan"] p code,
[data-theme="vulcan"] li code,
[data-theme="vulcan"] td code
{
background-color: #444444;
border-color: #555;
color: #FFFFFF;
}
.lineNumber {
${lineNumber && 'display: block !important;'}
font-family: '${codeBlockFontFamily.join("','")}';
}
.clipboardButton {
color: rgba(147,147,149,0.8);;
fill: rgba(147,147,149,1);;
border-radius: 50%;
margin: 0px 10px;
border: none;
background-color: transparent;
outline: none;
height: 15px;
width: 15px;
cursor: pointer;
}
.clipboardButton:hover {
transition: 0.2s;
color: #939395;
fill: #939395;
background-color: rgba(0,0,0,0.1);
}
h1, h2 {
border: none;
}
h3 {
margin: 1em 0 0.8em;
}
h4, h5, h6 {
margin: 1.1em 0 0.5em;
}
h1 {
padding: 0.2em 0 0.2em;
margin: 1em 0 8px;
}
h2 {
padding: 0.2em 0 0.2em;
margin: 1em 0 0.7em;
}
body p {
white-space: normal;
}
@media print {
body[data-theme="${theme}"] {
color: #000;
background-color: #fff;
}
.clipboardButton {
display: none
}
}
${allowCustomCSS ? customCSS : ''}
`
}
>>>>>>>
<<<<<<<
export default class MarkdownPreview extends React.Component {
constructor (props) {
=======
const OSX = global.process.platform === 'darwin'
const defaultFontFamily = ['helvetica', 'arial', 'sans-serif']
if (!OSX) {
defaultFontFamily.unshift('Microsoft YaHei')
defaultFontFamily.unshift('meiryo')
}
const defaultCodeBlockFontFamily = [
'Monaco',
'Menlo',
'Ubuntu Mono',
'Consolas',
'source-code-pro',
'monospace'
]
// return the line number of the line that used to generate the specified element
// return -1 if the line is not found
function getSourceLineNumberByElement(element) {
let isHasLineNumber = element.dataset.line !== undefined
let parent = element
while (!isHasLineNumber && parent.parentElement !== null) {
parent = parent.parentElement
isHasLineNumber = parent.dataset.line !== undefined
}
return parent.dataset.line !== undefined ? parseInt(parent.dataset.line) : -1
}
class MarkdownPreview extends React.Component {
constructor(props) {
>>>>>>>
// return the line number of the line that used to generate the specified element
// return -1 if the line is not found
function getSourceLineNumberByElement(element) {
let isHasLineNumber = element.dataset.line !== undefined
let parent = element
while (!isHasLineNumber && parent.parentElement !== null) {
parent = parent.parentElement
isHasLineNumber = parent.dataset.line !== undefined
}
return parent.dataset.line !== undefined ? parseInt(parent.dataset.line) : -1
}
class MarkdownPreview extends React.Component {
constructor(props) {
<<<<<<<
exportAsDocument (fileType, contentFormatter) {
const note = this.props.getNote()
=======
exportAsDocument(fileType, contentFormatter) {
>>>>>>>
exportAsDocument(fileType, contentFormatter) {
const note = this.props.getNote()
<<<<<<<
applyStyle () {
=======
getStyleParams() {
const {
fontSize,
lineNumber,
codeBlockTheme,
scrollPastEnd,
theme,
allowCustomCSS,
customCSS,
RTL
} = this.props
let { fontFamily, codeBlockFontFamily } = this.props
fontFamily =
_.isString(fontFamily) && fontFamily.trim().length > 0
? fontFamily
.split(',')
.map(fontName => fontName.trim())
.concat(defaultFontFamily)
: defaultFontFamily
codeBlockFontFamily =
_.isString(codeBlockFontFamily) && codeBlockFontFamily.trim().length > 0
? codeBlockFontFamily
.split(',')
.map(fontName => fontName.trim())
.concat(defaultCodeBlockFontFamily)
: defaultCodeBlockFontFamily
return {
fontFamily,
fontSize,
codeBlockFontFamily,
lineNumber,
codeBlockTheme,
scrollPastEnd,
theme,
allowCustomCSS,
customCSS,
RTL
}
}
applyStyle() {
>>>>>>>
applyStyle() { |
<<<<<<<
window.addEventListener('keydown', this.onKeyDown);
=======
this.container.current.addEventListener('wheel', this.onWheel, { passive: false });
>>>>>>>
window.addEventListener('keydown', this.onKeyDown);
this.container.current.addEventListener('wheel', this.onWheel, { passive: false });
<<<<<<<
window.removeEventListener('keydown', this.onKeyDown);
}
onKeyDown = e => {
const { currentPage, totalPages } = this.props;
const { scrollTop, clientHeight, scrollHeight } = this.container.current;
const reachedTop = scrollTop === 0;
const reachedBottom = Math.abs(scrollTop + clientHeight - scrollHeight) <= 1;
if ((e.key === 'ArrowUp' || e.which === 38) && reachedTop && currentPage > 1) {
this.pageUp();
} else if ((e.key === 'ArrowDown' || e.which === 40) && reachedBottom && currentPage < totalPages) {
this.pageDown();
}
=======
this.container.current.removeEventListener('wheel', this.onWheel, { passive: false });
>>>>>>>
window.removeEventListener('keydown', this.onKeyDown);
this.container.current.removeEventListener('wheel', this.onWheel, { passive: false });
}
onKeyDown = e => {
const { currentPage, totalPages } = this.props;
const { scrollTop, clientHeight, scrollHeight } = this.container.current;
const reachedTop = scrollTop === 0;
const reachedBottom = Math.abs(scrollTop + clientHeight - scrollHeight) <= 1;
if ((e.key === 'ArrowUp' || e.which === 38) && reachedTop && currentPage > 1) {
this.pageUp();
} else if ((e.key === 'ArrowDown' || e.which === 40) && reachedBottom && currentPage < totalPages) {
this.pageDown();
} |
<<<<<<<
import { translate } from 'react-i18next';
import classNames from 'classnames';
=======
import { withTranslation } from 'react-i18next';
>>>>>>>
import classNames from 'classnames';
import { withTranslation } from 'react-i18next'; |
<<<<<<<
it('uses session per query', async () => {
let tempSessionId = `${Date.now()}`;
const result = await clickhouse.query(
`CREATE TEMPORARY TABLE test_table
(_id String, str String)
ENGINE=Memory`, {}, {sessionId: tempSessionId}
).toPromise();
expect(result).to.be.ok();
const result2 = await clickhouse.query(
`SELECT * FROM test_table LIMIT 10`, {}, {sessionId: tempSessionId}
).toPromise();
expect(result2).to.be.ok();
try {
await clickhouse.query(
`SELECT * FROM test_table LIMIT 10`, {}, {sessionId: `${tempSessionId}_bad`}
).toPromise();
} catch (error) {
expect(error.code).to.be(60);
}
const result3 = await clickhouse.query(
`DROP TEMPORARY TABLE test_table`, {}, {sessionId: tempSessionId}
).toPromise();
expect(result3).to.be.ok();
});
=======
it('use setSessionPerQuery #1', async () => {
const sessionPerQuery = clickhouse.sessionPerQuery;
clickhouse.setSessionPerQuery(false);
const result = await clickhouse.query(
`CREATE TEMPORARY TABLE test_table
(_id String, str String)
ENGINE=Memory`
).toPromise();
expect(result).to.be.ok();
try {
await clickhouse.query(
`CREATE TEMPORARY TABLE test_table
(_id String, str String)
ENGINE=Memory`
).toPromise();
expect(1).to.be(0);
} catch (err) {
expect(err).to.be.ok();
expect(err.code).to.be(57);
}
clickhouse.setSessionPerQuery(sessionPerQuery);
});
it('use setSessionPerQuery #2', async () => {
const sessionPerQuery = clickhouse.sessionPerQuery;
clickhouse.setSessionPerQuery(true);
const result = await clickhouse.query(
`CREATE TEMPORARY TABLE test_table
(_id String, str String)
ENGINE=Memory`
).toPromise();
expect(result).to.be.ok();
await clickhouse.query(
`CREATE TEMPORARY TABLE test_table
(_id String, str String)
ENGINE=Memory`
).toPromise();
clickhouse.setSessionPerQuery(sessionPerQuery);
});
>>>>>>>
it('uses session per query', async () => {
let tempSessionId = `${Date.now()}`;
const result = await clickhouse.query(
`CREATE TEMPORARY TABLE test_table
(_id String, str String)
ENGINE=Memory`, {}, {sessionId: tempSessionId}
).toPromise();
expect(result).to.be.ok();
const result2 = await clickhouse.query(
`SELECT * FROM test_table LIMIT 10`, {}, {sessionId: tempSessionId}
).toPromise();
expect(result2).to.be.ok();
try {
await clickhouse.query(
`SELECT * FROM test_table LIMIT 10`, {}, {sessionId: `${tempSessionId}_bad`}
).toPromise();
} catch (error) {
expect(error.code).to.be(60);
}
const result3 = await clickhouse.query(
`DROP TEMPORARY TABLE test_table`, {}, {sessionId: tempSessionId}
).toPromise();
expect(result3).to.be.ok();
});
it('use setSessionPerQuery #1', async () => {
const sessionPerQuery = clickhouse.sessionPerQuery;
clickhouse.setSessionPerQuery(false);
const result = await clickhouse.query(
`CREATE TEMPORARY TABLE test_table
(_id String, str String)
ENGINE=Memory`
).toPromise();
expect(result).to.be.ok();
try {
await clickhouse.query(
`CREATE TEMPORARY TABLE test_table
(_id String, str String)
ENGINE=Memory`
).toPromise();
expect(1).to.be(0);
} catch (err) {
expect(err).to.be.ok();
expect(err.code).to.be(57);
}
clickhouse.setSessionPerQuery(sessionPerQuery);
});
it('use setSessionPerQuery #2', async () => {
const sessionPerQuery = clickhouse.sessionPerQuery;
clickhouse.setSessionPerQuery(true);
const result = await clickhouse.query(
`CREATE TEMPORARY TABLE test_table
(_id String, str String)
ENGINE=Memory`
).toPromise();
expect(result).to.be.ok();
await clickhouse.query(
`CREATE TEMPORARY TABLE test_table
(_id String, str String)
ENGINE=Memory`
).toPromise();
clickhouse.setSessionPerQuery(sessionPerQuery);
}); |
<<<<<<<
this.md.use(require('markdown-it-admonition'))
this.md.use(require('markdown-it-abbr'))
this.md.use(require('markdown-it-sub'))
this.md.use(require('markdown-it-sup'))
this.md.use(require('./markdown-it-deflist'))
=======
this.md.use(require('markdown-it-admonition'), {types: ['note', 'hint', 'attention', 'caution', 'danger', 'error']})
>>>>>>>
this.md.use(require('markdown-it-admonition'), {types: ['note', 'hint', 'attention', 'caution', 'danger', 'error']})
this.md.use(require('markdown-it-abbr'))
this.md.use(require('markdown-it-sub'))
this.md.use(require('markdown-it-sup'))
this.md.use(require('./markdown-it-deflist')) |
<<<<<<<
import { LogLevel } from "@azure/msal-browser";
=======
// Browser check variables
// If you support IE, our recommendation is that you sign-in using Redirect APIs
// If you as a developer are testing using Edge InPrivate mode, please add "isEdge" to the if check
const ua = window.navigator.userAgent;
const msie = ua.indexOf("MSIE ");
const msie11 = ua.indexOf("Trident/");
const msedge = ua.indexOf("Edge/");
const firefox = ua.indexOf("Firefox");
const isIE = msie > 0 || msie11 > 0;
const isEdge = msedge > 0;
const isFirefox = firefox > 0; // Only needed if you need to support the redirect flow in Firefox incognito
>>>>>>>
import { LogLevel } from "@azure/msal-browser";
// Browser check variables
// If you support IE, our recommendation is that you sign-in using Redirect APIs
// If you as a developer are testing using Edge InPrivate mode, please add "isEdge" to the if check
const ua = window.navigator.userAgent;
const msie = ua.indexOf("MSIE ");
const msie11 = ua.indexOf("Trident/");
const msedge = ua.indexOf("Edge/");
const firefox = ua.indexOf("Firefox");
const isIE = msie > 0 || msie11 > 0;
const isEdge = msedge > 0;
const isFirefox = firefox > 0; // Only needed if you need to support the redirect flow in Firefox incognito
<<<<<<<
},
system: {
loggerOptions: {
loggerCallback: (level, message, containsPii) => {
if (containsPii) {
return;
}
switch (level) {
case LogLevel.Error:
console.error(message);
return;
case LogLevel.Info:
console.info(message);
return;
case LogLevel.Verbose:
console.debug(message);
return;
case LogLevel.Warning:
console.warn(message);
return;
}
}
}
=======
},
cache: {
storeAuthStateInCookie: isIE || isEdge || isFirefox
>>>>>>>
},
cache: {
storeAuthStateInCookie: isIE || isEdge || isFirefox
},
system: {
loggerOptions: {
loggerCallback: (level, message, containsPii) => {
if (containsPii) {
return;
}
switch (level) {
case LogLevel.Error:
console.error(message);
return;
case LogLevel.Info:
console.info(message);
return;
case LogLevel.Verbose:
console.debug(message);
return;
case LogLevel.Warning:
console.warn(message);
return;
}
}
} |
<<<<<<<
=======
const frames = [];
const flipped = [];
>>>>>>>
<<<<<<<
let frames;
(async () => {
const framesPath = 'frames';
const files = await fs.readdir(framesPath);
frames = await Promise.all(files.map(async (file) => {
const frame = await fs.readFile(path.join(framesPath, file));
return frame.toString();
}));
})().catch((err) => {
console.log('Error loading frames');
console.log(err);
=======
fs.readdir('./frames').then(data => {
data.forEach(async frame => {
const f = await fs.readFile(`./frames/${frame}`);
frames.push(f.toString());
flipped.push(
f
.toString()
.split('')
.reverse()
.join('')
);
});
>>>>>>>
let frames;
let flipped;
(async () => {
const framesPath = 'frames';
const files = await fs.readdir(framesPath);
frames = await Promise.all(files.map(async (file) => {
const frame = await fs.readFile(path.join(framesPath, file));
return frame.toString();
}));
flipped = frames.map(f => {
return f
.toString()
.split('')
.reverse()
.join('')
})
})().catch((err) => {
console.log('Error loading frames');
console.log(err);
<<<<<<<
if (index >= frames.length) index = 0;
// clear the screen
stream.push('\033[2J\033[H');
=======
if (index >= frames.length) index = 0;
if (index < 0) index = frames.length - 1;
>>>>>>>
if (index >= frames.length) index = 0;
if (index < 0) index = frames.length - 1;
// clear the screen |
<<<<<<<
this._built = true;
window.addEvent('orientationchange', this.bound('_onWindowOrientationChange'));
=======
>>>>>>>
<<<<<<<
/**
* @hidden
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
_onWindowOrientationChange: function() {
this._willUpdateLayout();
this._didUpdateLayout();
=======
toElement: function() {
return this.element;
},
// <0.1-compat>
/**
* @deprecated
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
addChild: function() {
console.log('[DEPRECATION NOTICE] The method "addChild" will be removed in 0.3, use the method "addChildComponent" instead');
return this.addChildComponent.apply(this, arguments);
},
/**
* @deprecated
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
addChildInside: function() {
console.log('[DEPRECATION NOTICE] The method "addChildInside" will be removed in 0.3, use the method "addChildComponentInside" instead');
return this.addChildComponentInside.apply(this, arguments);
},
/**
* @deprecated
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
addChildAfter: function() {
console.log('[DEPRECATION NOTICE] The method "addChildAfter" will be removed in 0.3, use the method "addChildComponentAfter" instead');
return this.addChildComponentAfter.apply(this, arguments);
},
/**
* @deprecated
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
addChildBefore: function() {
console.log('[DEPRECATION NOTICE] The method "addChildBefore" will be removed in 0.3, use the method "addChildComponentBefore" instead');
return this.addChildComponentBefore.apply(this, arguments);
},
/**
* @deprecated
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
getChild: function() {
console.log('[DEPRECATION NOTICE] The method "getChild" will be removed in 0.3, use the method "getChildComponent" instead');
return this.getChildComponent.apply(this, arguments);
},
/**
* @deprecated
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
getChildOfType: function() {
console.log('[DEPRECATION NOTICE] The method "getChildOfType" will be removed in 0.3, use the method "getChildComponentOfType" instead');
return this.getChildComponentOfType.apply(this, arguments);
},
/**
* @deprecated
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
getChildAt: function() {
console.log('[DEPRECATION NOTICE] The method "getChildAt" will be removed in 0.3, use the method "getChildComponentAt" instead');
return this.getChildComponentAt.apply(this, arguments);
},
/**
* @deprecated
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
getChildOfTypeAt: function() {
console.log('[DEPRECATION NOTICE] The method "getChildOfTypeAt" will be removed in 0.3, use the method "getChildComponentOfTypeAt" instead');
return this.getChildComponentOfTypeAt.apply(this, arguments);
},
/**
* @deprecated
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
getChildIndex: function() {
console.log('[DEPRECATION NOTICE] The method "getChildIndex" will be removed in 0.3, use the method "getChildComponentIndex" instead');
return this.getChildComponentIndex.apply(this, arguments);
},
/**
* @deprecated
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
getChildren: function() {
console.log('[DEPRECATION NOTICE] The method "getChildren" will be removed in 0.3, use the method "getChildComponents" instead');
return this.getChildComponents.apply(this, arguments);
},
/**
* @deprecated
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
getChildrenOfType: function() {
console.log('[DEPRECATION NOTICE] The method "getChildrenOfType" will be removed in 0.3, use the method "getChildComponentsOfType" instead');
return this.getChildComponentsOfType.apply(this, arguments);
},
/**
* @deprecated
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
hasChild: function() {
console.log('[DEPRECATION NOTICE] The method "hasChild" will be removed in 0.3, use the method "hasChildComponent" instead');
return this.hasChildComponent.apply(this, arguments);
},
/**
* @deprecated
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
hasChildOfType: function() {
console.log('[DEPRECATION NOTICE] The method "hasChildOfType" will be removed in 0.3, use the method "hasChildComponentOfType" instead');
return this.hasChildComponentOfType.apply(this, arguments);
},
/**
* @deprecated
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
replaceChild: function() {
console.log('[DEPRECATION NOTICE] The method "replaceChild" will be removed in 0.3, use the method "replaceChildComponent" instead');
return this.replaceChildComponent.apply(this, arguments);
},
/**
* @deprecated
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
replaceWith: function() {
console.log('[DEPRECATION NOTICE] The method "replaceWith" will be removed in 0.3, use the method "replaceWithComponent" instead');
return this.replaceWithComponent.apply(this, arguments);
},
/**
* @deprecated
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
removeChild: function() {
console.log('[DEPRECATION NOTICE] The method "removeChild" will be removed in 0.3, use the method "removeChildComponent" instead');
return this.removeChildComponent.apply(this, arguments);
},
/**
* @deprecated
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
removeChildren: function() {
console.log('[DEPRECATION NOTICE] The method "removeChildren" will be removed in 0.3, use the method "removeAllChildComponents" instead');
return this.removeAllChildComponents.apply(this, arguments);
},
/**
* @deprecated
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
removeChildrenOfType: function() {
console.log('[DEPRECATION NOTICE] The method "removeChildrenOfType" will be removed in 0.3, use the method "removeAllChildComponentsOfType" instead');
return this.removeAllChildComponentsOfType.apply(this, arguments);
},
/**
* @deprecated
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
removeFromParent: function() {
console.log('[DEPRECATION NOTICE] The method "removeFromParent" will be removed in 0.3, use the method "removeFromParentComponent" instead');
return this.removeFromParentComponent.apply(this, arguments);
},
/**
* @deprecated
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
setParent: function() {
console.log('[DEPRECATION NOTICE] The method "setParent" will be removed in 0.3, use the method "setParentComponent" instead');
return this.setParentComponent.apply(this, arguments);
},
/**
* @deprecated
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
getParent: function() {
console.log('[DEPRECATION NOTICE] The method "getParent" will be removed in 0.3, use the method "getParentComponent" instead');
return this.getParentComponent.apply(this, arguments);
},
/**
* @deprecated
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
hasParent: function() {
console.log('[DEPRECATION NOTICE] The method "hasParent" will be removed in 0.3, use the "hasParentComponent" instead');
return this.hasParentComponent.apply(this, arguments);
>>>>>>> |
<<<<<<<
if (this._ready) {
component._setReady(true);
}
this._setUpdateLayout(true);
=======
>>>>>>>
if (this._ready) {
component._setReady(true);
}
this._setUpdateLayout(true);
<<<<<<<
this._setUpdateLayout(true);
=======
>>>>>>>
this._setUpdateLayout(true);
<<<<<<<
this._setUpdateLayout(true);
=======
>>>>>>>
this._setUpdateLayout(true);
<<<<<<<
this._setUpdateLayout(true);
=======
>>>>>>>
this._setUpdateLayout(true);
<<<<<<<
this._setUpdateLayout(true);
=======
>>>>>>>
this._setUpdateLayout(true);
<<<<<<<
this._setUpdateLayout(true);
=======
>>>>>>>
this._setUpdateLayout(true);
<<<<<<<
this._setUpdateLayout(true);
=======
>>>>>>>
this._setUpdateLayout(true);
<<<<<<<
this._setUpdateLayout(true);
=======
>>>>>>>
this._setUpdateLayout(true);
<<<<<<<
* @see http://moobilejs.com/doc/latest/Component/Component#didBuild
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
didBuild: function() {
},
/**
* @see http://moobilejs.com/doc/latest/Component/Component#didBecomeReady
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
didBecomeReady: function() {
},
/**
* @see http://moobilejs.com/doc/latest/Component/Component#didUpdateLayout
* @author Jean-Philippe Dery ([email protected])
* @since 0.3.0
*/
didUpdateLayout: function() {
},
/**
=======
>>>>>>>
* @see http://moobilejs.com/doc/latest/Component/Component#didBuild
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
didBuild: function() {
},
/**
* @see http://moobilejs.com/doc/latest/Component/Component#didBecomeReady
* @author Jean-Philippe Dery ([email protected])
* @since 0.1.0
*/
didBecomeReady: function() {
},
/**
* @see http://moobilejs.com/doc/latest/Component/Component#didUpdateLayout
* @author Jean-Philippe Dery ([email protected])
* @since 0.3.0
*/
didUpdateLayout: function() {
},
/** |
<<<<<<<
const { $, $$, after, append, before, detach, detachAll, prepend, substitute } = require('./utils/dom');
const { literalList } = require('./utils/misc');
=======
const { $, $$, after, append, detach, detachAll, prepend, substitute } = require('./utils/dom');
>>>>>>>
const { $, $$, after, append, before, detach, detachAll, prepend, substitute } = require('./utils/dom');
<<<<<<<
// Transform quotes (native and embedded)
$$(
literalList(`
blockquote:not([class])
.quote--pullquote
.inline-content.quote
.embed-quote
.comp-rich-text-blockquote
.view-inline-pullquote
[data-component="Blockquote"]
[data-component="Pullquote"]
`),
storyEl
).forEach(Quote.transformEl);
=======
// Transform quotes (native and embedded) that haven't already been transformed
$$(SELECTORS.QUOTE, storyEl)
.filter(el => el.closest('.Quote') === null)
.forEach(Quote.transformEl);
>>>>>>>
// Transform quotes (native and embedded) that haven't already been transformed
$$(SELECTORS.QUOTE, storyEl)
.filter(el => el.closest('.Quote') === null)
.forEach(Quote.transformEl); |
<<<<<<<
import Abilities from './Modules/Features/Abilities';
import Nazjatar from './Modules/Legendaries/Nazjatar';
import UncertainReminder from './Modules/Legendaries/UncertainReminder';
import Jonat from './Modules/Legendaries/Jonat';
import Nobundo from './Modules/Legendaries/Nobundo';
import Tidecallers from './Modules/Legendaries/Tidecallers';
import Restoration_Shaman_T19_2Set from './Modules/Legendaries/T19_2Set';
import Restoration_Shaman_T20_4Set from './Modules/Legendaries/T20_4Set';
=======
import CastEfficiency from './Modules/Features/CastEfficiency';
>>>>>>>
import Abilities from './Modules/Features/Abilities';
<<<<<<<
abilities: Abilities,
=======
castEfficiency: CastEfficiency,
tidalWaves: TidalWaves,
castBehavior: CastBehavior,
>>>>>>>
abilities: Abilities,
tidalWaves: TidalWaves,
castBehavior: CastBehavior, |
<<<<<<<
function typeSwitcher(type) {
switch (type) {
case 'string':
return 'string';
case 'number':
return 'number';
case 'object':
return 'object';
case 'array':
return 'any[]';
case 'bool':
return 'boolean';
case 'function':
return '() => any';
// case 'symbol':
// return 'string';
case 'node':
return 'string';
case 'element':
return 'string';
case 'tuple':
return '[any]';
case 'enum':
return '{}';
case 'any':
return 'any';
default:
return 'any';
}
}
// need to filter with reduce the import, copy from below
=======
>>>>>>>
<<<<<<<
.filter(child => child.childType !== 'HTML')
.map(child => `import ${child.componentName} from './${child.componentName}.tsx'`)
.reduce((acc, child) => {
if (!acc.includes(child)) {
acc.push(child);
=======
.filter(child => child.childType !== 'HTML')
.map(child => `import ${child.componentName} from './${child.componentName}.tsx'`)
.reduce((acc, child) => {
if (!acc.includes(child)) {
acc.push(child);
return acc;
}
>>>>>>>
.filter(child => child.childType !== 'HTML')
.map(child => `import ${child.componentName} from './${child.componentName}.tsx'`)
.reduce((acc, child) => {
if (!acc.includes(child)) {
acc.push(child);
return acc;
}
<<<<<<<
${props.map(p => `${p.key}: ${p.type}`).join('\n')}
=======
${props.map(prop => `${prop.key}: ${prop.type}`).join('\n')}
>>>>>>>
${props.map(prop => `${prop.key}: ${prop.type}`).join('\n')} |
<<<<<<<
=======
import React from 'React';
import PropTypes from 'prop-types';
>>>>>>>
<<<<<<<
_renderColumnsLeftShadow(/*number*/ left) /*?object*/ {
=======
_getColumnsWidth = (/*array*/ columns) => /*number*/ {
var width = 0;
for (var i = 0; i < columns.length; ++i) {
width += columns[i].props.width;
}
return width;
};
_renderColumnsLeftShadow = (/*number*/ left) => /*?object*/ {
>>>>>>>
_renderColumnsLeftShadow = (/*number*/ left) => /*?object*/ { |
<<<<<<<
FOOTER_EXAMPLE: {
location: 'example-footer.html',
fileName: 'FooterExample.js',
title: 'Footer',
description: 'A table example that displays a footer.'
},
MAX_HEIGHT_EXAMPLE: {
location: 'example-max-height.html',
fileName: 'MaxHeightExample.js',
title: 'Max Height',
description: 'A table example that displays a table growing to it\'s max height.'
},
OWNER_HEIGHT_EXAMPLE: {
location: 'example-owner-height.html',
fileName: 'OwnerHeightExample.js',
title: 'Owner Height',
description: 'A table example that displays a table footer sticking to the screen.'
},
=======
LONG_CLICK_EXAMPLE: {
location: 'example-long-click.html',
fileName: 'LongClickExample.js',
title: 'Row Long Click',
description: 'A table example that highlights a row after a long click',
},
>>>>>>>
FOOTER_EXAMPLE: {
location: 'example-footer.html',
fileName: 'FooterExample.js',
title: 'Footer',
description: 'A table example that displays a footer.'
},
MAX_HEIGHT_EXAMPLE: {
location: 'example-max-height.html',
fileName: 'MaxHeightExample.js',
title: 'Max Height',
description: 'A table example that displays a table growing to it\'s max height.'
},
OWNER_HEIGHT_EXAMPLE: {
location: 'example-owner-height.html',
fileName: 'OwnerHeightExample.js',
title: 'Owner Height',
description: 'A table example that displays a table footer sticking to the screen.'
},
LONG_CLICK_EXAMPLE: {
location: 'example-long-click.html',
fileName: 'LongClickExample.js',
title: 'Row Long Click',
description: 'A table example that highlights a row after a long click',
}, |
<<<<<<<
this.generateToc = () => this.handleGenerateToc()
this.getNote = this.getNote.bind(this)
=======
this.generateToc = this.handleGenerateToc.bind(this)
this.handleUpdateContent = this.handleUpdateContent.bind(this)
this.handleSwitchStackDirection = this.handleSwitchStackDirection.bind(this)
>>>>>>>
this.handleUpdateContent = this.handleUpdateContent.bind(this)
this.handleSwitchStackDirection = this.handleSwitchStackDirection.bind(this)
this.getNote = this.getNote.bind(this)
<<<<<<<
getNote () {
return this.state.note
}
renderEditor () {
=======
renderEditor() {
>>>>>>>
getNote() {
return this.state.note
}
renderEditor() { |
<<<<<<<
const FixedDataTable = React.createClass({
=======
var FixedDataTable = createReactClass({
displayName: 'FixedDataTable',
>>>>>>>
const FixedDataTable = createReactClass({
displayName: 'FixedDataTable',
<<<<<<<
touchEnabled && this._shouldHandleWheelX,
touchEnabled && this._shouldHandleWheelY,
this.props.stopScrollPropagation
=======
this._shouldHandleTouchX,
this._shouldHandleTouchY,
props.stopScrollPropagation
>>>>>>>
this._shouldHandleTouchX,
this._shouldHandleTouchY,
this.props.stopScrollPropagation
<<<<<<<
const {
ownerHeight,
scrollLeft,
scrollTop,
} = this.props;
=======
var newOverflowX = nextProps.overflowX;
var newOverflowY = nextProps.overflowY;
var touchEnabled = nextProps.touchScrollEnabled === true;
>>>>>>>
const {
ownerHeight,
scrollLeft,
scrollTop,
} = this.props;
<<<<<<<
const {
firstRowIndex,
onScrollStart,
scrollActions,
scrollX,
scrollY,
} = this.props;
if (this.isMounted() && !this._isScrolling) {
this._isScrolling = true;
scrollActions.startScroll();
if (onScrollStart) {
onScrollStart(scrollX, scrollY, firstRowIndex);
}
=======
if (this._isScrolling) {
return;
}
this._isScrolling = true;
if (this.props.onScrollStart) {
this.props.onScrollStart(this.state.scrollX, this.state.scrollY, this.state.firstRowIndex);
>>>>>>>
const {
firstRowIndex,
onScrollStart,
scrollActions,
scrollX,
scrollY,
} = this.props;
if (this._isScrolling) {
return;
}
this._isScrolling = true;
scrollActions.startScroll();
if (onScrollStart) {
onScrollStart(scrollX, scrollY, firstRowIndex);
<<<<<<<
const {
firstRowIndex,
onScrollEnd,
scrollActions,
scrollX,
scrollY,
} = this.props;
if (this.isMounted() && this._isScrolling) {
this._isScrolling = false;
scrollActions.stopScroll();
if (onScrollEnd) {
onScrollEnd(scrollX, scrollY, firstRowIndex);
}
=======
if (!this._isScrolling) {
return;
}
this._isScrolling = false;
this.setState({redraw: true});
if (this.props.onScrollEnd) {
this.props.onScrollEnd(this.state.scrollX, this.state.scrollY, this.state.firstRowIndex);
>>>>>>>
const {
firstRowIndex,
onScrollEnd,
scrollActions,
scrollX,
scrollY,
} = this.props;
if (!this._isScrolling) {
return;
}
this._isScrolling = false;
scrollActions.stopScroll();
if (onScrollEnd) {
onScrollEnd(scrollX, scrollY, firstRowIndex);
<<<<<<<
const HorizontalScrollbar = React.createClass({
=======
var HorizontalScrollbar = createReactClass({
displayName: 'HorizontalScrollbar',
>>>>>>>
const HorizontalScrollbar = createReactClass({
displayName: 'HorizontalScrollbar', |
<<<<<<<
import cx from 'cx';
import joinClasses from 'joinClasses';
import shallowEqual from 'shallowEqual';
import { polyfill as lifecycleCompatibilityPolyfill } from 'react-lifecycles-compat';
=======
import cx from './vendor_upstream/stubs/cx';
import joinClasses from './vendor_upstream/core/joinClasses';
import shallowEqual from './vendor_upstream/core/shallowEqual';
import FixedDataTableCellDefault from './FixedDataTableCellDefault';
import FixedDataTableColumnReorderHandle from './FixedDataTableColumnReorderHandle';
>>>>>>>
import cx from './vendor_upstream/stubs/cx';
import joinClasses from './vendor_upstream/core/joinClasses';
import shallowEqual from './vendor_upstream/core/shallowEqual';
import FixedDataTableCellDefault from './FixedDataTableCellDefault';
import FixedDataTableColumnReorderHandle from './FixedDataTableColumnReorderHandle';
import { polyfill as lifecycleCompatibilityPolyfill } from 'react-lifecycles-compat'; |
<<<<<<<
page.lexed = (_.isArray(page.content) ? page.content : lex(include(page.content, [options.dir, options.includes_dir], options.variables)))
return page.lexed
=======
return (_.isArray(src) ? src : lex(include(src, options.includer || function() { return undefined; })))
>>>>>>>
page.lexed = (_.isArray(page.content) ? page.content : lex(include(page.content, options.includer || function() { return undefined; })))
return page.lexed |
<<<<<<<
import { STAT_TRACKER as ROLLING_HAVOC_STATS } from 'parser/warlock/destruction/modules/azerite/RollingHavoc';
=======
import { STAT_TRACKER as BURSTING_FLARE_STATS } from 'parser/warlock/destruction/modules/azerite/BurstingFlare';
>>>>>>>
import { STAT_TRACKER as ROLLING_HAVOC_STATS } from 'parser/warlock/destruction/modules/azerite/RollingHavoc';
import { STAT_TRACKER as BURSTING_FLARE_STATS } from 'parser/warlock/destruction/modules/azerite/BurstingFlare';
<<<<<<<
[SPELLS.ROLLING_HAVOC_BUFF.id]: ROLLING_HAVOC_STATS,
=======
[SPELLS.BURSTING_FLARE_BUFF.id]: BURSTING_FLARE_STATS,
>>>>>>>
[SPELLS.ROLLING_HAVOC_BUFF.id]: ROLLING_HAVOC_STATS,
[SPELLS.BURSTING_FLARE_BUFF.id]: BURSTING_FLARE_STATS, |
<<<<<<<
#! /usr/bin/env node
=======
>>>>>>>
<<<<<<<
}
function access (path, mode, callback) {
if (typeof mode === 'function') {
return access(path, null, callback)
}
// Node v0.10 lacks `fs.access`, which is faster, so fallback to `fs.stat`
if (typeof fs.access === 'function') {
fs.access(path, mode, callback)
} else {
fs.stat(path, callback)
}
}
*/
=======
}
>>>>>>>
}
*/ |
<<<<<<<
debug = require('debug')('freecc:cntr:bonfires'),
Bonfire = require('./../models/Bonfire'),
User = require('./../models/User'),
resources = require('./resources'),
R = require('ramda');
MDNlinks = require('./../seed_data/bonfireMDNlinks');
=======
debug = require('debug')('freecc:cntr:bonfires'),
Bonfire = require('./../models/Bonfire'),
User = require('./../models/User'),
resources = require('./resources'),
MDNlinks = require('./../seed_data/bonfireMDNlinks'),
R = require('ramda');
>>>>>>>
debug = require('debug')('freecc:cntr:bonfires'),
Bonfire = require('./../models/Bonfire'),
User = require('./../models/User'),
resources = require('./resources'),
MDNlinks = require('./../seed_data/bonfireMDNlinks'),
R = require('ramda');
MDNlinks = require('./../seed_data/bonfireMDNlinks');
<<<<<<<
var bonfireName = req.body.name,
bonfireTests = req.body.tests,
bonfireDifficulty = req.body.difficulty,
bonfireDescription = req.body.description,
bonfireChallengeSeed = req.body.challengeSeed;
bonfireTests = bonfireTests.split('\r\n');
bonfireDescription = bonfireDescription.split('\r\n');
bonfireTests.filter(getRidOfEmpties);
bonfireDescription.filter(getRidOfEmpties);
bonfireChallengeSeed = bonfireChallengeSeed.replace('\r', '');
res.render('bonfire/show', {
completedWith: null,
title: bonfireName,
name: bonfireName,
difficulty: +bonfireDifficulty,
brief: bonfireDescription[0],
details: bonfireDescription.slice(1),
tests: bonfireTests,
challengeSeed: bonfireChallengeSeed,
cc: req.user ? req.user.bonfiresHash : undefined,
progressTimestamps: req.user ? req.user.progressTimestamps : undefined,
verb: resources.randomVerb(),
phrase: resources.randomPhrase(),
compliment: resources.randomCompliment(),
bonfires: [],
bonfireHash: 'test'
});
=======
var bonfireName = req.body.name,
bonfireTests = req.body.tests,
bonfireDifficulty = req.body.difficulty,
bonfireDescription = req.body.description,
bonfireChallengeSeed = req.body.challengeSeed;
bonfireTests = bonfireTests.split('\r\n');
bonfireDescription = bonfireDescription.split('\r\n');
bonfireTests.filter(getRidOfEmpties);
bonfireDescription.filter(getRidOfEmpties);
bonfireChallengeSeed = bonfireChallengeSeed.replace('\r', '');
res.render('bonfire/show', {
completedWith: null,
title: bonfireName,
name: bonfireName,
difficulty: +bonfireDifficulty,
brief: bonfireDescription[0],
details: bonfireDescription.slice(1),
tests: bonfireTests,
challengeSeed: bonfireChallengeSeed,
cc: req.user ? req.user.bonfiresHash : undefined,
progressTimestamps: req.user ? req.user.progressTimestamps : undefined,
verb: resources.randomVerb(),
phrase: resources.randomPhrase(),
compliment: resources.randomCompliment(),
bonfires: [],
bonfireHash: 'test'
});
>>>>>>>
var bonfireName = req.body.name,
bonfireTests = req.body.tests,
bonfireDifficulty = req.body.difficulty,
bonfireDescription = req.body.description,
bonfireChallengeSeed = req.body.challengeSeed;
bonfireTests = bonfireTests.split('\r\n');
bonfireDescription = bonfireDescription.split('\r\n');
bonfireTests.filter(getRidOfEmpties);
bonfireDescription.filter(getRidOfEmpties);
bonfireChallengeSeed = bonfireChallengeSeed.replace('\r', '');
res.render('bonfire/show', {
completedWith: null,
title: bonfireName,
name: bonfireName,
difficulty: +bonfireDifficulty,
brief: bonfireDescription[0],
details: bonfireDescription.slice(1),
tests: bonfireTests,
challengeSeed: bonfireChallengeSeed,
cc: req.user ? req.user.bonfiresHash : undefined,
progressTimestamps: req.user ? req.user.progressTimestamps : undefined,
verb: resources.randomVerb(),
phrase: resources.randomPhrase(),
compliment: resources.randomCompliment(),
bonfires: [],
bonfireHash: 'test'
});
<<<<<<<
var bonfireName = req.body.name,
bonfireTests = req.body.tests,
bonfireDifficulty = req.body.difficulty,
bonfireDescription = req.body.description,
bonfireChallengeSeed = req.body.challengeSeed;
bonfireTests = bonfireTests.split('\r\n');
bonfireDescription = bonfireDescription.split('\r\n');
bonfireTests.filter(getRidOfEmpties);
bonfireDescription.filter(getRidOfEmpties);
bonfireChallengeSeed = bonfireChallengeSeed.replace('\r', '');
var response = {
_id: randomString(),
name: bonfireName,
difficulty: bonfireDifficulty,
description: bonfireDescription,
challengeSeed: bonfireChallengeSeed,
tests: bonfireTests
};
res.send(response);
=======
var bonfireName = req.body.name,
bonfireTests = req.body.tests,
bonfireDifficulty = req.body.difficulty,
bonfireDescription = req.body.description,
bonfireChallengeSeed = req.body.challengeSeed;
bonfireTests = bonfireTests.split('\r\n');
bonfireDescription = bonfireDescription.split('\r\n');
bonfireTests.filter(getRidOfEmpties);
bonfireDescription.filter(getRidOfEmpties);
bonfireChallengeSeed = bonfireChallengeSeed.replace('\r', '');
var response = {
_id: randomString(),
name: bonfireName,
difficulty: bonfireDifficulty,
description: bonfireDescription,
challengeSeed: bonfireChallengeSeed,
tests: bonfireTests
};
res.send(response);
>>>>>>>
var bonfireName = req.body.name,
bonfireTests = req.body.tests,
bonfireDifficulty = req.body.difficulty,
bonfireDescription = req.body.description,
bonfireChallengeSeed = req.body.challengeSeed;
bonfireTests = bonfireTests.split('\r\n');
bonfireDescription = bonfireDescription.split('\r\n');
bonfireTests.filter(getRidOfEmpties);
bonfireDescription.filter(getRidOfEmpties);
bonfireChallengeSeed = bonfireChallengeSeed.replace('\r', '');
var response = {
_id: randomString(),
name: bonfireName,
difficulty: bonfireDifficulty,
description: bonfireDescription,
challengeSeed: bonfireChallengeSeed,
tests: bonfireTests
};
res.send(response); |
<<<<<<<
=======
/**
* API examples routes.
* accepts a post request. the challenge id req.body.challengeNumber
* and updates user.challengesHash & user.challengesCompleted
*
*/
app.post('/completed-challenge', function (req, res, done) {
req.user.challengesHash[parseInt(req.body.challengeNumber)] =
Math.round(+new Date() / 1000);
var timestamp = req.user.challengesHash;
var points = 0;
for (var key in timestamp) {
if (timestamp[key] > 0 && req.body.challengeNumber < 54) {
points += 1;
}
}
req.user.points = points;
req.user.save(function(err) {
if (err) { return done(err); }
res.status(200).send({ msg: 'progress saved' });
});
});
>>>>>>> |
<<<<<<<
jobs: function jobs(req, res) {
res.render('resources/jobs', {
title: 'Job Board for Front End Developer and Full Stack JavaScript Developer Jobs'
});
},
jobsForm: function jobsForm(req, res) {
res.render('resources/jobs-form', {
title: 'Employer Partnership Form for Job Postings, Recruitment and Corporate Sponsorships'
});
},
=======
catPhotoSubmit: function catPhotoSubmit(req, res) {
res.send(
'Success! You have submitted your cat photo. Return to your website ' +
'by typing any letter into your code editor.'
);
},
>>>>>>>
jobs: function jobs(req, res) {
res.render('resources/jobs', {
title: 'Job Board for Front End Developer and Full Stack JavaScript Developer Jobs'
});
},
jobsForm: function jobsForm(req, res) {
res.render('resources/jobs-form', {
title: 'Employer Partnership Form for Job Postings, Recruitment and Corporate Sponsorships'
});
},
catPhotoSubmit: function catPhotoSubmit(req, res) {
res.send(
'Success! You have submitted your cat photo. Return to your website ' +
'by typing any letter into your code editor.'
);
}, |
<<<<<<<
import SkullflowersHaemostasis from './Modules/Items/SkullflowersHaemostasis';
=======
import ShacklesofBryndaor from './Modules/Items/ShacklesofBryndaor';
>>>>>>>
import SkullflowersHaemostasis from './Modules/Items/SkullflowersHaemostasis';
import ShacklesofBryndaor from './Modules/Items/ShacklesofBryndaor';
<<<<<<<
skullflowersHaemostasis: SkullflowersHaemostasis,
=======
shacklesofBryndaor:ShacklesofBryndaor,
>>>>>>>
skullflowersHaemostasis: SkullflowersHaemostasis,
shacklesofBryndaor:ShacklesofBryndaor, |
<<<<<<<
bonfire = bonfire.pop();
if (bonfire === undefined) {
req.flash('errors', {
msg: "It looks like you've completed all the bonfires we have available. Good job!"
})
return res.redirect('../bonfires/meet-bonfire');
}
nameString = bonfire.name.toLowerCase().replace(/\s/g, '-');
return res.redirect('../bonfires/' + nameString);
=======
nameString = bonfire[0].name.toLowerCase().replace(/\s/g, '-');
return res.redirect('/bonfires/' + nameString);
>>>>>>>
bonfire = bonfire.pop();
if (bonfire === undefined) {
req.flash('errors', {
msg: "It looks like you've completed all the bonfires we have available. Good job!"
});
return res.redirect('../bonfires/meet-bonfire');
}
nameString = bonfire.name.toLowerCase().replace(/\s/g, '-');
return res.redirect('../bonfires/' + nameString);
<<<<<<<
bonfire = bonfire.pop()
var dashedNameFull = bonfire.name.toLowerCase().replace(/\s/g, '-');
if (dashedNameFull != dashedName) {
return res.redirect('../bonfires/' + dashedNameFull);
}
=======
>>>>>>>
<<<<<<<
return res.redirect('/bonfires')
} else {
res.render('bonfire/show', {
completedWith: null,
title: bonfire.name,
dashedName: dashedName,
name: bonfire.name,
difficulty: Math.floor(+bonfire.difficulty),
brief: bonfire.description[0],
details: bonfire.description.slice(1),
tests: bonfire.tests,
challengeSeed: bonfire.challengeSeed,
challengeEntryPoint: bonfire.challengeEntryPoint,
cc: !!req.user,
points: req.user ? req.user.points : undefined,
verb: resources.randomVerb(),
phrase: resources.randomPhrase(),
compliment: resources.randomCompliment(),
bonfires: bonfire,
bonfireHash: bonfire._id
});
=======
return res.redirect('/bonfires/meet-bonfire');
}
bonfire = bonfire.pop();
var dashedNameFull = bonfire.name.toLowerCase().replace(/\s/g, '-');
if (dashedNameFull != dashedName) {
return res.redirect('../bonfires/' + dashedNameFull);
>>>>>>>
return res.redirect('/bonfires');
}
bonfire = bonfire.pop()
var dashedNameFull = bonfire.name.toLowerCase().replace(/\s/g, '-');
if (dashedNameFull != dashedName) {
return res.redirect('../bonfires/' + dashedNameFull); |
<<<<<<<
var Linkedin = require('node-linkedin')(secrets.linkedin.clientID, secrets.linkedin.clientSecret, secrets.linkedin.callbackURL);
=======
var clockwork = require('clockwork')({key: secrets.clockwork.apiKey});
>>>>>>>
var Linkedin = require('node-linkedin')(secrets.linkedin.clientID, secrets.linkedin.clientSecret, secrets.linkedin.callbackURL);
var clockwork = require('clockwork')({key: secrets.clockwork.apiKey});
<<<<<<<
/**
* GET /api/venmo
* Venmo API example.
*/
=======
/**
* GET /api/Clockwork
* Clockwork SMS API example.
*/
exports.getClockwork = function(req, res, next) {
res.render('api/clockwork', {
title: 'Clockwork SMS API'
});
};
/**
* POST /api/Clockwork
* Clockwork SMS API example.
* @param telephone
*/
exports.postClockwork = function(req, res, next) {
var message = {
To: req.body.telephone,
From: 'Hackathon',
Content: 'Hello from the Hackathon Starter'
};
clockwork.sendSms(message, function(err, responseData) {
if (err) return next(err.message);
req.flash('success', { msg: 'Text sent to ' + responseData.responses[0].to});
res.redirect('/api/clockwork');
});
};
>>>>>>>
/**
* GET /api/Clockwork
* Clockwork SMS API example.
*/
exports.getClockwork = function(req, res, next) {
res.render('api/clockwork', {
title: 'Clockwork SMS API'
});
};
/**
* POST /api/Clockwork
* Clockwork SMS API example.
* @param telephone
*/
exports.postClockwork = function(req, res, next) {
var message = {
To: req.body.telephone,
From: 'Hackathon',
Content: 'Hello from the Hackathon Starter'
};
clockwork.sendSms(message, function(err, responseData) {
if (err) return next(err.message);
req.flash('success', { msg: 'Text sent to ' + responseData.responses[0].to});
res.redirect('/api/clockwork');
});
};
/**
* GET /api/venmo
* Venmo API example.
*/ |
<<<<<<<
debug = require('debug')('freecc:cntr:bonfires'),
Bonfire = require('./../models/Bonfire'),
User = require('./../models/User'),
resources = require('./resources'),
R = require('ramda');
=======
debug = require('debug')('freecc:cntr:bonfires'),
Bonfire = require('./../models/Bonfire'),
User = require('./../models/User'),
resources = require('./resources'),
MDNlinks = require('./../seed_data/bonfireMDNlinks');
>>>>>>>
debug = require('debug')('freecc:cntr:bonfires'),
Bonfire = require('./../models/Bonfire'),
User = require('./../models/User'),
resources = require('./resources'),
R = require('ramda');
MDNlinks = require('./../seed_data/bonfireMDNlinks');
<<<<<<<
bonfire = bonfire.pop();
var dashedNameFull = bonfire.name.toLowerCase().replace(/\s/g, '-');
if (dashedNameFull != dashedName) {
return res.redirect('../bonfires/' + dashedNameFull);
}
=======
res.render('bonfire/show', {
completedWith: null,
title: bonfire.name,
dashedName: dashedName,
name: bonfire.name,
difficulty: Math.floor(+bonfire.difficulty),
brief: bonfire.description[0],
details: bonfire.description.slice(1),
tests: bonfire.tests,
challengeSeed: bonfire.challengeSeed,
cc: !!req.user,
points: req.user ? req.user.points : undefined,
verb: resources.randomVerb(),
phrase: resources.randomPhrase(),
compliment: resources.randomCompliment(),
bonfires: bonfire,
bonfireHash: bonfire._id,
MDNkeys: bonfire.MDNlinks,
MDNlinks: getMDNlinks(bonfire.MDNlinks)
>>>>>>>
bonfire = bonfire.pop();
var dashedNameFull = bonfire.name.toLowerCase().replace(/\s/g, '-');
if (dashedNameFull != dashedName) {
return res.redirect('../bonfires/' + dashedNameFull);
} |
<<<<<<<
var __DEV__ = !yargs.argv.p;
var host = process.env.HOST || 'localhost';
var port = yargs.argv.port || process.env.PORT || '3001';
var syncPort = yargs.argv['sync-port'] || process.env.SYNC_PORT || '3000';
=======
const __DEV__ = !yargs.argv.p;
const port = yargs.argv.port || process.env.PORT || '3001';
const syncPort = yargs.argv['sync-port'] || process.env.SYNC_PORT || '3000';
>>>>>>>
const __DEV__ = !yargs.argv.p;
const host = process.env.HOST || 'localhost';
const port = yargs.argv.port || process.env.PORT || '3001';
const syncPort = yargs.argv['sync-port'] || process.env.SYNC_PORT || '3000'; |
<<<<<<<
$('.start-challenge').on('click', function() {
$(this).parent().remove();
$('.challenge-content')
.removeClass('hidden-element')
.addClass('animated fadeInDown');
});
$('.challenge-list-checkbox').on('change', function() {
var checkboxId = $(this).parent().parent().attr('id');
if ($(this).is(":checked")) {
$(this).parent().siblings().children().addClass('faded');
if (!localStorage || !localStorage[checkboxId]) {
localStorage[checkboxId] = true;
}
}
if (!$(this).is(":checked")) {
$(this).parent().siblings().children().removeClass('faded');
if (localStorage[checkboxId]) {
localStorage.removeItem(checkboxId);
}
}
});
$("img").error(function () {
$(this).unbind("error").attr("src", "https://s3.amazonaws.com/freecodecamp/camper-image-placeholder.png");
});
function reBindModals(){
$('.close-modal').unbind('click');
$('.close-modal').on('click', function(){
setTimeout(function() {
$('.close-modal').parent().parent().parent().parent().modal('hide');
}, 200);
});
$('#search-issue').unbind('click');
$('#search-issue').on('click', function() {
var queryIssue = window.location.href.toString();
window.open('https://github.com/FreeCodeCamp/FreeCodeCamp/issues?q=' +
'is:issue is:all ' + (challenge_Name || challengeName) + ' OR ' +
queryIssue.substr(queryIssue.lastIndexOf('challenges/') + 11)
.replace('/', ''), '_blank');
});
$('#help-ive-found-a-bug-wiki-article').unbind('click');
$('#help-ive-found-a-bug-wiki-article').on('click', function() {
window.open("https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Help-I've-Found-a-Bug", '_blank');
});
$('#report-issue').unbind('click');
$('#report-issue').on('click', function() {
var textMessage = [
'Challenge [',
(challenge_Name || challengeName || window.location.href),
'](',
window.location.href,
') has an issue.\n',
'User Agent is: <code>',
navigator.userAgent,
'</code>.\n',
'Please describe how to reproduce this issue, and include ',
'links to screenshots if possible.\n\n'
].join('');
if (editor.getValue().trim()) {
var type;
switch (challengeType) {
case challengeTypes.HTML_CSS_JQ:
type = 'html';
break;
case challengeTypes.JAVASCRIPT:
type = 'javascript';
break;
default:
type = '';
}
textMessage += [
'My code:\n```',
type,
'\n',
editor.getValue(),
'\n```\n\n'
].join('');
}
textMessage = encodeURIComponent(textMessage);
$('#issue-modal').modal('hide');
window.open(
'https://github.com/freecodecamp/freecodecamp/issues/new?&body=' +
textMessage, '_blank'
);
});
$('#completed-courseware').unbind('click');
$('#completed-courseware').on('click', function() {
$('#complete-courseware-dialog').modal('show');
});
$('#completed-courseware-editorless').unbind('click');
$('#completed-courseware-editorless').on('click', function() {
$('#complete-courseware-editorless-dialog').modal('show');
});
$('#trigger-pair-modal').unbind('click');
$('#trigger-pair-modal').on('click', function() {
$('#pair-modal').modal('show');
});
$('#trigger-reset-modal').unbind('click');
$('#trigger-reset-modal').on('click', function() {
$('#reset-modal').modal('show');
});
$('#trigger-help-modal').unbind('click');
$('#trigger-help-modal').on('click', function() {
$('#help-modal').modal('show');
});
$('#trigger-issue-modal').unbind('click');
$('#trigger-issue-modal').on('click', function() {
$('#issue-modal').modal('show');
});
$('#completed-zipline-or-basejump').unbind('click');
$('#completed-zipline-or-basejump').on('click', function() {
$('#complete-zipline-or-basejump-dialog').modal('show');
});
$('#next-courseware-button').unbind('click');
$('#next-courseware-button').on('click', function() {
$('#next-courseware-button').unbind('click');
if ($('.signup-btn-nav').length < 1) {
switch (challengeType) {
case challengeTypes.HTML_CSS_JQ:
case challengeTypes.JAVASCRIPT:
case challengeTypes.VIDEO:
$.post(
'/completed-challenge/',
{
challengeInfo: {
challengeId: challenge_Id,
challengeName: challenge_Name
}
}).success(
function(res) {
if (res) {
window.location.href = '/challenges/next-challenge?id=' + challenge_Id;
}
}).fail(
function() {
window.location.href="/challenges";
}
);
break;
case challengeTypes.ZIPLINE:
var didCompleteWith = $('#completed-with').val() || null;
var publicURL = $('#public-url').val() || null;
console.log("debug", didCompleteWith, publicURL);
$.post(
'/completed-zipline-or-basejump/',
{
challengeInfo: {
challengeId: challenge_Id,
challengeName: challenge_Name,
completedWith: didCompleteWith,
publicURL: publicURL,
challengeType: challengeType
}
}).success(
function() {
window.location.href = '/challenges/next-challenge?id=' + challenge_Id;
}).fail(
function() {
window.location.href = '/challenges';
});
break;
case challengeTypes.BASEJUMP:
var didCompleteWith = $('#completed-with').val() || null;
var publicURL = $('#public-url').val() || null;
var githubURL = $('#github-url').val() || null;
$.post(
'/completed-zipline-or-basejump/',
{
challengeInfo: {
challengeId: challenge_Id,
challengeName: challenge_Name,
completedWith: didCompleteWith,
publicURL: publicURL,
githubURL: githubURL,
challengeType: challengeType,
verified: false
}
}).success(function() {
window.location.href = '/challenges/next-challenge?id=' + challenge_Id;
}).fail(function() {
window.location.replace(window.location.href);
});
break;
case challengeTypes.BONFIRE:
window.location.href = '/challenges/next-challenge?id=' + challenge_Id;
default:
break;
}
}
});
$('#complete-courseware-dialog').on('hidden.bs.modal', function() {
editor.focus();
});
$('#complete-zipline-or-basejump').on('hidden.bs.modal', function() {
editor.focus();
});
};
$(window).resize(function(){
reBindModals();
});
reBindModals();
var challengeTypes = {
'HTML_CSS_JQ': '0',
'JAVASCRIPT': '1',
'VIDEO': '2',
'ZIPLINE': '3',
'BASEJUMP': '4',
'BONFIRE': '5'
};
=======
>>>>>>> |
<<<<<<<
webview.addEventListener('dom-ready', () => {
if (process.env.MODE == 'debug') {
webview.openDevTools()
}
})
=======
const webview = $('#view')
>>>>>>>
const webview = $('#view')
webview.addEventListener('dom-ready', () => {
if (process.env.MODE == 'debug') {
webview.openDevTools()
}
})
<<<<<<<
console.debug('Navigating', detail)
=======
const url = detail[1]
urlbar.value = url
>>>>>>>
const url = detail[1]
urlbar.value = url |
<<<<<<<
var _this = function(){
// User-Agent Parsed
var ua_parsers = this.regexes.user_agent_parsers.map(function(obj) {
var regexp = new RegExp(obj.regex),
famRep = obj.family_replacement,
majorVersionRep = obj.major_version_replacement;
function parser(ua) {
var m = ua.match(regexp);
if (!m) { return null; }
var family = famRep ? famRep.replace('$1', m[1]) : m[1];
var obj = new UserAgent(family);
obj.major = parseInt(majorVersionRep ? majorVersionRep : m[2]);
obj.minor = m[3] ? parseInt(m[3]) : null;
obj.patch = m[4] ? parseInt(m[4]) : null;
return obj;
}
return parser;
});
// Operating Systems Parsed
var os_parsers = this.regexes.os_parsers.map(function(obj) {
var regexp = new RegExp(obj.regex),
osRep = obj.os_replacement;
function parser(ua) {
var m = ua.match(regexp);
if(!m) { return null; }
var os = (osRep ? osRep : m[1]) + (m.length > 2 ? " " + m[2] : "");
return os;
}
return parser;
});
/*
* Parse User-Agent String
*
* @param (String) the user-agent string to parse
*/
this.prototype.parse = function(ua) {
var os, i;
for (i=0; i < ua_parsers.length; i++) {
var result = ua_parsers[i](ua);
if (result) { break; }
}
for (i=0; i < os_parsers.length; i++) {
os = os_parsers[i](ua);
if (os) { break; }
}
if(!result) { result = new UserAgent(); }
result.os = os;
return result;
}
/*
* User Agent
*
* @param (String)
*/
function UserAgent(family) {
this.family = family || 'Other';
}
UserAgent.prototype.toVersionString = function() {
var output = '';
if (this.major != null) {
output += this.major;
if (this.minor != null) {
output += '.' + this.minor;
if (this.patch != null) {
output += '.' + this.patch;
}
}
}
return output;
};
UserAgent.prototype.toString = function() {
var suffix = this.toVersionString();
if (suffix) { suffix = ' ' + suffix; }
return this.family + suffix;
};
UserAgent.prototype.toFullString = function() {
return this.toString() + (this.os ? "/" + this.os : "");
};
};
=======
>>>>>>> |
<<<<<<<
// edit lock
drawChapterEditLock(item, templateChapter);
// terminate link available only for book owner or superuser
if (jquery(".terminate-edit-chapter", templateChapter).length) {
jquery("a.terminate-edit-chapter", templateChapter).click(function () {
win.booktype.ui.notify(win.booktype._("terminate_editing", "Terminate editing."));
win.booktype.sendToCurrentBook({
"command": "chapter_kill_editlock",
"chapterID": item.get("chapterID")
},
function () {
win.booktype.ui.notify();
}
);
return false;
});
}
=======
// apply view mode
if (detailViewOn) {
templateChapter.toggleClass("detail-switch");
}
>>>>>>>
// edit lock
drawChapterEditLock(item, templateChapter);
// terminate link available only for book owner or superuser
if (jquery(".terminate-edit-chapter", templateChapter).length) {
jquery("a.terminate-edit-chapter", templateChapter).click(function () {
win.booktype.ui.notify(win.booktype._("terminate_editing", "Terminate editing."));
win.booktype.sendToCurrentBook({
"command": "chapter_kill_editlock",
"chapterID": item.get("chapterID")
},
function () {
win.booktype.ui.notify();
}
);
return false;
});
}
// apply view mode
if (detailViewOn) {
templateChapter.toggleClass("detail-switch");
} |
<<<<<<<
=======
this.popup.setRow(0);
this.popup.setTheme(editor.getTheme());
>>>>>>>
this.popup.setTheme(editor.getTheme());
<<<<<<<
=======
if (this.popup && this.popup.isOpen) {
this.gatherCompletionsId = this.gatherCompletionsId + 1;
}
>>>>>>>
if (this.popup && this.popup.isOpen) {
this.gatherCompletionsId = this.gatherCompletionsId + 1;
}
<<<<<<<
// TODO reenable this when we have proper change tracking
=======
}.bind(this);
// Calcul prefix
var session = this.editor.getSession();
var pos = this.editor.getCursorPosition();
var line = session.getLine(pos.row);
var prefix = util.retrievePrecedingIdentifier(line, pos.column);
// Results matches
var matches = results && results.matches;
// TODO reenable this when we have proper change tracking
>>>>>>>
}.bind(this);
// Calcul prefix
var session = this.editor.getSession();
var pos = this.editor.getCursorPosition();
var line = session.getLine(pos.row);
var prefix = util.retrievePrecedingIdentifier(line, pos.column);
// Results matches
var matches = results && results.matches;
if (!matches || !matches.length)
return this.detach();
// TODO reenable this when we have proper change tracking |
<<<<<<<
31-07-2017 - Added Vantus Rune gain display. (by Zerotorescue)
=======
30-07-2017 - Mistweaver Monk: Added Refreshing Jade Wind suggestion and updated some talent descriptions (by anomoly)
>>>>>>>
31-07-2017 - Added Vantus Rune gain display. (by Zerotorescue)
30-07-2017 - Mistweaver Monk: Added Refreshing Jade Wind suggestion and updated some talent descriptions (by anomoly) |
<<<<<<<
/**
* Ace.edit(el) -> Editor
* - el (String | Element): Either the id of an element, or the element itself
*
* This method embeds the Ace editor into the DOM, at the element provided by `el`.
*
**/
=======
require("./worker/worker_client");
>>>>>>>
require("./worker/worker_client");
/**
* Ace.edit(el) -> Editor
* - el (String | Element): Either the id of an element, or the element itself
*
* This method embeds the Ace editor into the DOM, at the element provided by `el`.
*
**/ |
<<<<<<<
/**
* Editor.onCut()
*
* Emitted whenever a text "cut" happens.
**/
=======
this.onCopy = function() {
this.commands.exec("copy", this);
};
>>>>>>>
/**
* Editor.onCopy()
*
* Called whenever a text "copy" happens.
**/
this.onCopy = function() {
this.commands.exec("copy", this);
};
/**
* Editor.onCut()
*
* called whenever a text "cut" happens.
**/
<<<<<<<
/**
* Editor.insert(text)
* - text (String): The new text to add
*
* Inserts `text` into wherever the cursor is pointing.
**/
=======
this.onPaste = function(text) {
this._emit("paste", text);
this.insert(text);
};
>>>>>>>
/**
* Editor.onPaste()
*
* called whenever a text "paste" happens.
**/
this.onPaste = function(text) {
this._emit("paste", text);
this.insert(text);
};
/**
* Editor.insert(text)
* - text (String): The new text to add
*
* Inserts `text` into wherever the cursor is pointing.
**/
<<<<<<<
/**
* Editor@onTextInput(text, pasted)
* - text (String): The text entered
* - pasted (Boolean): Identifies whether the text was pasted (`true`) or not
*
* Emitted when text is entered.
**/
this.onTextInput = function(text, pasted) {
if (pasted)
this._emit("paste", text);
this.keyBinding.onTextInput(text, pasted);
=======
this.onTextInput = function(text) {
this.keyBinding.onTextInput(text);
>>>>>>>
/**
* Editor@onTextInput(text, pasted)
* - text (String): The text entered
* - pasted (Boolean): Identifies whether the text was pasted (`true`) or not
*
* Emitted when text is entered.
**/
this.onTextInput = function(text) {
this.keyBinding.onTextInput(text);
<<<<<<<
/**
* Editor.remove(dir)
* - dir (String): The direction of the deletion to occur, either "left" or "right"
*
* Removes words of text from the editor. A "word" is defined as a string of characters bookended by whitespace.
*
**/
=======
this.setFadeFoldWidgets = function(show) {
this.renderer.setFadeFoldWidgets(show);
};
this.getFadeFoldWidgets = function() {
return this.renderer.getFadeFoldWidgets();
};
>>>>>>>
this.setFadeFoldWidgets = function(show) {
this.renderer.setFadeFoldWidgets(show);
};
this.getFadeFoldWidgets = function() {
return this.renderer.getFadeFoldWidgets();
};
/**
* Editor.remove(dir)
* - dir (String): The direction of the deletion to occur, either "left" or "right"
*
* Removes words of text from the editor. A "word" is defined as a string of characters bookended by whitespace.
*
**/
<<<<<<<
/**
* Editor.selectPageDown()
*
* Selects the text from the current position of the document until where a "page down" finishes.
**/
this.selectPageDown = function() {
var row = this.$getPageDownRow() + Math.floor(this.$getVisibleRowCount() / 2);
=======
renderer.scrollBy(0, rows * config.lineHeight);
if (select != null)
renderer.scrollCursorIntoView(null, 0.5);
>>>>>>>
renderer.scrollBy(0, rows * config.lineHeight);
if (select != null)
renderer.scrollCursorIntoView(null, 0.5);
<<<<<<<
/** related to: VirtualRenderer.scrollToLine
* Editor.scrollToLine(line, center)
* - line (Number): The line to scroll to
* - center (Boolean): If `true`
*
* TODO scrollsa to line, if center == true, puts line in middle of screen or attempts to)
**/
this.scrollToLine = function(line, center) {
this.renderer.scrollToLine(line, center);
=======
this.scrollToLine = function(line, center, animate, callback) {
this.renderer.scrollToLine(line, center, animate, callback);
>>>>>>>
/** related to: VirtualRenderer.scrollToLine
* Editor.scrollToLine(line, center)
* - line (Number): The line to scroll to
* - center (Boolean): If `true`
* - animate (Boolean): If `true` animates scrolling
* - callback (Function): Function to be called when the animation has finished
*
* TODO scrolls a to line, if center == true, puts line in middle of screen or attempts to)
**/
this.scrollToLine = function(line, center, animate, callback) {
this.renderer.scrollToLine(line, center, animate, callback);
<<<<<<<
/**
* Editor.gotoLine(lineNumber, column)
* - lineNumber (Number): The line number to go to
* - column (Number): A column number to go to
*
* Moves the cursor to the specified line number, and also into the indiciated column.
*
**/
this.gotoLine = function(lineNumber, column) {
=======
this.gotoLine = function(lineNumber, column, animate) {
>>>>>>>
/**
* Editor.gotoLine(lineNumber, column)
* - lineNumber (Number): The line number to go to
* - column (Number): A column number to go to
* - animate (Boolean): If `true` animates scolling
*
* Moves the cursor to the specified line number, and also into the indiciated column.
*
**/
this.gotoLine = function(lineNumber, column, animate) {
<<<<<<<
/** related to: Search.find
* Editor.find(needle, options)
* - needle (String): The text to search for
* - options (Object): An object defining various search properties
*
* Attempts to find `needle` within the document. For more information on `options`, see [[Search `Search`]].
**/
this.find = function(needle, options) {
=======
this.find = function(needle, options, animate) {
>>>>>>>
/** related to: Search.find
* Editor.find(needle, options)
* - needle (String): The text to search for
* - options (Object): An object defining various search properties
* - animate (Boolean): If `true` animate scrolling
*
* Attempts to find `needle` within the document. For more information on `options`, see [[Search `Search`]].
**/
this.find = function(needle, options, animate) {
<<<<<<<
/** related to: Editor.find
* Editor.findNext(options)
*
* Performs another search for `needle` in the document. For more information on `options`, see [[Search `Search`]].
**/
this.findNext = function(options) {
=======
this.findNext = function(options, animate) {
>>>>>>>
/** related to: Editor.find
* Editor.findNext(options)
* - options (Object): search options
* - animate (Boolean): If `true` animate scrolling
*
* Performs another search for `needle` in the document. For more information on `options`, see [[Search `Search`]].
**/
this.findNext = function(options, animate) {
<<<<<<<
/** related to: Editor.find
* Editor.findPrevious(options)
*
* Performs a search for `needle` backwards. For more information on `options`, see [[Search `Search`]].
**/
this.findPrevious = function(options) {
=======
this.findPrevious = function(options, animate) {
>>>>>>>
/** related to: Editor.find
* Editor.findPrevious(options)
* - options (Object): search options
* - animate (Boolean): If `true` animate scrolling
*
* Performs a search for `needle` backwards. For more information on `options`, see [[Search `Search`]].
**/
this.findPrevious = function(options, animate) {
<<<<<<<
if (this.getAnimatedScroll()) {
var cursor = this.getCursorPosition();
if (!this.isRowFullyVisible(cursor.row))
this.scrollToLine(cursor.row, true);
//@todo scroll X
//if (!this.isColumnFullyVisible(cursor.column))
//this.scrollToRow(cursor.column);
}
else {
this.renderer.scrollSelectionIntoView(range.start, range.end);
}
=======
var scrollTop = this.renderer.scrollTop;
this.renderer.scrollSelectionIntoView(range.start, range.end, 0.5);
this.renderer.animateScrolling(scrollTop);
>>>>>>>
var scrollTop = this.renderer.scrollTop;
this.renderer.scrollSelectionIntoView(range.start, range.end, 0.5);
this.renderer.animateScrolling(scrollTop); |
<<<<<<<
date: new Date('2019-02-21'),
changes: <>Added tracking of the azerite trait <SpellLink id={SPELLS.FURIOUS_GAZE.id} />.</>,
contributors: [Yajinni],
},
{
=======
date: new Date('2019-02-20'),
changes: <>Added stats for <SpellLink id={SPELLS.DARK_SLASH_TALENT.id} /> and <SpellLink id={SPELLS.CYCLE_OF_HATRED_TALENT.id} /> talents.</>,
contributors: [Yajinni],
},
{
>>>>>>>
date: new Date('2019-02-21'),
changes: <>Added tracking of the azerite trait <SpellLink id={SPELLS.FURIOUS_GAZE.id} />.</>,
contributors: [Yajinni],
},
{
date: new Date('2019-02-20'),
changes: <>Added stats for <SpellLink id={SPELLS.DARK_SLASH_TALENT.id} /> and <SpellLink id={SPELLS.CYCLE_OF_HATRED_TALENT.id} /> talents.</>,
contributors: [Yajinni],
},
{ |
<<<<<<<
},
export: {
metadata: 'DONT_EXPORT', // 'DONT_EXPORT', 'MERGE_HEADER', 'MERGE_VARIABLE'
variable: 'boostnote',
prefixAttachmentFolder: false
}
=======
},
coloredTags: {}
>>>>>>>
},
export: {
metadata: 'DONT_EXPORT', // 'DONT_EXPORT', 'MERGE_HEADER', 'MERGE_VARIABLE'
variable: 'boostnote',
prefixAttachmentFolder: false
},
coloredTags: {} |
<<<<<<<
date: new Date('2018-09-12'),
changes: <React.Fragment>Added implementation of Azerite trait Autumn Leaves.</React.Fragment>,
contributors: [blazyb],
},
{
date: new Date('2018-09-12'),
changes: <React.Fragment>Added implementation of Azerite trait Fungal Essence.</React.Fragment>,
contributors: [blazyb],
},
{
=======
date: new Date('2018-09-12'),
changes: <React.Fragment>Updated changes on rejuvenation mana cost from hotfix september 10th.</React.Fragment>,
contributors: [blazyb],
},
{
>>>>>>>
date: new Date('2018-09-12'),
changes: <React.Fragment>Added implementation of Azerite trait Autumn Leaves.</React.Fragment>,
contributors: [blazyb],
},
{
date: new Date('2018-09-12'),
changes: <React.Fragment>Added implementation of Azerite trait Fungal Essence.</React.Fragment>,
contributors: [blazyb],
},
{
date: new Date('2018-09-12'),
changes: <React.Fragment>Updated changes on rejuvenation mana cost from hotfix september 10th.</React.Fragment>,
contributors: [blazyb],
},
{ |
<<<<<<<
require("./keyboard/hash_handler");
require("./keyboard/state_handler");
require("./lib/net");
require("./placeholder");
=======
require("./config").init();
>>>>>>>
require("./keyboard/hash_handler");
require("./keyboard/state_handler");
require("./lib/net");
require("./placeholder");
require("./config").init(); |
<<<<<<<
var JavaMode = require("ace/mode/java").Mode;
=======
var RubyMode = require("ace/mode/ruby").Mode;
>>>>>>>
var JavaMode = require("ace/mode/java").Mode;
var RubyMode = require("ace/mode/ruby").Mode;
<<<<<<<
php: new PhpMode(),
java: new JavaMode()
=======
php: new PhpMode(),
ruby: new RubyMode()
>>>>>>>
php: new PhpMode(),
java: new JavaMode(),
ruby: new RubyMode()
<<<<<<<
else if (mode instanceof JavaMode) {
modeEl.value = "java";
}
=======
else if (mode instanceof RubyMode) {
modeEl.value = "ruby";
}
>>>>>>>
else if (mode instanceof JavaMode) {
modeEl.value = "java";
}
else if (mode instanceof RubyMode) {
modeEl.value = "ruby";
}
<<<<<<<
} else if (/^.*\.java$/i.test(file.name)) {
mode = "java";
=======
} else if (/^.*\.rb$/i.test(file.name)) {
mode = "ruby";
>>>>>>>
} else if (/^.*\.java$/i.test(file.name)) {
mode = "java";
} else if (/^.*\.rb$/i.test(file.name)) {
mode = "ruby"; |
<<<<<<<
import Estel from './Modules/Items/Estel';
=======
import Tier21_2set from './Modules/Items/Tier21_2set';
>>>>>>>
import Tier21_2set from './Modules/Items/Tier21_2set';
import Estel from './Modules/Items/Estel';
<<<<<<<
estel: Estel,
=======
tier21_2set: Tier21_2set,
// SoulOfTheHighPriest: SoulOfTheHighPriest,
>>>>>>>
tier21_2set: Tier21_2set,
estel: Estel, |
<<<<<<<
import UllrsFeatherSnowshoes from './Modules/Items/UllrsFeatherSnowshoes';
import SoulOfTheHuntmaster from '../Shared/Items/SoulOfTheHuntmaster';
import MKIIGyroscopicStabilizer from './Modules/Items/MKIIGyroscopicStabilizer';
import WarBeltOfTheSentinelArmy from "./Modules/Items/WarBeltOfTheSentinelArmy";
=======
import UllrsFeatherSnowshoes from './Modules/Items/UllrsFeatherSnowshoes';
//Talents
import LockAndLoad from './Modules/Talents/LockAndLoad';
import TrueAim from './Modules/Talents/TrueAim';
>>>>>>>
import UllrsFeatherSnowshoes from './Modules/Items/UllrsFeatherSnowshoes';
import SoulOfTheHuntmaster from '../Shared/Items/SoulOfTheHuntmaster';
import MKIIGyroscopicStabilizer from './Modules/Items/MKIIGyroscopicStabilizer';
import WarBeltOfTheSentinelArmy from "./Modules/Items/WarBeltOfTheSentinelArmy";
//Talents
import LockAndLoad from './Modules/Talents/LockAndLoad';
import TrueAim from './Modules/Talents/TrueAim'; |
<<<<<<<
change(date(2019, 12, 29), "Added statistic for Strife.", Abelito75),
=======
change(date(2019, 12, 31), 'Replaced TravisCI build pipelines with GitHub actions workflows.', Zerotorescue),
>>>>>>>
change(date(2019, 12, 31), "Added statistic for Strife.", Abelito75),
change(date(2019, 12, 31), 'Replaced TravisCI build pipelines with GitHub actions workflows.', Zerotorescue), |
<<<<<<<
INEVITABLE_DEMISE: {
id: 273521,
name: 'Inevitable Demise',
icon: 'spell_shadow_abominationexplosion',
},
=======
CASCADING_CALAMITY: {
id: 275372,
name: 'Cascading Calamity',
icon: 'spell_shadow_unstableaffliction_3',
},
WRACKING_BRILLIANCE: {
id: 272891,
name: 'Wracking Brilliance',
icon: 'spell_shadow_felmending',
},
DREADFUL_CALLING:{
id: 278727,
name: 'Dreadful Calling',
icon: 'inv_beholderwarlock',
},
>>>>>>>
CASCADING_CALAMITY: {
id: 275372,
name: 'Cascading Calamity',
icon: 'spell_shadow_unstableaffliction_3',
},
WRACKING_BRILLIANCE: {
id: 272891,
name: 'Wracking Brilliance',
icon: 'spell_shadow_felmending',
},
DREADFUL_CALLING:{
id: 278727,
name: 'Dreadful Calling',
icon: 'inv_beholderwarlock',
},
INEVITABLE_DEMISE: {
id: 273521,
name: 'Inevitable Demise',
icon: 'spell_shadow_abominationexplosion',
}, |
<<<<<<<
if (this.popup && this.popup.isOpen) {
this.gatherCompletionsId = this.gatherCompletionsId + 1;
}
=======
>>>>>>>
if (this.popup && this.popup.isOpen) {
this.gatherCompletionsId = this.gatherCompletionsId + 1;
}
<<<<<<<
=======
next();
});
}, function() {
// Fetch prefix again, because they may have changed by now
var pos = editor.getCursorPosition();
var line = session.getLine(pos.row);
>>>>>>>
// Fetch prefix again, because they may have changed by now
var pos = editor.getCursorPosition();
var line = session.getLine(pos.row);
<<<<<<<
prefix: prefix,
matches: matches,
finished: (--total === 0)
=======
prefix: util.retrievePrecedingIdentifier(line, pos.column),
matches: matches
>>>>>>>
prefix: util.retrievePrecedingIdentifier(line, pos.column),
matches: matches,
finished: (--total === 0) |
<<<<<<<
return verifyAsync(token, secret, opts)
.then((user) => {
=======
return JWT.verifyAsync(token, secret, opts)
.then(isRevoked)
.then((user) => {
>>>>>>>
return verifyAsync(token, secret, opts)
.then(isRevoked)
.then((user) => { |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.