text stringlengths 1 2.83M | id stringlengths 16 152 | metadata dict | __index_level_0__ int64 0 949 |
|---|---|---|---|
---
title: Модул тајмера
date: "2019-05-22T03:15:00"
author: Y_Less
---
Ово је sneak-peek једног од унапређених модула који смо завршили, за тајмере у open.mp:
```pawn
native SetTimer(const func[], msInterval, bool:repeat) = SetTimerEx;
native SetTimerEx(const func[], msInterval, bool:repeat, const params[], GLOBAL_T... | openmultiplayer/web/frontend/content/sr/blog/timers.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/sr/blog/timers.mdx",
"repo_id": "openmultiplayer",
"token_count": 1233
} | 482 |
---
title: 10,000 Members!
date: "2021-07-16T02:51:00"
author: Potassium
---
Всім привіт!
Нещодавно ми досягли дивовижної віхи: ми офіційно досягли 10000 користувачів у нашому Discord! 🥳🔟🥳
Ми думали, що скористаємося цією можливістю, щоб дати невелике оновлення, оскільки ми знаємо, що минуло деякий час, і всім ці... | openmultiplayer/web/frontend/content/uk/blog/10k-members.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/uk/blog/10k-members.mdx",
"repo_id": "openmultiplayer",
"token_count": 2608
} | 483 |
---
title: SA-MP 安卓(移动端)
date: "2021-01-30T12:46:46"
author: Potassium
---
open.mp 团队对安卓版 SA-MP 的看法
大家好,
我们只是想写一篇简短的博客,谈谈我们对安卓版 SA-MP 的看法,因为我们在 YouTube 视频和 Discord 上收到了很多关于它的评论。
正如我们在 YouTube 视频中所说,我们不支持当前的安卓版 SA-MP。这个 app 使用了从 SA-MP 团队窃取的源代码实现的,是非法的。
我们不容忍窃取他人代码的行为,也不容忍使用窃取的代码。我们也不与非法活动联系在一起。
我们看到《侠盗猎车手:圣安地列斯》联机... | openmultiplayer/web/frontend/content/zh-cn/blog/samp-mobile.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/zh-cn/blog/samp-mobile.mdx",
"repo_id": "openmultiplayer",
"token_count": 813
} | 484 |
import { WarningTwoIcon } from "@chakra-ui/icons";
import { Heading, Stack, Text } from "@chakra-ui/layout";
import React, { FC } from "react";
import { APIError } from "src/types/_generated_Error";
type Props = APIError;
const ErrorBanner: FC<Props> = ({ error, message, suggested }) => {
return (
<section>
... | openmultiplayer/web/frontend/src/components/ErrorBanner.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/ErrorBanner.tsx",
"repo_id": "openmultiplayer",
"token_count": 523
} | 485 |
import {
Box,
Button,
Flex,
Heading,
HStack,
Image,
Link,
Text,
useClipboard,
VStack,
} from "@chakra-ui/react";
import { ChakraProps } from "@chakra-ui/system";
import NextLink from "next/link";
import { FC, useCallback } from "react";
import { useIsAdmin } from "src/auth/hooks";
import { useDelete... | openmultiplayer/web/frontend/src/components/listing/ServerRow.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/listing/ServerRow.tsx",
"repo_id": "openmultiplayer",
"token_count": 1962
} | 486 |
import VersionWarn from "./version-warning";
import LowercaseNote from "./lowercase-note";
import TipNPCCallbacks from "./npc-callbacks-tip";
import VersionWarnID from "./translations/id/version-warning";
import LowercaseNoteID from "./translations/id/lowercase-note";
import TipNPCCallbacksID from "./translations/id/n... | openmultiplayer/web/frontend/src/components/templates/index.ts/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/templates/index.ts",
"repo_id": "openmultiplayer",
"token_count": 643
} | 487 |
import Admonition from "../../../Admonition";
export default function TipNpcCallback() {
return (
<Admonition type="tip">
<p>Bu geri çağırma aynı zamanda NPC tarafından da çağrılabilir.</p>
</Admonition>
);
}
| openmultiplayer/web/frontend/src/components/templates/translations/tr/npc-callbacks-tip.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/templates/translations/tr/npc-callbacks-tip.tsx",
"repo_id": "openmultiplayer",
"token_count": 99
} | 488 |
import Image from "next/image";
export default function Custom404() {
return (
<section className="measure-wide center">
<h1 className="tc">404 - Page Not Found</h1>
<Image
src="https://assets.open.mp/assets/images/assets/404.jpg"
width={1280}
height={720}
/>
</sect... | openmultiplayer/web/frontend/src/pages/404.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/pages/404.tsx",
"repo_id": "openmultiplayer",
"token_count": 140
} | 489 |
import { GetServerSideProps } from "next";
import { FC } from "react";
import ErrorBanner from "src/components/ErrorBanner";
import MemberView from "src/components/member/MemberView";
import { apiSSP, SSP } from "src/fetcher/fetcher";
import { User, UserSchema } from "src/types/_generated_User";
type Props = SSP<User>... | openmultiplayer/web/frontend/src/pages/members/[id].tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/pages/members/[id].tsx",
"repo_id": "openmultiplayer",
"token_count": 271
} | 490 |
import * as z from "zod"
export const LinkSchema = z.object({
url: z.string(),
})
export type Link = z.infer<typeof LinkSchema>
export const CallbackSchema = z.object({
state: z.string(),
code: z.string(),
})
export type Callback = z.infer<typeof CallbackSchema>
| openmultiplayer/web/frontend/src/types/_generated_Discord.ts/0 | {
"file_path": "openmultiplayer/web/frontend/src/types/_generated_Discord.ts",
"repo_id": "openmultiplayer",
"token_count": 97
} | 491 |
{
"framework": "nextjs",
"git": {
"deploymentEnabled": {
"master": true
}
}
} | openmultiplayer/web/frontend/vercel.json/0 | {
"file_path": "openmultiplayer/web/frontend/vercel.json",
"repo_id": "openmultiplayer",
"token_count": 67
} | 492 |
package web
import (
"encoding/json"
"net/http"
"github.com/Southclaws/qstring"
"github.com/asaskevich/govalidator"
)
func ParseQuery(w http.ResponseWriter, r *http.Request, out interface{}) bool {
if err := qstring.Unmarshal(r.URL.Query(), out); err != nil {
StatusBadRequest(w, err)
return false
}
if _, ... | openmultiplayer/web/internal/web/decode.go/0 | {
"file_path": "openmultiplayer/web/internal/web/decode.go",
"repo_id": "openmultiplayer",
"token_count": 351
} | 493 |
-- AlterTable
ALTER TABLE "Server" ADD COLUMN "omp" BOOL NOT NULL DEFAULT false;
| openmultiplayer/web/prisma/migrations/20230927192536_add_omp_column/migration.sql/0 | {
"file_path": "openmultiplayer/web/prisma/migrations/20230927192536_add_omp_column/migration.sql",
"repo_id": "openmultiplayer",
"token_count": 30
} | 494 |
.sb-show-main.modal-open {
overflow-y: auto !important;
}
.sb-show-main .modal-backdrop {
display: none;
}
.sb-show-main .modal {
position: relative;
}
| overleaf/web/.storybook/preview.css/0 | {
"file_path": "overleaf/web/.storybook/preview.css",
"repo_id": "overleaf",
"token_count": 68
} | 495 |
const AuthenticationController = require('./../Authentication/AuthenticationController')
const AnalyticsController = require('./AnalyticsController')
const AnalyticsProxy = require('./AnalyticsProxy')
const RateLimiterMiddleware = require('./../Security/RateLimiterMiddleware')
module.exports = {
apply(webRouter, pri... | overleaf/web/app/src/Features/Analytics/AnalyticsRouter.js/0 | {
"file_path": "overleaf/web/app/src/Features/Analytics/AnalyticsRouter.js",
"repo_id": "overleaf",
"token_count": 489
} | 496 |
const OError = require('@overleaf/o-error')
const HttpErrorHandler = require('../../Features/Errors/HttpErrorHandler')
const { ObjectId } = require('mongodb')
const CollaboratorsHandler = require('./CollaboratorsHandler')
const CollaboratorsGetter = require('./CollaboratorsGetter')
const OwnershipTransferHandler = requ... | overleaf/web/app/src/Features/Collaborators/CollaboratorsController.js/0 | {
"file_path": "overleaf/web/app/src/Features/Collaborators/CollaboratorsController.js",
"repo_id": "overleaf",
"token_count": 1313
} | 497 |
const AuthenticationController = require('../Authentication/AuthenticationController')
const SessionManager = require('../Authentication/SessionManager')
const ContactController = require('./ContactController')
const Settings = require('@overleaf/settings')
function contactsAuthenticationMiddleware() {
if (!Settings... | overleaf/web/app/src/Features/Contacts/ContactRouter.js/0 | {
"file_path": "overleaf/web/app/src/Features/Contacts/ContactRouter.js",
"repo_id": "overleaf",
"token_count": 255
} | 498 |
const { callbackify } = require('util')
const Settings = require('@overleaf/settings')
const EmailBuilder = require('./EmailBuilder')
const EmailSender = require('./EmailSender')
const EMAIL_SETTINGS = Settings.email || {}
module.exports = {
sendEmail: callbackify(sendEmail),
promises: {
sendEmail,
},
}
as... | overleaf/web/app/src/Features/Email/EmailHandler.js/0 | {
"file_path": "overleaf/web/app/src/Features/Email/EmailHandler.js",
"repo_id": "overleaf",
"token_count": 214
} | 499 |
const { UserSchema } = require('../../models/User')
module.exports = {
hasAnyStaffAccess,
}
function hasAnyStaffAccess(user) {
if (user.isAdmin) {
return true
}
if (!user.staffAccess) {
return false
}
for (const key of Object.keys(UserSchema.obj.staffAccess)) {
if (user.staffAccess[key]) retu... | overleaf/web/app/src/Features/Helpers/AuthorizationHelper.js/0 | {
"file_path": "overleaf/web/app/src/Features/Helpers/AuthorizationHelper.js",
"repo_id": "overleaf",
"token_count": 127
} | 500 |
const { callbackify } = require('util')
const UserGetter = require('../User/UserGetter')
const UserMembershipsHandler = require('../UserMembership/UserMembershipsHandler')
const UserMembershipEntityConfigs = require('../UserMembership/UserMembershipEntityConfigs')
async function _getCurrentAffiliations(userId) {
con... | overleaf/web/app/src/Features/Institutions/InstitutionsGetter.js/0 | {
"file_path": "overleaf/web/app/src/Features/Institutions/InstitutionsGetter.js",
"repo_id": "overleaf",
"token_count": 747
} | 501 |
const settings = require('@overleaf/settings')
const request = require('request')
const logger = require('logger-sharelatex')
const _ = require('lodash')
const notificationsApi = _.get(settings, ['apis', 'notifications', 'url'])
const oneSecond = 1000
const makeRequest = function (opts, callback) {
if (notification... | overleaf/web/app/src/Features/Notifications/NotificationsHandler.js/0 | {
"file_path": "overleaf/web/app/src/Features/Notifications/NotificationsHandler.js",
"repo_id": "overleaf",
"token_count": 1035
} | 502 |
const { callbackify } = require('util')
const { callbackifyMultiResult } = require('../../util/promises')
const _ = require('underscore')
const logger = require('logger-sharelatex')
const path = require('path')
const { ObjectId } = require('mongodb')
const Settings = require('@overleaf/settings')
const OError = require... | overleaf/web/app/src/Features/Project/ProjectEntityMongoUpdateHandler.js/0 | {
"file_path": "overleaf/web/app/src/Features/Project/ProjectEntityMongoUpdateHandler.js",
"repo_id": "overleaf",
"token_count": 7305
} | 503 |
/* eslint-disable
max-len,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null checks
* Full docs: ... | overleaf/web/app/src/Features/References/ReferencesController.js/0 | {
"file_path": "overleaf/web/app/src/Features/References/ReferencesController.js",
"repo_id": "overleaf",
"token_count": 861
} | 504 |
/* eslint-disable
max-len,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggesti... | overleaf/web/app/src/Features/StaticPages/UniversityController.js/0 | {
"file_path": "overleaf/web/app/src/Features/StaticPages/UniversityController.js",
"repo_id": "overleaf",
"token_count": 263
} | 505 |
/* eslint-disable
max-len,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions... | overleaf/web/app/src/Features/Subscription/SubscriptionRouter.js/0 | {
"file_path": "overleaf/web/app/src/Features/Subscription/SubscriptionRouter.js",
"repo_id": "overleaf",
"token_count": 1548
} | 506 |
let parseParams
const TpdsUpdateHandler = require('./TpdsUpdateHandler')
const UpdateMerger = require('./UpdateMerger')
const Errors = require('../Errors/Errors')
const logger = require('logger-sharelatex')
const Path = require('path')
const metrics = require('@overleaf/metrics')
const NotificationsBuilder = require('... | overleaf/web/app/src/Features/ThirdPartyDataStore/TpdsController.js/0 | {
"file_path": "overleaf/web/app/src/Features/ThirdPartyDataStore/TpdsController.js",
"repo_id": "overleaf",
"token_count": 1848
} | 507 |
const { ObjectId } = require('mongodb')
const EmailHandler = require('../Email/EmailHandler')
const Errors = require('../Errors/Errors')
const InstitutionsAPI = require('../Institutions/InstitutionsAPI')
const NotificationsBuilder = require('../Notifications/NotificationsBuilder')
const OError = require('@overleaf/o-er... | overleaf/web/app/src/Features/User/SAMLIdentityManager.js/0 | {
"file_path": "overleaf/web/app/src/Features/User/SAMLIdentityManager.js",
"repo_id": "overleaf",
"token_count": 3694
} | 508 |
const OError = require('@overleaf/o-error')
const Settings = require('@overleaf/settings')
const logger = require('logger-sharelatex')
const Async = require('async')
const _ = require('underscore')
const { promisify } = require('util')
const UserSessionsRedis = require('./UserSessionsRedis')
const rclient = UserSession... | overleaf/web/app/src/Features/User/UserSessionsManager.js/0 | {
"file_path": "overleaf/web/app/src/Features/User/UserSessionsManager.js",
"repo_id": "overleaf",
"token_count": 3273
} | 509 |
const logger = require('logger-sharelatex')
const Settings = require('@overleaf/settings')
const querystring = require('querystring')
const _ = require('lodash')
const Url = require('url')
const Path = require('path')
const moment = require('moment')
const pug = require('pug-runtime')
const IS_DEV_ENV = ['development'... | overleaf/web/app/src/infrastructure/ExpressLocals.js/0 | {
"file_path": "overleaf/web/app/src/infrastructure/ExpressLocals.js",
"repo_id": "overleaf",
"token_count": 4871
} | 510 |
/* eslint-disable
max-len,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS101: Remove unnecessary use of Array.from
* DS102: Remove unnecessary code created because of implicit returns
* DS205: Consider r... | overleaf/web/app/src/infrastructure/RedirectManager.js/0 | {
"file_path": "overleaf/web/app/src/infrastructure/RedirectManager.js",
"repo_id": "overleaf",
"token_count": 926
} | 511 |
const mongoose = require('../infrastructure/Mongoose')
const { Schema } = mongoose
const DocSnapshotSchema = new Schema(
{
project_id: Schema.Types.ObjectId,
doc_id: Schema.Types.ObjectId,
version: Number,
lines: [String],
pathname: String,
ranges: Schema.Types.Mixed,
ts: Date,
},
{ ... | overleaf/web/app/src/models/DocSnapshot.js/0 | {
"file_path": "overleaf/web/app/src/models/DocSnapshot.js",
"repo_id": "overleaf",
"token_count": 164
} | 512 |
const mongoose = require('../infrastructure/Mongoose')
const { Schema } = mongoose
// Note that for legacy reasons, user_id and project_ids are plain strings,
// not ObjectIds.
const TagSchema = new Schema({
user_id: { type: String, required: true },
name: { type: String, required: true },
project_ids: [String]... | overleaf/web/app/src/models/Tag.js/0 | {
"file_path": "overleaf/web/app/src/models/Tag.js",
"repo_id": "overleaf",
"token_count": 133
} | 513 |
mixin pagination(pages, page_path, max_btns)
//- @param pages.current_page the current page viewed
//- @param pages.total_pages previously calculated,
//- based on total entries and entries per page
//- @param page_path the relative path, minus a trailing slash and page param
//- @param max_btns max number of butt... | overleaf/web/app/views/_mixins/pagination.pug/0 | {
"file_path": "overleaf/web/app/views/_mixins/pagination.pug",
"repo_id": "overleaf",
"token_count": 945
} | 514 |
nav.navbar.navbar-default.navbar-main
.container-fluid
.navbar-header
button.navbar-toggle(ng-init="navCollapsed = true", ng-click="navCollapsed = !navCollapsed", ng-class="{active: !navCollapsed}", aria-label="Toggle " + translate('navigation'))
i.fa.fa-bars(aria-hidden="true")
if settings.nav.custom_logo... | overleaf/web/app/views/layout/navbar.pug/0 | {
"file_path": "overleaf/web/app/views/layout/navbar.pug",
"repo_id": "overleaf",
"token_count": 1530
} | 515 |
aside.editor-sidebar.full-size(
ng-controller="HistoryV2FileTreeController"
ng-if="ui.view == 'history' && history.isV2"
)
.history-file-tree-inner
history-file-tree(
files="history.selection.files"
selected-pathname="history.selection.pathname"
on-selected-file-change="handleFileSelection(file)"
is-lo... | overleaf/web/app/views/project/editor/history/fileTreeV2.pug/0 | {
"file_path": "overleaf/web/app/views/project/editor/history/fileTreeV2.pug",
"repo_id": "overleaf",
"token_count": 859
} | 516 |
script(type='text/ng-template', id='newTagModalTemplate')
.modal-header
button.close(
type="button"
data-dismiss="modal"
ng-click="cancel()"
aria-label="Close"
)
span(aria-hidden="true") ×
h3 #{translate("create_new_folder")}
.modal-body
form(name="newTagForm", novalidate)
input.form-c... | overleaf/web/app/views/project/list/modals.pug/0 | {
"file_path": "overleaf/web/app/views/project/list/modals.pug",
"repo_id": "overleaf",
"token_count": 4325
} | 517 |
each affiliation in confirmedMemberAffiliations
if (affiliation.licence && affiliation.licence != 'free')
-hasDisplayedSubscription = true
p
| You have a
|
strong(ng-non-bindable) Professional
|
| #{settings.appName} account as a confirmed member of
|
strong(ng-non-bindable)= affiliation.insti... | overleaf/web/app/views/subscriptions/dashboard/_institution_memberships.pug/0 | {
"file_path": "overleaf/web/app/views/subscriptions/dashboard/_institution_memberships.pug",
"repo_id": "overleaf",
"token_count": 120
} | 518 |
extends ../layout
block content
.masthead
.container
.row
.col-md-12
h1(ng-non-bindable) !{viewData.title}
.row.row-spaced
.pattern-container
.content
.container
.row
.col-md-10.col-md-offset-1
.card
.row(ng-non-bindable)
| !{viewData.html}
| overleaf/web/app/views/university/case_study.pug/0 | {
"file_path": "overleaf/web/app/views/university/case_study.pug",
"repo_id": "overleaf",
"token_count": 160
} | 519 |
extends ../layout
block content
main.content.content-alt#main-content
.container
.row
.col-md-10.col-md-offset-1
h3(ng-non-bindable) #{entityName} "#{entityId}" does not exists in v2
form(
enctype='application/json',
method='post',
action=''
)
input(name="_csrf", type="... | overleaf/web/app/views/user_membership/new.pug/0 | {
"file_path": "overleaf/web/app/views/user_membership/new.pug",
"repo_id": "overleaf",
"token_count": 224
} | 520 |
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/mast... | overleaf/web/frontend/js/directives/fineUpload.js/0 | {
"file_path": "overleaf/web/frontend/js/directives/fineUpload.js",
"repo_id": "overleaf",
"token_count": 968
} | 521 |
import PropTypes from 'prop-types'
import { getHueForUserId } from '../../../shared/utils/colors'
import MessageContent from './message-content'
function Message({ message, userId }) {
function hue(user) {
return user ? getHueForUserId(user.id, userId) : 0
}
function getMessageStyle(user) {
return {
... | overleaf/web/frontend/js/features/chat/components/message.js/0 | {
"file_path": "overleaf/web/frontend/js/features/chat/components/message.js",
"repo_id": "overleaf",
"token_count": 637
} | 522 |
import { useEffect, useState, useRef } from 'react'
import PropTypes from 'prop-types'
import { OverlayTrigger, Tooltip } from 'react-bootstrap'
import { useTranslation } from 'react-i18next'
import classNames from 'classnames'
import Icon from '../../../shared/components/icon'
function ProjectNameEditableLabel({
pr... | overleaf/web/frontend/js/features/editor-navigation-toolbar/components/project-name-editable-label.js/0 | {
"file_path": "overleaf/web/frontend/js/features/editor-navigation-toolbar/components/project-name-editable-label.js",
"repo_id": "overleaf",
"token_count": 999
} | 523 |
import { Trans } from 'react-i18next'
import { Alert, Button } from 'react-bootstrap'
import { useCallback, useState } from 'react'
import PropTypes from 'prop-types'
import Uppy from '@uppy/core'
import XHRUpload from '@uppy/xhr-upload'
import { Dashboard, useUppy } from '@uppy/react'
import { useFileTreeActionable } ... | overleaf/web/frontend/js/features/file-tree/components/file-tree-create/modes/file-tree-upload-doc.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/components/file-tree-create/modes/file-tree-upload-doc.js",
"repo_id": "overleaf",
"token_count": 2797
} | 524 |
import { Button, Modal } from 'react-bootstrap'
import { Trans, useTranslation } from 'react-i18next'
import { useFileTreeActionable } from '../../contexts/file-tree-actionable'
import {
InvalidFilenameError,
BlockedFilenameError,
DuplicateFilenameError,
DuplicateFilenameMoveError,
} from '../../errors'
func... | overleaf/web/frontend/js/features/file-tree/components/modals/file-tree-modal-error.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/components/modals/file-tree-modal-error.js",
"repo_id": "overleaf",
"token_count": 825
} | 525 |
import OError from '@overleaf/o-error'
export function findInTreeOrThrow(tree, id) {
const found = findInTree(tree, id)
if (found) return found
throw new OError('Entity not found in tree', { entityId: id })
}
export function findAllInTreeOrThrow(tree, ids) {
const list = new Set()
ids.forEach(id => {
li... | overleaf/web/frontend/js/features/file-tree/util/find-in-tree.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/util/find-in-tree.js",
"repo_id": "overleaf",
"token_count": 818
} | 526 |
import PropTypes from 'prop-types'
import { useTranslation } from 'react-i18next'
import OutlineList from './outline-list'
function OutlineRoot({ outline, jumpToLine, highlightedLine }) {
const { t } = useTranslation()
return (
<div>
{outline.length ? (
<OutlineList
outline={outline}
... | overleaf/web/frontend/js/features/outline/components/outline-root.js/0 | {
"file_path": "overleaf/web/frontend/js/features/outline/components/outline-root.js",
"repo_id": "overleaf",
"token_count": 490
} | 527 |
import { useState, useMemo } from 'react'
import { useTranslation, Trans } from 'react-i18next'
import { Form, FormGroup, FormControl, Button } from 'react-bootstrap'
import { useMultipleSelection } from 'downshift'
import { useShareProjectContext } from './share-project-modal'
import SelectCollaborators from './select... | overleaf/web/frontend/js/features/share-project-modal/components/add-collaborators.js/0 | {
"file_path": "overleaf/web/frontend/js/features/share-project-modal/components/add-collaborators.js",
"repo_id": "overleaf",
"token_count": 1744
} | 528 |
import {
deleteJSON,
getJSON,
postJSON,
putJSON,
} from '../../../infrastructure/fetch-json'
import { executeV2Captcha } from './captcha'
export function sendInvite(project, email, privileges) {
return executeV2Captcha(
window.ExposedSettings.recaptchaDisabled?.invite
).then(grecaptchaResponse => {
... | overleaf/web/frontend/js/features/share-project-modal/utils/api.js/0 | {
"file_path": "overleaf/web/frontend/js/features/share-project-modal/utils/api.js",
"repo_id": "overleaf",
"token_count": 629
} | 529 |
import { useEffect, useState } from 'react'
import PropTypes from 'prop-types'
import WordCountModalContent from './word-count-modal-content'
import { fetchWordCount } from '../utils/api'
function WordCountModal({ clsiServerId, handleHide, projectId, show }) {
const [loading, setLoading] = useState(true)
const [er... | overleaf/web/frontend/js/features/word-count-modal/components/word-count-modal.js/0 | {
"file_path": "overleaf/web/frontend/js/features/word-count-modal/components/word-count-modal.js",
"repo_id": "overleaf",
"token_count": 490
} | 530 |
/* eslint-disable
camelcase,
max-len,
no-return-assign,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS101: Remove unnecessary use of Array.from
* DS102: Remove unnecessary code created because of ... | overleaf/web/frontend/js/ide/colors/ColorManager.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/colors/ColorManager.js",
"repo_id": "overleaf",
"token_count": 1198
} | 531 |
import _ from 'lodash'
/* eslint-disable
max-len,
no-return-assign,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS101: Remove unnecessary use of Array.from
* DS102: Remove unnecessary code created bec... | overleaf/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/CommandManager.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/CommandManager.js",
"repo_id": "overleaf",
"token_count": 2641
} | 532 |
/* eslint-disable
max-len,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions... | overleaf/web/frontend/js/ide/editor/directives/toggleSwitch.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/editor/directives/toggleSwitch.js",
"repo_id": "overleaf",
"token_count": 469
} | 533 |
import _ from 'lodash'
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
im... | overleaf/web/frontend/js/ide/history/components/historyFileTree.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/history/components/historyFileTree.js",
"repo_id": "overleaf",
"token_count": 752
} | 534 |
/* eslint-disable
node/handle-callback-err,
max-len,
new-cap,
no-return-assign,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS101: Remove unnecessary use of Array.from
* DS102: Remove unnecess... | overleaf/web/frontend/js/ide/pdfng/directives/pdfRenderer.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/pdfng/directives/pdfRenderer.js",
"repo_id": "overleaf",
"token_count": 9381
} | 535 |
/* eslint-disable
max-len,
no-return-assign,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/m... | overleaf/web/frontend/js/ide/review-panel/directives/changeEntry.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/review-panel/directives/changeEntry.js",
"repo_id": "overleaf",
"token_count": 529
} | 536 |
import { captureException } from './error-reporter'
import { ErrorBoundary } from 'react-error-boundary'
function errorHandler(error, componentStack) {
captureException(error, scope => {
scope.setExtra('componentStack', componentStack)
scope.setTag('handler', 'react-error-boundary')
return scope
})
}
... | overleaf/web/frontend/js/infrastructure/error-boundary.js/0 | {
"file_path": "overleaf/web/frontend/js/infrastructure/error-boundary.js",
"repo_id": "overleaf",
"token_count": 317
} | 537 |
import _ from 'lodash'
import App from '../../../base'
import getMeta from '../../../utils/meta'
export default App.controller(
'UserAffiliationsReconfirmController',
function ($scope, $http, $window) {
const samlInitPath = ExposedSettings.samlInitPath
$scope.reconfirm = {}
$scope.ui = $scope.ui || {} ... | overleaf/web/frontend/js/main/affiliations/controllers/UserAffiliationsReconfirmController.js/0 | {
"file_path": "overleaf/web/frontend/js/main/affiliations/controllers/UserAffiliationsReconfirmController.js",
"repo_id": "overleaf",
"token_count": 992
} | 538 |
/* eslint-disable
node/handle-callback-err,
max-len,
no-return-assign,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variatio... | overleaf/web/frontend/js/main/project-list/modal-controllers.js/0 | {
"file_path": "overleaf/web/frontend/js/main/project-list/modal-controllers.js",
"repo_id": "overleaf",
"token_count": 1946
} | 539 |
/* eslint-disable
max-len,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions... | overleaf/web/frontend/js/modules/recursionHelper.js/0 | {
"file_path": "overleaf/web/frontend/js/modules/recursionHelper.js",
"repo_id": "overleaf",
"token_count": 894
} | 540 |
import PropTypes from 'prop-types'
import { Button, Tooltip, OverlayTrigger } from 'react-bootstrap'
function TooltipButton({ id, description, onClick, children }) {
const tooltip = <Tooltip id={`${id}_tooltip`}>{description}</Tooltip>
return (
<OverlayTrigger placement="bottom" overlay={tooltip}>
<Butt... | overleaf/web/frontend/js/shared/components/tooltip-button.js/0 | {
"file_path": "overleaf/web/frontend/js/shared/components/tooltip-button.js",
"repo_id": "overleaf",
"token_count": 222
} | 541 |
import { useState, useCallback } from 'react'
import localStorage from '../../infrastructure/local-storage'
function usePersistedState(key, defaultValue) {
const [value, setValue] = useState(() => {
const keyExists = localStorage.getItem(key) != null
return keyExists ? localStorage.getItem(key) : defaultValu... | overleaf/web/frontend/js/shared/hooks/use-persisted-state.js/0 | {
"file_path": "overleaf/web/frontend/js/shared/hooks/use-persisted-state.js",
"repo_id": "overleaf",
"token_count": 232
} | 542 |
/**
* ng-context-menu - v0.1.4 - An AngularJS directive to display a context menu when a right-click event is triggered
*
* @author Ian Kennington Walter (http://ianvonwalter.com)
*/
angular
.module('ng-context-menu', [])
.factory('ContextMenuService', function() {
return {
element: null,
menuEl... | overleaf/web/frontend/js/vendor/libs/ng-context-menu-0.1.4.js/0 | {
"file_path": "overleaf/web/frontend/js/vendor/libs/ng-context-menu-0.1.4.js",
"repo_id": "overleaf",
"token_count": 1643
} | 543 |
;(function(undefined) {
'use strict';
var __instances = {};
/**
* This is the sigma instances constructor. One instance of sigma represent
* one graph. It is possible to represent this grapĥ with several renderers
* at the same time. By default, the default renderer (WebGL + Canvas
* polyfill) will ... | overleaf/web/frontend/js/vendor/libs/sigma-master/sigma.require.js/0 | {
"file_path": "overleaf/web/frontend/js/vendor/libs/sigma-master/sigma.require.js",
"repo_id": "overleaf",
"token_count": 163320
} | 544 |
import Icon from '../js/shared/components/icon'
export const Type = args => {
return (
<>
<Icon {...args} />
<div>
<a
href="https://fontawesome.com/v4.7.0/icons/"
target="_blank"
rel="noopener"
>
Font Awesome icons
</a>
</div>
... | overleaf/web/frontend/stories/icon.stories.js/0 | {
"file_path": "overleaf/web/frontend/stories/icon.stories.js",
"repo_id": "overleaf",
"token_count": 354
} | 545 |
import { ContextRoot } from '../../js/shared/context/root-context'
// Unfortunately, we cannot currently use decorators here, since we need to
// set a value on window, before the contexts are rendered.
// When using decorators, the contexts are rendered before the story, so we
// don't have the opportunity to set the... | overleaf/web/frontend/stories/utils/with-context-root.js/0 | {
"file_path": "overleaf/web/frontend/stories/utils/with-context-root.js",
"repo_id": "overleaf",
"token_count": 189
} | 546 |
/*
Styling for content pages
Including: about, home, blog, /for/__, legal, contact, portals, wiki
*/
.content-page {
word-break: break-word;
/*
Links and Buttons
*/
a {
color: @link-color-alt;
&:hover {
color: @link-hover-color-alt;
}
}
// correct color property set on <a> above:... | overleaf/web/frontend/stylesheets/app/content_page.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/app/content_page.less",
"repo_id": "overleaf",
"token_count": 1375
} | 547 |
@rt-font-family-serif: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
@rt-line-padding: 8%;
.rich-text .CodeMirror {
font-family: @rt-font-family-serif;
font-size: 1.15em;
pre {
font-family: @rt-font-family-serif;
}
.CodeMirror-line {
// Add horizontal padding, to emulate a manuscript more c... | overleaf/web/frontend/stylesheets/app/editor/rich-text.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/app/editor/rich-text.less",
"repo_id": "overleaf",
"token_count": 2045
} | 548 |
.renderColorSwatchClasses(@colorName) {
@colorVal: @@colorName;
@colorValRed: red(@colorVal);
@colorValGreen: green(@colorVal);
@colorValBlue: blue(@colorVal);
@colorValAsRGB: 'rgb(@{colorValRed}, @{colorValGreen}, @{colorValBlue})';
&.@{colorName} {
.color-swatch {
background-color: @colorVal;
... | overleaf/web/frontend/stylesheets/app/ol-style-guide.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/app/ol-style-guide.less",
"repo_id": "overleaf",
"token_count": 628
} | 549 |
.wiki {
.contents {
ul {
padding: 0;
li {
font-size: 14px;
list-style: none;
margin-bottom: 6px;
}
}
h2 {
font-size: 18px;
}
}
.page-header {
a {
font-size: 0.8em;
line-height: 1;
}
}
.editsection {
display: none;
}
... | overleaf/web/frontend/stylesheets/app/wiki.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/app/wiki.less",
"repo_id": "overleaf",
"token_count": 2435
} | 550 |
/*
* Original version: 1.0 © 2010 Andrew Valums ( andrew(at)valums.com )
* Current Maintainer (2.0+): 2012, Ray Nicholus ( fineuploader(at)garstasio.com )
*
* Licensed under MIT license, GNU GPL 2 or later, GNU LGPL 2 or later, see license.txt.
*/
.qq-uploader-selector {
position: relative;
width: 100%;
}
.qq-... | overleaf/web/frontend/stylesheets/components/fineupload.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/components/fineupload.less",
"repo_id": "overleaf",
"token_count": 1477
} | 551 |
.nav-pills {
> li {
> a {
border-radius: @btn-border-radius-base;
}
}
}
| overleaf/web/frontend/stylesheets/components/navs-ol.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/components/navs-ol.less",
"repo_id": "overleaf",
"token_count": 48
} | 552 |
//
// Tooltips
// --------------------------------------------------
// Base class
.tooltip {
position: absolute;
z-index: @zindex-tooltip;
display: block;
visibility: visible;
font-size: @font-size-small;
line-height: 1.4;
.opacity(0);
&.in {
.opacity(@tooltip-opacity);
}
&.top {
margin-t... | overleaf/web/frontend/stylesheets/components/tooltip.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/components/tooltip.less",
"repo_id": "overleaf",
"token_count": 1100
} | 553 |
@import 'style.less';
@import 'core/ol-ieee-variables.less';
@is-overleaf-light: false;
@show-rich-text: true;
@ieee-wedge: 30px;
body > .portal-ieee {
padding-top: @header-height;
}
.portal-ieee {
.ieee-header {
background-color: @ieee-blue;
margin-bottom: @margin-xl;
padding-bottom: @padding-sm;
... | overleaf/web/frontend/stylesheets/ieee-style.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/ieee-style.less",
"repo_id": "overleaf",
"token_count": 407
} | 554 |
{
"generic_linked_file_compile_error": "Dette projekts udfiler er ikke tilgængelige, fordi det ikke kunne kompilere. Du kan se detaljerede kompileringsfejl, hvis du åbner projektet.",
"chat_error": "Kunne ikke indlæse chatbeskeder, prøv venligst igen.",
"reconnect": "Prøv igen",
"no_pdf_error_title": "Ingen PDF... | overleaf/web/locales/da.json/0 | {
"file_path": "overleaf/web/locales/da.json",
"repo_id": "overleaf",
"token_count": 31475
} | 555 |
{
"chat_error": "无法加载聊天消息,请重试。",
"reconnect": "重试",
"no_pdf_error_title": "无 PDF",
"no_pdf_error_explanation": "此编译未生成 PDF。 在以下情况下可能会发生这种情况:",
"no_pdf_error_reason_unrecoverable_error": "存在不可恢复的 LaTeX 错误。 如果在下面或原始日志中存在 LaTeX 错误,请尝试修复它们并重新编译。",
"no_pdf_error_reason_no_content": "<code>document</code> 环境不包含任何... | overleaf/web/locales/zh-CN.json/0 | {
"file_path": "overleaf/web/locales/zh-CN.json",
"repo_id": "overleaf",
"token_count": 57791
} | 556 |
/* eslint-disable no-unused-vars */
const Helpers = require('./lib/helpers')
exports.tags = ['server-ce', 'server-pro', 'saas']
const indexes = [
{
key: {
expires: 1,
},
name: 'expires_1',
expireAfterSeconds: 10,
},
{
key: {
key: 1,
},
name: 'key_1',
},
{
key: {
... | overleaf/web/migrations/20190912145014_create_notifications_indexes.js/0 | {
"file_path": "overleaf/web/migrations/20190912145014_create_notifications_indexes.js",
"repo_id": "overleaf",
"token_count": 310
} | 557 |
/* eslint-disable no-unused-vars */
const Helpers = require('./lib/helpers')
exports.tags = ['server-pro', 'saas']
const indexes = [
{
unique: true,
key: {
project_id: 1,
},
name: 'project_id_1',
},
{
key: {
user_id: 1,
},
name: 'user_id_1',
},
{
key: {
nam... | overleaf/web/migrations/20190912145030_create_templates_indexes.js/0 | {
"file_path": "overleaf/web/migrations/20190912145030_create_templates_indexes.js",
"repo_id": "overleaf",
"token_count": 305
} | 558 |
const Helpers = require('./lib/helpers')
exports.tags = ['server-ce', 'server-pro', 'saas']
const indexes = [
{
key: {
projectId: 1,
},
name: 'projectId_1',
},
]
exports.migrate = async client => {
const { db } = client
await Helpers.addIndexesToCollection(db.deletedFiles, indexes)
}
expor... | overleaf/web/migrations/20210310111225_create_deletedFiles_projectId_index.js/0 | {
"file_path": "overleaf/web/migrations/20210310111225_create_deletedFiles_projectId_index.js",
"repo_id": "overleaf",
"token_count": 168
} | 559 |
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
import './controllers/LaunchpadController'
| overleaf/web/modules/launchpad/frontend/js/main/index.js/0 | {
"file_path": "overleaf/web/modules/launchpad/frontend/js/main/index.js",
"repo_id": "overleaf",
"token_count": 40
} | 560 |
const Path = require('path')
const UserGetter = require('../../../../app/src/Features/User/UserGetter')
const ErrorController = require('../../../../app/src/Features/Errors/ErrorController')
module.exports = {
activateAccountPage(req, res, next) {
// An 'activation' is actually just a password reset on an accoun... | overleaf/web/modules/user-activate/app/src/UserActivateController.js/0 | {
"file_path": "overleaf/web/modules/user-activate/app/src/UserActivateController.js",
"repo_id": "overleaf",
"token_count": 604
} | 561 |
<svg xmlns="http://www.w3.org/2000/svg" width="777.28" height="777.28" viewBox="0 0 777.28 777.28">
<g>
<g>
<circle cx="388.64" cy="388.64" r="388.64" fill="#798ed2" opacity="0.05"/>
<g>
<rect x="241.27" y="232.25" width="294.75" height="294.75" fill="#c1c2c5"/>
<path d="M388.64,468.11... | overleaf/web/public/img/brand/500-visual-socket.svg/0 | {
"file_path": "overleaf/web/public/img/brand/500-visual-socket.svg",
"repo_id": "overleaf",
"token_count": 382
} | 562 |
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<title>favicon</title>
<path d="M6.12,4.38A7.08,7.08,0,0,0,2.67,10.2,5.07,5.07,0,1,0,9.55,5.46a4.68,4.68,0,0,0-1.8-.34A7.48,7.48,0,0,0,5.2,8.07a3.33,3.33,0,1,1,2.54,5.47A3.33,3.33,0,0,1,5.2,12.37,4,4... | overleaf/web/public/mask-favicon.svg/0 | {
"file_path": "overleaf/web/public/mask-favicon.svg",
"repo_id": "overleaf",
"token_count": 314
} | 563 |
// Script to create projects with sharelatex history for testing
// Example:
// node scripts/create_project.js --user-id=5dca84e11e71ae002ff73bd4 --name="My Test Project" --old-history
const fs = require('fs')
const path = require('path')
const _ = require('underscore')
const parseArgs = require('minimist')
const OErr... | overleaf/web/scripts/create_project.js/0 | {
"file_path": "overleaf/web/scripts/create_project.js",
"repo_id": "overleaf",
"token_count": 1187
} | 564 |
const Path = require('path')
const fs = require('fs')
const fetch = require('node-fetch')
const CACHE_IN = Path.join(
Path.dirname(Path.dirname(Path.dirname(__dirname))),
'data',
'learnPages'
)
async function scrape(baseUrl, page) {
const uri = new URL(baseUrl + '/learn-scripts/api.php')
uri.search = new U... | overleaf/web/scripts/learn/checkSanitize/scrape.js/0 | {
"file_path": "overleaf/web/scripts/learn/checkSanitize/scrape.js",
"repo_id": "overleaf",
"token_count": 1189
} | 565 |
let userOptions
try {
userOptions = require('../../data/onesky.json')
} catch (err) {
if (!process.env.ONE_SKY_PUBLIC_KEY) {
console.error(
'Cannot detect onesky credentials.\n\tDevelopers: see the docs at',
'https://github.com/overleaf/developer-manual/blob/master/code/translations.md#testing-trans... | overleaf/web/scripts/translations/config.js/0 | {
"file_path": "overleaf/web/scripts/translations/config.js",
"repo_id": "overleaf",
"token_count": 290
} | 566 |
const chai = require('chai')
chai.should()
chai.use(require('chai-as-promised'))
chai.use(require('chaid'))
chai.use(require('sinon-chai'))
// Do not truncate assertion errors
chai.config.truncateThreshold = 0
| overleaf/web/test/acceptance/bootstrap.js/0 | {
"file_path": "overleaf/web/test/acceptance/bootstrap.js",
"repo_id": "overleaf",
"token_count": 82
} | 567 |
const { expect } = require('chai')
const { exec } = require('child_process')
const { ObjectId } = require('mongodb')
const User = require('./helpers/User').promises
describe('ConvertArchivedState', function () {
let userOne, userTwo, userThree, userFour
let projectOne, projectOneId
let projectTwo, projectTwoId
... | overleaf/web/test/acceptance/src/ConvertArchivedState.js/0 | {
"file_path": "overleaf/web/test/acceptance/src/ConvertArchivedState.js",
"repo_id": "overleaf",
"token_count": 1381
} | 568 |
const { expect } = require('chai')
const User = require('./helpers/User').promises
describe('Project ownership transfer', function () {
beforeEach(async function () {
this.ownerSession = new User()
this.collaboratorSession = new User()
this.strangerSession = new User()
this.adminSession = new User()
... | overleaf/web/test/acceptance/src/ProjectOwnershipTransferTests.js/0 | {
"file_path": "overleaf/web/test/acceptance/src/ProjectOwnershipTransferTests.js",
"repo_id": "overleaf",
"token_count": 1056
} | 569 |
const { expect } = require('chai')
const async = require('async')
const User = require('./helpers/User')
const Institution = require('./helpers/Institution')
const Subscription = require('./helpers/Subscription')
const Publisher = require('./helpers/Publisher')
describe('UserMembershipAuthorization', function () {
b... | overleaf/web/test/acceptance/src/UserMembershipAuthorizationTests.js/0 | {
"file_path": "overleaf/web/test/acceptance/src/UserMembershipAuthorizationTests.js",
"repo_id": "overleaf",
"token_count": 2207
} | 570 |
function filterOutput(line) {
return (
!line.startsWith('Using settings from ') &&
!line.startsWith('Using default settings from ') &&
!line.startsWith('CoffeeScript settings file')
)
}
module.exports = { filterOutput }
| overleaf/web/test/acceptance/src/helpers/settings.js/0 | {
"file_path": "overleaf/web/test/acceptance/src/helpers/settings.js",
"repo_id": "overleaf",
"token_count": 81
} | 571 |
import { expect } from 'chai'
import sinon from 'sinon'
import { screen, render, fireEvent } from '@testing-library/react'
import MessageInput from '../../../../../frontend/js/features/chat/components/message-input'
describe('<MessageInput />', function () {
let resetUnreadMessages, sendMessage
beforeEach(functi... | overleaf/web/test/frontend/features/chat/components/message-input.test.js/0 | {
"file_path": "overleaf/web/test/frontend/features/chat/components/message-input.test.js",
"repo_id": "overleaf",
"token_count": 527
} | 572 |
import { expect } from 'chai'
import { screen, fireEvent } from '@testing-library/react'
import renderWithContext from '../helpers/render-with-context'
import FileTreeFolder from '../../../../../frontend/js/features/file-tree/components/file-tree-folder'
describe('<FileTreeFolder/>', function () {
beforeEach(functi... | overleaf/web/test/frontend/features/file-tree/components/file-tree-folder.test.js/0 | {
"file_path": "overleaf/web/test/frontend/features/file-tree/components/file-tree-folder.test.js",
"repo_id": "overleaf",
"token_count": 1357
} | 573 |
import { render, screen } from '@testing-library/react'
import HotkeysModal from '../../../../../frontend/js/features/hotkeys-modal/components/hotkeys-modal'
import { expect } from 'chai'
import sinon from 'sinon'
const modalProps = {
show: true,
handleHide: sinon.stub(),
trackChangesVisible: false,
}
describe(... | overleaf/web/test/frontend/features/hotkeys-modal/components/hotkeys-modal.test.js/0 | {
"file_path": "overleaf/web/test/frontend/features/hotkeys-modal/components/hotkeys-modal.test.js",
"repo_id": "overleaf",
"token_count": 674
} | 574 |
import { render, screen, cleanup } from '@testing-library/react'
import WordCountModal from '../../../../../frontend/js/features/word-count-modal/components/word-count-modal'
import { expect } from 'chai'
import sinon from 'sinon'
import fetchMock from 'fetch-mock'
describe('<WordCountModal />', function () {
afterE... | overleaf/web/test/frontend/features/word-count-modal/components/word-count-modal.test.js/0 | {
"file_path": "overleaf/web/test/frontend/features/word-count-modal/components/word-count-modal.test.js",
"repo_id": "overleaf",
"token_count": 1056
} | 575 |
class Fixture {
constructor() {
this.el = document.createElement('div')
document.body.appendChild(this.el)
}
load(html) {
this.el.innerHTML = html
return this.el.firstChild
}
cleanUp() {
this.el.innerHTML = ''
}
}
const fixture = new Fixture()
export default fixture
| overleaf/web/test/karma/support/fixture.js/0 | {
"file_path": "overleaf/web/test/karma/support/fixture.js",
"repo_id": "overleaf",
"token_count": 112
} | 576 |
const sinon = require('sinon')
const { expect } = require('chai')
const SandboxedModule = require('sandboxed-module')
const { ObjectId } = require('mongodb')
const AuthenticationErrors = require('../../../../app/src/Features/Authentication/AuthenticationErrors')
const modulePath =
'../../../../app/src/Features/Authe... | overleaf/web/test/unit/src/Authentication/AuthenticationManagerTests.js/0 | {
"file_path": "overleaf/web/test/unit/src/Authentication/AuthenticationManagerTests.js",
"repo_id": "overleaf",
"token_count": 9981
} | 577 |
/* eslint-disable
node/handle-callback-err,
max-len,
no-return-assign,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: h... | overleaf/web/test/unit/src/Compile/ClsiFormatCheckerTests.js/0 | {
"file_path": "overleaf/web/test/unit/src/Compile/ClsiFormatCheckerTests.js",
"repo_id": "overleaf",
"token_count": 3391
} | 578 |
const SandboxedModule = require('sandboxed-module')
const sinon = require('sinon')
const { expect } = require('chai')
const { ObjectId } = require('mongodb')
const Errors = require('../../../../app/src/Features/Errors/Errors')
const MODULE_PATH = '../../../../app/src/Features/Editor/EditorHttpController'
describe('Ed... | overleaf/web/test/unit/src/Editor/EditorHttpControllerTests.js/0 | {
"file_path": "overleaf/web/test/unit/src/Editor/EditorHttpControllerTests.js",
"repo_id": "overleaf",
"token_count": 8014
} | 579 |
const { expect } = require('chai')
const SandboxedModule = require('sandboxed-module')
const modulePath = require('path').join(
__dirname,
'../../../../app/src/Features/Helpers/UrlHelper.js'
)
describe('UrlHelper', function () {
beforeEach(function () {
this.settings = {
apis: { linkedUrlProxy: { url: ... | overleaf/web/test/unit/src/HelperFiles/UrlHelperTests.js/0 | {
"file_path": "overleaf/web/test/unit/src/HelperFiles/UrlHelperTests.js",
"repo_id": "overleaf",
"token_count": 545
} | 580 |
/* eslint-disable
camelcase,
node/handle-callback-err,
max-len,
no-return-assign,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
... | overleaf/web/test/unit/src/Notifications/NotificationsHandlerTests.js/0 | {
"file_path": "overleaf/web/test/unit/src/Notifications/NotificationsHandlerTests.js",
"repo_id": "overleaf",
"token_count": 2404
} | 581 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.