text stringlengths 1 2.83M | id stringlengths 16 152 | metadata dict | __index_level_0__ int64 0 949 |
|---|---|---|---|
---
title: OnVehicleDamageStatusUpdate
description: 这个回调是在汽车部件(例如车门、轮胎、面板或车灯)改变其损坏状态时调用的。
tags: ["vehicle"]
---
:::tip
关于处理车辆损坏度的一些有用函数,请参阅[这里](../resources/damagestatus)。
:::
## 描述
这个回调是在汽车部件(例如车门、轮胎、面板或车灯)改变其损坏状态时调用的。
| 参数名 | 描述 |
| --------- | -------------... | openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnVehicleDamageStatusUpdate.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnVehicleDamageStatusUpdate.md",
"repo_id": "openmultiplayer",
"token_count": 990
} | 461 |
---
title: AddStaticVehicle
description: 在游戏模式中新增一个静态的载具(模型是为玩家预加载的)。
tags: ["vehicle"]
---
## 描述
在游戏模式中新增一个静态的载具(模型是为玩家预加载的)。
| 参数名 | 说明 |
| ------------------------------------- | -------------------------- |
| modelid | 载具的模型 ID。 ... | openmultiplayer/web/docs/translations/zh-cn/scripting/functions/AddStaticVehicle.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/AddStaticVehicle.md",
"repo_id": "openmultiplayer",
"token_count": 940
} | 462 |
---
title: Create3DTextLabel
description: 在世界的特定位置创建一个三维文本标签。
tags: ["3dtextlabel"]
---
## 描述
在世界的特定位置创建一个三维文本标签
| 参数名 | 说明 |
| ------------ | ------------------------------------------------ |
| text[] | 初始文本内容字符串。 |
| color ... | openmultiplayer/web/docs/translations/zh-cn/scripting/functions/Create3DTextLabel.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/Create3DTextLabel.md",
"repo_id": "openmultiplayer",
"token_count": 1473
} | 463 |
---
title: SetPlayerCameraLookAt
description: 设置玩家的视角所看的方向。
tags: ["player"]
---
## 描述
设置玩家的视角所看的方向。通常与 SetPlayerCameraPos 结合使用。
| 参数名 | 说明 |
| -------- | -----... | openmultiplayer/web/docs/translations/zh-cn/scripting/functions/SetPlayerCameraLookAt.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/SetPlayerCameraLookAt.md",
"repo_id": "openmultiplayer",
"token_count": 1391
} | 464 |
---
title: "server.cfg"
description: 服务器配置文件.
---
## 描述
- `server.cfg` 是一个服务器配置文件,它允许您更改 sa-mp 服务器的各种设置。
- 该文件对于每一个服务器都是必需的,并且必须位于服务器文件夹中,与 samp-server.exe 文件 (或 Linux 上的 samp03svr) 处于同一层级。
## 控制台
| 配置项 | 类型 | 默认值 | 仅读 | 规则 | 作用 |
... | openmultiplayer/web/docs/translations/zh-cn/server/server.cfg.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/server/server.cfg.md",
"repo_id": "openmultiplayer",
"token_count": 10569
} | 465 |
---
title: How can I join the team?
date: "2021-08-29T01:24:09"
author: Potassium
---
➖ HOW CAN I JOIN THE TEAM?
We get asked this question a LOT, so we thought we should make a post about it!
Firstly, thanks so much for being interested in contributing!
As you know, we are all veteran SA-MP players who came togeth... | openmultiplayer/web/frontend/content/en/blog/how-to-join-the-team.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/en/blog/how-to-join-the-team.mdx",
"repo_id": "openmultiplayer",
"token_count": 392
} | 466 |
# Open Multiplayer
Un mod multijugador en desarollo para _Grand Theft Auto: San Andreas_ que será totalmente compatible con el mod multijugador ya existente _San Andreas Multiplayer._
<br />
Esto significa que **el cliente SA:MP existente y todos los scripts del mismo funcionarán en open.mp** y además varios errores... | openmultiplayer/web/frontend/content/es/index.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/es/index.mdx",
"repo_id": "openmultiplayer",
"token_count": 219
} | 467 |
# Open Multiplayer
Una modifica di _Grand Theft Auto: San Andreas_ in fase di sviluppo che sarà completamente retrocompatibile con la mod multiplayer già esistente _San Andreas Multiplayer._
<br />
Questo significa che **il client esistente di SA:MP e tutti gli script esistenti di SA:MP funzioneranno con open.mp** e... | openmultiplayer/web/frontend/content/it/index.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/it/index.mdx",
"repo_id": "openmultiplayer",
"token_count": 232
} | 468 |
# Open Multiplayer
Uma modificação em desenvolvimento para _Grand Theft Auto: San Andreas_ que será totalmente compatível com a modificação multiplayer existente _San Andreas Multiplayer._
<br />
Isto significa **que clientes existentes do SA:MP e todos scripts SA:MP existentes irão funcionar com o open.mp** e, adic... | openmultiplayer/web/frontend/content/pt-BR/index.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/pt-BR/index.mdx",
"repo_id": "openmultiplayer",
"token_count": 244
} | 469 |
---
title: Takıma nasıl katılabilirim?
date: "2021-08-29T01:24:09"
author: Potassium
---
➖ TAKIMA NASIL KATILABİLİRİM?
Bu soruyu SIKÇA aldık, bu yüzden bununla ilgili bir gönderi yapmamız gerektiğini düşündük!
İlk olarak, katkıda bulunmaya ilgi gösterdiğiniz için çok teşekkür ederiz!
Bildiğiniz gibi, hepimiz SA-MP ... | openmultiplayer/web/frontend/content/tr/blog/how-to-join-the-team.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/tr/blog/how-to-join-the-team.mdx",
"repo_id": "openmultiplayer",
"token_count": 847
} | 470 |
# FAQ
<hr />
## اوپن ایم پی کیا ہے؟
open.mp (اوپن ملٹی پلیئر، او ایم پی) سان اینڈریاس کے لئے ایک متبادل ملٹی پلیئر موڈ ہے، جو سان اینڈریاس کی تازہ کاریوں اور انتظامیہ کے ساتھ پریشانیوں میں بدقسمتی اضافے کے جواب میں شروع کیا گیا ہے۔ ابتدائی ریلیز صرف سرور کے لانچ دل ہوگا۔ موجودہ کلائنٹ اس سرور کے ساتھ کام کریں گا۔ مس... | openmultiplayer/web/frontend/content/ur/faq.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/ur/faq.mdx",
"repo_id": "openmultiplayer",
"token_count": 7367
} | 471 |
import { readdirSync, statSync } from "fs";
import { join } from "path";
import parseDir from "./scripts/gentree.mjs";
const localesFromContent = readdirSync("content").filter((v) =>
statSync(join("content", v)).isDirectory()
);
const localesFromDocs = readdirSync("../docs/translations").filter((v) =>
statSync(j... | openmultiplayer/web/frontend/next.config.mjs/0 | {
"file_path": "openmultiplayer/web/frontend/next.config.mjs",
"repo_id": "openmultiplayer",
"token_count": 683
} | 472 |
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns... | openmultiplayer/web/frontend/public/images/assets/widget.svg/0 | {
"file_path": "openmultiplayer/web/frontend/public/images/assets/widget.svg",
"repo_id": "openmultiplayer",
"token_count": 3475
} | 473 |
import { lstatSync, readdirSync } from "fs";
import { basename } from "path";
import pkg from "iso-639-1";
const { getNativeName } = pkg;
const SIDE_BAR_NAME = "Sidebar";
const CATEGORY_NAME_CAPITALIZATION = true;
function shouldIgnore(name) {
if (typeof name !== "string") {
return false;
}
if (name.includ... | openmultiplayer/web/frontend/scripts/gentree.mjs/0 | {
"file_path": "openmultiplayer/web/frontend/scripts/gentree.mjs",
"repo_id": "openmultiplayer",
"token_count": 1454
} | 474 |
import { Button, IconButton } from "@chakra-ui/button";
import { ArrowLeftIcon, ArrowRightIcon } from "@chakra-ui/icons";
import { ListItem, OrderedList, Text } from "@chakra-ui/layout";
import { useBreakpointValue } from "@chakra-ui/react";
import { isNull } from "lodash";
import { clamp, flow, map, reverse } from "lo... | openmultiplayer/web/frontend/src/components/generic/Pagination.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/generic/Pagination.tsx",
"repo_id": "openmultiplayer",
"token_count": 2364
} | 475 |
import Link from "next/link";
import { map } from "lodash/fp";
import { Box, useColorModeValue } from "@chakra-ui/react";
type Item = [string, string];
const footerList = (heading: string, items: Array<Item>) => (
<div className="flex flex-column">
<h4 className="ma0">{heading}</h4>
<ul className="list pa0"... | openmultiplayer/web/frontend/src/components/site/Footer.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/site/Footer.tsx",
"repo_id": "openmultiplayer",
"token_count": 732
} | 476 |
import Admonition from "../../../Admonition";
export default function TipNpcCallback() {
return (
<Admonition type="tip">
<p>Callback ini dapat terpanggil juga oleh NPC.</p>
</Admonition>
);
}
| openmultiplayer/web/frontend/src/components/templates/translations/id/npc-callbacks-tip.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/templates/translations/id/npc-callbacks-tip.tsx",
"repo_id": "openmultiplayer",
"token_count": 83
} | 477 |
import Link from "next/link";
const A = (props: any) => (
<Link {...props}>
<a>{props.children}</a>
</Link>
);
export const MDX_COMPONENTS = {
a: A,
};
| openmultiplayer/web/frontend/src/mdx-helpers/components.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/mdx-helpers/components.tsx",
"repo_id": "openmultiplayer",
"token_count": 76
} | 478 |
import useSWR from "swr";
import { withAuth } from "src/auth/hoc";
import { apiSWR } from "src/fetcher/fetcher";
import GitHubIcon from "src/components/icons/GitHub";
import DiscordIcon from "src/components/icons/Discord";
import { APIError } from "src/types/_generated_Error";
import OAuthButton from "src/components/O... | openmultiplayer/web/frontend/src/pages/dashboard.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/pages/dashboard.tsx",
"repo_id": "openmultiplayer",
"token_count": 825
} | 479 |
.hero {
background-image: url("/images/assets/map.png");
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}
| openmultiplayer/web/frontend/src/styles/Hero.module.css/0 | {
"file_path": "openmultiplayer/web/frontend/src/styles/Hero.module.css",
"repo_id": "openmultiplayer",
"token_count": 50
} | 480 |
import { formatRelative } from "date-fns";
import { enGB } from "date-fns/locale";
export const niceDate = (d: string): string =>
formatRelative(new Date(d), new Date(), { locale: enGB });
| openmultiplayer/web/frontend/src/utils/dates.ts/0 | {
"file_path": "openmultiplayer/web/frontend/src/utils/dates.ts",
"repo_id": "openmultiplayer",
"token_count": 64
} | 481 |
package github
import (
"context"
"github.com/google/go-github/github"
"golang.org/x/oauth2"
"github.com/openmultiplayer/web/internal/config"
)
func New(cfg config.Config) *github.Client {
return github.NewClient(oauth2.NewClient(
context.Background(),
oauth2.StaticTokenSource(&oauth2.Token{AccessToken: cf... | openmultiplayer/web/internal/github/github.go/0 | {
"file_path": "openmultiplayer/web/internal/github/github.go",
"repo_id": "openmultiplayer",
"token_count": 131
} | 482 |
/*
Warnings:
- You are about to alter the column `name` on the `User` table. The data in that column could be lost. The data in that column will be cast from `Text` to `VarChar(30)`.
*/
-- DropIndex
DROP INDEX "Discord_userId_unique";
-- DropIndex
DROP INDEX "GitHub_userId_unique";
-- AlterTable
ALTER TABLE "Us... | openmultiplayer/web/prisma/migrations/20210807114226_forum/migration.sql/0 | {
"file_path": "openmultiplayer/web/prisma/migrations/20210807114226_forum/migration.sql",
"repo_id": "openmultiplayer",
"token_count": 141
} | 483 |
{
"adapter": "./migrations/lib/adapter",
"migrationNumberFormat": "dateTime"
}
| overleaf/web/.eastrc/0 | {
"file_path": "overleaf/web/.eastrc",
"repo_id": "overleaf",
"token_count": 37
} | 484 |
12.22.3
| overleaf/web/.nvmrc/0 | {
"file_path": "overleaf/web/.nvmrc",
"repo_id": "overleaf",
"token_count": 6
} | 485 |
/* 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
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/d... | overleaf/web/app.js/0 | {
"file_path": "overleaf/web/app.js",
"repo_id": "overleaf",
"token_count": 971
} | 486 |
const BetaProgramHandler = require('./BetaProgramHandler')
const OError = require('@overleaf/o-error')
const UserGetter = require('../User/UserGetter')
const Settings = require('@overleaf/settings')
const logger = require('logger-sharelatex')
const SessionManager = require('../Authentication/SessionManager')
const Bet... | overleaf/web/app/src/Features/BetaProgram/BetaProgramController.js/0 | {
"file_path": "overleaf/web/app/src/Features/BetaProgram/BetaProgramController.js",
"repo_id": "overleaf",
"token_count": 664
} | 487 |
const async = require('async')
const Settings = require('@overleaf/settings')
const request = require('request')
const ProjectGetter = require('../Project/ProjectGetter')
const ProjectEntityHandler = require('../Project/ProjectEntityHandler')
const logger = require('logger-sharelatex')
const Url = require('url')
const ... | overleaf/web/app/src/Features/Compile/ClsiManager.js/0 | {
"file_path": "overleaf/web/app/src/Features/Compile/ClsiManager.js",
"repo_id": "overleaf",
"token_count": 13532
} | 488 |
const ProjectDeleter = require('../Project/ProjectDeleter')
const EditorController = require('./EditorController')
const ProjectGetter = require('../Project/ProjectGetter')
const AuthorizationManager = require('../Authorization/AuthorizationManager')
const ProjectEditorHandler = require('../Project/ProjectEditorHandler... | overleaf/web/app/src/Features/Editor/EditorHttpController.js/0 | {
"file_path": "overleaf/web/app/src/Features/Editor/EditorHttpController.js",
"repo_id": "overleaf",
"token_count": 3015
} | 489 |
/* eslint-disable
camelcase,
node/handle-callback-err,
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
* DS103: Rewrite code... | overleaf/web/app/src/Features/Exports/ExportsHandler.js/0 | {
"file_path": "overleaf/web/app/src/Features/Exports/ExportsHandler.js",
"repo_id": "overleaf",
"token_count": 3966
} | 490 |
/* eslint-disable
camelcase,
node/handle-callback-err,
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 sho... | overleaf/web/app/src/Features/History/RestoreManager.js/0 | {
"file_path": "overleaf/web/app/src/Features/History/RestoreManager.js",
"repo_id": "overleaf",
"token_count": 2112
} | 491 |
/* eslint-disable
camelcase,
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... | overleaf/web/app/src/Features/Metadata/MetaController.js/0 | {
"file_path": "overleaf/web/app/src/Features/Metadata/MetaController.js",
"repo_id": "overleaf",
"token_count": 904
} | 492 |
const logger = require('logger-sharelatex')
const OError = require('@overleaf/o-error')
const metrics = require('@overleaf/metrics')
const Settings = require('@overleaf/settings')
const { ObjectId } = require('mongodb')
const Features = require('../../infrastructure/Features')
const { Project } = require('../../models/... | overleaf/web/app/src/Features/Project/ProjectCreationHandler.js/0 | {
"file_path": "overleaf/web/app/src/Features/Project/ProjectCreationHandler.js",
"repo_id": "overleaf",
"token_count": 2430
} | 493 |
/* eslint-disable
camelcase,
node/handle-callback-err,
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 sho... | overleaf/web/app/src/Features/Publishers/PublishersGetter.js/0 | {
"file_path": "overleaf/web/app/src/Features/Publishers/PublishersGetter.js",
"repo_id": "overleaf",
"token_count": 345
} | 494 |
const UserGetter = require('../User/UserGetter')
const UserUpdater = require('../User/UserUpdater')
const AnalyticsManager = require('../Analytics/AnalyticsManager')
const Settings = require('@overleaf/settings')
const _ = require('lodash')
const crypto = require('crypto')
const OError = require('@overleaf/o-error')
co... | overleaf/web/app/src/Features/SplitTests/SplitTestHandler.js/0 | {
"file_path": "overleaf/web/app/src/Features/SplitTests/SplitTestHandler.js",
"repo_id": "overleaf",
"token_count": 1295
} | 495 |
/* eslint-disable
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: https://githu... | overleaf/web/app/src/Features/Subscription/SubscriptionFormatters.js/0 | {
"file_path": "overleaf/web/app/src/Features/Subscription/SubscriptionFormatters.js",
"repo_id": "overleaf",
"token_count": 512
} | 496 |
const TagsHandler = require('./TagsHandler')
const SessionManager = require('../Authentication/SessionManager')
const Errors = require('../Errors/Errors')
const TagsController = {
_getTags(userId, _req, res, next) {
if (!userId) {
return next(new Errors.NotFoundError())
}
TagsHandler.getAllTags(use... | overleaf/web/app/src/Features/Tags/TagsController.js/0 | {
"file_path": "overleaf/web/app/src/Features/Tags/TagsController.js",
"repo_id": "overleaf",
"token_count": 1003
} | 497 |
/* 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:
* DS101: Remove unnecessary use of Array.from
* DS102: Remove unnecessary code created because of impli... | overleaf/web/app/src/Features/Uploads/ArchiveManager.js/0 | {
"file_path": "overleaf/web/app/src/Features/Uploads/ArchiveManager.js",
"repo_id": "overleaf",
"token_count": 3474
} | 498 |
let UserController
const UserGetter = require('./UserGetter')
const SessionManager = require('../Authentication/SessionManager')
const { ObjectId } = require('mongodb')
module.exports = UserController = {
getLoggedInUsersPersonalInfo(req, res, next) {
const userId = SessionManager.getLoggedInUserId(req.session)
... | overleaf/web/app/src/Features/User/UserInfoController.js/0 | {
"file_path": "overleaf/web/app/src/Features/User/UserInfoController.js",
"repo_id": "overleaf",
"token_count": 881
} | 499 |
/* eslint-disable
node/handle-callback-err,
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
* DS207: Consider shorter variations of null checks
* F... | overleaf/web/app/src/Features/UserMembership/UserMembershipsHandler.js/0 | {
"file_path": "overleaf/web/app/src/Features/UserMembership/UserMembershipsHandler.js",
"repo_id": "overleaf",
"token_count": 961
} | 500 |
const mongoose = require('mongoose')
const Settings = require('@overleaf/settings')
const logger = require('logger-sharelatex')
if (
typeof global.beforeEach === 'function' &&
process.argv.join(' ').match(/unit/)
) {
throw new Error(
'It looks like unit tests are running, but you are connecting to Mongo. Mis... | overleaf/web/app/src/infrastructure/Mongoose.js/0 | {
"file_path": "overleaf/web/app/src/infrastructure/Mongoose.js",
"repo_id": "overleaf",
"token_count": 519
} | 501 |
const Settings = require('@overleaf/settings')
const { MongoClient, ObjectId } = require('mongodb')
if (
typeof global.beforeEach === 'function' &&
process.argv.join(' ').match(/unit/)
) {
throw new Error(
'It looks like unit tests are running, but you are connecting to Mongo. Missing a stub?'
)
}
const c... | overleaf/web/app/src/infrastructure/mongodb.js/0 | {
"file_path": "overleaf/web/app/src/infrastructure/mongodb.js",
"repo_id": "overleaf",
"token_count": 1030
} | 502 |
const mongoose = require('../infrastructure/Mongoose')
const { Schema } = mongoose
const { ObjectId } = Schema
const settings = require('@overleaf/settings')
const logger = require('logger-sharelatex')
const request = require('request')
const PublisherSchema = new Schema({
slug: { type: String, required: true },
m... | overleaf/web/app/src/models/Publisher.js/0 | {
"file_path": "overleaf/web/app/src/models/Publisher.js",
"repo_id": "overleaf",
"token_count": 549
} | 503 |
\documentclass{article}
% Language setting
% Replace `english' with e.g. `spanish' to change the document language
\usepackage[english]{babel}
% Set page size and margins
% Replace `letterpaper' with`a4paper' for UK/EU standard size
\usepackage[letterpaper,top=2cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{... | overleaf/web/app/templates/project_files/test-example-project/main.tex/0 | {
"file_path": "overleaf/web/app/templates/project_files/test-example-project/main.tex",
"repo_id": "overleaf",
"token_count": 1928
} | 504 |
extends ../layout
block content
main.content#main-content
.container
.row
.col-md-8.col-md-offset-2.text-center
.page-header
h1 Maintenance
p(ng-non-bindable)
if settings.statusPageUrl
| #{settings.appName} is currently down for maintenance.
| Please check our #[a(href='ht... | overleaf/web/app/views/general/closed.pug/0 | {
"file_path": "overleaf/web/app/views/general/closed.pug",
"repo_id": "overleaf",
"token_count": 256
} | 505 |
div(ng-controller="ReactShareProjectModalController")
share-project-modal(
handle-hide="handleHide"
show="show"
is-admin="isAdmin"
)
div(ng-controller="EditorNavigationToolbarController")
editor-navigation-toolbar-root(
open-doc="openDoc"
online-users-array="onlineUsersArray"
open-share-project-m... | overleaf/web/app/views/project/editor/header-react.pug/0 | {
"file_path": "overleaf/web/app/views/project/editor/header-react.pug",
"repo_id": "overleaf",
"token_count": 133
} | 506 |
extends ../layout
block vars
- var suppressNavbar = true
- var suppressFooter = true
- var suppressSkipToContent = true
- metadata.robotsNoindexNofollow = true
block content
.editor(ng-controller="ImportingController").full-size
.loading-screen
.loading-screen-brand-container
.loading-screen-brand(
... | overleaf/web/app/views/project/importing.pug/0 | {
"file_path": "overleaf/web/app/views/project/importing.pug",
"repo_id": "overleaf",
"token_count": 211
} | 507 |
.row.row-spaced-large
.col-md-12
.page-header.plans-header.plans-subheader.text-centered
h2 #{translate('in_good_company')}
.row
.col-md-6
div
.row
.col-md-3
.circle-img
img(src=buildImgPath('advocates/schultz.jpg') alt="Kevin Schultz")
.col-md-9
blockquote
p It is the ability ... | overleaf/web/app/views/subscriptions/_plans_quotes.pug/0 | {
"file_path": "overleaf/web/app/views/subscriptions/_plans_quotes.pug",
"repo_id": "overleaf",
"token_count": 340
} | 508 |
extends ../layout
block append meta
meta(name="ol-countryCode" content=countryCode)
meta(name="ol-recurlyApiKey" content=settings.apis.recurly.publicKey)
meta(name="ol-recomendedCurrency" content=String(currency).slice(0,3))
block head-scripts
script(type="text/javascript", nonce=scriptNonce, src="https://js.recu... | overleaf/web/app/views/subscriptions/new.pug/0 | {
"file_path": "overleaf/web/app/views/subscriptions/new.pug",
"repo_id": "overleaf",
"token_count": 8002
} | 509 |
extends ../layout
block append meta
meta(name="ol-otherSessions" data-type="json" content=sessions)
block content
main.content.content-alt#main-content
.container
.row
.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
.card.clear-user-sessions(ng-controller="ClearSessionsController", ng-cloak)
... | overleaf/web/app/views/user/sessions.pug/0 | {
"file_path": "overleaf/web/app/views/user/sessions.pug",
"repo_id": "overleaf",
"token_count": 679
} | 510 |
#!/bin/sh
set -e
if [[ "$BRANCH_NAME" == "master" || "$BRANCH_NAME" == "main" ]]; then
rm -rf sentry_upload
mkdir sentry_upload
tar --directory sentry_upload -xf build.tar
cd sentry_upload/public
SENTRY_RELEASE=${COMMIT_SHA}
OPTS="--no-rewrite --url-prefix ~"
sentry-cli releases new "$SENTRY_RELEASE"
... | overleaf/web/bin/sentry_upload/0 | {
"file_path": "overleaf/web/bin/sentry_upload",
"repo_id": "overleaf",
"token_count": 205
} | 511 |
/*!
* Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
*/
@font-face {
font-family: 'FontAwesome';
src: url('font-awesome-v470.woff2') format('woff2'),
url('font-awesome-v470.woff') format('woff');
font... | overleaf/web/frontend/fonts/font-awesome.css/0 | {
"file_path": "overleaf/web/frontend/fonts/font-awesome.css",
"repo_id": "overleaf",
"token_count": 17568
} | 512 |
@font-face {
font-family: 'Merriweather';
font-style: normal;
font-weight: 400;
src: local('Merriweather Regular'), local('Merriweather-Regular'),
url('merriweather-v21-latin-regular.woff2') format('woff2'),
url('merriweather-v21-latin-regular.woff') format('woff');
}
@font-face {
font-family: 'Merriw... | overleaf/web/frontend/fonts/merriweather.css/0 | {
"file_path": "overleaf/web/frontend/fonts/merriweather.css",
"repo_id": "overleaf",
"token_count": 450
} | 513 |
import App from '../base'
App.directive('autoSubmitForm', function () {
return {
link(scope, element) {
element.submit() // Runs on load
},
}
})
| overleaf/web/frontend/js/directives/autoSubmitForm.js/0 | {
"file_path": "overleaf/web/frontend/js/directives/autoSubmitForm.js",
"repo_id": "overleaf",
"token_count": 60
} | 514 |
import PropTypes from 'prop-types'
import { useTranslation } from 'react-i18next'
import { Button, Alert } from 'react-bootstrap'
function ChatFallbackError({ reconnect }) {
const { t } = useTranslation()
return (
<aside className="chat">
<div className="chat-error">
<Alert bsStyle="danger">{t('... | overleaf/web/frontend/js/features/chat/components/chat-fallback-error.js/0 | {
"file_path": "overleaf/web/frontend/js/features/chat/components/chat-fallback-error.js",
"repo_id": "overleaf",
"token_count": 291
} | 515 |
import PropTypes from 'prop-types'
function CobrandingLogo({
brandVariationHomeUrl,
brandVariationName,
logoImgUrl,
}) {
return (
<a
className="btn btn-full-height header-cobranding-logo-container"
href={brandVariationHomeUrl}
target="_blank"
rel="noreferrer noopener"
>
<i... | overleaf/web/frontend/js/features/editor-navigation-toolbar/components/cobranding-logo.js/0 | {
"file_path": "overleaf/web/frontend/js/features/editor-navigation-toolbar/components/cobranding-logo.js",
"repo_id": "overleaf",
"token_count": 277
} | 516 |
import { useTranslation } from 'react-i18next'
import FileTreeCreateNewDoc from './modes/file-tree-create-new-doc'
import FileTreeImportFromUrl from './modes/file-tree-import-from-url'
import FileTreeImportFromProject from './modes/file-tree-import-from-project'
import FileTreeUploadDoc from './modes/file-tree-upload-d... | overleaf/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-body.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-body.js",
"repo_id": "overleaf",
"token_count": 1648
} | 517 |
import { useState, useEffect } from 'react'
import PropTypes from 'prop-types'
import { useRefWithAutoFocus } from '../../../../shared/hooks/use-ref-with-auto-focus'
import { useFileTreeActionable } from '../../contexts/file-tree-actionable'
import { useFileTreeMainContext } from '../../contexts/file-tree-main'
func... | overleaf/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-name.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-name.js",
"repo_id": "overleaf",
"token_count": 1322
} | 518 |
import { useCallback, useEffect } from 'react'
import PropTypes from 'prop-types'
import { useUserContext } from '../../../shared/context/user-context'
import { useFileTreeMutable } from '../contexts/file-tree-mutable'
import { useFileTreeSelectable } from '../contexts/file-tree-selectable'
import { findInTreeOrThrow ... | overleaf/web/frontend/js/features/file-tree/hooks/file-tree-socket-listener.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/hooks/file-tree-socket-listener.js",
"repo_id": "overleaf",
"token_count": 1561
} | 519 |
import App from '../../../base'
import { react2angular } from 'react2angular'
import _ from 'lodash'
import { rootContext } from '../../../shared/context/root-context'
import FileView from '../components/file-view'
export default App.controller(
'FileViewController',
function ($scope, $rootScope) {
$scope.fil... | overleaf/web/frontend/js/features/file-view/controllers/file-view-controller.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-view/controllers/file-view-controller.js",
"repo_id": "overleaf",
"token_count": 212
} | 520 |
import { OverlayTrigger, Tooltip } from 'react-bootstrap'
import PropTypes from 'prop-types'
import classNames from 'classnames'
import { useTranslation } from 'react-i18next'
import Icon from '../../../shared/components/icon'
const MAX_ERRORS_COUNT = 99
function PreviewLogsToggleButton({
onToggle,
showLogs,
au... | overleaf/web/frontend/js/features/preview/components/preview-logs-toggle-button.js/0 | {
"file_path": "overleaf/web/frontend/js/features/preview/components/preview-logs-toggle-button.js",
"repo_id": "overleaf",
"token_count": 1932
} | 521 |
import { Button, Modal, Grid } from 'react-bootstrap'
import { Trans } from 'react-i18next'
import ShareModalBody from './share-modal-body'
import Icon from '../../../shared/components/icon'
import AccessibleModal from '../../../shared/components/accessible-modal'
import PropTypes from 'prop-types'
import { ReadOnlyTok... | overleaf/web/frontend/js/features/share-project-modal/components/share-project-modal-content.js/0 | {
"file_path": "overleaf/web/frontend/js/features/share-project-modal/components/share-project-modal-content.js",
"repo_id": "overleaf",
"token_count": 1075
} | 522 |
import PropTypes from 'prop-types'
import SymbolPaletteContent from './symbol-palette-content'
export default function SymbolPalette({ show, handleSelect }) {
if (!show) {
return null
}
return <SymbolPaletteContent handleSelect={handleSelect} />
}
SymbolPalette.propTypes = {
show: PropTypes.bool,
handle... | overleaf/web/frontend/js/features/symbol-palette/components/symbol-palette.js/0 | {
"file_path": "overleaf/web/frontend/js/features/symbol-palette/components/symbol-palette.js",
"repo_id": "overleaf",
"token_count": 110
} | 523 |
/* 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
* DS103: Rewrite code to no longer use __guard__
* DS207: Consi... | overleaf/web/frontend/js/ide/chat/controllers/ChatButtonController.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/chat/controllers/ChatButtonController.js",
"repo_id": "overleaf",
"token_count": 507
} | 524 |
/* 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/editor/EditorShareJsCodec.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/editor/EditorShareJsCodec.js",
"repo_id": "overleaf",
"token_count": 521
} | 525 |
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:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider sho... | overleaf/web/frontend/js/ide/editor/directives/aceEditor/spell-check/HighlightedWordManager.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/editor/directives/aceEditor/spell-check/HighlightedWordManager.js",
"repo_id": "overleaf",
"token_count": 1421
} | 526 |
import _ from 'lodash'
/* 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
* DS103: Rewrite code to no longer use __guard__
* DS207: Cons... | overleaf/web/frontend/js/ide/graphics/services/graphics.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/graphics/services/graphics.js",
"repo_id": "overleaf",
"token_count": 533
} | 527 |
import App from '../../../base'
export default App.directive('historyDraggableBoundary', () => ({
scope: {
historyDraggableBoundary: '@',
historyDraggableBoundaryOnDragStart: '&',
historyDraggableBoundaryOnDragStop: '&',
},
restrict: 'A',
link(scope, element, attrs) {
element.data('selectionBou... | overleaf/web/frontend/js/ide/history/directives/historyDraggableBoundary.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/history/directives/historyDraggableBoundary.js",
"repo_id": "overleaf",
"token_count": 392
} | 528 |
/* eslint-disable
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/master/docs/su... | overleaf/web/frontend/js/ide/pdf/controllers/PdfViewToggleController.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/pdf/controllers/PdfViewToggleController.js",
"repo_id": "overleaf",
"token_count": 316
} | 529 |
/* 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/controllers/BulkActionsModalController.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/review-panel/controllers/BulkActionsModalController.js",
"repo_id": "overleaf",
"token_count": 231
} | 530 |
/* 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:
* DS101: Remove unnecessary use of Array.from
* DS102: Remove unnecessary code created because of implicit returns
* DS103: Rewrite ... | overleaf/web/frontend/js/ide/services/ide.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/services/ide.js",
"repo_id": "overleaf",
"token_count": 1998
} | 531 |
import App from '../base'
App.controller('AccountSettingsController', function (
$scope,
$http,
$modal,
// eslint-disable-next-line camelcase
eventTracking,
UserAffiliationsDataService
) {
$scope.subscribed = true
$scope.unsubscribe = function () {
$scope.unsubscribing = true
return $http({
... | overleaf/web/frontend/js/main/account-settings.js/0 | {
"file_path": "overleaf/web/frontend/js/main/account-settings.js",
"repo_id": "overleaf",
"token_count": 1399
} | 532 |
import _ from 'lodash'
/* eslint-disable
camelcase,
max-len,
no-return-assign
*/
/* global recurly */
import App from '../base'
import getMeta from '../utils/meta'
export default App.controller(
'NewSubscriptionController',
function ($scope, MultiCurrencyPricing, $http, $location, eventTracking) {
... | overleaf/web/frontend/js/main/new-subscription.js/0 | {
"file_path": "overleaf/web/frontend/js/main/new-subscription.js",
"repo_id": "overleaf",
"token_count": 11643
} | 533 |
/* 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/main/system-messages.js/0 | {
"file_path": "overleaf/web/frontend/js/main/system-messages.js",
"repo_id": "overleaf",
"token_count": 698
} | 534 |
import React from 'react'
import { Dropdown } from 'react-bootstrap'
import PropTypes from 'prop-types'
import useDropdown from '../hooks/use-dropdown'
export default function ControlledDropdown(props) {
const dropdownProps = useDropdown(Boolean(props.defaultOpen))
return (
<Dropdown {...props} {...dropdownPr... | overleaf/web/frontend/js/shared/components/controlled-dropdown.js/0 | {
"file_path": "overleaf/web/frontend/js/shared/components/controlled-dropdown.js",
"repo_id": "overleaf",
"token_count": 382
} | 535 |
import 'abort-controller/polyfill'
import { useEffect, useState } from 'react'
export default function useAbortController() {
const [controller] = useState(() => new AbortController())
useEffect(() => {
return () => {
controller.abort()
}
}, [controller])
return controller
}
| overleaf/web/frontend/js/shared/hooks/use-abort-controller.js/0 | {
"file_path": "overleaf/web/frontend/js/shared/hooks/use-abort-controller.js",
"repo_id": "overleaf",
"token_count": 96
} | 536 |
// Generated by CoffeeScript 1.10.0
define(function() {
var BAD_CROSS_REFERENCE_REGEX, BibLogParser, LINE_SPLITTER_REGEX, MESSAGE_LEVELS, MULTILINE_COMMAND_ERROR_REGEX, MULTILINE_ERROR_REGEX, MULTILINE_WARNING_REGEX, SINGLELINE_WARNING_REGEX, consume, errorParsers, warningParsers;
LINE_SPLITTER_REGEX = /^\[(\d+)].*... | overleaf/web/frontend/js/vendor/libs/bib-log-parser.js/0 | {
"file_path": "overleaf/web/frontend/js/vendor/libs/bib-log-parser.js",
"repo_id": "overleaf",
"token_count": 3572
} | 537 |
import sinon from 'sinon'
export function setupContext() {
window.project_id = '1234'
window.user = {
id: 'fake_user',
allowedFreeTrial: true,
}
let $scope = {}
if (window._ide) {
$scope = {
...window._ide.$scope,
user: window.user,
project: {},
$watch: () => {},
ui:... | overleaf/web/frontend/stories/fixtures/context.js/0 | {
"file_path": "overleaf/web/frontend/stories/fixtures/context.js",
"repo_id": "overleaf",
"token_count": 316
} | 538 |
import PreviewLogsPaneEntry from '../js/features/preview/components/preview-logs-pane-entry.js'
import Icon from '../js/shared/components/icon.js'
export const EntryWithCompilerOutput = args => (
<PreviewLogsPaneEntry {...args} />
)
EntryWithCompilerOutput.args = {
title: 'PreviewLogsPaneEntry/bar/baz',
level: '... | overleaf/web/frontend/stories/preview-logs-pane-entry.stories.js/0 | {
"file_path": "overleaf/web/frontend/stories/preview-logs-pane-entry.stories.js",
"repo_id": "overleaf",
"token_count": 1293
} | 539 |
.beta-opt-in {
.form-group {
margin-top: 15px;
}
}
| overleaf/web/frontend/stylesheets/app/beta-program.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/app/beta-program.less",
"repo_id": "overleaf",
"token_count": 31
} | 540 |
@online-user-color: rgb(0, 170, 255);
.online-users {
display: flex;
.online-user {
background-color: @online-user-color;
width: 24px;
display: inline-block;
height: 24px;
margin-right: 8px;
text-align: center;
color: white;
text-transform: uppercase;
border-radius: 3px;
cu... | overleaf/web/frontend/stylesheets/app/editor/online-users.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/app/editor/online-users.less",
"repo_id": "overleaf",
"token_count": 402
} | 541 |
#institution-hub {
.section_header {
.dropdown {
margin-right: 10px;
}
}
#usage {
.recent-activity {
.overbox {
font-size: 16px;
}
.hub-big-number,
.hub-number-label,
.worked-on {
display: block;
width: 50%;
}
.hub-big-number {
... | overleaf/web/frontend/stylesheets/app/institution-hub.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/app/institution-hub.less",
"repo_id": "overleaf",
"token_count": 373
} | 542 |
.project-list-sidebar-wrapper {
height: 100%;
display: flex;
flex-direction: column;
}
.project-list-sidebar {
flex-grow: 1;
height: 100%;
padding-left: 15px;
padding-right: 15px;
}
.project-list-sidebar-v2-pane {
flex-grow: 0;
flex-shrink: 0;
text-align: center;
background-color: @v2-dash-pane-... | overleaf/web/frontend/stylesheets/app/sidebar-v2-dash-pane.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/app/sidebar-v2-dash-pane.less",
"repo_id": "overleaf",
"token_count": 342
} | 543 |
//
// Code (inline and block)
// --------------------------------------------------
// Inline and block code styles
code,
kbd,
pre,
samp {
font-family: @font-family-monospace;
}
// Inline code
code {
padding: 2px 4px;
font-size: 90%;
color: @code-color;
background-color: @code-bg;
white-space: nowrap;
b... | overleaf/web/frontend/stylesheets/components/code.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/components/code.less",
"repo_id": "overleaf",
"token_count": 491
} | 544 |
//
// Labels
// --------------------------------------------------
.label {
display: inline;
padding: 0.2em 0.6em 0.3em;
font-size: @labels-font-size;
font-weight: bold;
line-height: 1;
color: @label-color;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: 0.25em;
... | overleaf/web/frontend/stylesheets/components/labels.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/components/labels.less",
"repo_id": "overleaf",
"token_count": 427
} | 545 |
//
// Progress bars
// --------------------------------------------------
// Bar animations
// -------------------------
// WebKit
@-webkit-keyframes progress-bar-stripes {
from {
background-position: 40px 0;
}
to {
background-position: 0 0;
}
}
// Spec and IE10+
@keyframes progress-bar-stripes {
f... | overleaf/web/frontend/stylesheets/components/progress-bars.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/components/progress-bars.less",
"repo_id": "overleaf",
"token_count": 584
} | 546 |
//
// Basic print styles
// --------------------------------------------------
// Source: https://github.com/h5bp/html5-boilerplate/blob/master/css/main.css
@media print {
* {
text-shadow: none !important;
color: #000 !important; // Black prints faster: h5bp.com/s
background: transparent !important;
... | overleaf/web/frontend/stylesheets/core/print.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/core/print.less",
"repo_id": "overleaf",
"token_count": 667
} | 547 |
/*
* Custom webpack loader for i18next locale JSON files.
*
* It extracts translations used in the frontend (based on the list of keys in
* extracted-locales.json), and merges them with the fallback language (English)
*
* This means that we only load minimal translations data used in the frontend.
*/
const fs =... | overleaf/web/frontend/translations-loader.js/0 | {
"file_path": "overleaf/web/frontend/translations-loader.js",
"repo_id": "overleaf",
"token_count": 633
} | 548 |
{
"suggest_new_doc": "Foreslå nytt dokument",
"request_sent_thank_you": "Forespørsel sendt. Takk.",
"suggestion": "Forslag",
"project_url": "Prosjekt URL",
"subject": "Emne",
"confirm": "Bekreft",
"cancel_personal_subscription_first": "Du har allerede et personlig abonnement, vil du at vi skal kansellere ... | overleaf/web/locales/no.json/0 | {
"file_path": "overleaf/web/locales/no.json",
"repo_id": "overleaf",
"token_count": 14799
} | 549 |
/* eslint-disable no-unused-vars */
const Helpers = require('./lib/helpers')
exports.tags = ['server-ce', 'server-pro', 'saas']
const indexes = [
{
key: {
project_id: 1,
},
name: 'project_id_1',
},
]
exports.migrate = async client => {
const { db } = client
await Helpers.addIndexesToColle... | overleaf/web/migrations/20190912145008_create_docs_indexes.js/0 | {
"file_path": "overleaf/web/migrations/20190912145008_create_docs_indexes.js",
"repo_id": "overleaf",
"token_count": 218
} | 550 |
/* eslint-disable no-unused-vars */
const Helpers = require('./lib/helpers')
exports.tags = ['server-ce', 'server-pro', 'saas']
const indexes = [
{
key: {
active: 1,
lastOpened: 1,
},
name: 'active_1_lastOpened_1',
},
{
unique: true,
key: {
'tokens.readOnly': 1,
},
... | overleaf/web/migrations/20190912145024_create_projects_indexes.js/0 | {
"file_path": "overleaf/web/migrations/20190912145024_create_projects_indexes.js",
"repo_id": "overleaf",
"token_count": 1174
} | 551 |
/* eslint-disable no-unused-vars */
exports.tags = ['saas']
const Helpers = require('./lib/helpers')
const indexes = [
{
key: {
'emails.affiliationUnchecked': 1,
},
name: 'affiliationUnchecked_1',
sparse: true,
},
]
exports.migrate = async client => {
const { db } = client
await Helper... | overleaf/web/migrations/20200302143624_users_affiliationUnchecked_index.js/0 | {
"file_path": "overleaf/web/migrations/20200302143624_users_affiliationUnchecked_index.js",
"repo_id": "overleaf",
"token_count": 186
} | 552 |
const { getCollectionNames } = require('../../app/src/infrastructure/mongodb')
async function addIndexesToCollection(collection, indexes) {
return Promise.all(
indexes.map(index => {
index.background = true
return collection.createIndex(index.key, index)
})
)
}
async function dropIndexesFromCo... | overleaf/web/migrations/lib/helpers.js/0 | {
"file_path": "overleaf/web/migrations/lib/helpers.js",
"repo_id": "overleaf",
"token_count": 220
} | 553 |
const RedisWrapper = require('../../../app/src/infrastructure/RedisWrapper')
const rclient = RedisWrapper.client('health_check')
rclient.on('error', err => {
console.error('Cannot connect to redis.')
console.error(err)
process.exit(1)
})
rclient.healthCheck(err => {
if (err) {
console.error('Cannot connect... | overleaf/web/modules/server-ce-scripts/scripts/check-redis.js/0 | {
"file_path": "overleaf/web/modules/server-ce-scripts/scripts/check-redis.js",
"repo_id": "overleaf",
"token_count": 171
} | 554 |
<html>
<body>
<h1>Instructions</h1>
<h2>What is this file?</h2>
This file is used by Atlassian Cloud to verify ownership of your domain name.
<br>
Generated at 2017-02-02 11:42:45 UTC.
<h1>Domain Verification Token</h1>
This token must be found in the page at: <code>https://example.com/atlassian-domain-verification.ht... | overleaf/web/public/atlassian-domain-verification.html/0 | {
"file_path": "overleaf/web/public/atlassian-domain-verification.html",
"repo_id": "overleaf",
"token_count": 196
} | 555 |
const { waitForDb } = require('../app/src/infrastructure/mongodb')
const InstitutionsManager = require('../app/src/Features/Institutions/InstitutionsManager')
const institutionId = parseInt(process.argv[2])
if (isNaN(institutionId)) throw new Error('No institution id')
console.log('Checking users of institution', inst... | overleaf/web/scripts/check_institution_users.js/0 | {
"file_path": "overleaf/web/scripts/check_institution_users.js",
"repo_id": "overleaf",
"token_count": 192
} | 556 |
const SCRIPT_VERSION = 1
const VERBOSE_LOGGING = process.env.VERBOSE_LOGGING === 'true'
const WRITE_CONCURRENCY = parseInt(process.env.WRITE_CONCURRENCY, 10) || 10
const BATCH_SIZE = parseInt(process.env.BATCH_SIZE, 10) || 100
const DRY_RUN = process.env.DRY_RUN !== 'false'
// persist fallback in order to keep batchedU... | overleaf/web/scripts/history/upgrade_v1_without_conversion_if_no_sl_history.js/0 | {
"file_path": "overleaf/web/scripts/history/upgrade_v1_without_conversion_if_no_sl_history.js",
"repo_id": "overleaf",
"token_count": 1073
} | 557 |
const VERBOSE_LOGGING = process.env.VERBOSE_LOGGING === 'true'
const WRITE_CONCURRENCY = parseInt(process.env.WRITE_CONCURRENCY, 10) || 10
const BATCH_SIZE = parseInt(process.env.BATCH_SIZE, 10) || 100
// persist fallback in order to keep batchedUpdate in-sync
process.env.BATCH_SIZE = BATCH_SIZE
const { ReadPreference... | overleaf/web/scripts/regenerate_duplicate_referral_ids.js/0 | {
"file_path": "overleaf/web/scripts/regenerate_duplicate_referral_ids.js",
"repo_id": "overleaf",
"token_count": 1278
} | 558 |
'use strict'
/**
* Run with: node metadata-processor /path/ukamf.xml http://idp/entity/id
*
* `npm install` must be run for scripts/ukamf first.
*
* The ukamf metadata xml file can be downloaded from:
* http://metadata.ukfederation.org.uk/
*
* The entity id should be provided by the university.
*/
const ... | overleaf/web/scripts/ukamf/metadata-processor.js/0 | {
"file_path": "overleaf/web/scripts/ukamf/metadata-processor.js",
"repo_id": "overleaf",
"token_count": 735
} | 559 |
const { exec } = require('child_process')
const { promisify } = require('util')
const { expect } = require('chai')
const logger = require('logger-sharelatex')
const { db, ObjectId } = require('../../../app/src/infrastructure/mongodb')
const User = require('./helpers/User').promises
async function getDeletedFiles(proje... | overleaf/web/test/acceptance/src/BackFillDeletedFilesTests.js/0 | {
"file_path": "overleaf/web/test/acceptance/src/BackFillDeletedFilesTests.js",
"repo_id": "overleaf",
"token_count": 2055
} | 560 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.