text stringlengths 1 2.83M | id stringlengths 16 152 | metadata dict | __index_level_0__ int64 0 949 |
|---|---|---|---|
---
title: Dialog Styles
---
:::note
- In [OnDialogResponse](../callbacks/OnDialogResponse), pressing **button1** sets **response** to **1**, while pressing **button2** sets **response** to **0**.
- Every dialog can have an optional button 2. To make it disappear leave it empty, like in the first example. Players won... | openmultiplayer/web/docs/translations/th/scripting/resources/dialogstyles.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/resources/dialogstyles.md",
"repo_id": "openmultiplayer",
"token_count": 2389
} | 500 |
---
title: Material Text Sizes
description: A list of Material Text Sizes
---
| ID | Value |
| ---------------------------- | ----- |
| OBJECT_MATERIAL_SIZE_32x32 | 10 |
| OBJECT_MATERIAL_SIZE_64x32 | 20 |
| OBJECT_MATERIAL_SIZE_64x64 | 30 |
| OBJECT_MATERIAL_SIZE_128x32 | 40 ... | openmultiplayer/web/docs/translations/th/scripting/resources/materialtextsizes.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/resources/materialtextsizes.md",
"repo_id": "openmultiplayer",
"token_count": 433
} | 501 |
---
title: Starting IDs
description: Everything like objects, players or vehicles use IDs. Some IDs start with 0, others start with 1.
sidebar_label: Starting IDs
---
Everything like objects, players or vehicles use IDs. Some IDs start with 0, others start with 1.
| Type | Starting ID |
| -------... | openmultiplayer/web/docs/translations/th/scripting/resources/startingids.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/resources/startingids.md",
"repo_id": "openmultiplayer",
"token_count": 520
} | 502 |
---
title: การสอน
description: ชุดแบบฝึกหัดที่จะช่วยคุณในการเขียนเกมโหมดและจัดการเซิร์ฟเวอร์ของคุณ
---
ในส่วนนี้คุณจะพบกับชุดแบบฝึกหัดที่จะช่วยคุณในการเขียนเกมโหมดและจัดการเซิร์ฟเวอร์ของคุณ แบบฝึกหัดนี้ไม่มีลำดับเฉพาะ
| openmultiplayer/web/docs/translations/th/tutorials/_.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/tutorials/_.md",
"repo_id": "openmultiplayer",
"token_count": 387
} | 503 |
---
title: OnDialogResponse
description: Bu callback, bir oyuncu ShowPlayerDialog kullanılarak gösterilen bir dialog içerisinde bir butona tıkladığında, ENTER / esc tuşlarına bastığında veya liste dialogu içerisindeki bir seçeneğe çift tıkladığında(bu seçenek için dialog'un stili list olmalıdır) tetiklenir.
tags: []
--... | openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnDialogResponse.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnDialogResponse.md",
"repo_id": "openmultiplayer",
"token_count": 3489
} | 504 |
---
title: OnPlayerEditAttachedObject
description: Bu callback oyuncu üzerine takılan objenin düzenlemesini bitirdiğinde çağrılır.
tags: ["player"]
---
## Açıklama
Bu callback oyuncu üzerine takılan objenin düzenlemesini bitirdiğinde çağrılır.
| Ad | Açıklama ... | openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerEditAttachedObject.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerEditAttachedObject.md",
"repo_id": "openmultiplayer",
"token_count": 2138
} | 505 |
---
title: OnPlayerRequestClass
description: Fonksiyon, bir oyuncu sınıf seçiminde sınıfını değiştirdiğinde (ve sınıf seçimi ilk göründüğünde) çağrılır.
tags: ["player"]
---
## Açıklama
Fonksiyon, bir oyuncu sınıf seçiminde sınıfını değiştirdiğinde (ve sınıf seçimi ilk göründüğünde) çağrılır.
| Parametre | Açıklama ... | openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerRequestClass.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerRequestClass.md",
"repo_id": "openmultiplayer",
"token_count": 627
} | 506 |
---
title: OnUnoccupiedVehicleUpdate
description: Bu fonksiyon, oyuncunun istemcisi sürmediği bir aracın konumunu güncellediğinde / senkronize ettiğinde çağrılır.
tags: ["vehicle"]
---
## Açıklama
Bu fonksiyon, oyuncunun istemcisi sürmediği bir aracın konumunu güncellediğinde / senkronize ettiğinde çağrılır. Bu, arac... | openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnUnoccupiedVehicleUpdate.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnUnoccupiedVehicleUpdate.md",
"repo_id": "openmultiplayer",
"token_count": 1724
} | 507 |
---
title: AddSimpleModelTimed
description: İndirmek için yeni bir basit nesne modeli ekler.
tags: []
---
:::warning
Bu işlev SA-MP 0.3.DL R1'e eklenmiştir ve önceki sürümlerde çalışmayacaktır!
:::
## Açıklama
İndirmek için yeni bir basit nesne modeli ekler. Model dosyaları oynatıcının belgelerinde saklanır. Belge... | openmultiplayer/web/docs/translations/tr/scripting/functions/AddSimpleModelTimed.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/functions/AddSimpleModelTimed.md",
"repo_id": "openmultiplayer",
"token_count": 1438
} | 508 |
---
title: AttachPlayerObjectToVehicle
description: Oyuncu objesini araca bağlama.
tags: ["player", "vehicle"]
---
## Açıklama
Bir oyuncu objesini araca bağlar.
| Parametre | Açıklama |
| ------------- | --------------------------------------------------- |
| playerid ... | openmultiplayer/web/docs/translations/tr/scripting/functions/AttachPlayerObjectToVehicle.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/functions/AttachPlayerObjectToVehicle.md",
"repo_id": "openmultiplayer",
"token_count": 1365
} | 509 |
---
title: CreateMenu
description: Menü oluşturma.
tags: ["menu"]
---
## Açıklama
Menü oluşturma.
| Parametre | Açıklama |
| --------------- | ----------------------------------------------------------------------------------- |
| title... | openmultiplayer/web/docs/translations/tr/scripting/functions/CreateMenu.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/functions/CreateMenu.md",
"repo_id": "openmultiplayer",
"token_count": 1168
} | 510 |
---
title: "Anahtar Kelimeler: Başlatıcılar"
---
## `const`
```c
new const
MY_CONSTANT[] = {1, 2, 3};
```
`const`, geniş çapta kullanılmamakla birlikte, kod tarafından değiştirilemeyen bir değişkeni bildirir. Bu durumun birkaç kullanımı vardır - const dizi parametresine sahip fonksiyonlar bazen daha verimli bir ... | openmultiplayer/web/docs/translations/tr/scripting/language/Initialisers.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/language/Initialisers.md",
"repo_id": "openmultiplayer",
"token_count": 11499
} | 511 |
---
title: "Uzak Konsol (RCON)"
description: Uzak sunucu yönetimi.
---
Uzak Konsol, oyun içinde olmadan ve sunucunuzda RCON komutlarını kullanabileceğiniz bir komut istemidir. 0.3b sürümünden itibaren Uzak Konsol, Sunucu Tarayıcısı'ndan kaldırıldı. Bundan sonra, aşağıda açıklandığı gibi Uzak RCON'a erişmek için başka ... | openmultiplayer/web/docs/translations/tr/server/RemoteConsole.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/server/RemoteConsole.md",
"repo_id": "openmultiplayer",
"token_count": 496
} | 512 |
---
title: OnFilterScriptExit
description: 这个回调函数在卸载某个过滤脚本时调用。只有将被卸载的那个过滤脚本才会调用。
tags: []
---
## 描述
这个回调函数在卸载某个过滤脚本时调用。只有将被卸载的那个过滤脚本才会调用。
## 案例
```c
public OnFilterScriptExit()
{
print("\n--------------------------------------");
print("我的过滤脚本卸载了。");
print("--------------------------------------\n");
... | openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnFilterScriptExit.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnFilterScriptExit.md",
"repo_id": "openmultiplayer",
"token_count": 291
} | 513 |
---
title: OnPlayerClickTextDraw
description: 当玩家点击文本绘制或用Escape键取消选择模式时,这个回调函数被调用。
tags: ["player", "textdraw"]
---
## 描述
当玩家点击文本绘制或用 Escape 键取消选择模式时,这个回调函数被调用。
| 参数名 | 描述 |
| --------- | ---------------------------------------------------------------... | openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerClickTextDraw.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerClickTextDraw.md",
"repo_id": "openmultiplayer",
"token_count": 1197
} | 514 |
---
title: OnPlayerKeyStateChange
description: 当任何受支持的按键的状态发生变化(按下/松开)时,将调用此回调。
tags: ["player"]
---
## 描述
当任何受支持的[按键](../resources/keys)的状态发生变化(按下/松开)时,将调用此回调。
方向键不触发 OnPlayerKeyStateChange(上/下/左/右)。
| 参数名 | 描述 |
| -------- | -----------------------------------... | openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerKeyStateChange.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerKeyStateChange.md",
"repo_id": "openmultiplayer",
"token_count": 6568
} | 515 |
---
title: OnPlayerUpdate
description: 每次客户端/玩家向服务器更新它们的状态时,都会调用这个回调函数。
tags: ["player"]
---
## 描述
每次客户端/玩家向服务器更新它们的状态时,都会调用这个回调函数。
它经常被用于创建客户端更新的自定义回调,这些更新不被服务器主动跟踪,比如生命值或护甲的更新或玩家切换武器。
| 参数名 | 描述 |
| -------- | ------------------------- |
| playerid | 发送更新报文的玩家的 ID。 |
## 返回值
0 - 来自此玩家的更新不会复... | openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerUpdate.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerUpdate.md",
"repo_id": "openmultiplayer",
"token_count": 2293
} | 516 |
---
title: AddCharModel
description: 添加新的自定义角色模型以供下载。
tags: []
---
<VersionWarnCN version='SA-MP 0.3.DL R1' />
## 描述
添加新的自定义角色模型以供下载。模型文件将以 .CRC 格式存储在玩家的 Documents\GTA San Andreas User Files\SAMP\cache 的服务器 IP 和端口的文件夹中。
| 参数名 | 说明 |
|... | openmultiplayer/web/docs/translations/zh-cn/scripting/functions/AddCharModel.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/AddCharModel.md",
"repo_id": "openmultiplayer",
"token_count": 1107
} | 517 |
---
title: Attach3DTextLabelToVehicle
description: 将一个三维文本标签附加到特定的载具上。
tags: ["vehicle", "3dtextlabel"]
---
## 描述
将一个三维文本标签附加到特定的载具上。
| 参数名 | 说明 |
| --------- | ------------------------------------ |
| Text3D:textid | 你想附加的三维文本标签。 |
| vehicleid | 你想把三维文本标签附加在哪个载具上。 |
| ... | openmultiplayer/web/docs/translations/zh-cn/scripting/functions/Attach3DTextLabelToVehicle.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/Attach3DTextLabelToVehicle.md",
"repo_id": "openmultiplayer",
"token_count": 1097
} | 518 |
---
title: GetPlayerCameraUpVector
description: 该函数返回一个向量,它指向玩家视角的正上方,换句话说,它指向屏幕的中上方。
tags: ["player", "camera"]
---
## 描述
该函数返回一个向量,它指向玩家视角的正上方,换句话说,它指向屏幕的中上方。
| 参数名 | 说明 |
| -------- | ----------------------------------- |
| playerid | 要获取视角的上向量的玩家 ID。 |
| Float:x | 通过引用传递,存... | openmultiplayer/web/docs/translations/zh-cn/scripting/functions/GetPlayerCameraUpVector.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/GetPlayerCameraUpVector.md",
"repo_id": "openmultiplayer",
"token_count": 584
} | 519 |
---
title: floatcos
description: 从特定角度求余弦值。
tags: ["math", "floating-point"]
---
<LowercaseNote />
## 描述
从特定角度求余弦值。输入的角度可以是弧度、角度或分数。
| 参数名 | 说明 |
| ----------- | ------------------------------------------------------------- |
| Float:value | 求余弦的角度。 ... | openmultiplayer/web/docs/translations/zh-cn/scripting/functions/floatcos.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/floatcos.md",
"repo_id": "openmultiplayer",
"token_count": 718
} | 520 |
---
title: "Binary"
description: An in depth look at binary and bitwise operators.
---
## Credits
This is from a Tutorial topic in SA-MP Forums. The author is **Kyosaur**.
## What is binary?
Binary is a numeral system that uses two unique symbols to represent numbers. While the more common decimal system uses ten n... | openmultiplayer/web/docs/tutorials/Binary.md/0 | {
"file_path": "openmultiplayer/web/docs/tutorials/Binary.md",
"repo_id": "openmultiplayer",
"token_count": 3538
} | 521 |
# اسئله و اجوبه
<hr />
<h2>ما هو اوبن ام بي؟</h2> اوبن ام بي (اوبن ملتي بلاير) هو مود ملتي بلاير احطياطي لعبه سان اندريس
حيث انها تحل مشاكل سامب و تعمل مع السرفرات فقط و يمكن للعبين سامب اللعب علي هذا المود و سوف يتوافر
كلينت قريبا
<hr />
<h2>هل هذا تقليد؟</h2> لا حيث انه من الصفر ولكن يوجد بعض المشاكل الصعبه:
<ol... | openmultiplayer/web/frontend/content/ar/faq.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/ar/faq.mdx",
"repo_id": "openmultiplayer",
"token_count": 6088
} | 522 |
---
title: Forum i Wiki offline
description: Pitate se zašto su forum SA-MP i Wiki izvan mreže? Pročitajte ovo za informacije i sljedeće korake.
---
# Zašto su Forum i Wiki offline?
25. Septembra 2020, certifikat za forum.sa-mp.com i wiki.sa-mp.com je istekao. Mnogo korisnika je ovo primjetilo i donijelo pitanje na D... | openmultiplayer/web/frontend/content/bs/missing-sites.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/bs/missing-sites.mdx",
"repo_id": "openmultiplayer",
"token_count": 854
} | 523 |
# Open Multiplayer
Een opkomende multiplayer modificatie voor _Grand Theft Auto: San Andreas_ die volledig achterwaarts compatibel zal zijn met de bestaande multiplayer modificatie _San Andreas Multiplayer._
Dit betekent dat **de bestaande SA:MP client en alle bestaande SA:MP scripts zullen werken met open.mp**. Verd... | openmultiplayer/web/frontend/content/nl/index.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/nl/index.mdx",
"repo_id": "openmultiplayer",
"token_count": 242
} | 524 |
# Често постављана питања.
<hr />
## Шта је open.mp?
Open.mp (Open Multiplayer, OMP) је заменски мултиплејер мод за San Andreas, покренут као одговор на све већи број проблема са ажурирањима и вођењем SA:MP-a. Прво издање ће бити тренутна замена само за сервер. Већ постојећи SA:MP клијенти ће моћи да се прикљуће на ... | openmultiplayer/web/frontend/content/sr/faq.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/sr/faq.mdx",
"repo_id": "openmultiplayer",
"token_count": 5612
} | 525 |
---
title: SA-MP Android (Mobile Version)
date: "2021-01-30T12:46:46"
author: Potassium
---
Погляди команди open.mp на SA-MP для Android
Привіт всім!
Ми просто хотіли написати короткий допис у блозі про наші погляди на SA-MP для Android, тому що ми отримували багато коментарів з цього приводу у наших відео на YouTub... | openmultiplayer/web/frontend/content/uk/blog/samp-mobile.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/uk/blog/samp-mobile.mdx",
"repo_id": "openmultiplayer",
"token_count": 1328
} | 526 |
---
title: 2022更新 - 跨平台游戏和beta测试(新年快乐 🎉)
date: "2022-01-01T02:51:00"
author: iAmir
---
嗨,大家好!
自 open.mp 曝光以来,经过为期 3 年的磨炼,通过实验和重写,终于来到了大家的面前。这些年来,我们一直在尝试不同的方法,以找到最适合我们和社区的途径。首先,让我讲一个小小的背景故事会比较好:
我们在 2019 年初启动了 open.mp,并在曝光后获得了大量关注。但我们没能静下心来,而是不得不仓促地开发,这在我们的管理、团队和代码库中引发了一些问题。我们离我们的目标相去甚远。我们的实践是强大的,但同时也是复杂,难以继续的。这使得我们... | openmultiplayer/web/frontend/content/zh-cn/blog/update-2022.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/zh-cn/blog/update-2022.mdx",
"repo_id": "openmultiplayer",
"token_count": 2243
} | 527 |
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 50 50" style="enable-background:new 0 0 50 50... | openmultiplayer/web/frontend/public/images/assets/instagram.svg/0 | {
"file_path": "openmultiplayer/web/frontend/public/images/assets/instagram.svg",
"repo_id": "openmultiplayer",
"token_count": 410
} | 528 |
import { useColorModeValue } from "@chakra-ui/react";
import Link from "next/link";
import { FC, useCallback, useRef, useState } from "react";
import { API_ADDRESS } from "src/config";
import { Hit, SearchResults } from "src/types/_generated_SearchResult";
const noExtension = (path: string) => path.replace(".md", "");... | openmultiplayer/web/frontend/src/components/Search.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/Search.tsx",
"repo_id": "openmultiplayer",
"token_count": 1521
} | 529 |
import {
CheckIcon,
EditIcon,
HamburgerIcon,
NotAllowedIcon,
} from "@chakra-ui/icons";
import {
Box,
Button,
Divider,
Flex,
IconButton,
Heading,
Input,
Menu,
MenuButton,
MenuItem,
MenuList,
Stack,
Stat,
StatLabel,
StatNumber,
} from "@chakra-ui/react";
import { FC, useCallback, us... | openmultiplayer/web/frontend/src/components/member/MemberProfile.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/member/MemberProfile.tsx",
"repo_id": "openmultiplayer",
"token_count": 2522
} | 530 |
import Admonition from "../../../Admonition";
export default function NoteLowercase({ name = "function" }) {
return (
<Admonition type="warning">
<p>Ovo {name} počinje malim slovom.</p>
</Admonition>
);
}
| openmultiplayer/web/frontend/src/components/templates/translations/bs/lowercase-note.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/templates/translations/bs/lowercase-note.tsx",
"repo_id": "openmultiplayer",
"token_count": 86
} | 531 |
import Admonition from "../../../Admonition";
export default function TipNPCCallbacks() {
return (
<Admonition type="tip">
<p>这个回调也可以由NPC调用。</p>
</Admonition>
);
}
| openmultiplayer/web/frontend/src/components/templates/translations/zh-cn/npc-callbacks-tip.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/templates/translations/zh-cn/npc-callbacks-tip.tsx",
"repo_id": "openmultiplayer",
"token_count": 93
} | 532 |
import { Button } from "@chakra-ui/button";
import { useColorModeValue } from "@chakra-ui/color-mode";
import { ArrowForwardIcon } from "@chakra-ui/icons";
import { Box, Flex, Link, Stack, Text } from "@chakra-ui/layout";
import { Divider } from "@chakra-ui/react";
import { Stat, StatLabel, StatNumber } from "@chakra-u... | openmultiplayer/web/frontend/src/pages/servers/[ip].tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/pages/servers/[ip].tsx",
"repo_id": "openmultiplayer",
"token_count": 3524
} | 533 |
import * as z from "zod"
export const HitSchema = z.object({
score: z.number(),
url: z.string(),
title: z.string(),
desc: z.string(),
title_fragment: z.string(),
desc_fragment: z.string(),
})
export type Hit = z.infer<typeof HitSchema>
export const SearchResultsSchema = z.object({
total: z.number(),
t... | openmultiplayer/web/frontend/src/types/_generated_SearchResult.ts/0 | {
"file_path": "openmultiplayer/web/frontend/src/types/_generated_SearchResult.ts",
"repo_id": "openmultiplayer",
"token_count": 155
} | 534 |
4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a/go.mod h1:wfdC5ZjKSPr7CybKEcgJhUOgeAQW1+7WcyK8OvUilfo=
bitbucket.org/creachadair/shell v0.0.6/go.mod h1:8Qqi/cYk7vPnsOePHroKXDJYmb5x7ENhtiFtfZq8K+M=
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0... | openmultiplayer/web/go.sum/0 | {
"file_path": "openmultiplayer/web/go.sum",
"repo_id": "openmultiplayer",
"token_count": 84511
} | 535 |
package web
import (
"encoding/json"
"net/http"
"github.com/gorilla/schema"
"github.com/pkg/errors"
)
var decoder = schema.NewDecoder()
func DecodeBody(r *http.Request, v interface{}) error {
switch r.Header.Get("Content-Type") {
case "application/json":
return json.NewDecoder(r.Body).Decode(v)
case "appl... | openmultiplayer/web/internal/web/payload.go/0 | {
"file_path": "openmultiplayer/web/internal/web/payload.go",
"repo_id": "openmultiplayer",
"token_count": 225
} | 536 |
-- AlterTable
ALTER TABLE "User" ADD COLUMN "lastActive" TIMESTAMP(3);
| openmultiplayer/web/prisma/migrations/20231022180059_add_lastactive_field/migration.sql/0 | {
"file_path": "openmultiplayer/web/prisma/migrations/20231022180059_add_lastactive_field/migration.sql",
"repo_id": "openmultiplayer",
"token_count": 29
} | 537 |
# the base image is suitable for running web with /app bind mounted
FROM node:12.22.3 as base
WORKDIR /app
# install_deps changes app files and installs npm packages
# as such it has to run at a later stage
RUN apt-get update \
&& apt-get install -y parallel \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /app/node_mo... | overleaf/web/Dockerfile/0 | {
"file_path": "overleaf/web/Dockerfile",
"repo_id": "overleaf",
"token_count": 450
} | 538 |
const Settings = require('@overleaf/settings')
const { User } = require('../../models/User')
const { db, ObjectId } = require('../../infrastructure/mongodb')
const bcrypt = require('bcrypt')
const EmailHelper = require('../Helpers/EmailHelper')
const {
InvalidEmailError,
InvalidPasswordError,
} = require('./Authent... | overleaf/web/app/src/Features/Authentication/AuthenticationManager.js/0 | {
"file_path": "overleaf/web/app/src/Features/Authentication/AuthenticationManager.js",
"repo_id": "overleaf",
"token_count": 2694
} | 539 |
const { callbackify } = require('util')
const OError = require('@overleaf/o-error')
const { Project } = require('../../models/Project')
const ProjectGetter = require('../Project/ProjectGetter')
const ProjectHelper = require('../Project/ProjectHelper')
const logger = require('logger-sharelatex')
const ContactManager = r... | overleaf/web/app/src/Features/Collaborators/CollaboratorsHandler.js/0 | {
"file_path": "overleaf/web/app/src/Features/Collaborators/CollaboratorsHandler.js",
"repo_id": "overleaf",
"token_count": 2853
} | 540 |
/* 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/Docstore/DocstoreManager.js/0 | {
"file_path": "overleaf/web/app/src/Features/Docstore/DocstoreManager.js",
"repo_id": "overleaf",
"token_count": 4021
} | 541 |
const { callbackify } = require('util')
const logger = require('logger-sharelatex')
const metrics = require('@overleaf/metrics')
const Settings = require('@overleaf/settings')
const nodemailer = require('nodemailer')
const sesTransport = require('nodemailer-ses-transport')
const mandrillTransport = require('nodemailer-... | overleaf/web/app/src/Features/Email/EmailSender.js/0 | {
"file_path": "overleaf/web/app/src/Features/Email/EmailSender.js",
"repo_id": "overleaf",
"token_count": 1313
} | 542 |
const OError = require('@overleaf/o-error')
const { ObjectId } = require('mongodb')
const { ObjectId: MongooseObjectId } = require('mongoose').mongo
function _getObjectIdInstance(id) {
if (typeof id === 'string') {
return ObjectId(id)
} else if (id instanceof ObjectId) {
return id
} else if (id instanceo... | overleaf/web/app/src/Features/Helpers/Mongo.js/0 | {
"file_path": "overleaf/web/app/src/Features/Helpers/Mongo.js",
"repo_id": "overleaf",
"token_count": 432
} | 543 |
/* 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:
* DS101: Remove unnecessary use of Array.from
* DS102: Remove unnecessary code created because of implicit returns
* DS... | overleaf/web/app/src/Features/LinkedFiles/LinkedFilesController.js/0 | {
"file_path": "overleaf/web/app/src/Features/LinkedFiles/LinkedFilesController.js",
"repo_id": "overleaf",
"token_count": 2444
} | 544 |
const PasswordResetController = require('./PasswordResetController')
const AuthenticationController = require('../Authentication/AuthenticationController')
const CaptchaMiddleware = require('../../Features/Captcha/CaptchaMiddleware')
const RateLimiterMiddleware = require('../Security/RateLimiterMiddleware')
const { Joi... | overleaf/web/app/src/Features/PasswordReset/PasswordResetRouter.js/0 | {
"file_path": "overleaf/web/app/src/Features/PasswordReset/PasswordResetRouter.js",
"repo_id": "overleaf",
"token_count": 718
} | 545 |
const { ObjectId } = require('mongodb')
const _ = require('lodash')
const { promisify } = require('util')
const Settings = require('@overleaf/settings')
const ENGINE_TO_COMPILER_MAP = {
latex_dvipdf: 'latex',
pdflatex: 'pdflatex',
xelatex: 'xelatex',
lualatex: 'lualatex',
}
module.exports = {
compilerFromV1... | overleaf/web/app/src/Features/Project/ProjectHelper.js/0 | {
"file_path": "overleaf/web/app/src/Features/Project/ProjectHelper.js",
"repo_id": "overleaf",
"token_count": 1605
} | 546 |
const RateLimiter = require('../../infrastructure/RateLimiter')
const { promisifyAll } = require('../../util/promises')
const ONE_MIN = 60
const ATTEMPT_LIMIT = 10
function processLoginRequest(email, callback) {
const opts = {
endpointName: 'login',
throttle: ATTEMPT_LIMIT,
timeInterval: ONE_MIN * 2,
... | overleaf/web/app/src/Features/Security/LoginRateLimiter.js/0 | {
"file_path": "overleaf/web/app/src/Features/Security/LoginRateLimiter.js",
"repo_id": "overleaf",
"token_count": 257
} | 547 |
const Settings = require('@overleaf/settings')
const fs = require('fs')
const Path = require('path')
// The groups.json file encodes the various group plan options we provide, and
// is used in the app the render the appropriate dialog in the plans page, and
// to generate the appropriate entries in the Settings.plans... | overleaf/web/app/src/Features/Subscription/GroupPlansData.js/0 | {
"file_path": "overleaf/web/app/src/Features/Subscription/GroupPlansData.js",
"repo_id": "overleaf",
"token_count": 723
} | 548 |
/* 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/Subscription/TeamInvitesController.js/0 | {
"file_path": "overleaf/web/app/src/Features/Subscription/TeamInvitesController.js",
"repo_id": "overleaf",
"token_count": 1826
} | 549 |
const UpdateMerger = require('./UpdateMerger')
const logger = require('logger-sharelatex')
const NotificationsBuilder = require('../Notifications/NotificationsBuilder')
const ProjectCreationHandler = require('../Project/ProjectCreationHandler')
const ProjectDeleter = require('../Project/ProjectDeleter')
const ProjectGe... | overleaf/web/app/src/Features/ThirdPartyDataStore/TpdsUpdateHandler.js/0 | {
"file_path": "overleaf/web/app/src/Features/ThirdPartyDataStore/TpdsUpdateHandler.js",
"repo_id": "overleaf",
"token_count": 2021
} | 550 |
const UserHandler = require('./UserHandler')
const UserDeleter = require('./UserDeleter')
const UserGetter = require('./UserGetter')
const { User } = require('../../models/User')
const NewsletterManager = require('../Newsletter/NewsletterManager')
const UserRegistrationHandler = require('./UserRegistrationHandler')
con... | overleaf/web/app/src/Features/User/UserController.js/0 | {
"file_path": "overleaf/web/app/src/Features/User/UserController.js",
"repo_id": "overleaf",
"token_count": 6354
} | 551 |
const UserMembershipAuthorization = {
hasStaffAccess(requiredStaffAccess) {
return req => {
if (!req.user) {
return false
}
if (req.user.isAdmin) {
return true
}
return (
requiredStaffAccess &&
req.user.staffAccess &&
req.user.staffAccess[requi... | overleaf/web/app/src/Features/UserMembership/UserMembershipAuthorization.js/0 | {
"file_path": "overleaf/web/app/src/Features/UserMembership/UserMembershipAuthorization.js",
"repo_id": "overleaf",
"token_count": 280
} | 552 |
const request = require('request')
const settings = require('@overleaf/settings')
const _ = require('underscore')
const logger = require('logger-sharelatex')
const URL = require('url')
const { promisify, promisifyMultiResult } = require('../util/promises')
const currencyMappings = {
GB: 'GBP',
US: 'USD',
CH: 'CH... | overleaf/web/app/src/infrastructure/GeoIpLookup.js/0 | {
"file_path": "overleaf/web/app/src/infrastructure/GeoIpLookup.js",
"repo_id": "overleaf",
"token_count": 830
} | 553 |
const Path = require('path')
const express = require('express')
const Settings = require('@overleaf/settings')
const logger = require('logger-sharelatex')
const metrics = require('@overleaf/metrics')
const expressLocals = require('./ExpressLocals')
const Validation = require('./Validation')
const csp = require('./CSP')... | overleaf/web/app/src/infrastructure/Server.js/0 | {
"file_path": "overleaf/web/app/src/infrastructure/Server.js",
"repo_id": "overleaf",
"token_count": 2850
} | 554 |
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 InstitutionSchema = new Schema({
v1Id: { type: Number, required: true },
... | overleaf/web/app/src/models/Institution.js/0 | {
"file_path": "overleaf/web/app/src/models/Institution.js",
"repo_id": "overleaf",
"token_count": 510
} | 555 |
const AdminController = require('./Features/ServerAdmin/AdminController')
const ErrorController = require('./Features/Errors/ErrorController')
const ProjectController = require('./Features/Project/ProjectController')
const ProjectApiController = require('./Features/Project/ProjectApiController')
const SpellingControlle... | overleaf/web/app/src/router.js/0 | {
"file_path": "overleaf/web/app/src/router.js",
"repo_id": "overleaf",
"token_count": 13062
} | 556 |
extends ../layout
block content
.content.content-alt
.container
.row
.col-md-12
.card(ng-controller="RegisterUsersController")
.page-header
h1 Register New Users
form.form
.row
.col-md-4.col-xs-8
input.form-control(
name="email",
type="text",
... | overleaf/web/app/views/admin/register.pug/0 | {
"file_path": "overleaf/web/app/views/admin/register.pug",
"repo_id": "overleaf",
"token_count": 628
} | 557 |
div.binary-file.full-size(
ng-controller="BinaryFileController"
ng-show="ui.view == 'file'"
ng-if="openFile"
)
include ./binary-file-header
img(
ng-show="!failedLoad"
ng-src="/project/{{ project_id }}/file/{{ openFile.id }}"
ng-if="isImageFile()"
ng-class="{'img-preview': !imgLoaded}"
onerror="sl_binar... | overleaf/web/app/views/project/editor/binary-file.pug/0 | {
"file_path": "overleaf/web/app/views/project/editor/binary-file.pug",
"repo_id": "overleaf",
"token_count": 487
} | 558 |
aside#left-menu.full-size(
ng-class="{ 'shown': ui.leftMenuShown }"
ng-cloak
)
h4 #{translate("download")}
ul.list-unstyled.nav.nav-downloads.text-center
li
a(
ng-href="/project/{{project_id}}/download/zip"
target="_blank"
)
i.fa.fa-file-archive-o.fa-2x
br
| #{translate("source")}
li
... | overleaf/web/app/views/project/editor/left-menu.pug/0 | {
"file_path": "overleaf/web/app/views/project/editor/left-menu.pug",
"repo_id": "overleaf",
"token_count": 4173
} | 559 |
.dropdown(
dropdown
dropdown-append-to-body
)
a.btn.btn-primary.sidebar-new-proj-btn.dropdown-toggle(
href="#",
data-toggle="dropdown",
dropdown-toggle
)
| #{translate("new_project")}
ul.dropdown-menu(role="menu")
li
a(
href,
ng-click="openCreateProjectModal()"
) #{translate("blank_project... | overleaf/web/app/views/project/list/side-bar.pug/0 | {
"file_path": "overleaf/web/app/views/project/list/side-bar.pug",
"repo_id": "overleaf",
"token_count": 2078
} | 560 |
each publisher in managedPublishers
p
| You are a manager of
|
strong(ng-non-bindable)= publisher.name
p
a(href="/publishers/" + publisher.slug + "/hub")
i.fa.fa-fw.fa-user-circle
|
| View hub
p
a(href="/manage/publishers/" + publisher.slug + "/managers")
i.fa.fa-fw.fa-users
|
... | overleaf/web/app/views/subscriptions/dashboard/_managed_publishers.pug/0 | {
"file_path": "overleaf/web/app/views/subscriptions/dashboard/_managed_publishers.pug",
"repo_id": "overleaf",
"token_count": 157
} | 561 |
extends ../layout
block vars
- metadata = { viewport: true }
block content
main.content.content-alt#main-content
.container
.row
.col-md-6.col-md-offset-3.col-lg-4.col-lg-offset-4
.card
.page-header
h1 #{translate("log_in")}
form(async-form="login", name="loginForm", action='/login'... | overleaf/web/app/views/user/login.pug/0 | {
"file_path": "overleaf/web/app/views/user/login.pug",
"repo_id": "overleaf",
"token_count": 753
} | 562 |
#!/bin/bash
set -e
function upload_with_content_type() {
content_type=$1
bucket=$2
shift 2
content_type_options=""
if [[ "$content_type" != "-" ]]; then
content_type_options="-h Content-Type:${content_type};charset=utf-8"
fi
# DOCS for gsutil -- it does not have long command line flags!
## global ... | overleaf/web/bin/cdn_upload/0 | {
"file_path": "overleaf/web/bin/cdn_upload",
"repo_id": "overleaf",
"token_count": 640
} | 563 |
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'),
url('open-sans-v17-latin-300.woff2') format('woff2'),
url('open-sans-v17-latin-300.woff') format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
... | overleaf/web/frontend/fonts/open-sans.css/0 | {
"file_path": "overleaf/web/frontend/fonts/open-sans.css",
"repo_id": "overleaf",
"token_count": 438
} | 564 |
// 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/maxHeight.js/0 | {
"file_path": "overleaf/web/frontend/js/directives/maxHeight.js",
"repo_id": "overleaf",
"token_count": 207
} | 565 |
const TIMESTAMP_GROUP_SIZE = 5 * 60 * 1000 // 5 minutes
export function appendMessage(messageList, message) {
const lastMessage = messageList[messageList.length - 1]
const shouldGroup =
lastMessage &&
message &&
message.user &&
message.user.id &&
message.user.id === lastMessage.user.id &&
... | overleaf/web/frontend/js/features/chat/utils/message-list-appender.js/0 | {
"file_path": "overleaf/web/frontend/js/features/chat/utils/message-list-appender.js",
"repo_id": "overleaf",
"token_count": 683
} | 566 |
import PropTypes from 'prop-types'
import classNames from 'classnames'
import { useTranslation } from 'react-i18next'
function TrackChangesToggleButton({ trackChangesIsOpen, disabled, onClick }) {
const { t } = useTranslation()
const classes = classNames('btn', 'btn-full-height', {
active: trackChangesIsOpen &... | overleaf/web/frontend/js/features/editor-navigation-toolbar/components/track-changes-toggle-button.js/0 | {
"file_path": "overleaf/web/frontend/js/features/editor-navigation-toolbar/components/track-changes-toggle-button.js",
"repo_id": "overleaf",
"token_count": 310
} | 567 |
import { useRef } from 'react'
import PropTypes from 'prop-types'
import { useDragLayer } from 'react-dnd'
import classNames from 'classnames'
// a custom component rendered on top of a draggable area that renders the
// dragged item. See
// https://react-dnd.github.io/react-dnd/examples/drag-around/custom-drag-layer
... | overleaf/web/frontend/js/features/file-tree/components/file-tree-draggable-preview-layer.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/components/file-tree-draggable-preview-layer.js",
"repo_id": "overleaf",
"token_count": 696
} | 568 |
import { createContext, useContext, useMemo, useReducer } from 'react'
import { isCleanFilename } from '../util/safe-path'
import PropTypes from 'prop-types'
const FileTreeCreateNameContext = createContext()
export const useFileTreeCreateName = () => {
const context = useContext(FileTreeCreateNameContext)
if (!c... | overleaf/web/frontend/js/features/file-tree/contexts/file-tree-create-name.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/contexts/file-tree-create-name.js",
"repo_id": "overleaf",
"token_count": 424
} | 569 |
import { findInTreeOrThrow } from './find-in-tree'
export function renameInTree(tree, id, { newName }) {
return mutateInTree(tree, id, (parent, entity, index) => {
const newParent = Object.assign([], parent)
const newEntity = {
...entity,
name: newName,
}
newParent[index] = newEntity
... | overleaf/web/frontend/js/features/file-tree/util/mutate-in-tree.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/util/mutate-in-tree.js",
"repo_id": "overleaf",
"token_count": 767
} | 570 |
const COMMAND_LEVELS = {
book: 10,
part: 20,
addpart: 20,
chapter: 30,
addchap: 30,
section: 40,
addsect: 40,
subsection: 50,
subsubsection: 60,
paragraph: 70,
subparagraph: 80,
}
/*
*
* RegExp matcher parts:
*
* REGEX_START: begining of line, any number of spaces, double \ (required)
* REGE... | overleaf/web/frontend/js/features/outline/outline-parser.js/0 | {
"file_path": "overleaf/web/frontend/js/features/outline/outline-parser.js",
"repo_id": "overleaf",
"token_count": 1336
} | 571 |
import { useCallback, useState } from 'react'
import PropTypes from 'prop-types'
import { Button, Col, OverlayTrigger, Row, Tooltip } from 'react-bootstrap'
import { Trans } from 'react-i18next'
import Icon from '../../../shared/components/icon'
import { useShareProjectContext } from './share-project-modal'
import { se... | overleaf/web/frontend/js/features/share-project-modal/components/link-sharing.js/0 | {
"file_path": "overleaf/web/frontend/js/features/share-project-modal/components/link-sharing.js",
"repo_id": "overleaf",
"token_count": 3006
} | 572 |
import { TabPanels, TabPanel } from '@reach/tabs'
import { useTranslation } from 'react-i18next'
import PropTypes from 'prop-types'
import SymbolPaletteItems from './symbol-palette-items'
export default function SymbolPaletteBody({
categories,
categorisedSymbols,
filteredSymbols,
handleSelect,
focusInput,
})... | overleaf/web/frontend/js/features/symbol-palette/components/symbol-palette-body.js/0 | {
"file_path": "overleaf/web/frontend/js/features/symbol-palette/components/symbol-palette-body.js",
"repo_id": "overleaf",
"token_count": 718
} | 573 |
// 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/filters/formatDate.js/0 | {
"file_path": "overleaf/web/frontend/js/filters/formatDate.js",
"repo_id": "overleaf",
"token_count": 481
} | 574 |
/* global io */
class SocketShimBase {
static connect(url, options) {
return new SocketShimBase()
}
constructor(socket) {
this._socket = socket
}
}
const transparentMethods = [
'connect',
'disconnect',
'emit',
'on',
'removeListener',
]
for (const method of transparentMethods) {
SocketShimB... | overleaf/web/frontend/js/ide/connection/SocketIoShim.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/connection/SocketIoShim.js",
"repo_id": "overleaf",
"token_count": 2172
} | 575 |
/* eslint-disable
max-len,
*/
// 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
* Full docs: https://github.com/decaffe... | overleaf/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/PackageManager.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/PackageManager.js",
"repo_id": "overleaf",
"token_count": 1077
} | 576 |
import App from '../../../base'
import iconTypeFromName from '../util/iconTypeFromName'
App.controller(
'FileTreeEntityController',
function ($scope, ide, $modal, $element) {
$scope.MAX_DEPTH = 8
$scope.select = function (e) {
if (e.ctrlKey || e.metaKey) {
e.stopPropagation()
const in... | overleaf/web/frontend/js/ide/file-tree/controllers/FileTreeEntityController.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/file-tree/controllers/FileTreeEntityController.js",
"repo_id": "overleaf",
"token_count": 706
} | 577 |
/* eslint-disable
camelcase,
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/deca... | overleaf/web/frontend/js/ide/history/controllers/HistoryDiffController.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/history/controllers/HistoryDiffController.js",
"repo_id": "overleaf",
"token_count": 812
} | 578 |
/* 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
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/mas... | overleaf/web/frontend/js/ide/metadata/MetadataManager.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/metadata/MetadataManager.js",
"repo_id": "overleaf",
"token_count": 294
} | 579 |
import _ from 'lodash'
/* eslint-disable
node/handle-callback-err,
max-len,
new-cap,
no-return-assign,
no-sequences,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS101: Remove unnecessary us... | overleaf/web/frontend/js/ide/pdfng/directives/pdfViewer.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/pdfng/directives/pdfViewer.js",
"repo_id": "overleaf",
"token_count": 12336
} | 580 |
import _ from 'lodash'
/* 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
* DS205: Consider reworking code to avoid... | overleaf/web/frontend/js/ide/review-panel/directives/resolvedCommentsDropdown.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/review-panel/directives/resolvedCommentsDropdown.js",
"repo_id": "overleaf",
"token_count": 1453
} | 581 |
// fetch wrapper to make simple JSON requests:
// - send the CSRF token in the request
// - set the JSON content-type in the request headers
// - throw errors on non-ok response
// - parse JSON response body, unless response is empty
import OError from '@overleaf/o-error'
/**
* @typedef {Object} FetchOptions
* @exte... | overleaf/web/frontend/js/infrastructure/fetch-json.js/0 | {
"file_path": "overleaf/web/frontend/js/infrastructure/fetch-json.js",
"repo_id": "overleaf",
"token_count": 1795
} | 582 |
/* 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/main/bonus.js/0 | {
"file_path": "overleaf/web/frontend/js/main/bonus.js",
"repo_id": "overleaf",
"token_count": 252
} | 583 |
/* eslint-disable
camelcase
*/
import App from '../../../base'
export default App.service('ProjectListService', function () {
return {
getOwnerName(project) {
if (project.accessLevel === 'owner') {
return 'You'
} else if (project.owner != null) {
return this.getUserName(project.ow... | overleaf/web/frontend/js/main/project-list/services/project-list.js/0 | {
"file_path": "overleaf/web/frontend/js/main/project-list/services/project-list.js",
"repo_id": "overleaf",
"token_count": 387
} | 584 |
import _ from 'lodash'
import App from '../base'
import AlgoliaSearch from 'algoliasearch'
import getMeta from '../utils/meta'
export default App.factory('algoliaSearch', function () {
let wikiIdx
const algoliaConfig = getMeta('ol-algolia')
const wikiIndex = _.get(algoliaConfig, 'indexes.wiki')
if (wikiIndex) ... | overleaf/web/frontend/js/services/algolia-search.js/0 | {
"file_path": "overleaf/web/frontend/js/services/algolia-search.js",
"repo_id": "overleaf",
"token_count": 194
} | 585 |
import {
createContext,
useCallback,
useContext,
useEffect,
useMemo,
} from 'react'
import PropTypes from 'prop-types'
import useScopeValue from './util/scope-value-hook'
import useBrowserWindow from '../hooks/use-browser-window'
import { useIdeContext } from './ide-context'
import { useProjectContext } from ... | overleaf/web/frontend/js/shared/context/editor-context.js/0 | {
"file_path": "overleaf/web/frontend/js/shared/context/editor-context.js",
"repo_id": "overleaf",
"token_count": 1764
} | 586 |
import md5 from 'crypto-js/md5'
const ANONYMOUS_HUE = 100
const OWN_HUE = 200 // We will always appear as this color to ourselves
const OWN_HUE_BLOCKED_SIZE = 20 // no other user should have a HUE in this range
const TOTAL_HUES = 360 // actually 361, but 360 for legacy reasons
export function getHueForUserId(userId, ... | overleaf/web/frontend/js/shared/utils/colors.js/0 | {
"file_path": "overleaf/web/frontend/js/shared/utils/colors.js",
"repo_id": "overleaf",
"token_count": 424
} | 587 |
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
... | overleaf/web/frontend/js/vendor/libs/pdfjs-dist/build/LICENSE/0 | {
"file_path": "overleaf/web/frontend/js/vendor/libs/pdfjs-dist/build/LICENSE",
"repo_id": "overleaf",
"token_count": 2856
} | 588 |
import { v4 as uuid } from 'uuid'
import { ContextRoot } from '../js/shared/context/root-context'
import ChatPane from '../js/features/chat/components/chat-pane'
import { stubMathJax } from '../../test/frontend/features/chat/components/stubs'
import { setupContext } from './fixtures/context'
import useFetchMock from '... | overleaf/web/frontend/stories/chat.stories.js/0 | {
"file_path": "overleaf/web/frontend/stories/chat.stories.js",
"repo_id": "overleaf",
"token_count": 807
} | 589 |
import {
ModalFooterDecorator,
ModalContentDecorator,
} from '../modal-decorators'
import { FileTreeModalCreateFileFooterContent } from '../../../js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-footer'
export const Valid = args => <FileTreeModalCreateFileFooterContent {...args} />
ex... | overleaf/web/frontend/stories/modals/create-file/create-file-modal-footer.stories.js/0 | {
"file_path": "overleaf/web/frontend/stories/modals/create-file/create-file-modal-footer.stories.js",
"repo_id": "overleaf",
"token_count": 501
} | 590 |
@import 'app/sidebar-v2-dash-pane.less';
@import 'app/front-chat-widget.less';
@import 'app/ol-chat.less';
@import 'app/templates-v2.less';
@import 'app/login-register.less';
@import 'app/review-features-page.less';
@import 'app/institution-hub.less';
@import 'app/publisher-hub.less';
@import 'app/admin-hub.less';
@imp... | overleaf/web/frontend/stylesheets/_ol_style_includes.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/_ol_style_includes.less",
"repo_id": "overleaf",
"token_count": 156
} | 591 |
.fake-full-width-bg(@bg-color) {
&::before {
content: '\00a0';
position: absolute;
width: 100%;
right: 100%;
background-color: @bg-color;
}
}
.editor-sidebar {
display: flex;
flex-direction: column;
background-color: @file-tree-bg;
}
.file-tree {
display: flex !important; // To work ar... | overleaf/web/frontend/stylesheets/app/editor/file-tree.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/app/editor/file-tree.less",
"repo_id": "overleaf",
"token_count": 5135
} | 592 |
.symbol-palette-container {
height: 100%;
}
.symbol-palette {
display: flex;
flex-direction: column;
background: @symbol-palette-bg;
color: @symbol-palette-color;
width: 100%;
height: 100%;
}
.symbol-palette-header {
flex-shrink: 0;
display: flex;
flex-wrap: wrap;
justify-content: space-between;... | overleaf/web/frontend/stylesheets/app/editor/symbol-palette.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/app/editor/symbol-palette.less",
"repo_id": "overleaf",
"token_count": 854
} | 593 |
.plans {
p {
color: @gray-dark;
margin-bottom: @line-height-computed;
}
.best-value {
color: @brand-secondary;
line-height: @line-height-computed;
text-transform: capitalize;
}
blockquote {
footer {
/* accessibility fix */
color: @gray-med;
}
}
.btn-header {
fon... | overleaf/web/frontend/stylesheets/app/plans.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/app/plans.less",
"repo_id": "overleaf",
"token_count": 4303
} | 594 |
.info-badge,
.beta-badge {
display: inline-block;
width: @line-height-computed * 0.75;
height: @line-height-computed * 0.75;
line-height: @line-height-computed * 0.75;
text-align: center;
color: #fff;
&:hover,
&:focus {
color: #fff;
text-decoration: none;
}
}
.info-badge {
background-color... | overleaf/web/frontend/stylesheets/components/beta-badges.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/components/beta-badges.less",
"repo_id": "overleaf",
"token_count": 299
} | 595 |
.hover-container {
.show-on-hover {
display: none;
}
&:hover {
.show-on-hover {
display: initial;
}
}
}
| overleaf/web/frontend/stylesheets/components/hover.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/components/hover.less",
"repo_id": "overleaf",
"token_count": 63
} | 596 |
/* nvd3 version 1.8.4 (https://github.com/novus/nvd3) 2016-07-03 */
.nvd3 .nv-axis {
pointer-events: none;
opacity: 1;
}
.nvd3 .nv-axis path {
fill: none;
stroke: #000;
stroke-opacity: 0.75;
shape-rendering: crispEdges;
}
.nvd3 .nv-axis path.domain {
stroke-opacity: 0.75;
}
.nvd3 .nv-axis.nv-x path.dom... | overleaf/web/frontend/stylesheets/components/nvd3.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/components/nvd3.less",
"repo_id": "overleaf",
"token_count": 5505
} | 597 |
//
// Wells
// --------------------------------------------------
// Base class
.well {
min-height: 20px;
padding: 19px;
margin-bottom: 20px;
background-color: @well-bg;
border: 1px solid @well-border;
border-radius: @border-radius-base;
.box-shadow(inset 0 1px 1px rgba(0, 0, 0, 0.05));
blockquote {
... | overleaf/web/frontend/stylesheets/components/wells.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/components/wells.less",
"repo_id": "overleaf",
"token_count": 212
} | 598 |
.CodeMirror-dialog {
position: absolute;
left: 0; right: 0;
background: inherit;
z-index: 15;
padding: .1em .8em;
overflow: hidden;
color: inherit;
}
.CodeMirror-dialog-top {
border-bottom: 1px solid #eee;
top: 0;
}
.CodeMirror-dialog-bottom {
border-top: 1px solid #eee;
bottom: 0;
}
.CodeMirro... | overleaf/web/frontend/stylesheets/vendor/codemirror-dialog.css/0 | {
"file_path": "overleaf/web/frontend/stylesheets/vendor/codemirror-dialog.css",
"repo_id": "overleaf",
"token_count": 204
} | 599 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.