text
stringlengths
1
2.83M
id
stringlengths
16
152
metadata
dict
__index_level_0__
int64
0
949
When searching for records on same field Odoo joins multiple queries with OR. For example: * Perform a search for customer "John" on field Name * Odoo displays customers containing "John" * Search for "Smith" on same field Name * Odoo displays customers containing "John" OR "Smith" With this module installed you can press Shift key before searching for "Smith" and Odoo finds customers containing "John" AND "Smith"
OCA/web/web_search_with_and/readme/DESCRIPTION.rst/0
{ "file_path": "OCA/web/web_search_with_and/readme/DESCRIPTION.rst", "repo_id": "OCA", "token_count": 100 }
89
==================== Web Sheet Full Width ==================== .. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:dca42879af8282b84a007a91f937d351da9b64987b9bd319c1940815128609e6 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status :alt: Beta .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github :target: https://github.com/OCA/web/tree/16.0/web_sheet_full_width :alt: OCA/web .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png :target: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_sheet_full_width :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png :target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=16.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| This module was written to extend the functionality of the web client to get full width in the form view sheet. This module works in community edition and in enterprise edition. This module feature and many other features and improvements to the web backend are included in `web_responsive module <https://github.com/OCA/web/tree/13.0/web_responsive>`_. Before installing this module, please consider Web Responsive as a better alternative. **Table of contents** .. contents:: :local: Bug Tracker =========== Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed `feedback <https://github.com/OCA/web/issues/new?body=module:%20web_sheet_full_width%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. Do not contact contributors directly about support or help with technical issues. Credits ======= Authors ~~~~~~~ * Therp BV * Sudokeys * GRAP * Métal Sartigan Contributors ~~~~~~~~~~~~ * Holger Brunn <hbrunn@therp.nl> * Nicolas JEUDY - Sudokeys (https://github.com/njeudy) * Stephane (SOLIBRE) <stephane@omerp.net> * Sylvain LE GAL (https://twitter.com/legalsylvain) * Jérôme Thériault <jtheriault@metalsartigan.com> * Lois Rilo <lois.rilo@forgeflow.com> Maintainers ~~~~~~~~~~~ This module is maintained by the OCA. .. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association :target: https://odoo-community.org OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. This module is part of the `OCA/web <https://github.com/OCA/web/tree/16.0/web_sheet_full_width>`_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
OCA/web/web_sheet_full_width/README.rst/0
{ "file_path": "OCA/web/web_sheet_full_width/README.rst", "repo_id": "OCA", "token_count": 1194 }
90
# Translation of Odoo Server. # This file contains the translation of the following modules: # * web_timeline # msgid "" msgstr "" "Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2020-10-19 08:08+0000\n" "Last-Translator: Yves Goldberg <admin@ygol.com>\n" "Language-Team: none\n" "Language: he\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=4; plural=(n == 1) ? 0 : ((n == 2) ? 1 : ((n > 10 && " "n % 10 == 0) ? 2 : 3));\n" "X-Generator: Weblate 3.10\n" #. module: web_timeline #. odoo-javascript #: code:addons/web_timeline/static/src/js/timeline_renderer.js:0 #, python-format msgid "<b>UNASSIGNED</b>" msgstr "<b>לא הוקצה</b>" #. module: web_timeline #. odoo-javascript #: code:addons/web_timeline/static/src/js/timeline_controller.esm.js:0 #, python-format msgid "Are you sure you want to delete this record?" msgstr "האם אתה בטוח שברצונך למחוק רשומה זו?" #. module: web_timeline #. odoo-javascript #: code:addons/web_timeline/static/src/xml/web_timeline.xml:0 #, python-format msgid "Day" msgstr "יְוֹם" #. module: web_timeline #. odoo-javascript #: code:addons/web_timeline/static/src/xml/web_timeline.xml:0 #, python-format msgid "Month" msgstr "חודש" #. module: web_timeline #. odoo-javascript #: code:addons/web_timeline/static/src/js/timeline_renderer.js:0 #, python-format msgid "Template \"timeline-item\" not present in timeline view definition." msgstr "התבנית \"ציר זמן-פריט\" אינה קיימת בהגדרת תצוגת ציר הזמן." #. module: web_timeline #. odoo-javascript #: code:addons/web_timeline/static/src/js/timeline_view.js:0 #: model:ir.model.fields.selection,name:web_timeline.selection__ir_ui_view__type__timeline #, python-format msgid "Timeline" msgstr "ציר זמן" #. module: web_timeline #. odoo-javascript #: code:addons/web_timeline/static/src/js/timeline_renderer.js:0 #, python-format msgid "Timeline view has not defined 'date_start' attribute." msgstr "בתצוגת ציר הזמן לא הוגדרה תכונת 'התחלת_תאריך'." #. module: web_timeline #. odoo-javascript #: code:addons/web_timeline/static/src/xml/web_timeline.xml:0 #, python-format msgid "Today" msgstr "היום" #. module: web_timeline #: model:ir.model,name:web_timeline.model_ir_ui_view msgid "View" msgstr "תצוגה" #. module: web_timeline #: model:ir.model.fields,field_description:web_timeline.field_ir_ui_view__type msgid "View Type" msgstr "סוג תצוגה" #. module: web_timeline #. odoo-javascript #: code:addons/web_timeline/static/src/js/timeline_controller.esm.js:0 #, python-format msgid "Warning" msgstr "אזהרה" #. module: web_timeline #. odoo-javascript #: code:addons/web_timeline/static/src/xml/web_timeline.xml:0 #, python-format msgid "Week" msgstr "שבוע" #. module: web_timeline #. odoo-javascript #: code:addons/web_timeline/static/src/xml/web_timeline.xml:0 #, python-format msgid "Year" msgstr "שנה"
OCA/web/web_timeline/i18n/he.po/0
{ "file_path": "OCA/web/web_timeline/i18n/he.po", "repo_id": "OCA", "token_count": 1314 }
91
This module was developed because Odoo optimizes views only for mobile or desktop, but forgets about tablets. It will be useful for you if you usually use a tablet. If you need this module for those reasons, these might interest you too: - `web_widget_numeric_step` - OCA's `web_responsive`, or the Odoo EE alternative `web_enterprise` (closed source).
OCA/web/web_touchscreen/readme/CONTEXT.md/0
{ "file_path": "OCA/web/web_touchscreen/readme/CONTEXT.md", "repo_id": "OCA", "token_count": 95 }
92
# Translation of Odoo Server. # This file contains the translation of the following modules: # * web_tree_duplicate # msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2023-11-27 11:34+0000\n" "Last-Translator: mymage <stefano.consolaro@mymage.it>\n" "Language-Team: none\n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 4.17\n" #. module: web_tree_duplicate #. odoo-javascript #: code:addons/web_tree_duplicate/static/src/web_tree_duplicate.esm.js:0 #, python-format msgid "Duplicate" msgstr "Duplica" #. module: web_tree_duplicate #. odoo-javascript #: code:addons/web_tree_duplicate/static/src/web_tree_duplicate.esm.js:0 #, python-format msgid "Duplicated Records" msgstr "Record duplicati"
OCA/web/web_tree_duplicate/i18n/it.po/0
{ "file_path": "OCA/web/web_tree_duplicate/i18n/it.po", "repo_id": "OCA", "token_count": 375 }
93
# Copyright 2017 ForgeFlow S.L. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). { "name": "Web Widget Bokeh Chart", "category": "Hidden", "summary": "This widget allows to display charts using Bokeh library.", "author": "ForgeFlow, " "Odoo Community Association (OCA), " "Creu Blanca", "version": "16.0.1.1.0", "maintainers": ["LoisRForgeFlow", "ChrisOForgeFlow"], "development_status": "Production/Stable", "website": "https://github.com/OCA/web", "depends": ["web"], "data": [], "external_dependencies": {"python": ["bokeh==3.1.1"]}, "auto_install": False, "license": "LGPL-3", "assets": { "web.assets_backend": [ "web_widget_bokeh_chart/static/src/js/web_widget_bokeh_chart.esm.js", "web_widget_bokeh_chart/static/src/js/web_widget_bokeh_json_chart.esm.js", "web_widget_bokeh_chart/static/src/xml/bokeh.xml", ], }, }
OCA/web/web_widget_bokeh_chart/__manifest__.py/0
{ "file_path": "OCA/web/web_widget_bokeh_chart/__manifest__.py", "repo_id": "OCA", "token_count": 423 }
94
/** @odoo-module **/ /* Copyright 2019 Tecnativa - David Vidal * Copyright 2024 Tecnativa - Carlos Roca * License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */ import {SelectCreateDialog} from "@web/views/view_dialogs/select_create_dialog"; import {Domain} from "@web/core/domain"; export function findChildren(comp, predicate = (e) => e) { const queue = []; [].unshift.apply(queue, Object.values(comp.__owl__.children)); while (queue.length > 0) { const curNode = queue.pop(); if (predicate(curNode)) { return curNode; } [].unshift.apply(queue, Object.values(curNode.component.__owl__.children)); } } export class DomainEditorDialog extends SelectCreateDialog { /** * Bind this to allow call get_domain from onSelected function definition. * * @override */ async select(resIds) { if (this.props.onSelected) { const onselected = this.props.onSelected.bind(this); await onselected(resIds); this.props.close(); } } _getDomainOfGroups(groups, domain) { const groups_unfolded = _.filter(groups, (g) => !g.isFolded); var groups_domain = []; for (var group of groups_unfolded) { var group_list = group.list; if (group_list.groupBy.length) { groups_domain.push(this._getDomainOfGroups(group_list.groups, domain)); } else { var group_domain = group_list.domain; _.each(domain, (d) => { group_domain = _.without( group_domain, _.filter(group_domain, (x) => { return _.isEqual(x, d); })[0] ); }); group_domain = _.without(group_domain, "&"); groups_domain.push(group_domain); } } return Domain.or(groups_domain).toList(); } get_domain(resIds) { const dynamicList = findChildren( this, (node) => node.component && node.component.model && node.component.model.root && ["DynamicGroupList", "DynamicRecordList"].includes( node.component.model.root.constructor.name ) ).component.model.root; let domain = dynamicList.domain; let group_domain = []; if ($(".o_list_record_selector input").prop("checked")) { if (dynamicList.groupBy.length) { group_domain = this._getDomainOfGroups(dynamicList.groups, domain); } } else { domain = domain.concat([["id", "in", resIds]]); } return JSON.stringify(domain.concat(group_domain)); } }
OCA/web/web_widget_domain_editor_dialog/static/src/js/widget_domain_editor_dialog.esm.js/0
{ "file_path": "OCA/web/web_widget_domain_editor_dialog/static/src/js/widget_domain_editor_dialog.esm.js", "repo_id": "OCA", "token_count": 1393 }
95
/** @odoo-module **/ import {editInput, getFixture} from "@web/../tests/helpers/utils"; import {makeView, setupViewRegistries} from "@web/../tests/views/helpers"; const {QUnit} = window; let serverData = {}; let target = getFixture(); QUnit.module("web_widget_dropdown_dynamic", (hooks) => { hooks.beforeEach(() => { target = getFixture(); serverData = { models: { "sale.order": { fields: { content_string: {string: "Content", type: "char"}, bool_field: {string: "Boolean", type: "boolean"}, content_integer: {string: "Integer", type: "integer"}, change_field: {string: "Change", type: "char"}, content_selection: { string: "Selection", type: "selection", selection: [["default", "Default"]], }, }, records: [ {id: 1, bool_field: false, change_field: ""}, {id: 2, bool_field: true, change_field: ""}, ], methods: { method_name() { return Promise.resolve([["value a", "Value A"]]); }, }, }, }, }; setupViewRegistries(); }); QUnit.test("values are fetched with changing context", async function (assert) { assert.expect(13); await makeView({ type: "form", resModel: "sale.order", serverData, arch: ` <form> <field name="change_field"/> <field name="content_string" widget="dynamic_dropdown" options="{'values':'method_name'}" context="{'depending_on': change_field}" /> </form>`, resId: 1, mockRPC: function (route, args) { assert.step(args.method); if (args.method === "method_name") { if (args.kwargs.context.depending_on === "step-1") { return Promise.resolve([["value", "Title"]]); } else if (args.kwargs.context.depending_on === "step-2") { return Promise.resolve([ ["value", "Title"], ["value_2", "Title 2"], ]); } return Promise.resolve([]); } }, }); await editInput(target, ".o_field_widget[name='change_field'] input", "step-1"); assert.containsN(target, "option", 2); assert.containsOnce(target, "option[value='\"value\"']"); await editInput(target, ".o_field_widget[name='change_field'] input", "step-2"); assert.containsN(target, "option", 3); assert.containsOnce(target, "option[value='\"value\"']"); assert.containsOnce(target, "option[value='\"value_2\"']"); await editInput( target, ".o_field_widget[name='change_field'] input", "step-other" ); assert.containsN(target, "option", 1); assert.verifySteps([ "get_views", "read", "method_name", "method_name", "method_name", "method_name", ]); }); QUnit.test("values are fetched w/o context (char)", async (assert) => { assert.expect(6); console.log("Start assert", serverData); console.log("Start makeView"); await makeView({ type: "form", resModel: "sale.order", serverData, arch: ` <form> <field name="bool_field"/> <field name="content_string" widget="dynamic_dropdown" options="{'values':'method_name'}" context="{'depending_on': bool_field}" /> </form>`, resId: 2, mockRPC(route, args) { assert.step(args.method); if (args.method === "method_name") { if (args.kwargs.context.depending_on) { return Promise.resolve([["value b", "Value B"]]); } } }, }); const field_target = target.querySelector("div[name='content_string']"); assert.verifySteps(["get_views", "read", "method_name"]); assert.containsN(field_target, "option", 2); assert.containsOnce( field_target, "option[value='\"value b\"']", "got `value b` " ); console.log("Ending makeView", target); }); QUnit.test("values are fetched w/o context (integer)", async (assert) => { assert.expect(6); await makeView({ type: "form", resModel: "sale.order", serverData, arch: ` <form> <field name="bool_field"/> <field name="content_integer" widget="dynamic_dropdown" options="{'values':'method_name'}" context="{'depending_on': bool_field}" /> </form>`, resId: 2, mockRPC(route, args) { assert.step(args.method); if (args.method === "method_name") { if (args.kwargs.context.depending_on) { return Promise.resolve([["10", "Value B"]]); } } }, }); const field_target = target.querySelector("div[name='content_integer']"); assert.verifySteps(["get_views", "read", "method_name"]); assert.containsN(field_target, "option", 2); assert.containsOnce(field_target, 'option[value="10"]'); }); QUnit.test("values are fetched w/o context (selection)", async (assert) => { assert.expect(6); await makeView({ type: "form", resModel: "sale.order", serverData, arch: ` <form> <field name="bool_field"/> <field name="content_selection" widget="dynamic_dropdown" options="{'values':'method_name'}" context="{'depending_on': bool_field}" /> </form>`, resId: 2, mockRPC(route, args) { assert.step(args.method); if (args.method === "method_name") { if (args.kwargs.context.depending_on) { return Promise.resolve([["choice b", "Choice B"]]); } } }, }); const field_target = target.querySelector("div[name='content_selection']"); assert.verifySteps(["get_views", "read", "method_name"]); assert.containsN(field_target, "option", 2); assert.containsOnce(field_target, "option[value='\"choice b\"']"); }); });
OCA/web/web_widget_dropdown_dynamic/static/tests/web_widget_dropdown_dynamic_tests.esm.js/0
{ "file_path": "OCA/web/web_widget_dropdown_dynamic/static/tests/web_widget_dropdown_dynamic_tests.esm.js", "repo_id": "OCA", "token_count": 3810 }
96
/* global Webcam */ /* Copyright 2016 Siddharth Bhalgami <siddharth.bhalgami@gmail.com> License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */ odoo.define("web_widget_image_webcam.webcam_widget", function (require) { "use strict"; var core = require("web.core"); var rpc = require("web.rpc"); var Dialog = require("web.Dialog"); const {patch} = require("@web/core/utils/patch"); const {ImageField} = require("@web/views/fields/image/image_field"); var _t = core._t; var QWeb = core.qweb; const getWebcamFlashFallbackModeConfig = rpc.query({ model: "ir.config_parameter", method: "get_webcam_flash_fallback_mode_config", }); patch(ImageField.prototype, "web_widget_image_webcam", { async _setWebcamParams() { // ::webcamjs:: < https://github.com/jhuckaby/webcamjs > // Webcam: Set Custom Parameters Webcam.set({ width: 320, height: 240, dest_width: 320, dest_height: 240, image_format: "jpeg", jpeg_quality: 90, force_flash: (await getWebcamFlashFallbackModeConfig) === "1", fps: 45, swfURL: "/web_widget_image_webcam/static/src/lib/webcam.swf", }); }, onWebcamClicked() { var self = this, WebCamDialog = $(QWeb.render("WebCamDialog")), img_data = false; self._setWebcamParams(); var dialog = new Dialog(self, { size: "large", dialogClass: "o_act_window", title: _t("WebCam Booth"), $content: WebCamDialog, buttons: [ { text: _t("Take Snapshot"), classes: "btn-primary take_snap_btn", click: function () { Webcam.snap(function (data) { img_data = data; // Display Snap besides Live WebCam Preview WebCamDialog.find("#webcam_result").html( '<img src="' + img_data + '"/>' ); }); if (Webcam.live) { // Remove "disabled" attr from "Save & Close" button $(".save_close_btn").removeAttr("disabled"); } }, }, { text: _t("Save & Close"), classes: "btn-primary save_close_btn", close: true, click: function () { var img_data_base64 = img_data.split(",")[1]; /* Size in base64 is approx 33% overhead the original data size. Source: -> http://stackoverflow.com/questions/11402329/base64-encoded-image-size -> http://stackoverflow.com/questions/6793575/estimating-the-size-of-binary-data-encoded-as-a-b64-string-in-python -> https://en.wikipedia.org/wiki/Base64 [ The ratio of output bytes to input bytes is 4:3 (33% overhead). Specifically, given an input of n bytes, the output will be "4[n/3]" bytes long in base64, including padding characters. ] */ // From the above info, we doing the opposite stuff to find the approx size of Image in bytes. var approx_img_size = 3 * (img_data_base64.length / 4) - (img_data_base64.match(/[=]+$/g) || []).length; // Like... "3[n/4]" // Upload image in Binary Field self.onFileUploaded({ size: approx_img_size, name: "web-cam-preview.jpeg", type: "image/jpeg", data: img_data_base64, }); }, }, { text: _t("Close"), close: true, }, ], }).open(); dialog.opened().then(function () { Webcam.attach("#live_webcam"); // At time of Init "Save & Close" button is disabled $(".save_close_btn").attr("disabled", "disabled"); // Placeholder Image in the div "webcam_result" WebCamDialog.find("#webcam_result").html( '<img src="/web_widget_image_webcam/static/src/img/webcam_placeholder.png"/>' ); }); }, }); Dialog.include({ destroy: function () { // Shut Down the Live Camera Preview | Reset the System Webcam.reset(); this._super.apply(this, arguments); }, }); });
OCA/web/web_widget_image_webcam/static/src/js/webcam_widget.js/0
{ "file_path": "OCA/web/web_widget_image_webcam/static/src/js/webcam_widget.js", "repo_id": "OCA", "token_count": 3137 }
97
To insert a mpld3 chart in a view proceed as follows: #. You should inherit from abstract class abstract.mpld3.parser:: _name = 'res.partner' _inherit = ['res.partner', 'abstract.mpld3.parser'] #. Import the required libraries:: import matplotlib.pyplot as plt #. Declare a json computed field like this:: mpld3_chart = fields.Json( string='Mpld3 Chart', compute='_compute_mpld3_chart', ) #. In its computed method do:: def _compute_mpld3_chart(self): for rec in self: # Design your mpld3 figure: plt.scatter([1, 10], [5, 9]) figure = plt.figure() rec.mpld3_chart = self.convert_figure_to_json(figure) #. In the view, add something like this wherever you want to display your mpld3 chart:: <div> <field name="mpld3_chart" widget="mpld3_chart" nolabel="1"/> </div>
OCA/web/web_widget_mpld3_chart/readme/USAGE.rst/0
{ "file_path": "OCA/web/web_widget_mpld3_chart/readme/USAGE.rst", "repo_id": "OCA", "token_count": 373 }
98
This widget changes input number field and make it easier to increment the number thanks to 2 buttons (+ and -). Use JS native logic for input number, so you can use the options ``min``, ``max``, ``step``, ``placeholder``. Demo available at `Settings > Users & Companies > Users > *Select One* > See 'Credit Limit' field`
OCA/web/web_widget_numeric_step/readme/DESCRIPTION.rst/0
{ "file_path": "OCA/web/web_widget_numeric_step/readme/DESCRIPTION.rst", "repo_id": "OCA", "token_count": 82 }
99
# Translation of Odoo Server. # This file contains the translation of the following modules: # * web_widget_open_tab # msgid "" msgstr "" "Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2023-09-20 17:50+0000\n" "Last-Translator: Ivorra78 <informatica@totmaterial.es>\n" "Language-Team: none\n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 4.17\n" #. module: web_widget_open_tab #: model:ir.model.fields,field_description:web_widget_open_tab.field_ir_model__add_open_tab_field msgid "Add Open Tab Field" msgstr "Añadir campo de pestaña abierta" #. module: web_widget_open_tab #: model:ir.model.fields,help:web_widget_open_tab.field_ir_model__add_open_tab_field msgid "Adds open-tab field in list views." msgstr "Añade un campo de pestaña abierta en las vistas de lista." #. module: web_widget_open_tab #: model:ir.model,name:web_widget_open_tab.model_base msgid "Base" msgstr "Base" #. module: web_widget_open_tab #. odoo-javascript #: code:addons/web_widget_open_tab/static/src/js/open_tab_widget.esm.js:0 #, python-format msgid "Click to open on new tab" msgstr "Haga clic para abrir en una nueva pestaña" #. module: web_widget_open_tab #: model:ir.model,name:web_widget_open_tab.model_ir_model msgid "Models" msgstr "Modelos" #. module: web_widget_open_tab #. odoo-javascript #: code:addons/web_widget_open_tab/static/src/js/open_tab_widget.esm.js:0 #, python-format msgid "Open Tab" msgstr "Abrir pestaña" #, python-format #~ msgid "Click in order to open on new tab" #~ msgstr "Clica para poder abrir una nueva pestaña" #, python-format #~ msgid "Widget" #~ msgstr "Widget"
OCA/web/web_widget_open_tab/i18n/es.po/0
{ "file_path": "OCA/web/web_widget_open_tab/i18n/es.po", "repo_id": "OCA", "token_count": 720 }
100
<?xml version="1.0" encoding="utf-8" ?> <odoo> <record id="ir_model_view" model="ir.ui.view"> <field name="name">ir.model.view.form</field> <field name="model">ir.model</field> <field name="inherit_id" ref="base.view_model_form" /> <field name="arch" type="xml"> <xpath expr="//field[@name='transient']" position="after"> <field name="add_open_tab_field" /> </xpath> </field> </record> </odoo>
OCA/web/web_widget_open_tab/views/ir_model_views.xml/0
{ "file_path": "OCA/web/web_widget_open_tab/views/ir_model_views.xml", "repo_id": "OCA", "token_count": 234 }
101
# Translation of Odoo Server. # This file contains the translation of the following modules: # * web_widget_x2many_2d_matrix # msgid "" msgstr "" "Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2021-04-22 15:47+0000\n" "Last-Translator: Bosd <c5e2fd43-d292-4c90-9d1f-74ff3436329a@anonaddy.me>\n" "Language-Team: none\n" "Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 4.3.2\n" #. module: web_widget_x2many_2d_matrix #. odoo-javascript #: code:addons/web_widget_x2many_2d_matrix/static/src/components/x2many_2d_matrix_renderer/x2many_2d_matrix_renderer.xml:0 #, python-format msgid "Nothing to display." msgstr "" #, python-format #~ msgid "Sorry no matrix data to display." #~ msgstr "Sorry er is geen matrix data om weertegeven." #, python-format #~ msgid "Sum" #~ msgstr "Som" #, python-format #~ msgid "Sum Total" #~ msgstr "Totaal"
OCA/web/web_widget_x2many_2d_matrix/i18n/nl.po/0
{ "file_path": "OCA/web/web_widget_x2many_2d_matrix/i18n/nl.po", "repo_id": "OCA", "token_count": 442 }
102
$x2many_2d_matrix_max_height: 450px; .o_form_view .o_field_x2many_2d_matrix { .table-responsive { max-height: $x2many_2d_matrix_max_height; overflow-y: auto; } .table { > thead > tr > th { white-space: pre-line; position: sticky; top: 0; z-index: 1; background-color: $o-list-footer-bg-color; &.total { right: 0; } } > tbody { > tr { &:nth-of-type(2n + 1) td.row-total, &:nth-of-type(2n + 1) td:first-child { background-color: mix(#000, #fff, 1%); } &:nth-of-type(2n) td.row-total, &:nth-of-type(2n) td:first-child { background-color: white; } > td { text-align: left; &:first-child { position: sticky; left: 0; border-right-width: 1px; border-right-color: $gray-300; border-right-style: solid; box-shadow: -1px 5px 10px $gray-300; } &.row-total { padding: 0.75rem; font-weight: bold; position: sticky; right: 0; border-left-width: 1px; border-left-color: $gray-300; border-left-style: solid; box-shadow: -1px 5px 10px $gray-300; } } } } > tfoot > tr > th { padding: 0.75rem; text-align: left; background-color: $o-list-footer-bg-color; position: sticky; bottom: 0; &.col-total { right: 0; border-left-width: 1px; border-left-color: $gray-300; border-left-style: solid; } } } }
OCA/web/web_widget_x2many_2d_matrix/static/src/components/x2many_2d_matrix_field/x2many_2d_matrix_field.scss/0
{ "file_path": "OCA/web/web_widget_x2many_2d_matrix/static/src/components/x2many_2d_matrix_field/x2many_2d_matrix_field.scss", "repo_id": "OCA", "token_count": 1424 }
103
# Copyright 2014 Square Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. root = exports ? this # Manages the search field in the navigation bar. Sends Ajax requests to fulfill # suggestion prompting and searching. # class root.SearchBar # Creates a new manager that handles a given search field. # # @param [jQuery object] element The search field. # constructor: (@element) -> @suggestions = $('<ul/>').attr('id', 'search-suggestions').insertAfter(@element) this.hideSuggestions() @element.keypress (event) => if event.charCode == 13 this.search() event.preventDefault(); event.stopPropagation(); return false return true @element.keyup (event) => this.change() return true @element.submit => this.search() @element.blur => @element.val '' this.hideSuggestions() # Called when the search field value changes. Retrieves suggestions and # renders the results. # change: -> @element.stopTime 'suggestions' @element.oneTime 500, 'suggestions', => $.ajax '/search/suggestions.json', type: 'GET' data: $.param({query: @element.val()}) success: (suggestions) => this.clearSuggestions() if suggestions.length > 0 this.renderSuggestions suggestions if suggestions.length == 1 switch suggestions[0].type when 'project' this.hintEnvironment(suggestions[0].project) this.hintBug(suggestions[0].project) this.hintOccurrence(suggestions[0].project) when 'environment' this.hintBug(suggestions[0].project, suggestions[0].environment) this.hintOccurrence(suggestions[0].project, suggestions[0].environment) when 'bug' this.hintOccurrence(suggestions[0].project, suggestions[0].environment, suggestions[0].bug) else this.hintProject() this.hintEnvironment() this.hintBug() this.hintOccurrence() this.hintUser() this.showSuggestions() error: (xhr) => this.clearSuggestions() if xhr.status != 404 && xhr.status != 422 new Flash('alert').text "Couldn’t load search suggestions." # Called when the search field is submitted using the enter key. Performs a # search. Redirects to the result if given. # search: -> $.ajax "/search", type: 'GET' data: $.param({query: @element.val()}) success: (url) -> window.location = url unless url.match(/^\s*$/) error: -> new Flash('alert').text "Couldn’t perform search." # @private hintUser: -> li = $('<li/>').addClass('hint').appendTo(@suggestions) li.append "@" $('<em/>').text('username').appendTo li return li # @private hintProject: -> li = $('<li/>').addClass('hint').appendTo(@suggestions) $('<em/>').text('project').appendTo li # @private hintEnvironment: (project=null) -> li = $('<li/>').addClass('hint').appendTo(@suggestions) if project li.text project.slug else $('<em/>').text('project').appendTo li li.append ' ' $('<em/>').text('environment').appendTo li # @private hintBug: (project=null, environment=null) -> li = $('<li/>').addClass('hint').appendTo(@suggestions) if project li.text project.slug else $('<em/>').text('project').appendTo li li.append ' ' if environment li.append $('<span/>').text(environment.name).html() else $('<em/>').text('environment').appendTo li li.append ' ' $('<em/>').text('bug#').appendTo li # @private hintOccurrence: (project=null, environment=null , bug=null) -> li = $('<li/>').addClass('hint').appendTo(@suggestions) if project li.text project.slug else $('<em/>').text('project').appendTo li li.append ' ' if environment li.append $('<span/>').text(environment.name).html() else $('<em/>').text('environment').appendTo li li.append ' ' if bug li.append bug.number else $('<em/>').text('bug#').appendTo li li.append ' ' $('<em/>').text('occurrence#').appendTo li # @private clearSuggestions: -> this.hideSuggestions() @suggestions.empty() # @private renderSuggestions: (suggestions) -> for suggestion in suggestions do (suggestion) => li = $('<li/>').appendTo(@suggestions) switch suggestion.type when 'user' li.text "@#{suggestion.user.username} — #{suggestion.user.name}" when 'project' li.text "#{suggestion.project.slug} — #{suggestion.project.name}" when 'environment' li.text "#{suggestion.project.name} #{suggestion.environment.name}" when 'bug' li.text "#{suggestion.project.name} #{suggestion.environment.name} bug ##{numberWithDelimiter suggestion.bug.number}" when 'occurrence' li.text "#{suggestion.project.name} #{suggestion.environment.name} bug ##{numberWithDelimiter suggestion.bug.number} occurrence ##{numberWithDelimiter suggestion.occurrence.number}" if suggestions.length == 1 $('<span/>').addClass('newline').text("⏎").appendTo li # Shows the suggestions list. showSuggestions: -> @suggestions.show() # Hides the suggestions list. hideSuggestions: -> @suggestions.hide() # Creates the manager for the search bar. # $(window).ready -> new SearchBar($('#quicknav'))
SquareSquash/web/app/assets/javascripts/search.js.coffee/0
{ "file_path": "SquareSquash/web/app/assets/javascripts/search.js.coffee", "repo_id": "SquareSquash", "token_count": 2420 }
104
@import "vars"; body#bugs-index { #filter { font-size: 11px; select, input { font-size: 11px; font-weight: normal; width: auto; } } } body#bugs-show { // ----- GLOBAL PORTION h1 { border-bottom: 1px solid $gray5; padding-bottom: 20px; } a#watch { color: $orange; float: right; text-decoration: none; &:hover { cursor: pointer; } } #location { font-weight: bold; .aux { font-weight: normal; } } #editor-links { font-family: Menlo, sans-serif; margin: 5px 40px; a { text-decoration: none; } } // ----- HISTORY #histogram { width: 100%; height: 200px; .deploy-tooltip { cursor: pointer; bottom: 0; width: 3px; height: 200px; position: absolute; } } // ----- GIT BLAME summary { font-size: $h5-size; margin-bottom: 10px; } .diff { span.additions-deletions { float: right; } span.additions { color: darkgreen; } span.deletions { color: red; } .syntaxhighlighter { margin: 0 !important; } } // ----- MANAGEMENT #management-form { .comment { padding-top: 10px; textarea { width: 100%; } } #jira-name { margin-top: 10px; } ul.autocomplete>li { display: -webkit-box; display: -moz-box; display: box; -webkit-box-orient: horizontal; -moz-box-orient: horizontal; box-orient: horizontal; div { -webkit-box-flex: 1; -moz-box-flex: 1; box-flex: 1; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; } tt { display: block; text-align: right; padding-left: 10px; } } } // ----- COMMENTS .comment { &>img { margin-bottom: 0; position: relative; top: 6px; } .comment-author { margin-bottom: 0; a { text-decoration: none; } img { height: 32px; vertical-align: middle; margin-right: 10px; } .times { font-size: 12px; font-weight: normal; position: relative; top: 10px; // shift down to the center of the div float: right; } } .comment-body { .actions { text-align: right; } background-color: white; padding-left: 8px; padding-right: 8px; padding-top: 12px; padding-bottom: 1px; border-radius: 6px; border-top-left-radius: 0; } textarea { background-color: white; border-bottom: 1px solid $gray5; } margin-bottom: 20px; } // ----- OCCURRENCES #aggregation-options { position: relative; width: 100%; display: -webkit-box; display: -moz-box; display: box; -webkit-box-orient: horizontal; -moz-box-orient: horizontal; box-orient: horizontal; @include iphone-landscape-and-smaller { display: block; } &>div { padding-left: 5px; padding-right: 5px; &:not(#agg-submit) { -webkit-box-flex: 1; -moz-box-flex: 1; box-flex: 1; } &:first-child { padding-left: 0; } &:last-child { padding-right: 0; } @include iphone-landscape-and-smaller { padding: 0; } } } #aggregation-charts { margin-top: 20px; .aggregation-dim { width: 100%; height: 150px; margin-top: 20px; &:first-child { margin-top: 0; } .legend { display: none; z-index: 1000; } .legend > * { background-color: rgba(white, 0.75); z-index: 1000; } &:hover .legend { display: inherit; } } table { width: auto; td { vertical-align: middle; padding: 2.5px; } } } }
SquareSquash/web/app/assets/stylesheets/bugs.css.scss/0
{ "file_path": "SquareSquash/web/app/assets/stylesheets/bugs.css.scss", "repo_id": "SquareSquash", "token_count": 1774 }
105
# Copyright 2014 Square Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Includes methods for authentication with LDAP. Information for the LDAP server # is stored in the `authentication.yml` Configoro file for the current # environment. A successful BIND yields an authenticated session. # # If this is the user's first time logging in, the User will be created for him # or her. module LdapAuthenticationHelpers # Attempts to log in a user, given his/her credentials. If the login fails, # the reason is logged and tagged with "[AuthenticationHelpers]". If the login # is successful, the user ID is written to the session. Also creates or # updates the User as appropriate. # # @param [String] username The LDAP username. # @param [String] password The LDAP password. # @return [true, false] Whether or not the login was successful. def log_in(username, password) username = username.downcase username.sub! /@#{Regexp.escape Squash::Configuration.mailer.domain}$/, '' dn = "#{Squash::Configuration.authentication.ldap.search_key}=#{username},#{Squash::Configuration.authentication.ldap.tree_base}" ldap = build_ldap_interface entry = nil if Squash::Configuration.authentication.ldap[:bind_dn] ldap.auth Squash::Configuration.authentication.ldap.bind_dn, Squash::Configuration.authentication.ldap.bind_password if ldap.bind if (entry = locate_ldap_user(ldap, username)) ldap.auth entry.dn, password unless ldap.bind logger.tagged('AuthenticationHelpers') { logger.info "Denying login to #{username}: LDAP authentication failed." } return false end else logger.tagged('AuthenticationHelpers') { logger.info "Denying login to #{username}: Couldn't locate user." } end else logger.tagged('AuthenticationHelpers') { logger.info "Couldn't bind using authenticator DN." } end else ldap.auth dn, password if ldap.bind entry = locate_ldap_user(ldap, username) end end if entry user = find_or_create_user_from_ldap_entry(entry, username) log_in_user user return true else logger.tagged('AuthenticationHelpers') { logger.info "Denying login to #{username}: LDAP authentication failed." } return false end rescue Net::LDAP::LdapError respond_to do |format| format.html do flash.now[:alert] = t('controllers.sessions.create.ldap_error') return false end end end private def build_ldap_interface ldap_opts = {} if Squash::Configuration.authentication.ldap.ssl ldap_opts[:encryption] = Squash::Configuration.authentication.ldap.encryption_method.to_sym || :start_tls end ldap = Net::LDAP.new(ldap_opts) ldap.host = Squash::Configuration.authentication.ldap.host ldap.port = Squash::Configuration.authentication.ldap.port ldap end def locate_ldap_user(ldap, username) entry = nil filter = Net::LDAP::Filter.eq(Squash::Configuration.authentication.ldap.search_key, username) ldap.search(base: Squash::Configuration.authentication.ldap.tree_base, filter: filter) { |e| entry = e } entry end def find_or_create_user_from_ldap_entry(entry, username) User.where(username: username).create_or_update!(first_name: entry[:givenname].first, last_name: entry[:sn].first) end end
SquareSquash/web/app/controllers/additions/ldap_authentication_helpers.rb/0
{ "file_path": "SquareSquash/web/app/controllers/additions/ldap_authentication_helpers.rb", "repo_id": "SquareSquash", "token_count": 1459 }
106
# Copyright 2014 Square Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Controller that works with {Membership Memberships} belonging to a {Project}. # # Common # ====== # # Path Parameters # --------------- # # | | | # |:-------------|:--------------------| # | `project_id` | The Project's slug. | class Project::MembershipsController < ApplicationController before_filter :find_project before_filter :find_membership, only: [:update, :destroy] before_filter :admin_login_required, except: :index respond_to :json # Returns a list of the 10 most recently-created memberships to a project. # # Routes # ------ # # * `GET /projects/:project_id/memberships.json` # # Query Parameters # ---------------- # # | | | # |:--------|:---------------------------------------------------------------------------------------------------| # | `query` | If set, includes only those memberships where the username begins with `query` (case-insensitive). | def index respond_to do |format| format.json do @memberships = @project.memberships.order('created_at DESC').limit(10) @memberships = @memberships.user_prefix(params[:query]) if params[:query].present? render json: decorate(@memberships) end end end # Adds a user to this project. # # Routes # ------ # # * `POST /projects/:project_id/memberships.json` # # Body Parameters # --------------- # # The body parameters can be JSON- or form URL-encoded. # # | | | # |:-------------|:-----------------------------------------| # | `membership` | Parameterized hash of Membership fields. | def create if params[:membership][:user_username] params[:membership][:user_id] = User.find_by_username(params[:membership].delete('user_username')).try!(:id) end @membership = @project.memberships.create(membership_params) respond_with @project, @membership end # Alters a user's membership to this project. # # Routes # ------ # # * `PATCH /projects/:project_id/memberships/:id.json` # # Path Parameters # --------------- # # | | | # |:-----|:-----------------------| # | `id` | The {User}'s username. | # # Body Parameters # --------------- # # The body parameters can be JSON- or form URL-encoded. # # | | | # |:-------------|:-----------------------------------------| # | `membership` | Parameterized hash of Membership fields. | def update @membership.update_attributes membership_params respond_with @project, @membership end # Removes a user from this project. # # Routes # ------ # # * `DELETE /projects/:project_id/memberships/:id.json` # # Path Parameters # --------------- # # | | | # |:-----|:---------------------| # | `id` | The User's username. | def destroy if current_user.role(@project) == :admin && @membership.admin? return respond_to do |format| format.json { head :forbidden } end end @membership.destroy head :no_content end private def find_project @project = Project.find_from_slug!(params[:project_id]) end def find_membership @membership = @project.memberships.find_by_user_id!(User.find_by_username!(params[:id])) end def decorate(memberships) memberships.map do |membership| membership.as_json(include: [:user, :project]).deep_merge( user: membership.user.as_json.merge(url: user_url(membership.user), name: membership.user.name), created_string: l(membership.created_at, format: :short_date), human_role: membership.human_role.capitalize, role: membership.role ) end end def membership_params params.require(:membership).permit(*( case current_user.role(@project) when :admin [:user_id] when :owner [:user_id, :admin] end )) end end
SquareSquash/web/app/controllers/project/memberships_controller.rb/0
{ "file_path": "SquareSquash/web/app/controllers/project/memberships_controller.rb", "repo_id": "SquareSquash", "token_count": 1870 }
107
# Copyright 2014 Square Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # A comment made by a {User} on a {Bug}. Successive comments on the same bug are # given incrementing `number` values, which are used instead of the less # meaningful ID value when referencing comments. # # The `user` association can be `nil`. This is typically because the user who # made the comment was since deleted. # # When comments are displayed, they are formatted using the Kramdown Markdown # formatter. Twitter-style username references (e.g. "@riscfuture") are linked # to the relevant user profile. # # Associations # ============ # # | | | # |:-------|:---------------------------------| # | `user` | The {User} who made the comment. | # | `bug` | The {Bug} that was commented on. | # # Properties # ========== # # | | | # |:---------|:--------------------------------------------------------------------------| # | `number` | This comment's number in sequence among all the comments on the same bug. | # # Metadata # ======== # # | | | # |:-------|:-----------------------------------------------| # | `body` | The Markdown-formatted content of the comment. | class Comment < ActiveRecord::Base belongs_to :user, inverse_of: :comments belongs_to :bug, inverse_of: :comments attr_readonly :user, :bug, :number include HasMetadataColumn has_metadata_column( body: {presence: true, length: {maximum: 2000}} ) validates :bug, presence: true #validates :number, # presence: true, # numericality: {only_integer: true, greater_than: 0}, # uniqueness: {scope: :bug_id} validate :user_must_have_permission_to_comment after_create :reload # grab the number value after the rule has been run after_destroy :remove_events after_save { |comment| comment.bug.index_for_search! } # @private def to_param() number.to_s end # @private def as_json(options=nil) options ||= {} options[:except] = Array.wrap(options[:except]) options[:except] << :id options[:except] << :user_id options[:except] << :bug_id options[:include] = Array.wrap(options[:include]) options[:include] << :user super options end # @private def to_json(options={}) options[:except] = Array.wrap(options[:except]) options[:except] << :id options[:except] << :user_id options[:except] << :bug_id options[:include] = Array.wrap(options[:include]) options[:include] << :user super options end private def user_must_have_permission_to_comment errors.add(:bug_id, :not_allowed) unless [:member, :admin, :owner].include? user.role(bug) end def remove_events bug.events.find_each { |event| event.destroy if event.kind == 'comment' && event.data['comment_id'] == id } end end
SquareSquash/web/app/models/comment.rb/0
{ "file_path": "SquareSquash/web/app/models/comment.rb", "repo_id": "SquareSquash", "token_count": 1276 }
108
# Copyright 2014 Square Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require 'securerandom' # A Project is a single code repository that can (and probably does) have # {Bug bugs}. Only {User Users} who are {Membership members} of a project can # view and manage its exceptions. # # A project also has an `owner`, that can promote/demote administrators. (See # {Membership} for more information.) Each project has a local, bare checkout of # its repository in `tmp/repos`. This repo is used for analyzing bugs, # assigning blame, and providing code context. # # A project consists of one or more {Environment Environments} in which Bugs can # occur. # # Associations # ============ # # | | | # |:----------------------|:--------------------------------------------------------| # | `owner` | The {User} who owns this project. | # | `default_environment` | The default {Environment} to display when viewing bugs. | # | `environments` | The {Environment Environments} in this project. | # | `memberships` | The {Membership Memberships} in this project. | # | `members` | The {User Users} who have memberships in this project. | # # Properties # ========== # # | | | # |:-----------------|:------------------------------------------------------------------------| # | `name` | The human-readable name of the project. | # | `api_key` | A unique key sent with occurrences to associate them with this project. | # | `repository_url` | The URL to the project's repository. | # # Metadata # ======== # # General # ======= # # | | | # |:----------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------| # | `uses_releases` | If `true`, bug views will be segregated by release, and release data will be displayed. Automatically set to true if any Deploys with release data are received. | # | `uses_releases_override` | `uses_releases` is set automatically. If the user has set the value at least once manually, this is `true`, and automatic updates are suppressed. | # | `disable_message_filtering` | If `true`, Bug messages are not filtered for potentially sensitive information. | # | `blamer_type` | The name of a subclass of {Blamer::Base} that will be used to perform the blame operation. | # # Code configuration # ------------------ # # | | | # |:--------------------|:--------------------------------------------------------------------------------------------------------------| # | `commit_url_format` | The format of the URL to a web page describing a commit (includes the "%!{commit}" interpolation). | # | `filter_paths` | Paths to ignore when determining a Bug's relevant file and line. | # | `whitelist_paths` | Paths to _not_ ignore when determining a Bug's relevant file and line (takes precedence over `filter_paths`). | # # Mailer # ------ # # | | | # |:----------------------------|:-----------------------------------------------------------------------------------------------------------------------------------| # | `critical_mailing_list` | The mailing list to send exception reports when a Bug exceeds `critical_threshold` Occurrences. | # | `all_mailing_list` | The mailing list to send reports of every new Bug. | # | `critical_threshold` | The number of Occurrences a Bug must have to notify the `critical_mailing_list`. | # | `sender` | The address to use for the "Sender" field of notification emails. | # | `locale` | The ISO 639-1 name of the locale to use for emails. | # | `sends_emails_outside_team` | If `true`, emails will be sent blamed email addresses even if they don't correspond to a project member. | # | `trusted_email_domain` | If `sends_emails_outside_team` is true, only email addresses with this domain will be notified. If `nil`, all domains are trusted. | # # Integrations # ------------ # # | | | # |:--------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------| # | `pagerduty_enabled` | If `true`, new Occurrences are sent to PagerDuty. Note that PagerDuty "acknowledge" and "resolve" events are sent regardless of this value. | # | `pagerduty_service_key` | The service key assigned to this project by PagerDuty. | # | `always_notify_pagerduty` | If `true`, all new Bugs are sent to PagerDuty. If `false`, only those Bugs that exceed the critical threshold are sent. | # # Source-Mapping # -------------- # # | | | # |:------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| # | `digest_in_asset_names` | If `true`, it is assumed that this application uniquely names its JavaScript assets. This allows Squash to search more than just the current revision's source maps when locating one matching an asset name, and allows the application to only upload new source maps when a JavaScript file actually changes. | class Project < ActiveRecord::Base # The directory where repositories are checked out. REPOS_DIRECTORY = File.expand_path(Squash::Configuration.repositories.directory, Rails.root.to_s) # File names that appear in backtraces that aren't really file names META_FILE_NAMES = %w( (irb) (eval) -e ) # If set to `true`, Git will attempt to clone the repository, and add an error # to the `repository_url` attribute if it cannot. attr_accessor :validate_repo_connectivity belongs_to :owner, class_name: 'User', inverse_of: :owned_projects belongs_to :default_environment, class_name: 'Environment', inverse_of: :default_project has_many :environments, dependent: :delete_all, inverse_of: :project has_many :memberships, dependent: :delete_all, inverse_of: :project has_many :members, through: :memberships, source: :user has_many :emails, inverse_of: :project, dependent: :delete_all include Slugalicious slugged :name include HasMetadataColumn has_metadata_column( commit_url_format: {allow_nil: true}, filter_paths: {type: Array, default: []}, whitelist_paths: {type: Array, default: []}, critical_mailing_list: {email: true, allow_nil: true}, all_mailing_list: {email: true, allow_nil: true}, critical_threshold: {type: Fixnum, presence: true, default: 100, numericality: {only_integer: true, greater_than_or_equal_to: 1}}, sender: {email: true, allow_nil: true}, locale: {default: 'en', presence: true}, sends_emails_outside_team: {type: Boolean, default: false, allow_nil: false}, trusted_email_domain: {allow_nil: true}, pagerduty_enabled: {type: Boolean, default: false}, pagerduty_service_key: {presence: {if: :pagerduty_enabled}}, always_notify_pagerduty: {type: Boolean, default: false}, uses_releases: {type: Boolean, default: false}, uses_releases_override: {type: Boolean, default: false}, disable_message_filtering: {type: Boolean, default: false}, blamer_type: {presence: true, default: 'Blamer::Recency'}, digest_in_asset_names: {type: Boolean, default: true} ) validates :owner, presence: true validates :name, presence: true, length: {maximum: 126} validates :api_key, presence: true #uniqueness: true, #length: {is: 36}, #format: {with: /[0-9a-f\-]+/} validates :repository_url, presence: true, length: {maximum: 255} validate :default_environment_belongs_to_project validate :can_clone_repo, if: :validate_repo_connectivity before_validation :create_api_key, on: :create set_nil_if_blank :commit_url_format, :critical_mailing_list, :all_mailing_list, :sender, :trusted_email_domain, :pagerduty_service_key after_save do |obj| obj.memberships.where(user_id: obj.owner_id).create_or_update!(admin: true) if owner_id_changed? obj.memberships.where(user_id: obj.owner_id_was).create_or_update!(admin: true) if owner_id_was end before_validation :set_commit_url_format scope :prefix, ->(query) { where("LOWER(name) LIKE ?", query.downcase.gsub(/[^a-z0-9\-_ ]/, '') + '%') } # Returns a `Git::Repository` proxy object that allows you to work with the # local checkout of this Project's repository. The repository will be checked # out if it hasn't been already. # # Any Git errors that occur when attempting to clone the repository are # swallowed, and `nil` is returned. # # @overload repo # @return [Git::Repository, nil] The proxy object for the repository. # # @overload repo(&block) # If passed a block, this method will lock a mutex and yield the repository, # giving you exclusive access to the repository. This is recommended when # performing any repository-altering operations (e.g., fetches). The mutex # is freed when the block completes. # @yield A block that is given exclusive control of the repository. # @yieldparam [Git::Repository] repo The proxy object for the repository. def repo repo_mutex.synchronize do @repo ||= begin exists = File.exist?(repo_path) || clone_repo exists ? Git.bare(repo_path) : nil end end if block_given? repo_mutex.synchronize { yield @repo } else @repo end end # Returns the URL to a web page describing a commit in this project. # # @param [String] commit The commit ID. # @return [String, nil] The URL to the commit's web page, or `nil` if # `commit_url_format` has not been set. def commit_url(commit) return nil unless commit_url_format commit_url_format.gsub '%{commit}', commit end # Generates a new API key for the Project. Does not save the Project. def create_api_key self.api_key = SecureRandom.uuid end # Determines if a file is project source code, filtered project source code, # or library code. The project root must have already been stripped from the # path for this to work. # # @param [String] file A path to a file. # @return [Symbol] `:project` if this a project file, `:filtered` if this is a # project file that should be filtered from the backtrace, and `:library` if # this is a library file. def path_type(file) return :library if file.start_with?('/') # not within project root return :library if META_FILE_NAMES.include?(file) # file names that aren't really file names # in filter paths and not in whitelist paths return :filtered if filter_paths.any? { |filter_line| file.start_with? filter_line } && whitelist_paths.none? { |filter_line| file.start_with? filter_line } # everything else is a project file return :project end # @private def as_json(options=nil) options ||= {} options[:except] = Array.wrap(options[:except]) options[:except] << :id options[:except] << :default_environment_id options[:except] << :owner_id options[:except] << :updated_at options[:methods] = Array.wrap(options[:methods]) options[:methods] << :slug super options end # @return [Service::PagerDuty, nil] A module for interacting with this # Project's PagerDuty integration, or `nil` if PagerDuty is not enabled. def pagerduty @pagerduty ||= (pagerduty_service_key? ? Service::PagerDuty.new(pagerduty_service_key) : nil) end # @return [Class] The subclass of {Blamer::Base} that will be used to perform # the blame operation for this Project's Occurrences. def blamer blamer_type.constantize end # @private def repository_hash Digest::SHA1.hexdigest(repository_url) end private def repo_path @repo_path ||= File.join(REPOS_DIRECTORY, repo_directory) end def repo_directory @repo_dir ||= repository_hash + '.git' end def clone_repo Git.clone repository_url, repo_directory, path: REPOS_DIRECTORY, mirror: true rescue Git::GitExecuteError return nil end def default_environment_belongs_to_project errors.add(:default_environment_id, :wrong_project) if default_environment && default_environment.project_id != id end def set_commit_url_format if repository_url =~ /^git@github\.com:([^\/]+)\/(.+)\.git$/ || repository_url =~ /https:\/\/\w+@github\.com\/([^\/]+)\/(.+)\.git/ || repository_url =~ /git:\/\/github\.com\/([^\/]+)\/(.+)\.git/ # GitHub self.commit_url_format ||= "https://github.com/#{$1}/#{$2}/commit/%{commit}" end end def can_clone_repo unless system('git', 'ls-remote', repository_url, out: '/dev/null', err: '/dev/null') errors.add :repository_url, :unreachable end end def repo_mutex @repo_mutex ||= FileMutex.new(repo_path.to_s + '.lock') end end
SquareSquash/web/app/models/project.rb/0
{ "file_path": "SquareSquash/web/app/models/project.rb", "repo_id": "SquareSquash", "token_count": 6442 }
109
// Copyright 2014 Square Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. $(document).ready(function() { new PageManager().setup(); }); function PageManager() { this.setup = function() { this.setupManagementForm(); this.setupCommentForm(); this.setupCommitDropdown(); this.loadEvents(); this.loadComments(); this.occurrencesTable = this.setupOccurrencesTable(); this.setupTabCounts(); this.setupWatchButton(); this.setupAggregation(); this.setupNotifications(); this.setupMagicFixedCheckbox(); this.setupJoinLink(); this.setupNotificationForm(); this.setupHistogram(); <% unless Squash::Configuration.jira.disabled? %> this.setupJIRALink(); this.loadJIRAProjects(); <% end %> }; this.setupManagementForm = function() { return new SmartForm($('#management-form'), function() { new Flash('success').text("Changes saved."); }); }; this.setupCommentForm = function() { var self = this; return new SmartForm($('#new_comment'), function() { $('#new_comment textarea').val(""); self.loadComments(); }); }; this.loadEvents = function() { new Feed("<%= project_environment_bug_events_url(@project, @environment, @bug, format: 'json') %>", $('#events')); }; this.setupCommitDropdown = function() { $.ajax("<%= project_commits_url(@project, format: 'json') %>", { type: 'GET', success: function(commits) { $('#bug_resolution_revision').autocomplete({ suggestions: commits, elementBuilder: function(li, commit) { li.append($('<div/>').text(commit.message)); $('<tt/>').text(commit.sha.slice(0, 6)).appendTo(li); }, filterSuggestions: function(string, suggestions) { return suggestions.filter(function(commit) { return commit.sha.indexOf(string.toLowerCase()) == 0 || commit.message.toLowerCase().indexOf(string.toLowerCase()) == 0; }); }, fieldValue: function(suggestion) { return suggestion.sha; } }); } }); }; this.loadComments = function() { var self = this; $('#comments-list').empty(); $.ajax("<%= project_environment_bug_comments_url(@project, @environment, @bug, format: 'json') %>", { type: 'GET', success: function(comments) { $.each(comments, function(_, comment) { var row = $('<div/>').addClass('comment').appendTo('#comments-list'); var author = $('<h5/>').addClass('comment-author').appendTo(row); $('<img/>').attr('src', comment.user.gravatar).appendTo(author); $('<a/>').attr('href', comment.user_url).text(comment.user.name).appendTo(author); var times = $('<span/>').text("written ").addClass('aux times').appendTo(author); $('<time/>').attr('datetime', comment.created_at).liveUpdate().appendTo(times); if (comment.updated_at != comment.created_at) { times.append("; last edited "); $('<time/>').attr('datetime', comment.updated_at).liveUpdate().appendTo(times); } $('<img/>').attr('src', "<%= image_path 'comment-arrow.png' %>").appendTo(row); var viewDiv = $('<div/>').addClass('comment-body').html(comment.body_html).appendTo(row); if (comment.user.username == "<%= current_user.username %>" || <%= (current_user.role(@project) == :admin || current_user.role(@project) == :owner).inspect %>) { var editDiv = $('<div/>').addClass('comment-body').appendTo(row).hide(); var form = $('<form/>').attr({ 'accept-charset': 'UTF-8', action: comment.url, method: 'post' }).appendTo(editDiv); var extras = $('<div/>').css({ margin: 0, padding: 0, display: 'inline' }).appendTo(form); $('<input/>').attr({ name: 'utf8', type: 'hidden', value: '✓' }).appendTo(extras); $('<input/>').attr({ name: '_method', type: 'hidden', value: 'patch' }).appendTo(extras); $('<input/>').attr({ name: $('meta[name=csrf-param]').attr('content'), type: 'hidden', value: $('meta[name=csrf-token]').attr('content') }).appendTo(extras); $('<textarea/>').attr({ name: 'comment[body]', rows: 4 }).val(comment.body).appendTo(form); var buttons = $('<p/>').appendTo(form); $('<input/>').addClass('default').attr({ name: 'commit', type: 'submit', value: 'Update' }).appendTo(buttons); buttons.append(" "); $('<input/>').attr({ type: 'button', value: 'Cancel' }).appendTo(buttons).click(function() { editDiv.hide(); viewDiv.show(); return false; }); new SmartForm(form, function() { self.loadComments(); return false; }); buttons = $('<p/>').addClass('actions').appendTo(viewDiv); $('<input/>').addClass('small').attr({ type: 'button', value: 'Edit' }).appendTo(buttons).click(function() { editDiv.show(); viewDiv.hide(); return false; }); buttons.append(" "); $('<input/>').addClass('small warning').attr({ type: 'button', value: 'Delete' }).appendTo(buttons).click(function() { if (!confirm("Are you sure you want to delete " + comment.user.name + "’s comment?")) return; $.ajax(comment.url, { type: 'DELETE', //success: function() { self.loadComments(); }, error: function() { new Flash('alert').text("Couldn’t delete the comment."); } }); return false; }); } }); }, error: function() { new Flash('alert').text("Couldn’t load comments."); } }); }; this.setupOccurrencesTable = function() { return new SortableTable($('#occurrences-table'), "<%= project_environment_bug_occurrences_url(@project, @environment, @bug, format: 'json') %>", [ { key: 'occurred_at', title: "Time", sortable: 'desc', htmlGenerator: function(occurrence) { return $('<time/>').attr('datetime', occurrence.occurred_at).liveUpdate(); } }, { key: 'message', title: 'Message', sortable: false }, <% OccurrencesController::INDEX_FIELDS[@bug.client].each do |key| %> { key: "<%= key %>", title: "<%= Occurrence.human_attribute_name(key).titleize %>", sortable: false }, <% end %> ], { sort_key: 'occurred_at', scroll_with: 'number' } ); }; this.setupTabCounts = function() { $('#first-occurrence').liveUpdate(); $('#latest-occurrence').liveUpdate(); }; this.setupWatchButton = function() { $('#watch').click(function() { $.ajax("<%= watch_project_environment_bug_url(@project, @environment, @bug, format: 'json') %>", { type: 'POST', success: function(_, _, xhr) { if (xhr.status == 204) $('#watch').removeClass('fa fa-star').addClass('fa fa-star-o'); else if (xhr.status == 201) $('#watch').removeClass('fa fa-star-o').addClass('fa fa-star'); else new Flash('alert').text("Couldn’t watch or unwatch this bug."); }, error: function() { new Flash('alert').text("Couldn’t watch or unwatch this bug."); }, dataType: 'text' }); return false; }); }; this.setupAggregation = function() { var agg = new Aggregation($('#aggregation-charts'), $('#aggregation-filter'), "<%= aggregate_project_environment_bug_occurrences_url(@project, @environment, @bug, format: 'json') %>"); $('#aggregation-filter').submit(function(e) { agg.load(); return false; }); }; this.setupNotifications = function() { var deploy_input = $('#notify_on_deploy'); deploy_input.change(function() { deploy_input[0].disabled = true; $.ajax("<%= notify_deploy_project_environment_bug_url(@project, @environment, @bug, format: 'json') %>", { type: 'POST', complete: function() { deploy_input[0].disabled = false; }, success: function(bug) { deploy_input[0].checked = bug.notify_on_deploy; new Flash('success').text("Your notification settings were updated."); }, error: function() { new Flash('alert').text("Error updating email settings."); deploy_input[0].checked = !deploy_input[0].checked; } }) }); var occurrence_input = $('#notify_on_occurrence'); occurrence_input.change(function() { occurrence_input[0].disabled = true; $.ajax("<%= notify_occurrence_project_environment_bug_url(@project, @environment, @bug, format: 'json') %>", { type: 'POST', complete: function() { occurrence_input[0].disabled = false; }, success: function(bug) { occurrence_input[0].checked = bug.notify_on_occurrence; new Flash('success').text("Your notification settings were updated."); }, error: function() { new Flash('alert').text("Error updating email settings."); occurrence_input[0].checked = !occurrence_input[0].checked; } }) }); }; this.setupMagicFixedCheckbox = function() { $('#bug_resolution_revision').change(function() { if ($('#bug_resolution_revision').val().length > 0) { $('#bug_fixed')[0].checked = true; $('#bug_fix_deployed').removeAttr('disabled'); } }); $('#bug_fixed').change(function() { if ($('#bug_fixed')[0].checked) $('#bug_fix_deployed').removeAttr('disabled'); else $('#bug_fix_deployed').attr('disabled', 'disabled'); }); if (!('#bug_fix_deployed')[0].checked) $('#bug_fix_deployed').attr('disabled', 'disabled'); }; this.setupJoinLink = function() { $('#join-link').click(function(e) { $.ajax($(e.currentTarget).attr('href') + '.json', { type: 'POST', success: function() { window.location.reload(); }, error: function() { new Flash('alert').text("Couldn’t join project."); } }); return false; }); }; this.setupNotificationForm = function() { new SmartForm($('#page-threshold-form'), function() { new Flash('success').text("Paging options saved."); }); return new SmartForm($('#notification-form'), function() { new Flash('success').text("Notification set."); }); }; this.setupHistogram = function() { new Histogram($('#histogram'), "<%= histogram_project_environment_bug_occurrences_url(@project, @environment, @bug, format: 'json') %>"); }; <% unless Squash::Configuration.jira.disabled? %> this.setupJIRALink = function() { var field = $('#bug_jira_issue'), info = $('#jira-name'), status = $('#jira-status'), statusSelector = $('#bug_jira_status_id'), statusesLoaded = false; var fieldChanged = function() { info.empty(); status.empty(); statusSelector.attr('disabled', 'disabled'); if (field.val() == '') return; $('<i/>').addClass('fa fa-refresh').appendTo(status); $.ajax("<%= jira_issue_url('REPLACEME') %>".replace('REPLACEME', field.val()), { type: 'GET', success: function(issue) { status.empty(); $('<i/>').addClass('fa fa-check-circle text-success').appendTo(status); var url = "<%= Squash::Configuration.jira.api_host %><%= Squash::Configuration.jira.api_root %>/browse/" + issue.key; $('<a/>').attr({href: url, target: '_blank'}).text(issue.fields.summary).appendTo(info); if (statusesLoaded) statusSelector.removeAttr('disabled'); }, error: function(xhr) { status.empty(); $('<i/>').addClass('fa fa-times-circle text-error').appendTo(status); if (xhr.status == 404) $('<span/>').addClass('text-error').text("Couldn’t find that JIRA issue.").appendTo(info); else $('<span/>').addClass('text-error').text("Problem loading JIRA issue.").appendTo(info); } }); }; fieldChanged(); field.change(fieldChanged); $.ajax("<%= jira_statuses_url(format: 'json') %>", { type: 'GET', success: function(statuses) { statusSelector.empty(); $('<option/>').attr('value', '').text('').appendTo(statusSelector); $.each(statuses, function(_, status) { $('<option/>').attr('value', status.id).text(status.name).appendTo(statusSelector); }); statusesLoaded = true; if (field.val().length > 0) statusSelector.removeAttr('disabled'); statusSelector.val("<%= @bug.jira_status_id || '' %>"); }, error: function() { statusSelector.attr('disabled', 'disabled'); $('#bug_jira_status_id option').text("Error"); } }); }; this.loadJIRAProjects = function() { var dropdown = $('#jira-projects'); $.ajax("<%= jira_projects_url(format: 'json') %>", { type: 'GET', success: function(projects) { $('<option/>').attr('selected', 'selected').appendTo(dropdown); $.each(projects, function(_, project) { $('<option/>').attr('value', project.id).text(project.name).appendTo(dropdown); }); dropdown.change(function() { if (dropdown.val() == '') return false; var url = "<%= @new_issue_url %>&pid=" + dropdown.val(); var opened = window.open(url); if (!opened || opened.closed) prompt("You have a pop-up blocker enabled. Visit this URL:", url); return false; }); dropdown.removeAttr('disabled'); }, error: function() { new Flash('alert').text("Couldn’t load the list of JIRA projects."); } }); }; <% end %> }
SquareSquash/web/app/views/bugs/show.js.erb/0
{ "file_path": "SquareSquash/web/app/views/bugs/show.js.erb", "repo_id": "SquareSquash", "token_count": 6384 }
110
development: adapter: postgresql encoding: utf8 host: localhost username: squash password: database: squash_development test: adapter: postgresql encoding: utf8 host: localhost username: squash password: database: squash_test production: adapter: postgresql encoding: utf8 host: localhost username: squash password: database: squash_production pool: 30
SquareSquash/web/config/database.yml/0
{ "file_path": "SquareSquash/web/config/database.yml", "repo_id": "SquareSquash", "token_count": 124 }
111
--- APIHost: YOUR_URL
SquareSquash/web/config/environments/production/javascript_dogfood.yml/0
{ "file_path": "SquareSquash/web/config/environments/production/javascript_dogfood.yml", "repo_id": "SquareSquash", "token_count": 9 }
112
# Copyright 2014 Square Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. Squash::Application.routes.draw do resources :projects, except: [:new] do member { patch :rekey } resources :commits do member { get :context } end resources :environments, only: [:update] do resources :bugs, except: [:new, :create, :edit] do collection { get :count } member { post :watch, :notify_deploy, :notify_occurrence } resources :occurrences, only: [:index, :show] do collection { get :count, :aggregate, :histogram } end resources :events, only: :index resources :comments, except: [:show, :new, :edit] resource :notification_threshold, only: [:create, :update, :destroy] end end resources :memberships, controller: 'project/memberships', only: [:index, :create, :update, :destroy], constraints: {id: /[^\/]+?/, format: 'json'} resource :membership, controller: 'project/membership', as: :my_membership, only: [:edit, :update, :destroy] do member { post :join } resources :emails, controller: 'emails', only: [:index, :create] end end constraints(id: /[^\/]+?/, format: 'html') do resources :users, only: :show end actions = [:index] actions << :create if Squash::Configuration.authentication.strategy == 'password' resources :users, only: actions actions = [:show] actions << :update if Squash::Configuration.authentication.strategy == 'password' resource :account, only: actions do resources :memberships, controller: 'account/memberships', only: [:index] resources :bugs, controller: 'account/bugs', only: :index resources :events, controller: 'account/events', only: :index resources :emails, controller: 'emails', only: [:index, :create, :destroy], constraints: {id: /[^\/]+?/, format: 'json'} end namespace :jira do resources :projects, only: :index resources :issues, only: :show resources :statuses, only: :index end unless Squash::Configuration.jira.disabled? get 'login' => 'sessions#new' post 'login' => 'sessions#create' get 'logout' => 'sessions#destroy' post 'signup' => 'users#create' if Squash::Configuration.authentication.strategy == 'password' post 'api/1.0/notify' => 'api/v1#notify' post 'api/1.0/deploy' => 'api/v1#deploy' post 'api/1.0/symbolication' => 'api/v1#symbolication' post 'api/1.0/deobfuscation' => 'api/v1#deobfuscation' post 'api/1.0/sourcemap' => 'api/v1#sourcemap' get 'search/suggestions' => 'search#suggestions' get 'search' => 'search#search' root to: 'projects#index' if Squash::Configuration.concurrency.background_runner == 'Sidekiq' require 'sidekiq/web' constraints lambda { |request| SidekiqAuthConstraint.authorized?(request) } do mount Sidekiq::Web => '/sidekiq' end end end
SquareSquash/web/config/routes.rb/0
{ "file_path": "SquareSquash/web/config/routes.rb", "repo_id": "SquareSquash", "token_count": 1181 }
113
@import "vars"; ul.autocomplete { z-index: 99; position: absolute; left: 0; min-width: 200px; border: 1px solid $gray4; box-shadow: 0 4px 4px rgba(black, 0.5); background-color: white; display: none; &.shown { display: block; } li { padding: 5px 10px; &.selected { background-color: $blue; } &:hover { cursor: pointer; } } }
SquareSquash/web/lib/assets/stylesheets/autocomplete.css.scss/0
{ "file_path": "SquareSquash/web/lib/assets/stylesheets/autocomplete.css.scss", "repo_id": "SquareSquash", "token_count": 149 }
114
# Copyright 2014 Square Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require 'fileutils' require 'socket' # A mutex that uses a lockfile to synchronize on. The presence of the lockfile # indicates that the resource is in use; the contents of the file identify the # owner of the lock. class FileMutex # The default timeout to wait for an exclusive lock before raising # `Timeout::Error`. DEFAULT_TIMEOUT = 60.minutes # Creates a new file-based mutex. # # @param [String] path The path to the lockfile (can be any file; will be # created if it doesn't exist). def initialize(path) @path = path end # Attempts to acquire an exclusive lock on the resource. Blocks until a lock # is available. Once a lock is available, acquires it, executes the provided # block, and then releases the lock. # # @yield The code to run in the lock. # @return The result of the block. def lock!(timeout_duration = DEFAULT_TIMEOUT) result = nil File.open(@path, File::CREAT|File::EXCL|File::WRONLY, 0644) do |f| f.puts contents f.flush Timeout.timeout(timeout_duration) do begin result = yield ensure unlock! end end end return result rescue Errno::EEXIST sleep 1 retry ensure unlock! end alias synchronize lock! # Forces this lock to be unlocked. Does nothing if the lock is already # unlocked. def unlock! FileUtils.rm_f @path end private def contents "created=#{Time.now.to_s}, pid=#{Process.pid}, thread=#{Thread.current.object_id}\n\n" + caller.join("\n") end end
SquareSquash/web/lib/file_mutex.rb/0
{ "file_path": "SquareSquash/web/lib/file_mutex.rb", "repo_id": "SquareSquash", "token_count": 721 }
115
# Copyright 2014 Square Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Simple worker class that emails all relevant Users, informing them of a new # {Comment} on a {Bug}. class CommentNotificationMailer include BackgroundRunner::Job # Creates a new instance and sends notification emails. # # @param [Fixnum] comment_id The ID of a Comment that was just posted. def self.perform(comment_id) new(Comment.find(comment_id)).perform end # Creates a new worker instance. # # @param [Comment] comment A Comment that was just posted. def initialize(comment) @comment = comment end # Emails all relevant Users about the new Comment. def perform recipients = @comment.bug.comments.select('user_id').uniq.pluck(:user_id) recipients << @comment.bug.assigned_user_id recipients.delete @comment.user_id recipients.uniq! User.where(id: recipients).each { |user| NotificationMailer.comment(@comment, user).deliver_now } end end
SquareSquash/web/lib/workers/comment_notification_mailer.rb/0
{ "file_path": "SquareSquash/web/lib/workers/comment_notification_mailer.rb", "repo_id": "SquareSquash", "token_count": 457 }
116
# Copyright 2014 Square Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require 'rails_helper' if Squash::Configuration.authentication.strategy == 'ldap' class FakeController def self.helper_method(*) end def logger(*) Rails.logger end include AuthenticationHelpers include LdapAuthenticationHelpers end RSpec.describe LdapAuthenticationHelpers, type: :model do describe "#log_in" do before(:all) { @user = FactoryGirl.create(:user) } before :each do @controller = FakeController.new @ldap = double('Net::LDAP') allow(@controller).to receive(:build_ldap_interface).and_return(@ldap) end it "should return true if the LDAP entry exists and can bind" do entry = OpenStruct.new( givenname: 'Foo', sn: 'Bar', dn: "#{Squash::Configuration.authentication.ldap.search_key}=#{@user.username},#{Squash::Configuration.authentication.ldap.tree_base}" ) expect(@ldap).to receive(:search).once { |hsh| hsh[:filter].to_raw_rfc2254 == "#{Squash::Configuration.authentication.ldap.search_key}=#{@user.username}" }.and_yield(entry) expect(@ldap).to receive(:auth).once.with( /#{Regexp.escape Squash::Configuration.authentication.ldap.search_key}=#{Regexp.escape @user.username},/, 'password' ) if Squash::Configuration.authentication.ldap[:bind_dn] expect(@ldap).to receive(:auth).once.with(Squash::Configuration.authentication.ldap.bind_dn, Squash::Configuration.authentication.ldap.bind_password) end allow(@ldap).to receive(:bind).and_return(true) expect(@controller).to receive(:log_in_user).once.with(@user) expect(@controller.log_in(@user.username, 'password')).to eql(true) end it "should extract the username from an email address login" do entry = OpenStruct.new( givenname: 'Foo', sn: 'Bar', dn: "#{Squash::Configuration.authentication.ldap.search_key}=#{@user.username},#{Squash::Configuration.authentication.ldap.tree_base}" ) expect(@ldap).to receive(:search).once { |hsh| hsh[:filter].to_raw_rfc2254 == "#{Squash::Configuration.authentication.ldap.search_key}=#{@user.username}" }.and_yield(entry) expect(@ldap).to receive(:auth).once.with( /#{Regexp.escape Squash::Configuration.authentication.ldap.search_key}=#{Regexp.escape @user.username},/, 'password' ) if Squash::Configuration.authentication.ldap[:bind_dn] expect(@ldap).to receive(:auth).once.with(Squash::Configuration.authentication.ldap.bind_dn, Squash::Configuration.authentication.ldap.bind_password) end allow(@ldap).to receive(:bind).and_return(true) expect(@controller).to receive(:log_in_user).once.with(@user) expect(@controller.log_in("#{@user.username}@#{Squash::Configuration.mailer.domain}", 'password')).to eql(true) end it "should return false if the LDAP entry does not exist" do expect(@ldap).to receive(:search).once do |hsh| hsh[:filter].to_raw_rfc2254 == "#{Squash::Configuration.authentication.ldap.search_key}=#{@user.username}" end if Squash::Configuration.authentication.ldap[:bind_dn] expect(@ldap).to receive(:auth).once.with(Squash::Configuration.authentication.ldap.bind_dn, Squash::Configuration.authentication.ldap.bind_password) else expect(@ldap).to receive(:auth).once.with( /#{Regexp.escape Squash::Configuration.authentication.ldap.search_key}=#{Regexp.escape @user.username},/, 'password' ) end allow(@ldap).to receive(:bind).and_return(true) expect(@controller).not_to receive :log_in_user expect(@controller.log_in(@user.username, 'password')).to eql(false) end if Squash::Configuration.authentication.ldap[:bind_dn] it "should return false if the user cannot bind" do entry = OpenStruct.new( givenname: 'Foo', sn: 'Bar', dn: "#{Squash::Configuration.authentication.ldap.search_key}=#{@user.username},#{Squash::Configuration.authentication.ldap.tree_base}" ) expect(@ldap).to receive(:search).once { |hsh| hsh[:filter].to_raw_rfc2254 == "#{Squash::Configuration.authentication.ldap.search_key}=#{@user.username}" }.and_yield(entry) expect(@ldap).to receive(:auth).once.with( /#{Regexp.escape Squash::Configuration.authentication.ldap.search_key}=#{Regexp.escape @user.username},/, 'password' ) expect(@ldap).to receive(:auth).once.with(Squash::Configuration.authentication.ldap.bind_dn, Squash::Configuration.authentication.ldap.bind_password) expect(@ldap).to receive(:bind).twice.and_return(true, false) expect(@controller).not_to receive :log_in_user expect(@controller.log_in(@user.username, 'password')).to eql(false) end it "should return false if the LDAP authenticator cannot bind" do expect(@ldap).to receive(:auth).once.with(Squash::Configuration.authentication.ldap.bind_dn, Squash::Configuration.authentication.ldap.bind_password) allow(@ldap).to receive(:bind).once.and_return(false) expect(@controller).not_to receive :log_in_user expect(@controller.log_in(@user.username, 'password')).to eql(false) end else it "should return false if the user cannot bind" do expect(@ldap).not_to receive :search expect(@ldap).to receive(:auth).once.with( /#{Regexp.escape Squash::Configuration.authentication.ldap.search_key}=#{Regexp.escape @user.username},/, 'password' ) expect(@ldap).to receive(:bind).once.and_return(false) expect(@controller).not_to receive :log_in_user expect(@controller.log_in(@user.username, 'password')).to eql(false) end end it "should create a new user if one doesn't already exist" do entry = OpenStruct.new( givenname: 'New', sn: 'User', dn: "#{Squash::Configuration.authentication.ldap.search_key}=newuser,#{Squash::Configuration.authentication.ldap.tree_base}" ) expect(@ldap).to receive(:search).once { |hsh| hsh[:filter].to_raw_rfc2254 == "#{Squash::Configuration.authentication.ldap.search_key}=newuser" }.and_yield(entry) expect(@ldap).to receive(:auth).once.with( /#{Regexp.escape Squash::Configuration.authentication.ldap.search_key}=newuser,/, 'password' ) if Squash::Configuration.authentication.ldap[:bind_dn] expect(@ldap).to receive(:auth).once.with(Squash::Configuration.authentication.ldap.bind_dn, Squash::Configuration.authentication.ldap.bind_password) end allow(@ldap).to receive(:bind).and_return(true) expect(@controller).to receive(:log_in_user).once do |user| user.username == 'newuser' && user.first_name == 'New' && user.last_name == 'User' end expect(@controller.log_in('newuser', 'password')).to eql(true) end end end end
SquareSquash/web/spec/controllers/additions/ldap_authentication_helpers_spec.rb/0
{ "file_path": "SquareSquash/web/spec/controllers/additions/ldap_authentication_helpers_spec.rb", "repo_id": "SquareSquash", "token_count": 3870 }
117
# encoding: utf-8 # Copyright 2014 Square Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require 'rails_helper' RSpec.describe Project::MembershipsController, type: :controller do describe "#index" do before :all do @project = FactoryGirl.create(:project) User.where("username LIKE 'filter-%'").delete_all @filter_memberships = 11.times.map { |i| FactoryGirl.create(:membership, project: @project, created_at: Time.now - 1.month, user: FactoryGirl.create(:user, username: "filter-#{i}")) } FactoryGirl.create_list :membership, 11, project: @project @memberships = @project.memberships.to_a # get the owner's membership too end it "should require a logged-in user" do get :index, polymorphic_params(@project, true) expect(response).to redirect_to login_url(next: request.fullpath) end context '[authenticated]' do before(:each) { login_as @project.owner } it "should only allow projects that exist" do get :index, project_id: 'not-found' expect(response.status).to eql(404) end context '[JSON]' do it "should load the first 10 memberships" do get :index, polymorphic_params(@project, true, format: 'json') expect(response.status).to eql(200) expect(JSON.parse(response.body).map { |r| r['user']['username'] }).to eql(@memberships.sort_by(&:created_at).reverse.map(&:user).map(&:username)[0, 10]) end it "should filter memberships by name when a query is given" do get :index, polymorphic_params(@project, true, format: 'json', query: 'filter') expect(response.status).to eql(200) expect(JSON.parse(response.body).map { |r| r['user']['username'] }).to eql(@filter_memberships.sort_by(&:created_at).reverse.map(&:user).map(&:username)[0, 10]) end end end end describe "#create" do before :all do @project = FactoryGirl.create(:project) FactoryGirl.create_list :membership, 100, project: @project @memberships = @project.memberships.to_a # get the owner's membership too end before(:each) { @user = FactoryGirl.create(:user) } it "should require a logged-in user" do post :create, polymorphic_params(@project, true, membership: {user_id: @user.id}, format: 'json') expect(response.status).to eql(401) expect(@project.memberships.map(&:user_id)).not_to include(@user.id) end context '[authenticated]' do before(:each) { login_as @project.owner } it "should only allow projects that exist and the user has a membership for" do post :create, project_id: 'not-found', membership: {user_id: @user.id}, format: 'json' expect(response.status).to eql(404) post :create, project_id: FactoryGirl.create(:project).to_param, membership: {user_id: @user.id}, format: 'json' expect(response.status).to eql(403) end it "should create the membership (created by owner)" do login_as @project.owner post :create, polymorphic_params(@project, true, membership: {user_id: @user.id}, format: 'json') expect(response.status).to eql(201) expect(membership = @project.memberships.where(user_id: @user.id).first).not_to be_nil expect(response.body).to eql(membership.to_json) end it "should allow admins to add members" do login_as FactoryGirl.create(:membership, project: @project, admin: true).user post :create, polymorphic_params(@project, true, membership: {user_id: @user.id}, format: 'json') expect(response.status).to eql(201) expect(@project.memberships.where(user_id: @user.id).first).not_to be_nil end it "should not allow members to add other members" do login_as FactoryGirl.create(:membership, project: @project, admin: false).user post :create, polymorphic_params(@project, true, membership: {user_id: @user.id}, format: 'json') expect(response.status).to eql(403) expect(@project.memberships.where(user_id: @user.id).first).to be_nil end it "should allow owners to create admins" do login_as @project.owner post :create, polymorphic_params(@project, true, membership: {user_id: @user.id, admin: 'true'}, format: 'json') expect(response.status).to eql(201) membership = @project.memberships.where(user_id: @user.id).first expect(membership).not_to be_nil expect(membership).to be_admin end it "should not allow admins to create admins" do login_as FactoryGirl.create(:membership, project: @project, admin: true).user post :create, polymorphic_params(@project, true, membership: {user_id: @user.id, admin: 'true'}, format: 'json') expect(@project.memberships.where(user_id: @user.id).first).not_to be_admin end it "should render the errors with status 422 if invalid" do post :create, polymorphic_params(@project, true, membership: {user_id: 'halp', admin: 'true'}, format: 'json') expect(response.status).to eql(422) expect(response.body).to eql("{\"membership\":{\"user\":[\"can’t be blank\"]}}") end end end describe "#update" do before(:all) { @project = FactoryGirl.create(:project) } before(:each) { @membership = FactoryGirl.create(:membership, project: @project) } it "should require a logged-in administrator or owner" do patch :update, polymorphic_params(@membership, false, membership: {admin: true}, format: 'json') expect(response.status).to eql(401) expect(@membership.reload).not_to be_admin login_as FactoryGirl.create(:membership, project: @project).user patch :update, polymorphic_params(@membership, false, membership: {admin: true}, format: 'json') expect(response.status).to eql(403) expect(@membership.reload).not_to be_admin end context('[authenticated]') do before(:each) { login_as @project.owner } it "should only allow projects that exist and the user has a membership for" do patch :update, project_id: 'not-found', id: @membership.user.to_param, membership: {admin: true}, format: 'json' expect(response.status).to eql(404) post :create, project_id: FactoryGirl.create(:project).to_param, id: @membership.user.to_param, membership: {admin: true}, format: 'json' expect(response.status).to eql(403) end it "should allow owners to promote or demote admins" do patch :update, polymorphic_params(@membership, false, membership: {admin: true}, format: 'json') expect(response.status).to eql(200) expect(@membership.reload).to be_admin expect(response.body).to eql(@membership.to_json) patch :update, polymorphic_params(@membership, false, membership: {admin: false}, format: 'json') expect(response.status).to eql(200) expect(@membership.reload).not_to be_admin expect(response.body).to eql(@membership.to_json) end it "should not allow admins to promote or demote admins" do login_as FactoryGirl.create(:membership, project: @project, admin: true).user patch :update, polymorphic_params(@membership, false, membership: {admin: true}, format: 'json') expect(@membership.reload).not_to be_admin end it "should render the errors with status 422 if invalid" end end describe "#destroy" do before(:all) { @project = FactoryGirl.create(:project) } before(:each) { @membership = FactoryGirl.create(:membership, project: @project) } it "should require a logged-in administrator or owner" do delete :destroy, polymorphic_params(@membership, false, format: 'json') expect(response.status).to eql(401) expect { @membership.reload }.not_to raise_error login_as FactoryGirl.create(:membership, project: @project).user delete :destroy, polymorphic_params(@membership, false, format: 'json') expect(response.status).to eql(403) expect { @membership.reload }.not_to raise_error end context '[authenticated]' do before(:each) { login_as @project.owner } it "should only allow projects that exist and the user has a membership for" do delete :destroy, project_id: 'not-found', id: @membership.user.to_param, format: 'json' expect(response.status).to eql(404) delete :destroy, project_id: FactoryGirl.create(:project).to_param, id: @membership.user.to_param, format: 'json' expect(response.status).to eql(404) end it "should destroy the membership" do delete :destroy, polymorphic_params(@membership, false, format: 'json') expect(response.status).to eql(204) expect { @membership.reload }.to raise_error(ActiveRecord::RecordNotFound) end it "should not allow admins to delete other admins" do login_as FactoryGirl.create(:membership, project: @project, admin: true).user @membership.update_attribute :admin, true delete :destroy, polymorphic_params(@membership, false, format: 'json') expect(response.status).to eql(403) expect { @membership.reload }.not_to raise_error end it "should allow the owner to delete other admins" do @membership.update_attribute :admin, true delete :destroy, polymorphic_params(@membership, false, format: 'json') expect(response.status).to eql(204) expect { @membership.reload }.to raise_error(ActiveRecord::RecordNotFound) end end end end
SquareSquash/web/spec/controllers/project/memberships_controller_spec.rb/0
{ "file_path": "SquareSquash/web/spec/controllers/project/memberships_controller_spec.rb", "repo_id": "SquareSquash", "token_count": 3794 }
118
# Copyright 2014 Square Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. FactoryGirl.define do factory :occurrence do association :bug occurred_at { Time.now } end factory :rails_occurrence, parent: :occurrence do association :bug, class_name: 'ActionController::RedirectBackError' client 'rails' message 'No HTTP_REFERRER was set in the request to this action, so redirect_to :back could not be called successfully. If this is a test, make sure to specify request.env["HTTP_REFERRER"].' backtraces [{"name" => "Thread 0", "faulted" => true, "backtrace" => [{"file" => "/usr/bin/gist", "line" => 313, "symbol" => "<main>"}, {"file" => "/usr/bin/gist", "line" => 171, "symbol" => "execute"}, {"file" => "/usr/bin/gist", "line" => 197, "symbol" => "write"}, {"file" => "/usr/lib/ruby/1.9.1/net/http.rb", "line" => 626, "symbol" => "start"}, {"file" => "/usr/lib/ruby/1.9.1/net/http.rb", "line" => 637, "symbol" => "do_start"}, {"file" => "/usr/lib/ruby/1.9.1/net/http.rb", "line" => 644, "symbol" => "connect"}, {"file" => "/usr/lib/ruby/1.9.1/timeout.rb", "line" => 87, "symbol" => "timeout"}, {"file" => "/usr/lib/ruby/1.9.1/timeout.rb", "line" => 44, "symbol" => "timeout"}, {"file" => "/usr/lib/ruby/1.9.1/net/http.rb", "line" => 644, "symbol" => "block in connect"}, {"file" => "/usr/lib/ruby/1.9.1/net/http.rb", "line" => 644, "symbol" => "open"}, {"file" => "/usr/lib/ruby/1.9.1/net/http.rb", "line" => 644, "symbol" => "initialize"}]}] revision 'adf85a0c645e8b262ed7cdb347ff0b32a2f860dc' request_method 'POST' schema 'https' host 'squareup.com' port 443 path '/broken_controller/broken_action' query '?foo[bar]=1&foo[baz]=2' headers( 'Content-Length' => '20570', 'Content-Type' => 'text/html; charset=utf-8', 'Connection' => 'close', 'Status' => '200', 'Etag' => "5897cf6b991135493aba558481f65f4e", 'X-Frame-Options' => 'DENY', 'Set-Cookie' => "visited=; path=/, _session=foobarbaz--bazbarfoo; path=/; secure; HttpOnly", 'Cache-Control' => 'private, max-age=0, must-revalidate', 'X-Square' => 'S=app05.mtv.squareup.com', 'Strict-Transport-Security' => 'max-age=1296000' ) root '/var/www/apps/web/releases/20120221024555' params( 'controller' => 'home', 'action' => 'index', 'foo' => {'bar' => '1', 'baz' => '2'} ) session('user_id' => '12345') flash('alert' => "Couldn't find that user.") hostname 'app012.cloud.local' pid 20104 env_vars( "TERM_PROGRAM" => "Apple_Terminal", "GEM_HOME" => "/Users/tim/.rvm/gems/ree-1.8.7-2011.12", "SHELL" => "/bin/bash", "TERM" => "xterm-256color", "TMPDIR" => "/var/folders/71/cmpmcwg972b2mfvy98hz71kw00018q/T/", "TERM_PROGRAM_VERSION" => "303", "TERM_SESSION_ID" => "F73E4DF7-5824-4E20-A0FA-1BC3698A42DF", "USER" => "tim", "COMMAND_MODE" => "unix2003", "SSH_AUTH_SOCK" => "/tmp/launch-0W3t1G/Listeners", "PATH" => "/Users/tim/.rvm/gems/ree-1.8.7-2011.12/bin:/Users/tim/.rvm/gems/ree-1.8.7-2011.12@global/bin:/Users/tim/.rvm/rubies/ree-1.8.7-2011.12/bin:/Users/tim/.rvm/gems/ree-1.8.7-2011.12/bin:/Users/tim/.rvm/gems/ree-1.8.7-2011.12@global/bin:/Users/tim/.rvm/rubies/ree-1.8.7-2011.12/bin:/Users/tim/.rvm/bin:/Users/tim/Development/topsoil/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/usr/local/git/bin", "PWD" => "/Users/tim/Development/web", "EDITOR" => "vim", "LANG" => "en_US.UTF-8", "HISTCONTROL" => "ignoreboth", "HOME" => "/Users/tim", "SHLVL" => "1", "LOGNAME" => "tim", "GEM_PATH" => "/Users/tim/.rvm/gems/ree-1.8.7-2011.12:/Users/tim/.rvm/gems/ree-1.8.7-2011.12@global", "DISPLAY" => "/tmp/launch-GWtyIN/org.x:0", "RUBY_VERSION" => "ree-1.8.7-2011.12", "_" => "/Users/tim/.rvm/rubies/ree-1.8.7-2011.12/bin/irb" ) end factory :legacy_occurrence, parent: :rails_occurrence do [["Thread 0", true, [ ['/usr/bin/gist', 313, '<main>'], ['/usr/bin/gist', 171, 'execute'], ['/usr/bin/gist', 197, 'write'], ['/usr/lib/ruby/1.9.1/net/http.rb', 626, 'start'], ['/usr/lib/ruby/1.9.1/net/http.rb', 637, 'do_start'], ['/usr/lib/ruby/1.9.1/net/http.rb', 644, 'connect'], ['/usr/lib/ruby/1.9.1/timeout.rb', 87, 'timeout'], ['/usr/lib/ruby/1.9.1/timeout.rb', 44, 'timeout'], ['/usr/lib/ruby/1.9.1/net/http.rb', 644, 'block in connect'], ['/usr/lib/ruby/1.9.1/net/http.rb', 644, 'open'], ['/usr/lib/ruby/1.9.1/net/http.rb', 644, 'initialize'] ]]] end end
SquareSquash/web/spec/factories/occurrences.rb/0
{ "file_path": "SquareSquash/web/spec/factories/occurrences.rb", "repo_id": "SquareSquash", "token_count": 3941 }
119
# Copyright 2014 Square Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require 'rails_helper' RSpec.describe Blamer::Cache do describe "#blame" do before(:all) { @project = FactoryGirl.create(:project) } before(:each) { Blame.delete_all } it "should return a cached blame result if available" do blame = FactoryGirl.create(:blame, repository_hash: @project.repository_hash, file: 'myfile.rb', line: 100) expect(@project.repo).not_to receive(:blame) commit = double('Git::Object::Commit') expect(@project.repo).to receive(:object).once.with(blame.blamed_revision).and_return(commit) expect(Blamer::Cache.instance.blame(@project, blame.revision, 'myfile.rb', 100)).to eql(commit) end it "should fall back to a Git blame operation otherwise" do expect(@project.repo).to receive(:blame).once.with( 'file.rb', hash_including( revision: 'f19641fd13d396fa1b11c595912323cc1c30571d', start: 3, end: 3 ) ).and_return([nil, 'bad', 'bad', 'd1500ebf6cd84775f4cd56b73e81aaa1b3fd9c47']) commit = double('Git::Object::Commit', sha: 'd1500ebf6cd84775f4cd56b73e81aaa1b3fd9c47') expect(@project.repo).to receive(:object).once.with('d1500ebf6cd84775f4cd56b73e81aaa1b3fd9c47').and_return(commit) expect(Blamer::Cache.instance.blame(@project, 'f19641fd13d396fa1b11c595912323cc1c30571d', 'file.rb', 3)). to eql(commit) end it "should write the result of the operation for a cache miss" do Blame.delete_all expect(@project.repo).to receive(:blame).once.with( 'file.rb', hash_including( revision: 'f19641fd13d396fa1b11c595912323cc1c30571d', start: 3, end: 3 ) ).and_return([nil, 'bad', 'bad', 'd1500ebf6cd84775f4cd56b73e81aaa1b3fd9c47']) commit = double('Git::Object::Commit', sha: 'd1500ebf6cd84775f4cd56b73e81aaa1b3fd9c47') expect(@project.repo).to receive(:object).once.with('d1500ebf6cd84775f4cd56b73e81aaa1b3fd9c47').and_return(commit) Blamer::Cache.instance.blame @project, 'f19641fd13d396fa1b11c595912323cc1c30571d', 'file.rb', 3 expect(Blame.for_project(@project).where( revision: 'f19641fd13d396fa1b11c595912323cc1c30571d', file: 'file.rb', line: 3 ).first.blamed_revision).to eql('d1500ebf6cd84775f4cd56b73e81aaa1b3fd9c47') end it "should update a Blame's updated_at for a cache hit" do blame = FactoryGirl.create(:blame, repository_hash: @project.repository_hash, file: 'myfile.rb', line: 100, updated_at: Time.now - 1.day) commit = double('Git::Object::Commit') expect(@project.repo).to receive(:object).once.with(blame.blamed_revision).and_return(commit) Blamer::Cache.instance.blame @project, blame.revision, 'myfile.rb', 100 expect { blame.reload }.to change(blame, :updated_at) end it "should drop the least recently used Blame when the cache is full" do stub_const 'Blamer::Cache::MAX_ENTRIES', 3 FactoryGirl.create_list :blame, 4 doomed = FactoryGirl.create :blame, updated_at: Time.now - 1.day expect(@project.repo).to receive(:blame).once.with( 'file.rb', hash_including( revision: 'f19641fd13d396fa1b11c595912323cc1c30571d', start: 3, end: 3 ) ).and_return([nil, 'bad', 'bad', 'd1500ebf6cd84775f4cd56b73e81aaa1b3fd9c47']) commit = double('Git::Object::Commit', sha: 'd1500ebf6cd84775f4cd56b73e81aaa1b3fd9c47') expect(@project.repo).to receive(:object).once.with('d1500ebf6cd84775f4cd56b73e81aaa1b3fd9c47').and_return(commit) Blamer::Cache.instance.blame(@project, 'f19641fd13d396fa1b11c595912323cc1c30571d', 'file.rb', 3) expect { doomed.reload }.to raise_error(ActiveRecord::RecordNotFound) expect(Blame.count).to eql(3) end end end
SquareSquash/web/spec/lib/blamer/cache_spec.rb/0
{ "file_path": "SquareSquash/web/spec/lib/blamer/cache_spec.rb", "repo_id": "SquareSquash", "token_count": 2023 }
120
# encoding: utf-8 # Copyright 2014 Square Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require 'rails_helper' RSpec.describe Comment, type: :comment do context "[database rules]" do it "should set number sequentially for a given bug" do bug1 = FactoryGirl.create(:bug) bug2 = FactoryGirl.create(:bug) user1 = bug1.environment.project.owner user2 = bug2.environment.project.owner comment1_1 = FactoryGirl.create(:comment, bug: bug1, user: user1) comment1_2 = FactoryGirl.create(:comment, bug: bug1, user: user1) comment2_1 = FactoryGirl.create(:comment, bug: bug2, user: user2) comment2_2 = FactoryGirl.create(:comment, bug: bug2, user: user2) expect(comment1_1.number).to eql(1) expect(comment1_2.number).to eql(2) expect(comment2_1.number).to eql(1) expect(comment2_2.number).to eql(2) end it "should not reuse deleted numbers" do #bug = FactoryGirl.create(:bug) #FactoryGirl.create :comment, bug: bug #FactoryGirl.create(:comment, bug: bug).destroy #FactoryGirl.create(:comment, bug: bug).number.should eql(3) #TODO get this part of the spec to work (for URL-resource identity integrity) bug = FactoryGirl.create(:bug) FactoryGirl.create :comment, bug: bug, user: bug.environment.project.owner c = FactoryGirl.create(:comment, bug: bug, user: bug.environment.project.owner) FactoryGirl.create :comment, bug: bug, user: bug.environment.project.owner c.destroy expect(FactoryGirl.create(:comment, bug: bug, user: bug.environment.project.owner).number).to eql(4) end end context "[validations]" do it "should only allow permitted users to leave comments" do comment = FactoryGirl.build(:comment, bug: FactoryGirl.create(:bug)) expect(comment).not_to be_valid expect(comment.errors[:bug_id]).to eql(["You don’t have permission to comment on this bug."]) end end context "[events]" do it "should create an event when created" do comment = FactoryGirl.create(:comment) event = comment.bug.events.last expect(event.kind).to eql('comment') expect(event.data['comment_id']).to eql(comment.id) expect(event.user).to eql(comment.user) end it "should destroy related events when deleted" do comment = FactoryGirl.create(:comment) event = comment.bug.events.last FactoryGirl.create(:comment, bug: comment.bug, user: comment.user) red_herring = comment.bug.events(true).last comment.destroy expect { event.reload }.to raise_error(ActiveRecord::RecordNotFound) expect { red_herring.reload }.not_to raise_error end end context "[emails]" do before :all do @project = FactoryGirl.create(:project) @assigned = FactoryGirl.create(:membership, project: @project, send_comment_emails: true).user @prev_commenter = FactoryGirl.create(:membership, project: @project, send_comment_emails: true).user @cur_commenter = FactoryGirl.create(:membership, project: @project, send_comment_emails: true).user end before :each do @bug = FactoryGirl.create(:bug, environment: FactoryGirl.create(:environment, project: @project), assigned_user: @assigned) FactoryGirl.create :comment, bug: @bug, user: @prev_commenter ActionMailer::Base.deliveries.clear end it "should send an email to the assigned user and all previous commenters when someone comments on a bug" do FactoryGirl.create :comment, bug: @bug, user: @cur_commenter expect(ActionMailer::Base.deliveries.size).to eql(2) expect(ActionMailer::Base.deliveries.map(&:to).flatten.sort).to eql([@assigned.email, @prev_commenter.email]) ActionMailer::Base.deliveries.each { |d| expect(d.subject).to include("A comment has been added") } end it "should not send an email to the assigned user if the assigned user was the commenter" do FactoryGirl.create :comment, bug: @bug, user: @assigned expect(ActionMailer::Base.deliveries.size).to eql(1) expect(ActionMailer::Base.deliveries.first.to).to eql([@prev_commenter.email]) expect(ActionMailer::Base.deliveries.first.subject).to include("A comment has been added") end it "should not send an email to the author even if the author has previously commented" do FactoryGirl.create :comment, bug: @bug, user: @prev_commenter expect(ActionMailer::Base.deliveries.size).to eql(1) expect(ActionMailer::Base.deliveries.first.to).to eql([@assigned.email]) expect(ActionMailer::Base.deliveries.first.subject).to include("A comment has been added") end it "should send only one email to the assigned user if the assigned user has previously commented on the bug" do FactoryGirl.create :comment, bug: @bug, user: @assigned ActionMailer::Base.deliveries.clear FactoryGirl.create :comment, bug: @bug, user: @cur_commenter expect(ActionMailer::Base.deliveries.size).to eql(2) expect(ActionMailer::Base.deliveries.map(&:to).flatten.sort).to eql([@assigned.email, @prev_commenter.email]) ActionMailer::Base.deliveries.each { |d| expect(d.subject).to include("A comment has been added") } end it "should not send an email if the environment is configured not to send emails" do @bug.environment.update_attribute :sends_emails, false FactoryGirl.create :comment, bug: @bug, user: @cur_commenter expect(ActionMailer::Base.deliveries).to be_empty end it "should not send an email if the recipient has turned off comment emails (assigned user)" do Membership.for(@assigned, @project).first.update_attribute :send_comment_emails, false FactoryGirl.create :comment, bug: @bug, user: @cur_commenter expect(ActionMailer::Base.deliveries.size).to eql(1) expect(ActionMailer::Base.deliveries.first.to).to eql([@prev_commenter.email]) expect(ActionMailer::Base.deliveries.first.subject).to include("A comment has been added") end it "should not send an email if the recipient has turned off comment emails (commenter)" do Membership.for(@assigned, @project).first.update_attribute :send_comment_emails, true Membership.for(@prev_commenter, @project).first.update_attribute :send_comment_emails, false FactoryGirl.create :comment, bug: @bug, user: @cur_commenter expect(ActionMailer::Base.deliveries.size).to eql(1) expect(ActionMailer::Base.deliveries.first.to).to eql([@assigned.email]) expect(ActionMailer::Base.deliveries.first.subject).to include("A comment has been added") end end context "[auto-watching]" do before :all do @user = FactoryGirl.create(:user) @bug = FactoryGirl.create(:bug) FactoryGirl.create :membership, user: @user, project: @bug.environment.project end it "should automatically have the author watch the bug" do @user.watches.destroy_all FactoryGirl.create :comment, user: @user, bug: @bug expect(@user.watches.count).to eql(1) expect(@user.watches(true).first.bug_id).to eql(@bug.id) end it "should do nothing if the author is already watching the bug" do @user.watches.destroy_all FactoryGirl.create :watch, user: @user, bug: @bug FactoryGirl.create :comment, user: @user, bug: @bug expect(@user.watches.count).to eql(1) expect(@user.watches(true).first.bug_id).to eql(@bug.id) end end end
SquareSquash/web/spec/models/comment_spec.rb/0
{ "file_path": "SquareSquash/web/spec/models/comment_spec.rb", "repo_id": "SquareSquash", "token_count": 2901 }
121
# Copyright 2014 Square Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # This file is copied to spec/ when you run 'rails generate rspec:install' ENV['RAILS_ENV'] ||= 'test' require 'spec_helper' require File.expand_path('../../config/environment', __FILE__) require 'rspec/rails' # Add additional requires below this line. Rails is not loaded until this point! # Requires supporting ruby files with custom matchers and macros, etc, in # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are # run as spec files by default. This means that files in spec/support that end # in _spec.rb will both be required and run as specs, causing the specs to be # run twice. It is recommended that you do not name files matching this glob to # end with _spec.rb. You can configure this pattern with the --pattern # option on the command line or in ~/.rspec, .rspec or `.rspec-local`. # # The following line is provided for convenience purposes. It has the downside # of increasing the boot-up time by auto-requiring all files in the support # directory. Alternatively, in the individual `*_spec.rb` files, manually # require only the support files necessary. # # Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f } # Checks for pending migrations before tests are run. # If you are not using ActiveRecord, you can remove this line. ActiveRecord::Migration.check_pending! # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. Dir.glob(Rails.root.join('spec', 'support', '**', '*.rb')).each do |file| require file end # Clear out the database to avoid duplicate key conflicts Dir[Rails.root.join('app', 'models', '**', '*.rb')].each { |f| require f } ActiveRecord::Base.subclasses.each do |model| next if model == ActiveRecord::SchemaMigration model.connection.execute "TRUNCATE #{model.table_name} CASCADE" end RSpec.configure do |config| # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures config.fixture_path = "#{::Rails.root}/spec/fixtures" # If you're not using ActiveRecord, or you'd prefer not to run each of your # examples within a transaction, remove the following line or assign false # instead of true. config.use_transactional_fixtures = true # RSpec Rails can automatically mix in different behaviours to your tests # based on their file location, for example enabling you to call `get` and # `post` in specs under `spec/controllers`. # # You can disable this behaviour by removing the line below, and instead # explicitly tag your specs with their type, e.g.: # # RSpec.describe UsersController, :type => :controller do # # ... # end # # The different available types are documented in the features, such as in # https://relishapp.com/rspec/rspec-rails/docs config.infer_spec_type_from_file_location! end FakeWeb.allow_net_connect = false require Rails.root.join('config', 'initializers', 'active_record_observer_hooks') # see comments in this file for more info # Logs a user in for spec purposes. # # @params [User] user A user. def login_as(user) allow(controller).to receive(:current_user).and_return(user) end # Returns the parameters that would be created when a polymorphic route is hit # corresponding to the given model object. # # @param [ActiveRecord::Base] object A model object. # @param [true, false] nested Whether or not there are further route components # nested beneath this one. # @param [Hash<Symbol, String>] overrides Additional items to merge into the result hash. # @return [Hash<Symbol, String>] The URL parameters. # # @example # polymorphic_params(some_comment, false) #=> {project_id: 'foo', environment_id: 'development', bug_id: 123, id: 3} # polymorphic_params(some_bug, true) #=> {project_id: 'bar', environment_id: 'test', id: 123} def polymorphic_params(object, nested, overrides={}) hsh = case object when Occurrence {project_id: object.bug.environment.project.to_param, environment_id: object.bug.environment.to_param, bug_id: object.bug.to_param, occurrence_id: object.to_param} when Bug {project_id: object.environment.project.to_param, environment_id: object.environment.to_param, bug_id: object.to_param} when Environment {project_id: object.project.to_param, environment_id: object.to_param} when Comment {project_id: object.bug.environment.project.to_param, environment_id: object.bug.environment.to_param, bug_id: object.bug.to_param, comment_id: object.to_param} when Event {project_id: object.bug.environment.project.to_param, environment_id: object.bug.environment.to_param, bug_id: object.bug.to_param, event_id: object.to_param} when Project {project_id: object.to_param} when Membership {project_id: object.project.to_param, membership_id: object.user.to_param} when Email {id: object.to_param} when User {user_id: object.to_param} else raise ArgumentError, "Unknown model type #{object.class}" end unless nested id_key = hsh.keys.last hsh[:id] = hsh[id_key] hsh.delete id_key end return hsh.reverse_merge(overrides) end # Builds a JIRA API URL as used by JIRA-Ruby. def jira_url(path) host = Squash::Configuration.jira.api_host root = Squash::Configuration.jira.api_root user = Squash::Configuration.jira.authentication.user password = Squash::Configuration.jira.authentication.password host = host.gsub('://', "://#{user}:#{password}@") host + root + path end # @return [String] A random 40-digit hex number. def random_sha 40.times.map { rand(16).to_s(16) }.join end
SquareSquash/web/spec/rails_helper.rb/0
{ "file_path": "SquareSquash/web/spec/rails_helper.rb", "repo_id": "SquareSquash", "token_count": 2105 }
122
/* Flot plugin for plotting error bars. Copyright (c) 2007-2012 IOLA and Ole Laursen. Licensed under the MIT license. Error bars are used to show standard deviation and other statistical properties in a plot. * Created by Rui Pereira - rui (dot) pereira (at) gmail (dot) com This plugin allows you to plot error-bars over points. Set "errorbars" inside the points series to the axis name over which there will be error values in your data array (*even* if you do not intend to plot them later, by setting "show: null" on xerr/yerr). The plugin supports these options: series: { points: { errorbars: "x" or "y" or "xy", xerr: { show: null/false or true, asymmetric: null/false or true, upperCap: null or "-" or function, lowerCap: null or "-" or function, color: null or color, radius: null or number }, yerr: { same options as xerr } } } Each data point array is expected to be of the type: "x" [ x, y, xerr ] "y" [ x, y, yerr ] "xy" [ x, y, xerr, yerr ] Where xerr becomes xerr_lower,xerr_upper for the asymmetric error case, and equivalently for yerr. Eg., a datapoint for the "xy" case with symmetric error-bars on X and asymmetric on Y would be: [ x, y, xerr, yerr_lower, yerr_upper ] By default no end caps are drawn. Setting upperCap and/or lowerCap to "-" will draw a small cap perpendicular to the error bar. They can also be set to a user-defined drawing function, with (ctx, x, y, radius) as parameters, as eg. function drawSemiCircle( ctx, x, y, radius ) { ctx.beginPath(); ctx.arc( x, y, radius, 0, Math.PI, false ); ctx.moveTo( x - radius, y ); ctx.lineTo( x + radius, y ); ctx.stroke(); } Color and radius both default to the same ones of the points series if not set. The independent radius parameter on xerr/yerr is useful for the case when we may want to add error-bars to a line, without showing the interconnecting points (with radius: 0), and still showing end caps on the error-bars. shadowSize and lineWidth are derived as well from the points series. */ (function ($) { var options = { series: { points: { errorbars: null, //should be 'x', 'y' or 'xy' xerr: { err: 'x', show: null, asymmetric: null, upperCap: null, lowerCap: null, color: null, radius: null}, yerr: { err: 'y', show: null, asymmetric: null, upperCap: null, lowerCap: null, color: null, radius: null} } } }; function processRawData(plot, series, data, datapoints){ if (!series.points.errorbars) return; // x,y values var format = [ { x: true, number: true, required: true }, { y: true, number: true, required: true } ]; var errors = series.points.errorbars; // error bars - first X then Y if (errors == 'x' || errors == 'xy') { // lower / upper error if (series.points.xerr.asymmetric) { format.push({ x: true, number: true, required: true }); format.push({ x: true, number: true, required: true }); } else format.push({ x: true, number: true, required: true }); } if (errors == 'y' || errors == 'xy') { // lower / upper error if (series.points.yerr.asymmetric) { format.push({ y: true, number: true, required: true }); format.push({ y: true, number: true, required: true }); } else format.push({ y: true, number: true, required: true }); } datapoints.format = format; } function parseErrors(series, i){ var points = series.datapoints.points; // read errors from points array var exl = null, exu = null, eyl = null, eyu = null; var xerr = series.points.xerr, yerr = series.points.yerr; var eb = series.points.errorbars; // error bars - first X if (eb == 'x' || eb == 'xy') { if (xerr.asymmetric) { exl = points[i + 2]; exu = points[i + 3]; if (eb == 'xy') if (yerr.asymmetric){ eyl = points[i + 4]; eyu = points[i + 5]; } else eyl = points[i + 4]; } else { exl = points[i + 2]; if (eb == 'xy') if (yerr.asymmetric) { eyl = points[i + 3]; eyu = points[i + 4]; } else eyl = points[i + 3]; } // only Y } else if (eb == 'y') if (yerr.asymmetric) { eyl = points[i + 2]; eyu = points[i + 3]; } else eyl = points[i + 2]; // symmetric errors? if (exu == null) exu = exl; if (eyu == null) eyu = eyl; var errRanges = [exl, exu, eyl, eyu]; // nullify if not showing if (!xerr.show){ errRanges[0] = null; errRanges[1] = null; } if (!yerr.show){ errRanges[2] = null; errRanges[3] = null; } return errRanges; } function drawSeriesErrors(plot, ctx, s){ var points = s.datapoints.points, ps = s.datapoints.pointsize, ax = [s.xaxis, s.yaxis], radius = s.points.radius, err = [s.points.xerr, s.points.yerr]; //sanity check, in case some inverted axis hack is applied to flot var invertX = false; if (ax[0].p2c(ax[0].max) < ax[0].p2c(ax[0].min)) { invertX = true; var tmp = err[0].lowerCap; err[0].lowerCap = err[0].upperCap; err[0].upperCap = tmp; } var invertY = false; if (ax[1].p2c(ax[1].min) < ax[1].p2c(ax[1].max)) { invertY = true; var tmp = err[1].lowerCap; err[1].lowerCap = err[1].upperCap; err[1].upperCap = tmp; } for (var i = 0; i < s.datapoints.points.length; i += ps) { //parse var errRanges = parseErrors(s, i); //cycle xerr & yerr for (var e = 0; e < err.length; e++){ var minmax = [ax[e].min, ax[e].max]; //draw this error? if (errRanges[e * err.length]){ //data coordinates var x = points[i], y = points[i + 1]; //errorbar ranges var upper = [x, y][e] + errRanges[e * err.length + 1], lower = [x, y][e] - errRanges[e * err.length]; //points outside of the canvas if (err[e].err == 'x') if (y > ax[1].max || y < ax[1].min || upper < ax[0].min || lower > ax[0].max) continue; if (err[e].err == 'y') if (x > ax[0].max || x < ax[0].min || upper < ax[1].min || lower > ax[1].max) continue; // prevent errorbars getting out of the canvas var drawUpper = true, drawLower = true; if (upper > minmax[1]) { drawUpper = false; upper = minmax[1]; } if (lower < minmax[0]) { drawLower = false; lower = minmax[0]; } //sanity check, in case some inverted axis hack is applied to flot if ((err[e].err == 'x' && invertX) || (err[e].err == 'y' && invertY)) { //swap coordinates var tmp = lower; lower = upper; upper = tmp; tmp = drawLower; drawLower = drawUpper; drawUpper = tmp; tmp = minmax[0]; minmax[0] = minmax[1]; minmax[1] = tmp; } // convert to pixels x = ax[0].p2c(x), y = ax[1].p2c(y), upper = ax[e].p2c(upper); lower = ax[e].p2c(lower); minmax[0] = ax[e].p2c(minmax[0]); minmax[1] = ax[e].p2c(minmax[1]); //same style as points by default var lw = err[e].lineWidth ? err[e].lineWidth : s.points.lineWidth, sw = s.points.shadowSize != null ? s.points.shadowSize : s.shadowSize; //shadow as for points if (lw > 0 && sw > 0) { var w = sw / 2; ctx.lineWidth = w; ctx.strokeStyle = "rgba(0,0,0,0.1)"; drawError(ctx, err[e], x, y, upper, lower, drawUpper, drawLower, radius, w + w/2, minmax); ctx.strokeStyle = "rgba(0,0,0,0.2)"; drawError(ctx, err[e], x, y, upper, lower, drawUpper, drawLower, radius, w/2, minmax); } ctx.strokeStyle = err[e].color? err[e].color: s.color; ctx.lineWidth = lw; //draw it drawError(ctx, err[e], x, y, upper, lower, drawUpper, drawLower, radius, 0, minmax); } } } } function drawError(ctx,err,x,y,upper,lower,drawUpper,drawLower,radius,offset,minmax){ //shadow offset y += offset; upper += offset; lower += offset; // error bar - avoid plotting over circles if (err.err == 'x'){ if (upper > x + radius) drawPath(ctx, [[upper,y],[Math.max(x + radius,minmax[0]),y]]); else drawUpper = false; if (lower < x - radius) drawPath(ctx, [[Math.min(x - radius,minmax[1]),y],[lower,y]] ); else drawLower = false; } else { if (upper < y - radius) drawPath(ctx, [[x,upper],[x,Math.min(y - radius,minmax[0])]] ); else drawUpper = false; if (lower > y + radius) drawPath(ctx, [[x,Math.max(y + radius,minmax[1])],[x,lower]] ); else drawLower = false; } //internal radius value in errorbar, allows to plot radius 0 points and still keep proper sized caps //this is a way to get errorbars on lines without visible connecting dots radius = err.radius != null? err.radius: radius; // upper cap if (drawUpper) { if (err.upperCap == '-'){ if (err.err=='x') drawPath(ctx, [[upper,y - radius],[upper,y + radius]] ); else drawPath(ctx, [[x - radius,upper],[x + radius,upper]] ); } else if ($.isFunction(err.upperCap)){ if (err.err=='x') err.upperCap(ctx, upper, y, radius); else err.upperCap(ctx, x, upper, radius); } } // lower cap if (drawLower) { if (err.lowerCap == '-'){ if (err.err=='x') drawPath(ctx, [[lower,y - radius],[lower,y + radius]] ); else drawPath(ctx, [[x - radius,lower],[x + radius,lower]] ); } else if ($.isFunction(err.lowerCap)){ if (err.err=='x') err.lowerCap(ctx, lower, y, radius); else err.lowerCap(ctx, x, lower, radius); } } } function drawPath(ctx, pts){ ctx.beginPath(); ctx.moveTo(pts[0][0], pts[0][1]); for (var p=1; p < pts.length; p++) ctx.lineTo(pts[p][0], pts[p][1]); ctx.stroke(); } function draw(plot, ctx){ var plotOffset = plot.getPlotOffset(); ctx.save(); ctx.translate(plotOffset.left, plotOffset.top); $.each(plot.getData(), function (i, s) { if (s.points.errorbars && (s.points.xerr.show || s.points.yerr.show)) drawSeriesErrors(plot, ctx, s); }); ctx.restore(); } function init(plot) { plot.hooks.processRawData.push(processRawData); plot.hooks.draw.push(draw); } $.plot.plugins.push({ init: init, options: options, name: 'errorbars', version: '1.0' }); })(jQuery);
SquareSquash/web/vendor/assets/javascripts/flot/errorbars.js/0
{ "file_path": "SquareSquash/web/vendor/assets/javascripts/flot/errorbars.js", "repo_id": "SquareSquash", "token_count": 6663 }
123
/** * SyntaxHighlighter * http://alexgorbatchev.com/SyntaxHighlighter * * SyntaxHighlighter is donationware. If you are using it, please donate. * http://alexgorbatchev.com/SyntaxHighlighter/donate.html * * @version * 3.0.83 (Wed, 12 Feb 2014 03:42:24 GMT) * * @copyright * Copyright (C) 2004-2013 Alex Gorbatchev. * * @license * Dual licensed under the MIT and GPL licenses. */ (function() { var sh = SyntaxHighlighter; /** * Provides functionality to dynamically load only the brushes that a needed to render the current page. * * There are two syntaxes that autoload understands. For example: * * SyntaxHighlighter.autoloader( * [ 'applescript', 'Scripts/shBrushAppleScript.js' ], * [ 'actionscript3', 'as3', 'Scripts/shBrushAS3.js' ] * ); * * or a more easily comprehendable one: * * SyntaxHighlighter.autoloader( * 'applescript Scripts/shBrushAppleScript.js', * 'actionscript3 as3 Scripts/shBrushAS3.js' * ); */ sh.autoloader = function() { var list = arguments, elements = sh.findElements(), brushes = {}, scripts = {}, all = SyntaxHighlighter.all, allCalled = false, allParams = null, i ; SyntaxHighlighter.all = function(params) { allParams = params; allCalled = true; }; function addBrush(aliases, url) { for (var i = 0; i < aliases.length; i++) brushes[aliases[i]] = url; }; function getAliases(item) { return item.pop ? item : item.split(/\s+/) ; } // create table of aliases and script urls for (i = 0; i < list.length; i++) { var aliases = getAliases(list[i]), url = aliases.pop() ; addBrush(aliases, url); } // dynamically add <script /> tags to the document body for (i = 0; i < elements.length; i++) { var url = brushes[elements[i].params.brush]; if(url && scripts[url] === undefined) { if(elements[i].params['html-script'] === 'true') { if(scripts[brushes['xml']] === undefined) { loadScript(brushes['xml']); scripts[url] = false; } } scripts[url] = false; loadScript(url); } } function loadScript(url) { var script = document.createElement('script'), done = false ; script.src = url; script.type = 'text/javascript'; script.language = 'javascript'; script.onload = script.onreadystatechange = function() { if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) { done = true; scripts[url] = true; checkAll(); // Handle memory leak in IE script.onload = script.onreadystatechange = null; script.parentNode.removeChild(script); } }; // sync way of adding script tags to the page document.body.appendChild(script); }; function checkAll() { for(var url in scripts) if (scripts[url] == false) return; if (allCalled) SyntaxHighlighter.highlight(allParams); }; }; })();
SquareSquash/web/vendor/assets/javascripts/sh/shAutoloader.js/0
{ "file_path": "SquareSquash/web/vendor/assets/javascripts/sh/shAutoloader.js", "repo_id": "SquareSquash", "token_count": 1139 }
124
/** * SyntaxHighlighter * http://alexgorbatchev.com/SyntaxHighlighter * * SyntaxHighlighter is donationware. If you are using it, please donate. * http://alexgorbatchev.com/SyntaxHighlighter/donate.html * * @version * 3.0.83 (Wed, 12 Feb 2014 03:42:24 GMT) * * @copyright * Copyright (C) 2004-2013 Alex Gorbatchev. * * @license * Dual licensed under the MIT and GPL licenses. */ ;(function() { // CommonJS SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null); function Brush() { // Contributed by Patrick Webster // http://patrickwebster.blogspot.com/2009/04/javafx-brush-for-syntaxhighlighter.html var datatypes = 'Boolean Byte Character Double Duration ' + 'Float Integer Long Number Short String Void' ; var keywords = 'abstract after and as assert at before bind bound break catch class ' + 'continue def delete else exclusive extends false finally first for from ' + 'function if import in indexof init insert instanceof into inverse last ' + 'lazy mixin mod nativearray new not null on or override package postinit ' + 'protected public public-init public-read replace return reverse sizeof ' + 'step super then this throw true try tween typeof var where while with ' + 'attribute let private readonly static trigger' ; this.regexList = [ { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, { regex: /(-?\.?)(\b(\d*\.?\d+|\d+\.?\d*)(e[+-]?\d+)?|0x[a-f\d]+)\b\.?/gi, css: 'color2' }, // numbers { regex: new RegExp(this.getKeywords(datatypes), 'gm'), css: 'variable' }, // datatypes { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } ]; this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags); }; Brush.prototype = new SyntaxHighlighter.Highlighter(); Brush.aliases = ['jfx', 'javafx']; SyntaxHighlighter.brushes.JavaFX = Brush; // CommonJS typeof(exports) != 'undefined' ? exports.Brush = Brush : null; })();
SquareSquash/web/vendor/assets/javascripts/sh/shBrushJavaFX.js/0
{ "file_path": "SquareSquash/web/vendor/assets/javascripts/sh/shBrushJavaFX.js", "repo_id": "SquareSquash", "token_count": 830 }
125
/** * SyntaxHighlighter * http://alexgorbatchev.com/SyntaxHighlighter * * SyntaxHighlighter is donationware. If you are using it, please donate. * http://alexgorbatchev.com/SyntaxHighlighter/donate.html * * @version * 3.0.83 (Wed, 12 Feb 2014 03:42:24 GMT) * * @copyright * Copyright (C) 2004-2013 Alex Gorbatchev. * * @license * Dual licensed under the MIT and GPL licenses. */ .syntaxhighlighter{background-color:white !important;} .syntaxhighlighter .line.alt1{background-color:white !important;} .syntaxhighlighter .line.alt2{background-color:white !important;} .syntaxhighlighter .line.highlighted.alt1,.syntaxhighlighter .line.highlighted.alt2{background-color:#c3defe !important;} .syntaxhighlighter .line.highlighted.number{color:white !important;} .syntaxhighlighter table caption{color:black !important;} .syntaxhighlighter table td.code .container textarea{background:white;color:black;} .syntaxhighlighter .gutter{color:#787878 !important;} .syntaxhighlighter .gutter .line{border-right:3px solid #d4d0c8 !important;} .syntaxhighlighter .gutter .line.highlighted{background-color:#d4d0c8 !important;color:white !important;} .syntaxhighlighter.printing .line .content{border:none !important;} .syntaxhighlighter.collapsed{overflow:visible !important;} .syntaxhighlighter.collapsed .toolbar{color:#3f5fbf !important;background:white !important;border:1px solid #d4d0c8 !important;} .syntaxhighlighter.collapsed .toolbar a{color:#3f5fbf !important;} .syntaxhighlighter.collapsed .toolbar a:hover{color:#aa7700 !important;} .syntaxhighlighter .toolbar{color:#a0a0a0 !important;background:#d4d0c8 !important;border:none !important;} .syntaxhighlighter .toolbar a{color:#a0a0a0 !important;} .syntaxhighlighter .toolbar a:hover{color:red !important;} .syntaxhighlighter .plain,.syntaxhighlighter .plain a{color:black !important;} .syntaxhighlighter .comments,.syntaxhighlighter .comments a{color:#3f5fbf !important;} .syntaxhighlighter .string,.syntaxhighlighter .string a{color:#2a00ff !important;} .syntaxhighlighter .keyword{color:#7f0055 !important;} .syntaxhighlighter .preprocessor{color:#646464 !important;} .syntaxhighlighter .variable{color:#aa7700 !important;} .syntaxhighlighter .value{color:#009900 !important;} .syntaxhighlighter .functions{color:deeppink !important;} .syntaxhighlighter .constants{color:#0066cc !important;} .syntaxhighlighter .script{font-weight:bold !important;color:#7f0055 !important;background-color:none !important;} .syntaxhighlighter .color1,.syntaxhighlighter .color1 a{color:grey !important;} .syntaxhighlighter .color2,.syntaxhighlighter .color2 a{color:deeppink !important;} .syntaxhighlighter .color3,.syntaxhighlighter .color3 a{color:red !important;} .syntaxhighlighter .keyword{font-weight:bold !important;} .syntaxhighlighter .xml .keyword{color:#3f7f7f !important;font-weight:normal !important;} .syntaxhighlighter .xml .color1,.syntaxhighlighter .xml .color1 a{color:#7f007f !important;} .syntaxhighlighter .xml .string{font-style:italic !important;color:#2a00ff !important;}
SquareSquash/web/vendor/assets/stylesheets/sh/shThemeEclipse.css/0
{ "file_path": "SquareSquash/web/vendor/assets/stylesheets/sh/shThemeEclipse.css", "repo_id": "SquareSquash", "token_count": 1030 }
126
# Bitwarden Licensed Code All source code under this directory is licensed under the [Bitwarden License Agreement](https://github.com/bitwarden/web/blob/master/LICENSE_BITWARDEN.txt).
bitwarden/web/bitwarden_license/README.md/0
{ "file_path": "bitwarden/web/bitwarden_license/README.md", "repo_id": "bitwarden", "token_count": 53 }
127
import { NgModule } from "@angular/core"; import { RouterModule, Routes } from "@angular/router"; import { AuthGuard } from "jslib-angular/guards/auth.guard"; import { Permissions } from "jslib-common/enums/permissions"; import { PermissionsGuard } from "src/app/organizations/guards/permissions.guard"; import { OrganizationLayoutComponent } from "src/app/organizations/layouts/organization-layout.component"; import { ManageComponent } from "src/app/organizations/manage/manage.component"; import { NavigationPermissionsService } from "src/app/organizations/services/navigation-permissions.service"; import { SsoComponent } from "./manage/sso.component"; const routes: Routes = [ { path: "organizations/:organizationId", component: OrganizationLayoutComponent, canActivate: [AuthGuard, PermissionsGuard], children: [ { path: "manage", component: ManageComponent, canActivate: [PermissionsGuard], data: { permissions: NavigationPermissionsService.getPermissions("manage"), }, children: [ { path: "sso", component: SsoComponent, canActivate: [PermissionsGuard], data: { permissions: [Permissions.ManageSso], }, }, ], }, ], }, ]; @NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule], }) export class OrganizationsRoutingModule {}
bitwarden/web/bitwarden_license/src/app/organizations/organizations-routing.module.ts/0
{ "file_path": "bitwarden/web/bitwarden_license/src/app/organizations/organizations-routing.module.ts", "repo_id": "bitwarden", "token_count": 557 }
128
import { Component, Input } from "@angular/core"; import { ProviderUserStatusType } from "jslib-common/enums/providerUserStatusType"; import { ProviderUserBulkConfirmRequest } from "jslib-common/models/request/provider/providerUserBulkConfirmRequest"; import { ProviderUserBulkRequest } from "jslib-common/models/request/provider/providerUserBulkRequest"; import { BulkConfirmComponent as OrganizationBulkConfirmComponent } from "src/app/organizations/manage/bulk/bulk-confirm.component"; import { BulkUserDetails } from "src/app/organizations/manage/bulk/bulk-status.component"; @Component({ templateUrl: "../../../../../../src/app/organizations/manage/bulk/bulk-confirm.component.html", }) export class BulkConfirmComponent extends OrganizationBulkConfirmComponent { @Input() providerId: string; protected isAccepted(user: BulkUserDetails) { return user.status === ProviderUserStatusType.Accepted; } protected async getPublicKeys() { const request = new ProviderUserBulkRequest(this.filteredUsers.map((user) => user.id)); return await this.apiService.postProviderUsersPublicKey(this.providerId, request); } protected getCryptoKey() { return this.cryptoService.getProviderKey(this.providerId); } protected async postConfirmRequest(userIdsWithKeys: any[]) { const request = new ProviderUserBulkConfirmRequest(userIdsWithKeys); return await this.apiService.postProviderUserBulkConfirm(this.providerId, request); } }
bitwarden/web/bitwarden_license/src/app/providers/manage/bulk/bulk-confirm.component.ts/0
{ "file_path": "bitwarden/web/bitwarden_license/src/app/providers/manage/bulk/bulk-confirm.component.ts", "repo_id": "bitwarden", "token_count": 446 }
129
import { Component } from "@angular/core"; import { ActivatedRoute } from "@angular/router"; import { ApiService } from "jslib-common/abstractions/api.service"; import { I18nService } from "jslib-common/abstractions/i18n.service"; import { LogService } from "jslib-common/abstractions/log.service"; import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service"; import { SyncService } from "jslib-common/abstractions/sync.service"; import { ProviderUpdateRequest } from "jslib-common/models/request/provider/providerUpdateRequest"; import { ProviderResponse } from "jslib-common/models/response/provider/providerResponse"; @Component({ selector: "provider-account", templateUrl: "account.component.html", }) export class AccountComponent { selfHosted = false; loading = true; provider: ProviderResponse; formPromise: Promise<any>; taxFormPromise: Promise<any>; private providerId: string; constructor( private apiService: ApiService, private i18nService: I18nService, private route: ActivatedRoute, private syncService: SyncService, private platformUtilsService: PlatformUtilsService, private logService: LogService ) {} async ngOnInit() { this.selfHosted = this.platformUtilsService.isSelfHost(); this.route.parent.parent.params.subscribe(async (params) => { this.providerId = params.providerId; try { this.provider = await this.apiService.getProvider(this.providerId); } catch (e) { this.logService.error(`Handled exception: ${e}`); } }); this.loading = false; } async submit() { try { const request = new ProviderUpdateRequest(); request.name = this.provider.name; request.businessName = this.provider.businessName; request.billingEmail = this.provider.billingEmail; this.formPromise = this.apiService.putProvider(this.providerId, request).then(() => { return this.syncService.fullSync(true); }); await this.formPromise; this.platformUtilsService.showToast("success", null, this.i18nService.t("providerUpdated")); } catch (e) { this.logService.error(`Handled exception: ${e}`); } } }
bitwarden/web/bitwarden_license/src/app/providers/settings/account.component.ts/0
{ "file_path": "bitwarden/web/bitwarden_license/src/app/providers/settings/account.component.ts", "repo_id": "bitwarden", "token_count": 768 }
130
#!/bin/bash # Setup GROUPNAME="bitwarden" USERNAME="bitwarden" LUID=${LOCAL_UID:-0} LGID=${LOCAL_GID:-0} # Step down from host root to well-known nobody/nogroup user if [ $LUID -eq 0 ] then LUID=65534 fi if [ $LGID -eq 0 ] then LGID=65534 fi # Create user and group groupadd -o -g $LGID $GROUPNAME >/dev/null 2>&1 || groupmod -o -g $LGID $GROUPNAME >/dev/null 2>&1 useradd -o -u $LUID -g $GROUPNAME -s /bin/false $USERNAME >/dev/null 2>&1 || usermod -o -u $LUID -g $GROUPNAME -s /bin/false $USERNAME >/dev/null 2>&1 mkhomedir_helper $USERNAME # The rest... chown -R $USERNAME:$GROUPNAME /etc/bitwarden cp /etc/bitwarden/web/app-id.json /app/app-id.json chown -R $USERNAME:$GROUPNAME /app chown -R $USERNAME:$GROUPNAME /bitwarden_server exec gosu $USERNAME:$GROUPNAME dotnet /bitwarden_server/Server.dll \ /contentRoot=/app /webRoot=. /serveUnknown=false /webVault=true
bitwarden/web/entrypoint.sh/0
{ "file_path": "bitwarden/web/entrypoint.sh", "repo_id": "bitwarden", "token_count": 400 }
131
import { Component } from "@angular/core"; import { Router } from "@angular/router"; import { HintComponent as BaseHintComponent } from "jslib-angular/components/hint.component"; import { ApiService } from "jslib-common/abstractions/api.service"; import { I18nService } from "jslib-common/abstractions/i18n.service"; import { LogService } from "jslib-common/abstractions/log.service"; import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service"; @Component({ selector: "app-hint", templateUrl: "hint.component.html", }) export class HintComponent extends BaseHintComponent { constructor( router: Router, i18nService: I18nService, apiService: ApiService, platformUtilsService: PlatformUtilsService, logService: LogService ) { super(router, i18nService, apiService, platformUtilsService, logService); } }
bitwarden/web/src/app/accounts/hint.component.ts/0
{ "file_path": "bitwarden/web/src/app/accounts/hint.component.ts", "repo_id": "bitwarden", "token_count": 285 }
132
import { Component } from "@angular/core"; import { ActivatedRoute, Router } from "@angular/router"; import { first } from "rxjs/operators"; import { SsoComponent as BaseSsoComponent } from "jslib-angular/components/sso.component"; import { ApiService } from "jslib-common/abstractions/api.service"; import { AuthService } from "jslib-common/abstractions/auth.service"; import { CryptoFunctionService } from "jslib-common/abstractions/cryptoFunction.service"; import { EnvironmentService } from "jslib-common/abstractions/environment.service"; import { I18nService } from "jslib-common/abstractions/i18n.service"; import { LogService } from "jslib-common/abstractions/log.service"; import { PasswordGenerationService } from "jslib-common/abstractions/passwordGeneration.service"; import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service"; import { StateService } from "jslib-common/abstractions/state.service"; @Component({ selector: "app-sso", templateUrl: "sso.component.html", }) export class SsoComponent extends BaseSsoComponent { constructor( authService: AuthService, router: Router, i18nService: I18nService, route: ActivatedRoute, stateService: StateService, platformUtilsService: PlatformUtilsService, apiService: ApiService, cryptoFunctionService: CryptoFunctionService, environmentService: EnvironmentService, passwordGenerationService: PasswordGenerationService, logService: LogService ) { super( authService, router, i18nService, route, stateService, platformUtilsService, apiService, cryptoFunctionService, environmentService, passwordGenerationService, logService ); this.redirectUri = window.location.origin + "/sso-connector.html"; this.clientId = "web"; } async ngOnInit() { super.ngOnInit(); this.route.queryParams.pipe(first()).subscribe(async (qParams) => { if (qParams.identifier != null) { this.identifier = qParams.identifier; } else { const storedIdentifier = await this.stateService.getSsoOrgIdentifier(); if (storedIdentifier != null) { this.identifier = storedIdentifier; } } }); } async submit() { await this.stateService.setSsoOrganizationIdentifier(this.identifier); if (this.clientId === "browser") { document.cookie = `ssoHandOffMessage=${this.i18nService.t("ssoHandOff")};SameSite=strict`; } super.submit(); } }
bitwarden/web/src/app/accounts/sso.component.ts/0
{ "file_path": "bitwarden/web/src/app/accounts/sso.component.ts", "repo_id": "bitwarden", "token_count": 893 }
133
import { Directive, OnInit } from "@angular/core"; import { ActivatedRoute, Router } from "@angular/router"; import { first } from "rxjs/operators"; import { I18nService } from "jslib-common/abstractions/i18n.service"; import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service"; import { StateService } from "jslib-common/abstractions/state.service"; @Directive() export abstract class BaseAcceptComponent implements OnInit { loading = true; authed = false; email: string; actionPromise: Promise<any>; protected requiredParameters: string[] = []; protected failedShortMessage = "inviteAcceptFailedShort"; protected failedMessage = "inviteAcceptFailed"; constructor( protected router: Router, protected platformUtilService: PlatformUtilsService, protected i18nService: I18nService, protected route: ActivatedRoute, protected stateService: StateService ) {} abstract authedHandler(qParams: any): Promise<void>; abstract unauthedHandler(qParams: any): Promise<void>; ngOnInit() { this.route.queryParams.pipe(first()).subscribe(async (qParams) => { let error = this.requiredParameters.some((e) => qParams?.[e] == null || qParams[e] === ""); let errorMessage: string = null; if (!error) { this.authed = await this.stateService.getIsAuthenticated(); if (this.authed) { try { await this.authedHandler(qParams); } catch (e) { error = true; errorMessage = e.message; } } else { this.email = qParams.email; await this.unauthedHandler(qParams); } } if (error) { const message = errorMessage != null ? this.i18nService.t(this.failedShortMessage, errorMessage) : this.i18nService.t(this.failedMessage); this.platformUtilService.showToast("error", null, message, { timeout: 10000 }); this.router.navigate(["/"]); } this.loading = false; }); } }
bitwarden/web/src/app/common/base.accept.component.ts/0
{ "file_path": "bitwarden/web/src/app/common/base.accept.component.ts", "repo_id": "bitwarden", "token_count": 786 }
134
import { Component, OnDestroy, OnInit } from "@angular/core"; import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service"; @Component({ selector: "app-frontend-layout", templateUrl: "frontend-layout.component.html", }) export class FrontendLayoutComponent implements OnInit, OnDestroy { version: string; year = "2015"; constructor(private platformUtilsService: PlatformUtilsService) {} async ngOnInit() { this.year = new Date().getFullYear().toString(); this.version = await this.platformUtilsService.getApplicationVersion(); document.body.classList.add("layout_frontend"); } ngOnDestroy() { document.body.classList.remove("layout_frontend"); } }
bitwarden/web/src/app/layouts/frontend-layout.component.ts/0
{ "file_path": "bitwarden/web/src/app/layouts/frontend-layout.component.ts", "repo_id": "bitwarden", "token_count": 218 }
135
<ng-container *ngIf="show"> <div class="filter-heading"> <button (click)="toggleCollapse(collectionsGrouping)" [attr.aria-expanded]="!isCollapsed(collectionsGrouping)" aria-controls="collection-filters" title="{{ 'toggleCollapse' | i18n }}" class="toggle-button" > <i class="bwi bwi-fw" [ngClass]="{ 'bwi-angle-right': isCollapsed(collectionsGrouping), 'bwi-angle-down': !isCollapsed(collectionsGrouping) }" aria-hidden="true" ></i> </button> <h3 class="filter-title">&nbsp;{{ collectionsGrouping.name | i18n }}</h3> </div> <ul id="collection-filters" *ngIf="!isCollapsed(collectionsGrouping)" class="filter-options"> <ng-template #recursiveCollections let-collections> <li *ngFor="let c of collections" [ngClass]="{ active: c.node.id === activeFilter.selectedCollectionId }" class="filter-option" > <span class="filter-buttons"> <button class="toggle-button" *ngIf="c.children.length" (click)="toggleCollapse(c.node)" title="{{ 'toggleCollapse' | i18n }}" [attr.aria-expanded]="!isCollapsed(c.node)" [attr.aria-controls]="c.node.name + '_children'" > <i class="bwi bwi-fw" [ngClass]="{ 'bwi-angle-right': isCollapsed(c.node), 'bwi-angle-down': !isCollapsed(c.node) }" aria-hidden="true" ></i> </button> <button class="filter-button" (click)="applyFilter(c.node)"> <i *ngIf="c.children.length === 0" class="bwi bwi-collection bwi-fw" aria-hidden="true" ></i >&nbsp;{{ c.node.name }} </button> </span> <ul [id]="c.node.name + '_children'" class="nested-filter-options" *ngIf="c.children.length && !isCollapsed(c.node)" > <ng-container *ngTemplateOutlet="recursiveCollections; context: { $implicit: c.children }" > </ng-container> </ul> </li> </ng-template> <ng-container *ngTemplateOutlet="recursiveCollections; context: { $implicit: nestedCollections }" > </ng-container> </ul> </ng-container>
bitwarden/web/src/app/modules/vault-filter/components/collection-filter.component.html/0
{ "file_path": "bitwarden/web/src/app/modules/vault-filter/components/collection-filter.component.html", "repo_id": "bitwarden", "token_count": 1258 }
136
import { Component, EventEmitter, Output } from "@angular/core"; import { VaultFilterComponent as BaseVaultFilterComponent } from "jslib-angular/modules/vault-filter/vault-filter.component"; import { VaultFilterService } from "./vault-filter.service"; @Component({ selector: "app-vault-filter", templateUrl: "vault-filter.component.html", }) export class VaultFilterComponent extends BaseVaultFilterComponent { @Output() onSearchTextChanged = new EventEmitter<string>(); searchPlaceholder: string; searchText = ""; constructor(protected vaultFilterService: VaultFilterService) { // This empty constructor is required to provide the web vaultFilterService subclass to super() // TODO: refactor this to use proper dependency injection super(vaultFilterService); } searchTextChanged() { this.onSearchTextChanged.emit(this.searchText); } }
bitwarden/web/src/app/modules/vault-filter/vault-filter.component.ts/0
{ "file_path": "bitwarden/web/src/app/modules/vault-filter/vault-filter.component.ts", "repo_id": "bitwarden", "token_count": 247 }
137
import { Injectable } from "@angular/core"; import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from "@angular/router"; import { I18nService } from "jslib-common/abstractions/i18n.service"; import { OrganizationService } from "jslib-common/abstractions/organization.service"; import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service"; import { SyncService } from "jslib-common/abstractions/sync.service"; import { Permissions } from "jslib-common/enums/permissions"; @Injectable() export class PermissionsGuard implements CanActivate { constructor( private router: Router, private organizationService: OrganizationService, private platformUtilsService: PlatformUtilsService, private i18nService: I18nService, private syncService: SyncService ) {} async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { // TODO: We need to fix this issue once and for all. if ((await this.syncService.getLastSync()) == null) { await this.syncService.fullSync(false); } const org = await this.organizationService.get(route.params.organizationId); if (org == null) { return this.router.createUrlTree(["/"]); } if (!org.isOwner && !org.enabled) { this.platformUtilsService.showToast( "error", null, this.i18nService.t("organizationIsDisabled") ); return this.router.createUrlTree(["/"]); } const permissions = route.data == null ? [] : (route.data.permissions as Permissions[]); if (permissions != null && !org.hasAnyPermission(permissions)) { // Handle linkable ciphers for organizations the user only has view access to // https://bitwarden.atlassian.net/browse/EC-203 if (state.root.queryParamMap.has("cipherId")) { return this.router.createUrlTree(["/vault"], { queryParams: { cipherId: state.root.queryParamMap.get("cipherId"), }, }); } this.platformUtilsService.showToast("error", null, this.i18nService.t("accessDenied")); return this.router.createUrlTree(["/"]); } return true; } }
bitwarden/web/src/app/organizations/guards/permissions.guard.ts/0
{ "file_path": "bitwarden/web/src/app/organizations/guards/permissions.guard.ts", "repo_id": "bitwarden", "token_count": 785 }
138
import { Component, OnInit } from "@angular/core"; import { ActivatedRoute, Router } from "@angular/router"; import { UserNamePipe } from "jslib-angular/pipes/user-name.pipe"; import { ApiService } from "jslib-common/abstractions/api.service"; import { ExportService } from "jslib-common/abstractions/export.service"; import { I18nService } from "jslib-common/abstractions/i18n.service"; import { LogService } from "jslib-common/abstractions/log.service"; import { OrganizationService } from "jslib-common/abstractions/organization.service"; import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service"; import { ProviderService } from "jslib-common/abstractions/provider.service"; import { Organization } from "jslib-common/models/domain/organization"; import { EventResponse } from "jslib-common/models/response/eventResponse"; import { BaseEventsComponent } from "../../common/base.events.component"; import { EventService } from "../../services/event.service"; @Component({ selector: "app-org-events", templateUrl: "events.component.html", }) export class EventsComponent extends BaseEventsComponent implements OnInit { exportFileName = "org-events"; organizationId: string; organization: Organization; private orgUsersUserIdMap = new Map<string, any>(); constructor( private apiService: ApiService, private route: ActivatedRoute, eventService: EventService, i18nService: I18nService, exportService: ExportService, platformUtilsService: PlatformUtilsService, private router: Router, logService: LogService, private userNamePipe: UserNamePipe, private organizationService: OrganizationService, private providerService: ProviderService ) { super(eventService, i18nService, exportService, platformUtilsService, logService); } async ngOnInit() { this.route.parent.parent.params.subscribe(async (params) => { this.organizationId = params.organizationId; this.organization = await this.organizationService.get(this.organizationId); if (this.organization == null || !this.organization.useEvents) { this.router.navigate(["/organizations", this.organizationId]); return; } await this.load(); }); } async load() { const response = await this.apiService.getOrganizationUsers(this.organizationId); response.data.forEach((u) => { const name = this.userNamePipe.transform(u); this.orgUsersUserIdMap.set(u.userId, { name: name, email: u.email }); }); if (this.organization.providerId != null) { try { const provider = await this.providerService.get(this.organization.providerId); if ( provider != null && (await this.providerService.get(this.organization.providerId)).canManageUsers ) { const providerUsersResponse = await this.apiService.getProviderUsers( this.organization.providerId ); providerUsersResponse.data.forEach((u) => { const name = this.userNamePipe.transform(u); this.orgUsersUserIdMap.set(u.userId, { name: `${name} (${this.organization.providerName})`, email: u.email, }); }); } } catch (e) { this.logService.warning(e); } } await this.loadEvents(true); this.loaded = true; } protected requestEvents(startDate: string, endDate: string, continuationToken: string) { return this.apiService.getEventsOrganization( this.organizationId, startDate, endDate, continuationToken ); } protected getUserName(r: EventResponse, userId: string) { if (userId == null) { return null; } if (this.orgUsersUserIdMap.has(userId)) { return this.orgUsersUserIdMap.get(userId); } if (r.providerId != null && r.providerId === this.organization.providerId) { return { name: this.organization.providerName, }; } return null; } }
bitwarden/web/src/app/organizations/manage/events.component.ts/0
{ "file_path": "bitwarden/web/src/app/organizations/manage/events.component.ts", "repo_id": "bitwarden", "token_count": 1470 }
139
import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core"; import { ApiService } from "jslib-common/abstractions/api.service"; import { CollectionService } from "jslib-common/abstractions/collection.service"; import { I18nService } from "jslib-common/abstractions/i18n.service"; import { LogService } from "jslib-common/abstractions/log.service"; import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service"; import { OrganizationUserType } from "jslib-common/enums/organizationUserType"; import { PermissionsApi } from "jslib-common/models/api/permissionsApi"; import { CollectionData } from "jslib-common/models/data/collectionData"; import { Collection } from "jslib-common/models/domain/collection"; import { OrganizationUserInviteRequest } from "jslib-common/models/request/organizationUserInviteRequest"; import { OrganizationUserUpdateRequest } from "jslib-common/models/request/organizationUserUpdateRequest"; import { SelectionReadOnlyRequest } from "jslib-common/models/request/selectionReadOnlyRequest"; import { CollectionDetailsResponse } from "jslib-common/models/response/collectionResponse"; import { CollectionView } from "jslib-common/models/view/collectionView"; @Component({ selector: "app-user-add-edit", templateUrl: "user-add-edit.component.html", }) export class UserAddEditComponent implements OnInit { @Input() name: string; @Input() organizationUserId: string; @Input() organizationId: string; @Input() usesKeyConnector = false; @Output() onSavedUser = new EventEmitter(); @Output() onDeletedUser = new EventEmitter(); loading = true; editMode = false; title: string; emails: string; type: OrganizationUserType = OrganizationUserType.User; permissions = new PermissionsApi(); showCustom = false; access: "all" | "selected" = "selected"; collections: CollectionView[] = []; formPromise: Promise<any>; deletePromise: Promise<any>; organizationUserType = OrganizationUserType; manageAllCollectionsCheckboxes = [ { id: "createNewCollections", get: () => this.permissions.createNewCollections, set: (v: boolean) => (this.permissions.createNewCollections = v), }, { id: "editAnyCollection", get: () => this.permissions.editAnyCollection, set: (v: boolean) => (this.permissions.editAnyCollection = v), }, { id: "deleteAnyCollection", get: () => this.permissions.deleteAnyCollection, set: (v: boolean) => (this.permissions.deleteAnyCollection = v), }, ]; manageAssignedCollectionsCheckboxes = [ { id: "editAssignedCollections", get: () => this.permissions.editAssignedCollections, set: (v: boolean) => (this.permissions.editAssignedCollections = v), }, { id: "deleteAssignedCollections", get: () => this.permissions.deleteAssignedCollections, set: (v: boolean) => (this.permissions.deleteAssignedCollections = v), }, ]; get customUserTypeSelected(): boolean { return this.type === OrganizationUserType.Custom; } constructor( private apiService: ApiService, private i18nService: I18nService, private collectionService: CollectionService, private platformUtilsService: PlatformUtilsService, private logService: LogService ) {} async ngOnInit() { this.editMode = this.loading = this.organizationUserId != null; await this.loadCollections(); if (this.editMode) { this.editMode = true; this.title = this.i18nService.t("editUser"); try { const user = await this.apiService.getOrganizationUser( this.organizationId, this.organizationUserId ); this.access = user.accessAll ? "all" : "selected"; this.type = user.type; if (user.type === OrganizationUserType.Custom) { this.permissions = user.permissions; } if (user.collections != null && this.collections != null) { user.collections.forEach((s) => { const collection = this.collections.filter((c) => c.id === s.id); if (collection != null && collection.length > 0) { (collection[0] as any).checked = true; collection[0].readOnly = s.readOnly; collection[0].hidePasswords = s.hidePasswords; } }); } } catch (e) { this.logService.error(e); } } else { this.title = this.i18nService.t("inviteUser"); } this.loading = false; } async loadCollections() { const response = await this.apiService.getCollections(this.organizationId); const collections = response.data.map( (r) => new Collection(new CollectionData(r as CollectionDetailsResponse)) ); this.collections = await this.collectionService.decryptMany(collections); } check(c: CollectionView, select?: boolean) { (c as any).checked = select == null ? !(c as any).checked : select; if (!(c as any).checked) { c.readOnly = false; } } selectAll(select: boolean) { this.collections.forEach((c) => this.check(c, select)); } setRequestPermissions(p: PermissionsApi, clearPermissions: boolean) { Object.assign(p, clearPermissions ? new PermissionsApi() : this.permissions); return p; } handleDependentPermissions() { // Manage Password Reset must have Manage Users enabled if (this.permissions.manageResetPassword && !this.permissions.manageUsers) { this.permissions.manageUsers = true; (document.getElementById("manageUsers") as HTMLInputElement).checked = true; this.platformUtilsService.showToast( "info", null, this.i18nService.t("resetPasswordManageUsers") ); } } async submit() { let collections: SelectionReadOnlyRequest[] = null; if (this.access !== "all") { collections = this.collections .filter((c) => (c as any).checked) .map((c) => new SelectionReadOnlyRequest(c.id, !!c.readOnly, !!c.hidePasswords)); } try { if (this.editMode) { const request = new OrganizationUserUpdateRequest(); request.accessAll = this.access === "all"; request.type = this.type; request.collections = collections; request.permissions = this.setRequestPermissions( request.permissions ?? new PermissionsApi(), request.type !== OrganizationUserType.Custom ); this.formPromise = this.apiService.putOrganizationUser( this.organizationId, this.organizationUserId, request ); } else { const request = new OrganizationUserInviteRequest(); request.emails = this.emails.trim().split(/\s*,\s*/); request.accessAll = this.access === "all"; request.type = this.type; request.permissions = this.setRequestPermissions( request.permissions ?? new PermissionsApi(), request.type !== OrganizationUserType.Custom ); request.collections = collections; this.formPromise = this.apiService.postOrganizationUserInvite(this.organizationId, request); } await this.formPromise; this.platformUtilsService.showToast( "success", null, this.i18nService.t(this.editMode ? "editedUserId" : "invitedUsers", this.name) ); this.onSavedUser.emit(); } catch (e) { this.logService.error(e); } } async delete() { if (!this.editMode) { return; } const message = this.usesKeyConnector ? "removeUserConfirmationKeyConnector" : "removeUserConfirmation"; const confirmed = await this.platformUtilsService.showDialog( this.i18nService.t(message), this.name, this.i18nService.t("yes"), this.i18nService.t("no"), "warning" ); if (!confirmed) { return false; } try { this.deletePromise = this.apiService.deleteOrganizationUser( this.organizationId, this.organizationUserId ); await this.deletePromise; this.platformUtilsService.showToast( "success", null, this.i18nService.t("removedUserId", this.name) ); this.onDeletedUser.emit(); } catch (e) { this.logService.error(e); } } }
bitwarden/web/src/app/organizations/manage/user-add-edit.component.ts/0
{ "file_path": "bitwarden/web/src/app/organizations/manage/user-add-edit.component.ts", "repo_id": "bitwarden", "token_count": 3146 }
140
import { Component } from "@angular/core"; import { I18nService } from "jslib-common/abstractions/i18n.service"; import { PolicyType } from "jslib-common/enums/policyType"; import { Organization } from "jslib-common/models/domain/organization"; import { PolicyRequest } from "jslib-common/models/request/policyRequest"; import { BasePolicy, BasePolicyComponent } from "./base-policy.component"; export class RequireSsoPolicy extends BasePolicy { name = "requireSso"; description = "requireSsoPolicyDesc"; type = PolicyType.RequireSso; component = RequireSsoPolicyComponent; display(organization: Organization) { return organization.useSso; } } @Component({ selector: "policy-require-sso", templateUrl: "require-sso.component.html", }) export class RequireSsoPolicyComponent extends BasePolicyComponent { constructor(private i18nService: I18nService) { super(); } buildRequest(policiesEnabledMap: Map<PolicyType, boolean>): Promise<PolicyRequest> { const singleOrgEnabled = policiesEnabledMap.get(PolicyType.SingleOrg) ?? false; if (this.enabled.value && !singleOrgEnabled) { throw new Error(this.i18nService.t("requireSsoPolicyReqError")); } return super.buildRequest(policiesEnabledMap); } }
bitwarden/web/src/app/organizations/policies/require-sso.component.ts/0
{ "file_path": "bitwarden/web/src/app/organizations/policies/require-sso.component.ts", "repo_id": "bitwarden", "token_count": 395 }
141
<div class="card card-org-plans"> <div class="card-body"> <button type="button" class="close" appA11yTitle="{{ 'cancel' | i18n }}" (click)="cancel()"> <span aria-hidden="true">&times;</span> </button> <h2 class="card-body-header">{{ "changeBillingPlan" | i18n }}</h2> <p class="mb-0">{{ "changeBillingPlanUpgrade" | i18n }}</p> <app-organization-plans [showFree]="false" [showCancel]="true" [plan]="defaultUpgradePlan" [product]="defaultUpgradeProduct" [organizationId]="organizationId" (onCanceled)="cancel()" > </app-organization-plans> </div> </div>
bitwarden/web/src/app/organizations/settings/change-plan.component.html/0
{ "file_path": "bitwarden/web/src/app/organizations/settings/change-plan.component.html", "repo_id": "bitwarden", "token_count": 276 }
142
import { Component } from "@angular/core"; import { BaseAcceptComponent } from "src/app/common/base.accept.component"; @Component({ selector: "app-accept-family-sponsorship", templateUrl: "accept-family-sponsorship.component.html", }) export class AcceptFamilySponsorshipComponent extends BaseAcceptComponent { failedShortMessage = "inviteAcceptFailedShort"; failedMessage = "inviteAcceptFailed"; requiredParameters = ["email", "token"]; async authedHandler(qParams: any) { this.router.navigate(["/setup/families-for-enterprise"], { queryParams: qParams }); } async unauthedHandler(qParams: any) { if (!qParams.register) { this.router.navigate(["/login"], { queryParams: { email: qParams.email } }); } else { this.router.navigate(["/register"], { queryParams: { email: qParams.email } }); } } }
bitwarden/web/src/app/organizations/sponsorships/accept-family-sponsorship.component.ts/0
{ "file_path": "bitwarden/web/src/app/organizations/sponsorships/accept-family-sponsorship.component.ts", "repo_id": "bitwarden", "token_count": 283 }
143
import { NgModule } from "@angular/core"; import { RouterModule, Routes } from "@angular/router"; import { AuthGuard } from "jslib-angular/guards/auth.guard"; import { LockGuard } from "jslib-angular/guards/lock.guard"; import { UnauthGuard } from "jslib-angular/guards/unauth.guard"; import { AcceptEmergencyComponent } from "./accounts/accept-emergency.component"; import { AcceptOrganizationComponent } from "./accounts/accept-organization.component"; import { HintComponent } from "./accounts/hint.component"; import { LockComponent } from "./accounts/lock.component"; import { LoginComponent } from "./accounts/login.component"; import { RecoverDeleteComponent } from "./accounts/recover-delete.component"; import { RecoverTwoFactorComponent } from "./accounts/recover-two-factor.component"; import { RegisterComponent } from "./accounts/register.component"; import { RemovePasswordComponent } from "./accounts/remove-password.component"; import { SetPasswordComponent } from "./accounts/set-password.component"; import { SsoComponent } from "./accounts/sso.component"; import { TwoFactorComponent } from "./accounts/two-factor.component"; import { UpdatePasswordComponent } from "./accounts/update-password.component"; import { UpdateTempPasswordComponent } from "./accounts/update-temp-password.component"; import { VerifyEmailTokenComponent } from "./accounts/verify-email-token.component"; import { VerifyRecoverDeleteComponent } from "./accounts/verify-recover-delete.component"; import { HomeGuard } from "./guards/home.guard"; import { FrontendLayoutComponent } from "./layouts/frontend-layout.component"; import { UserLayoutComponent } from "./layouts/user-layout.component"; import { AcceptFamilySponsorshipComponent } from "./organizations/sponsorships/accept-family-sponsorship.component"; import { FamiliesForEnterpriseSetupComponent } from "./organizations/sponsorships/families-for-enterprise-setup.component"; import { AccessComponent } from "./send/access.component"; import { SendComponent } from "./send/send.component"; import { AccountComponent } from "./settings/account.component"; import { CreateOrganizationComponent } from "./settings/create-organization.component"; import { DomainRulesComponent } from "./settings/domain-rules.component"; import { EmergencyAccessViewComponent } from "./settings/emergency-access-view.component"; import { EmergencyAccessComponent } from "./settings/emergency-access.component"; import { PreferencesComponent } from "./settings/preferences.component"; import { SettingsComponent } from "./settings/settings.component"; import { SponsoredFamiliesComponent } from "./settings/sponsored-families.component"; import { ExportComponent } from "./tools/export.component"; import { GeneratorComponent } from "./tools/generator.component"; import { ImportComponent } from "./tools/import.component"; import { ToolsComponent } from "./tools/tools.component"; const routes: Routes = [ { path: "", component: FrontendLayoutComponent, data: { doNotSaveUrl: true }, children: [ { path: "", pathMatch: "full", children: [], // Children lets us have an empty component. canActivate: [HomeGuard], // Redirects either to vault, login or lock page. }, { path: "login", component: LoginComponent, canActivate: [UnauthGuard] }, { path: "2fa", component: TwoFactorComponent, canActivate: [UnauthGuard] }, { path: "register", component: RegisterComponent, canActivate: [UnauthGuard], data: { titleId: "createAccount" }, }, { path: "sso", component: SsoComponent, canActivate: [UnauthGuard], data: { titleId: "enterpriseSingleSignOn" }, }, { path: "set-password", component: SetPasswordComponent, data: { titleId: "setMasterPassword" }, }, { path: "hint", component: HintComponent, canActivate: [UnauthGuard], data: { titleId: "passwordHint" }, }, { path: "lock", component: LockComponent, canActivate: [LockGuard], }, { path: "verify-email", component: VerifyEmailTokenComponent }, { path: "accept-organization", component: AcceptOrganizationComponent, data: { titleId: "joinOrganization", doNotSaveUrl: false }, }, { path: "accept-emergency", component: AcceptEmergencyComponent, data: { titleId: "acceptEmergency", doNotSaveUrl: false }, }, { path: "accept-families-for-enterprise", component: AcceptFamilySponsorshipComponent, data: { titleId: "acceptFamilySponsorship", doNotSaveUrl: false }, }, { path: "recover", pathMatch: "full", redirectTo: "recover-2fa" }, { path: "recover-2fa", component: RecoverTwoFactorComponent, canActivate: [UnauthGuard], data: { titleId: "recoverAccountTwoStep" }, }, { path: "recover-delete", component: RecoverDeleteComponent, canActivate: [UnauthGuard], data: { titleId: "deleteAccount" }, }, { path: "verify-recover-delete", component: VerifyRecoverDeleteComponent, canActivate: [UnauthGuard], data: { titleId: "deleteAccount" }, }, { path: "send/:sendId/:key", component: AccessComponent, data: { title: "Bitwarden Send" }, }, { path: "update-temp-password", component: UpdateTempPasswordComponent, canActivate: [AuthGuard], data: { titleId: "updateTempPassword" }, }, { path: "update-password", component: UpdatePasswordComponent, canActivate: [AuthGuard], data: { titleId: "updatePassword" }, }, { path: "remove-password", component: RemovePasswordComponent, canActivate: [AuthGuard], data: { titleId: "removeMasterPassword" }, }, ], }, { path: "", component: UserLayoutComponent, canActivate: [AuthGuard], children: [ { path: "vault", loadChildren: async () => (await import("./modules/vault/modules/individual-vault/individual-vault.module")) .IndividualVaultModule, }, { path: "sends", component: SendComponent, data: { title: "Send" } }, { path: "create-organization", component: CreateOrganizationComponent, data: { titleId: "newOrganization" }, }, { path: "settings", component: SettingsComponent, children: [ { path: "", pathMatch: "full", redirectTo: "account" }, { path: "account", component: AccountComponent, data: { titleId: "myAccount" } }, { path: "preferences", component: PreferencesComponent, data: { titleId: "preferences" }, }, { path: "security", loadChildren: async () => (await import("./settings/security-routing.module")).SecurityRoutingModule, }, { path: "domain-rules", component: DomainRulesComponent, data: { titleId: "domainRules" }, }, { path: "subscription", loadChildren: async () => (await import("./settings/subscription-routing.module")).SubscriptionRoutingModule, }, { path: "emergency-access", children: [ { path: "", component: EmergencyAccessComponent, data: { titleId: "emergencyAccess" }, }, { path: ":id", component: EmergencyAccessViewComponent, data: { titleId: "emergencyAccess" }, }, ], }, { path: "sponsored-families", component: SponsoredFamiliesComponent, data: { titleId: "sponsoredFamilies" }, }, ], }, { path: "tools", component: ToolsComponent, canActivate: [AuthGuard], children: [ { path: "", pathMatch: "full", redirectTo: "generator" }, { path: "import", component: ImportComponent, data: { titleId: "importData" } }, { path: "export", component: ExportComponent, data: { titleId: "exportVault" } }, { path: "generator", component: GeneratorComponent, data: { titleId: "generator" }, }, ], }, { path: "reports", loadChildren: async () => (await import("./reports/reports-routing.module")).ReportsRoutingModule, }, { path: "setup/families-for-enterprise", component: FamiliesForEnterpriseSetupComponent }, ], }, { path: "organizations", loadChildren: () => import("./organizations/organization-routing.module").then( (m) => m.OrganizationsRoutingModule ), }, ]; @NgModule({ imports: [ RouterModule.forRoot(routes, { useHash: true, paramsInheritanceStrategy: "always", // enableTracing: true, }), ], exports: [RouterModule], }) export class OssRoutingModule {}
bitwarden/web/src/app/oss-routing.module.ts/0
{ "file_path": "bitwarden/web/src/app/oss-routing.module.ts", "repo_id": "bitwarden", "token_count": 3752 }
144
import { NgModule } from "@angular/core"; import { RouterModule, Routes } from "@angular/router"; import { AuthGuard } from "jslib-angular/guards/auth.guard"; import { BreachReportComponent } from "./breach-report.component"; import { ExposedPasswordsReportComponent } from "./exposed-passwords-report.component"; import { InactiveTwoFactorReportComponent } from "./inactive-two-factor-report.component"; import { ReportListComponent } from "./report-list.component"; import { ReportsComponent } from "./reports.component"; import { ReusedPasswordsReportComponent } from "./reused-passwords-report.component"; import { UnsecuredWebsitesReportComponent } from "./unsecured-websites-report.component"; import { WeakPasswordsReportComponent } from "./weak-passwords-report.component"; const routes: Routes = [ { path: "", component: ReportsComponent, canActivate: [AuthGuard], children: [ { path: "", pathMatch: "full", component: ReportListComponent, data: { homepage: true } }, { path: "breach-report", component: BreachReportComponent, data: { titleId: "dataBreachReport" }, }, { path: "reused-passwords-report", component: ReusedPasswordsReportComponent, data: { titleId: "reusedPasswordsReport" }, }, { path: "unsecured-websites-report", component: UnsecuredWebsitesReportComponent, data: { titleId: "unsecuredWebsitesReport" }, }, { path: "weak-passwords-report", component: WeakPasswordsReportComponent, data: { titleId: "weakPasswordsReport" }, }, { path: "exposed-passwords-report", component: ExposedPasswordsReportComponent, data: { titleId: "exposedPasswordsReport" }, }, { path: "inactive-two-factor-report", component: InactiveTwoFactorReportComponent, data: { titleId: "inactive2faReport" }, }, ], }, ]; @NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule], }) export class ReportsRoutingModule {}
bitwarden/web/src/app/reports/reports-routing.module.ts/0
{ "file_path": "bitwarden/web/src/app/reports/reports-routing.module.ts", "repo_id": "bitwarden", "token_count": 775 }
145
import { Component, NgZone, ViewChild, ViewContainerRef } from "@angular/core"; import { SendComponent as BaseSendComponent } from "jslib-angular/components/send/send.component"; import { ModalService } from "jslib-angular/services/modal.service"; import { BroadcasterService } from "jslib-common/abstractions/broadcaster.service"; import { EnvironmentService } from "jslib-common/abstractions/environment.service"; import { I18nService } from "jslib-common/abstractions/i18n.service"; import { LogService } from "jslib-common/abstractions/log.service"; import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service"; import { PolicyService } from "jslib-common/abstractions/policy.service"; import { SearchService } from "jslib-common/abstractions/search.service"; import { SendService } from "jslib-common/abstractions/send.service"; import { SendView } from "jslib-common/models/view/sendView"; import { AddEditComponent } from "./add-edit.component"; const BroadcasterSubscriptionId = "SendComponent"; @Component({ selector: "app-send", templateUrl: "send.component.html", }) export class SendComponent extends BaseSendComponent { @ViewChild("sendAddEdit", { read: ViewContainerRef, static: true }) sendAddEditModalRef: ViewContainerRef; constructor( sendService: SendService, i18nService: I18nService, platformUtilsService: PlatformUtilsService, environmentService: EnvironmentService, ngZone: NgZone, searchService: SearchService, policyService: PolicyService, private modalService: ModalService, private broadcasterService: BroadcasterService, logService: LogService ) { super( sendService, i18nService, platformUtilsService, environmentService, ngZone, searchService, policyService, logService ); } async ngOnInit() { await super.ngOnInit(); await this.load(); // Broadcaster subscription - load if sync completes in the background this.broadcasterService.subscribe(BroadcasterSubscriptionId, (message: any) => { this.ngZone.run(async () => { switch (message.command) { case "syncCompleted": if (message.successfully) { await this.load(); } break; } }); }); } ngOnDestroy() { this.broadcasterService.unsubscribe(BroadcasterSubscriptionId); } async addSend() { if (this.disableSend) { return; } const component = await this.editSend(null); component.type = this.type; } async editSend(send: SendView) { const [modal, childComponent] = await this.modalService.openViewRef( AddEditComponent, this.sendAddEditModalRef, (comp) => { comp.sendId = send == null ? null : send.id; comp.onSavedSend.subscribe(async () => { modal.close(); await this.load(); }); comp.onDeletedSend.subscribe(async () => { modal.close(); await this.load(); }); } ); return childComponent; } }
bitwarden/web/src/app/send/send.component.ts/0
{ "file_path": "bitwarden/web/src/app/send/send.component.ts", "repo_id": "bitwarden", "token_count": 1132 }
146
import { Component } from "@angular/core"; import { LogService } from "jslib-common/abstractions/log.service"; import { UserVerificationService } from "jslib-common/abstractions/userVerification.service"; import { SecretVerificationRequest } from "jslib-common/models/request/secretVerificationRequest"; import { ApiKeyResponse } from "jslib-common/models/response/apiKeyResponse"; import { Verification } from "jslib-common/types/verification"; @Component({ selector: "app-api-key", templateUrl: "api-key.component.html", }) export class ApiKeyComponent { keyType: string; isRotation: boolean; postKey: (entityId: string, request: SecretVerificationRequest) => Promise<ApiKeyResponse>; entityId: string; scope: string; grantType: string; apiKeyTitle: string; apiKeyWarning: string; apiKeyDescription: string; masterPassword: Verification; formPromise: Promise<ApiKeyResponse>; clientId: string; clientSecret: string; constructor( private userVerificationService: UserVerificationService, private logService: LogService ) {} async submit() { try { this.formPromise = this.userVerificationService .buildRequest(this.masterPassword) .then((request) => this.postKey(this.entityId, request)); const response = await this.formPromise; this.clientSecret = response.apiKey; this.clientId = `${this.keyType}.${this.entityId}`; } catch (e) { this.logService.error(e); } } }
bitwarden/web/src/app/settings/api-key.component.ts/0
{ "file_path": "bitwarden/web/src/app/settings/api-key.component.ts", "repo_id": "bitwarden", "token_count": 489 }
147
import { Component, OnInit } from "@angular/core"; import { ApiService } from "jslib-common/abstractions/api.service"; import { I18nService } from "jslib-common/abstractions/i18n.service"; import { LogService } from "jslib-common/abstractions/log.service"; import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service"; import { UpdateDomainsRequest } from "jslib-common/models/request/updateDomainsRequest"; @Component({ selector: "app-domain-rules", templateUrl: "domain-rules.component.html", }) export class DomainRulesComponent implements OnInit { loading = true; custom: string[] = []; global: any[] = []; formPromise: Promise<any>; constructor( private apiService: ApiService, private i18nService: I18nService, private platformUtilsService: PlatformUtilsService, private logService: LogService ) {} async ngOnInit() { const response = await this.apiService.getSettingsDomains(); this.loading = false; if (response.equivalentDomains != null) { this.custom = response.equivalentDomains.map((d) => d.join(", ")); } if (response.globalEquivalentDomains != null) { this.global = response.globalEquivalentDomains.map((d) => { return { domains: d.domains.join(", "), excluded: d.excluded, key: d.type, }; }); } } toggleExcluded(globalDomain: any) { globalDomain.excluded = !globalDomain.excluded; } customize(globalDomain: any) { globalDomain.excluded = true; this.custom.push(globalDomain.domains); } remove(index: number) { this.custom.splice(index, 1); } add() { this.custom.push(""); } async submit() { const request = new UpdateDomainsRequest(); request.excludedGlobalEquivalentDomains = this.global .filter((d) => d.excluded) .map((d) => d.key); if (request.excludedGlobalEquivalentDomains.length === 0) { request.excludedGlobalEquivalentDomains = null; } request.equivalentDomains = this.custom .filter((d) => d != null && d.trim() !== "") .map((d) => d.split(",").map((d2) => d2.trim())); if (request.equivalentDomains.length === 0) { request.equivalentDomains = null; } try { this.formPromise = this.apiService.putSettingsDomains(request); await this.formPromise; this.platformUtilsService.showToast("success", null, this.i18nService.t("domainsUpdated")); } catch (e) { this.logService.error(e); } } indexTrackBy(index: number, obj: any): any { return index; } }
bitwarden/web/src/app/settings/domain-rules.component.ts/0
{ "file_path": "bitwarden/web/src/app/settings/domain-rules.component.ts", "repo_id": "bitwarden", "token_count": 967 }
148
import { Component, OnInit } from "@angular/core"; import { Router } from "@angular/router"; import { ApiService } from "jslib-common/abstractions/api.service"; import { I18nService } from "jslib-common/abstractions/i18n.service"; import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service"; import { PaymentMethodType } from "jslib-common/enums/paymentMethodType"; import { BillingPaymentResponse } from "jslib-common/models/response/billingPaymentResponse"; @Component({ selector: "app-payment-method", templateUrl: "payment-method.component.html", }) export class PaymentMethodComponent implements OnInit { loading = false; firstLoaded = false; showAdjustPayment = false; showAddCredit = false; billing: BillingPaymentResponse; paymentMethodType = PaymentMethodType; constructor( protected apiService: ApiService, protected i18nService: I18nService, protected platformUtilsService: PlatformUtilsService, private router: Router ) {} async ngOnInit() { if (this.platformUtilsService.isSelfHost()) { this.router.navigate(["/settings/subscription"]); } await this.load(); this.firstLoaded = true; } async load() { if (this.loading) { return; } this.loading = true; this.billing = await this.apiService.getUserBillingPayment(); this.loading = false; } addCredit() { if (this.paymentSourceInApp) { this.platformUtilsService.showDialog( this.i18nService.t("cannotPerformInAppPurchase"), this.i18nService.t("addCredit"), null, null, "warning" ); return; } this.showAddCredit = true; } closeAddCredit(load: boolean) { this.showAddCredit = false; if (load) { this.load(); } } changePayment() { if (this.paymentSourceInApp) { this.platformUtilsService.showDialog( this.i18nService.t("cannotPerformInAppPurchase"), this.i18nService.t("changePaymentMethod"), null, null, "warning" ); return; } this.showAdjustPayment = true; } closePayment(load: boolean) { this.showAdjustPayment = false; if (load) { this.load(); } } get isCreditBalance() { return this.billing == null || this.billing.balance <= 0; } get creditOrBalance() { return Math.abs(this.billing != null ? this.billing.balance : 0); } get paymentSource() { return this.billing != null ? this.billing.paymentSource : null; } get paymentSourceInApp() { return ( this.paymentSource != null && (this.paymentSource.type === PaymentMethodType.AppleInApp || this.paymentSource.type === PaymentMethodType.GoogleInApp) ); } }
bitwarden/web/src/app/settings/payment-method.component.ts/0
{ "file_path": "bitwarden/web/src/app/settings/payment-method.component.ts", "repo_id": "bitwarden", "token_count": 1036 }
149
<div class="container page-content"> <div class="row"> <div class="col-3"> <div class="card"> <div class="card-header">{{ "accountSettings" | i18n }}</div> <div class="list-group list-group-flush"> <a routerLink="account" class="list-group-item" routerLinkActive="active"> {{ "myAccount" | i18n }} </a> <a routerLink="security" class="list-group-item" routerLinkActive="active"> {{ "security" | i18n }} </a> <a routerLink="preferences" class="list-group-item" routerLinkActive="active"> {{ "preferences" | i18n }} </a> <a routerLink="subscription" class="list-group-item" routerLinkActive="active" *ngIf="!hideSubscription" > {{ "subscription" | i18n }} </a> <a routerLink="domain-rules" class="list-group-item" routerLinkActive="active"> {{ "domainRules" | i18n }} </a> <a routerLink="emergency-access" class="list-group-item" routerLinkActive="active"> {{ "emergencyAccess" | i18n }} </a> <a routerLink="sponsored-families" class="list-group-item" routerLinkActive="active" *ngIf="hasFamilySponsorshipAvailable" > {{ "sponsoredFamilies" | i18n }} </a> </div> </div> </div> <div class="col-9"> <router-outlet></router-outlet> </div> </div> </div>
bitwarden/web/src/app/settings/settings.component.html/0
{ "file_path": "bitwarden/web/src/app/settings/settings.component.html", "repo_id": "bitwarden", "token_count": 779 }
150
<div class="modal fade" role="dialog" aria-modal="true" aria-labelledby="2faEmailTitle"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h2 class="modal-title" id="2faEmailTitle"> {{ "twoStepLogin" | i18n }} <small>{{ "emailTitle" | i18n }}</small> </h2> <button type="button" class="close" data-dismiss="modal" appA11yTitle="{{ 'close' | i18n }}" > <span aria-hidden="true">&times;</span> </button> </div> <app-two-factor-verify [organizationId]="organizationId" [type]="type" (onAuthed)="auth($event)" *ngIf="!authed" > </app-two-factor-verify> <form #form (ngSubmit)="submit()" [appApiAction]="formPromise" ngNativeValidate *ngIf="authed" > <div class="modal-body"> <ng-container *ngIf="enabled"> <app-callout type="success" title="{{ 'enabled' | i18n }}" icon="bwi bwi-check-circle"> {{ "twoStepLoginProviderEnabled" | i18n }} </app-callout> <strong>{{ "email" | i18n }}:</strong> {{ email }} </ng-container> <ng-container *ngIf="!enabled"> <p class="d-flex"> <span class="mr-3">{{ "twoFactorEmailDesc" | i18n }}</span> <img class="float-right ml-auto mfaType1" alt="Email logo" /> </p> <div class="form-group"> <label for="email">1. {{ "twoFactorEmailEnterEmail" | i18n }}</label> <input id="email" type="text" name="Email" class="form-control" [(ngModel)]="email" required inputmode="email" appInputVerbatim="false" /> </div> <div class="mb-3 d-flex"> <button #sendBtn type="button" class="btn btn-outline-primary btn-sm btn-submit align-self-start" (click)="sendEmail()" [appApiAction]="emailPromise" [disabled]="sendBtn.loading" > <i class="bwi bwi-spinner bwi-spin" title="{{ 'loading' | i18n }}" aria-hidden="true" ></i> <span>{{ "sendEmail" | i18n }}</span> </button> <span class="text-success ml-3" *ngIf="sentEmail"> {{ "verificationCodeEmailSent" | i18n: sentEmail }} </span> </div> <div class="form-group"> <label for="token">2. {{ "twoFactorEmailEnterCode" | i18n }}</label> <input id="token" type="text" name="Token" class="form-control" [(ngModel)]="token" required appInputVerbatim /> </div> </ng-container> </div> <div class="modal-footer"> <button type="submit" class="btn btn-primary btn-submit" [disabled]="form.loading"> <i class="bwi bwi-spinner bwi-spin" title="{{ 'loading' | i18n }}" aria-hidden="true" ></i> <span *ngIf="!enabled">{{ "enable" | i18n }}</span> <span *ngIf="enabled">{{ "disable" | i18n }}</span> </button> <button type="button" class="btn btn-outline-secondary" data-dismiss="modal"> {{ "close" | i18n }} </button> </div> </form> </div> </div> </div>
bitwarden/web/src/app/settings/two-factor-email.component.html/0
{ "file_path": "bitwarden/web/src/app/settings/two-factor-email.component.html", "repo_id": "bitwarden", "token_count": 2158 }
151
<div class="tabbed-header d-flex"> <h1> {{ "billingHistory" | i18n }} </h1> <button bitButton buttonType="secondary" (click)="load()" class="tw-ml-auto" *ngIf="firstLoaded" [disabled]="loading" > <i class="bwi bwi-refresh bwi-fw" [ngClass]="{ 'bwi-spin': loading }" aria-hidden="true"></i> {{ "refresh" | i18n }} </button> </div> <ng-container *ngIf="!firstLoaded && loading"> <i class="bwi bwi-spinner bwi-spin text-muted" title="{{ 'loading' | i18n }}" aria-hidden="true" ></i> <span class="sr-only">{{ "loading" | i18n }}</span> </ng-container> <ng-container *ngIf="billing"> <h2>{{ "invoices" | i18n }}</h2> <p *ngIf="!invoices || !invoices.length">{{ "noInvoices" | i18n }}</p> <table class="table mb-2" *ngIf="invoices && invoices.length"> <tbody> <tr *ngFor="let i of invoices"> <td>{{ i.date | date: "mediumDate" }}</td> <td> <a href="{{ i.pdfUrl }}" target="_blank" rel="noopener" class="mr-2" appA11yTitle="{{ 'downloadInvoice' | i18n }}" > <i class="bwi bwi-file-pdf" aria-hidden="true"></i ></a> <a href="{{ i.url }}" target="_blank" rel="noopener" title="{{ 'viewInvoice' | i18n }}"> {{ "invoiceNumber" | i18n: i.number }}</a > </td> <td>{{ i.amount | currency: "$" }}</td> <td> <span *ngIf="i.paid"> <i class="bwi bwi-check text-success" aria-hidden="true"></i> {{ "paid" | i18n }} </span> <span *ngIf="!i.paid"> <i class="bwi bwi-exclamation-circle text-muted" aria-hidden="true"></i> {{ "unpaid" | i18n }} </span> </td> </tr> </tbody> </table> <h2 class="spaced-header">{{ "transactions" | i18n }}</h2> <p *ngIf="!transactions || !transactions.length">{{ "noTransactions" | i18n }}</p> <table class="table mb-2" *ngIf="transactions && transactions.length"> <tbody> <tr *ngFor="let t of transactions"> <td>{{ t.createdDate | date: "mediumDate" }}</td> <td> <span *ngIf="t.type === transactionType.Charge || t.type === transactionType.Credit"> {{ "chargeNoun" | i18n }} </span> <span *ngIf="t.type === transactionType.Refund">{{ "refundNoun" | i18n }}</span> </td> <td> <i class="bwi bwi-fw" *ngIf="t.paymentMethodType" aria-hidden="true" [ngClass]="{ 'bwi-credit-card': t.paymentMethodType === paymentMethodType.Card, 'bwi-bank': t.paymentMethodType === paymentMethodType.BankAccount || t.paymentMethodType === paymentMethodType.WireTransfer, 'bwi-bitcoin text-warning': t.paymentMethodType === paymentMethodType.BitPay, 'bwi-paypal text-primary': t.paymentMethodType === paymentMethodType.PayPal }" ></i> {{ t.details }} </td> <td [ngClass]="{ 'text-strike': t.refunded }" title="{{ (t.refunded ? 'refunded' : '') | i18n }}" > {{ t.amount | currency: "$" }} </td> </tr> </tbody> </table> <small class="text-muted">* {{ "chargesStatement" | i18n: "BITWARDEN" }}</small> </ng-container>
bitwarden/web/src/app/settings/user-billing-history.component.html/0
{ "file_path": "bitwarden/web/src/app/settings/user-billing-history.component.html", "repo_id": "bitwarden", "token_count": 1735 }
152
<div class="container page-content"> <div class="row"> <div class="col-3"> <div class="card mb-4"> <div class="card-header">{{ "tools" | i18n }}</div> <div class="list-group list-group-flush"> <a routerLink="generator" class="list-group-item" routerLinkActive="active"> {{ "generator" | i18n }} </a> <a routerLink="import" class="list-group-item" routerLinkActive="active"> {{ "importData" | i18n }} </a> <a routerLink="export" class="list-group-item" routerLinkActive="active"> {{ "exportVault" | i18n }} </a> </div> </div> </div> <div class="col-9"> <router-outlet></router-outlet> </div> </div> </div>
bitwarden/web/src/app/tools/tools.component.html/0
{ "file_path": "bitwarden/web/src/app/tools/tools.component.html", "repo_id": "bitwarden", "token_count": 369 }
153
<div class="modal fade" role="dialog" aria-modal="true" aria-labelledby="moveSelectedToOrgTitle"> <div class="modal-dialog modal-dialog-scrollable" role="document"> <form class="modal-content" #form (ngSubmit)="submit()" [appApiAction]="formPromise"> <div class="modal-header"> <h2 class="modal-title" id="moveSelectedToOrgTitle"> {{ "moveSelectedToOrg" | i18n }} </h2> <button type="button" class="close" data-dismiss="modal" appA11yTitle="{{ 'close' | i18n }}" > <span aria-hidden="true">&times;</span> </button> </div> <div class="modal-body"> <p>{{ "moveManyToOrgDesc" | i18n }}</p> <p> {{ "moveSelectedItemsCountDesc" | i18n: this.ciphers.length:shareableCiphers.length:nonShareableCount }} </p> <div class="form-group"> <label for="organization">{{ "organization" | i18n }}</label> <select id="organization" name="OrganizationId" [(ngModel)]="organizationId" class="form-control" (change)="filterCollections()" > <option *ngFor="let o of organizations" [ngValue]="o.id">{{ o.name }}</option> </select> </div> <div class="d-flex"> <h3>{{ "collections" | i18n }}</h3> <div class="ml-auto d-flex" *ngIf="collections && collections.length"> <button type="button" (click)="selectAll(true)" class="btn btn-link btn-sm py-0"> {{ "selectAll" | i18n }} </button> <button type="button" (click)="selectAll(false)" class="btn btn-link btn-sm py-0"> {{ "unselectAll" | i18n }} </button> </div> </div> <div *ngIf="!collections || !collections.length"> {{ "noCollectionsInList" | i18n }} </div> <table class="table table-hover table-list mb-0" *ngIf="collections && collections.length"> <tbody> <tr *ngFor="let c of collections; let i = index" (click)="check(c)"> <td class="table-list-checkbox"> <input type="checkbox" [(ngModel)]="c.checked" name="Collection[{{ i }}].Checked" appStopProp /> </td> <td> {{ c.name }} </td> </tr> </tbody> </table> </div> <div class="modal-footer"> <button type="submit" class="btn btn-primary btn-submit manual" [disabled]="form.loading || !canSave" [ngClass]="{ loading: form.loading }" > <i class="bwi bwi-spinner bwi-spin" title="{{ 'loading' | i18n }}" aria-hidden="true"></i> <span>{{ "save" | i18n }}</span> </button> <button type="button" class="btn btn-outline-secondary" data-dismiss="modal"> {{ "cancel" | i18n }} </button> </div> </form> </div> </div>
bitwarden/web/src/app/vault/bulk-share.component.html/0
{ "file_path": "bitwarden/web/src/app/vault/bulk-share.component.html", "repo_id": "bitwarden", "token_count": 1659 }
154
import { b64Decode, getQsParam } from "./common"; declare let hcaptcha: any; if (window.location.pathname.includes("mobile")) { require("./captcha-mobile.scss"); } else { require("./captcha.scss"); } document.addEventListener("DOMContentLoaded", () => { init(); }); (window as any).captchaSuccess = captchaSuccess; (window as any).captchaError = captchaError; let parentUrl: string = null; let parentOrigin: string = null; let mobileResponse: boolean = null; let sentSuccess = false; async function init() { await start(); onMessage(); } async function start() { sentSuccess = false; const data = getQsParam("data"); if (!data) { error("No data."); return; } parentUrl = getQsParam("parent"); if (!parentUrl) { error("No parent."); return; } else { parentUrl = decodeURIComponent(parentUrl); parentOrigin = new URL(parentUrl).origin; } let decodedData: any; try { decodedData = JSON.parse(b64Decode(data, true)); } catch (e) { error("Cannot parse data."); return; } mobileResponse = decodedData.callbackUri != null || decodedData.mobile === true; let src = "https://hcaptcha.com/1/api.js?render=explicit"; // Set language code if (decodedData.locale) { src += `&hl=${encodeURIComponent(decodedData.locale) ?? "en"}`; } // Set captchaRequired subtitle for mobile const subtitleEl = document.getElementById("captchaRequired"); if (decodedData.captchaRequiredText && subtitleEl) { subtitleEl.textContent = decodedData.captchaRequiredText; } const script = document.createElement("script"); script.src = src; script.async = true; script.defer = true; script.addEventListener("load", () => { hcaptcha.render("captcha", { sitekey: encodeURIComponent(decodedData.siteKey), callback: "captchaSuccess", "error-callback": "captchaError", }); watchHeight(); }); document.head.appendChild(script); } function captchaSuccess(response: string) { if (mobileResponse) { document.location.replace("bitwarden://captcha-callback?token=" + encodeURIComponent(response)); } else { success(response); } } function captchaError() { error("An error occurred with the captcha. Try again."); } function onMessage() { window.addEventListener( "message", (event) => { if (!event.origin || event.origin === "" || event.origin !== parentOrigin) { return; } if (event.data === "start") { start(); } }, false ); } function error(message: string) { parent.postMessage("error|" + message, parentUrl); } function success(data: string) { if (sentSuccess) { return; } parent.postMessage("success|" + data, parentUrl); sentSuccess = true; } function info(message: string | object) { parent.postMessage("info|" + JSON.stringify(message), parentUrl); } async function watchHeight() { const imagesDiv = document.body.lastChild as HTMLElement; // eslint-disable-next-line while (true) { info({ height: imagesDiv.style.visibility === "hidden" ? document.documentElement.offsetHeight : document.documentElement.scrollHeight, width: document.documentElement.scrollWidth, }); await sleep(100); } } async function sleep(ms: number) { await new Promise((r) => setTimeout(r, ms)); }
bitwarden/web/src/connectors/captcha.ts/0
{ "file_path": "bitwarden/web/src/connectors/captcha.ts", "repo_id": "bitwarden", "token_count": 1190 }
155
declare function escape(s: string): string; declare function unescape(s: string): string;
bitwarden/web/src/global.d.ts/0
{ "file_path": "bitwarden/web/src/global.d.ts", "repo_id": "bitwarden", "token_count": 25 }
156
{ "pageTitle": { "message": "Cofre Web do(a) $APP_NAME$", "description": "The title of the website in the browser window.", "placeholders": { "app_name": { "content": "$1", "example": "Bitwarden" } } }, "whatTypeOfItem": { "message": "Que tipo de item é este?" }, "name": { "message": "Nome" }, "uri": { "message": "URI" }, "uriPosition": { "message": "URI $POSITION$", "description": "A listing of URIs. Ex: URI 1, URI 2, URI 3, etc.", "placeholders": { "position": { "content": "$1", "example": "2" } } }, "newUri": { "message": "Novo URI" }, "username": { "message": "Nome de Usuário" }, "password": { "message": "Senha" }, "newPassword": { "message": "Nova Senha" }, "passphrase": { "message": "Frase Secreta" }, "notes": { "message": "Notas" }, "customFields": { "message": "Campos Personalizados" }, "cardholderName": { "message": "Titular do Cartão" }, "number": { "message": "Número" }, "brand": { "message": "Bandeira" }, "expiration": { "message": "Vencimento" }, "securityCode": { "message": "Código de Segurança (CVV)" }, "identityName": { "message": "Nome de Identidade" }, "company": { "message": "Empresa" }, "ssn": { "message": "Cadastro de Pessoas Físicas (CPF)" }, "passportNumber": { "message": "Número do Passaporte" }, "licenseNumber": { "message": "Número da Licença" }, "email": { "message": "E-mail" }, "phone": { "message": "Telefone" }, "january": { "message": "Janeiro" }, "february": { "message": "Fevereiro" }, "march": { "message": "Março" }, "april": { "message": "Abril" }, "may": { "message": "Maio" }, "june": { "message": "Junho" }, "july": { "message": "Julho" }, "august": { "message": "Agosto" }, "september": { "message": "Setembro" }, "october": { "message": "Outubro" }, "november": { "message": "Novembro" }, "december": { "message": "Dezembro" }, "title": { "message": "Título" }, "mr": { "message": "Sr" }, "mrs": { "message": "Sra" }, "ms": { "message": "Sra" }, "dr": { "message": "Dr" }, "expirationMonth": { "message": "Mês de Vencimento" }, "expirationYear": { "message": "Ano de Vencimento" }, "authenticatorKeyTotp": { "message": "Chave de Autenticação (TOTP)" }, "folder": { "message": "Pasta" }, "newCustomField": { "message": "Novo Campo Personalizado" }, "value": { "message": "Valor" }, "dragToSort": { "message": "Arrastar para ordenar" }, "cfTypeText": { "message": "Texto" }, "cfTypeHidden": { "message": "Ocultado" }, "cfTypeBoolean": { "message": "Booleano" }, "cfTypeLinked": { "message": "Vinculado", "description": "This describes a field that is 'linked' (related) to another field." }, "remove": { "message": "Remover" }, "unassigned": { "message": "Não atribuído" }, "noneFolder": { "message": "Nenhuma Pasta", "description": "This is the folder for uncategorized items" }, "addFolder": { "message": "Adicionar Pasta" }, "editFolder": { "message": "Editar Pasta" }, "baseDomain": { "message": "Domínio de base", "description": "Domain name. Ex. website.com" }, "domainName": { "message": "Domain Name", "description": "Domain name. Ex. website.com" }, "host": { "message": "Servidor", "description": "A URL's host value. For example, the host of https://sub.domain.com:443 is 'sub.domain.com:443'." }, "exact": { "message": "Exato" }, "startsWith": { "message": "Começa com" }, "regEx": { "message": "Expressão regular", "description": "A programming term, also known as 'RegEx'." }, "matchDetection": { "message": "Detecção de Correspondência", "description": "URI match detection for auto-fill." }, "defaultMatchDetection": { "message": "Detecção de correspondência padrão", "description": "Default URI match detection for auto-fill." }, "never": { "message": "Nunca" }, "toggleVisibility": { "message": "Alternar Visibilidade" }, "toggleCollapse": { "message": "Alternar Colapso", "description": "Toggling an expand/collapse state." }, "generatePassword": { "message": "Gerar Senha" }, "checkPassword": { "message": "Verifique se a senha foi exposta." }, "passwordExposed": { "message": "Esta senha foi exposta $VALUE$ vez(es) em violações de dados. Você deve alterá-la.", "placeholders": { "value": { "content": "$1", "example": "2" } } }, "passwordSafe": { "message": "Esta senha não foi encontrada em violações de dados conhecidos. Deve ser seguro de usar." }, "save": { "message": "Salvar" }, "cancel": { "message": "Cancelar" }, "canceled": { "message": "Cancelado" }, "close": { "message": "Fechar" }, "delete": { "message": "Excluir" }, "favorite": { "message": "Favorito" }, "unfavorite": { "message": "Desfavoritar" }, "edit": { "message": "Editar" }, "searchCollection": { "message": "Pesquisar Coleção" }, "searchFolder": { "message": "Pesquisar Pasta" }, "searchFavorites": { "message": "Pesquisar Favoritos" }, "searchType": { "message": "Pesquisar Tipo", "description": "Search item type" }, "searchVault": { "message": "Pesquisar no Cofre" }, "allItems": { "message": "Todos os Itens" }, "favorites": { "message": "Favoritos" }, "types": { "message": "Tipos" }, "typeLogin": { "message": "Credencial" }, "typeCard": { "message": "Cartão" }, "typeIdentity": { "message": "Identidade" }, "typeSecureNote": { "message": "Nota Segura" }, "typeLoginPlural": { "message": "Logins" }, "typeCardPlural": { "message": "Cartões" }, "typeIdentityPlural": { "message": "Identidades" }, "typeSecureNotePlural": { "message": "Notas Seguras" }, "folders": { "message": "Pastas" }, "collections": { "message": "Coleções" }, "firstName": { "message": "Primeiro Nome" }, "middleName": { "message": "Nome do Meio" }, "lastName": { "message": "Sobrenome" }, "fullName": { "message": "Nome Completo" }, "address1": { "message": "Endereço 1" }, "address2": { "message": "Endereço 2" }, "address3": { "message": "Endereço 3" }, "cityTown": { "message": "Cidade / Localidade" }, "stateProvince": { "message": "Estado" }, "zipPostalCode": { "message": "CEP / Código Postal" }, "country": { "message": "País" }, "shared": { "message": "Compartilhado" }, "attachments": { "message": "Anexos" }, "select": { "message": "Selecionar" }, "addItem": { "message": "Adicionar Item" }, "editItem": { "message": "Editar Item" }, "viewItem": { "message": "Visualizar Item" }, "ex": { "message": "ex.", "description": "Short abbreviation for 'example'." }, "other": { "message": "Outros" }, "share": { "message": "Compartilhar" }, "moveToOrganization": { "message": "Mover para a Organização" }, "valueCopied": { "message": "$VALUE$ copiado(a)", "description": "Value has been copied to the clipboard.", "placeholders": { "value": { "content": "$1", "example": "Password" } } }, "copyValue": { "message": "Copiar Valor", "description": "Copy value to clipboard" }, "copyPassword": { "message": "Copiar Senha", "description": "Copy password to clipboard" }, "copyUsername": { "message": "Copiar Nome de Usuário", "description": "Copy username to clipboard" }, "copyNumber": { "message": "Copiar Número", "description": "Copy credit card number" }, "copySecurityCode": { "message": "Copiar Código de Segurança", "description": "Copy credit card security code (CVV)" }, "copyUri": { "message": "Copiar URI", "description": "Copy URI to clipboard" }, "myVault": { "message": "Meu Cofre" }, "vault": { "message": "Cofre" }, "moveSelectedToOrg": { "message": "Mover Selecionados para a organização" }, "deleteSelected": { "message": "Excluir Selecionados" }, "moveSelected": { "message": "Mover Selecionados" }, "selectAll": { "message": "Selecionar Todos" }, "unselectAll": { "message": "Desmarcar Todos" }, "launch": { "message": "Abrir" }, "newAttachment": { "message": "Adicionar Novo Anexo" }, "deletedAttachment": { "message": "Anexo excluído" }, "deleteAttachmentConfirmation": { "message": "Tem certeza que deseja excluir esse anexo?" }, "attachmentSaved": { "message": "O anexo foi salvo." }, "file": { "message": "Arquivo" }, "selectFile": { "message": "Selecione um arquivo." }, "maxFileSize": { "message": "O tamanho máximo do arquivo é de 500 MB." }, "updateKey": { "message": "Você não pode usar este recurso, até você atualizar sua chave de criptografia." }, "addedItem": { "message": "Item adicionado" }, "editedItem": { "message": "Item editado" }, "movedItemToOrg": { "message": "$ITEMNAME$ movido para $ORGNAME$", "placeholders": { "itemname": { "content": "$1", "example": "Secret Item" }, "orgname": { "content": "$2", "example": "Company Name" } } }, "movedItemsToOrg": { "message": "Itens selecionados movidos para $ORGNAME$", "placeholders": { "orgname": { "content": "$1", "example": "Company Name" } } }, "deleteItem": { "message": "Excluir Item" }, "deleteFolder": { "message": "Excluir Pasta" }, "deleteAttachment": { "message": "Excluir Anexo" }, "deleteItemConfirmation": { "message": "Você tem certeza que deseja enviar este item para a lixeira?" }, "deletedItem": { "message": "Item enviado para a lixeira" }, "deletedItems": { "message": "Itens enviados para a lixeira" }, "movedItems": { "message": "Itens movidos" }, "overwritePasswordConfirmation": { "message": "Você tem certeza que deseja substituir a senha atual?" }, "editedFolder": { "message": "Pasta editada" }, "addedFolder": { "message": "Pasta adicionada" }, "deleteFolderConfirmation": { "message": "Você tem certeza que deseja excluir esta pasta?" }, "deletedFolder": { "message": "Pasta excluída" }, "loggedOut": { "message": "Sessão encerrada" }, "loginExpired": { "message": "A sua sessão expirou." }, "logOutConfirmation": { "message": "Você tem certeza que deseja sair?" }, "logOut": { "message": "Encerrar Sessão" }, "ok": { "message": "Ok" }, "yes": { "message": "Sim" }, "no": { "message": "Não" }, "loginOrCreateNewAccount": { "message": "Inicie a sessão ou crie uma nova conta para acessar seu cofre seguro." }, "createAccount": { "message": "Criar Conta" }, "logIn": { "message": "Iniciar Sessão" }, "submit": { "message": "Enviar" }, "emailAddressDesc": { "message": "Você usará o seu endereço de e-mail para a iniciar sessão." }, "yourName": { "message": "Seu Nome" }, "yourNameDesc": { "message": "Como devemos chamá-lo?" }, "masterPass": { "message": "Senha Mestra" }, "masterPassDesc": { "message": "A senha mestra é a senha que você usa para acessar o seu cofre. É muito importante que você não esqueça sua senha mestra. Não há maneira de recuperar a senha caso você se esqueça." }, "masterPassHintDesc": { "message": "Uma dica de senha mestra pode ajudá-lo(a) a lembrar a senha caso você esqueça." }, "reTypeMasterPass": { "message": "Digite Novamente a Senha Mestra" }, "masterPassHint": { "message": "Dica da Senha Mestra (opcional)" }, "masterPassHintLabel": { "message": "Dica da Senha Mestra" }, "settings": { "message": "Configurações" }, "passwordHint": { "message": "Dica da Senha" }, "enterEmailToGetHint": { "message": "Insira o seu endereço de e-mail para receber a dica da sua senha mestra." }, "getMasterPasswordHint": { "message": "Obter dica da senha mestra" }, "emailRequired": { "message": "O endereço de e-mail é obrigatório." }, "invalidEmail": { "message": "Endereço de e-mail inválido." }, "masterPassRequired": { "message": "A senha mestra é obrigatória." }, "masterPassLength": { "message": "A senha mestra deve ter pelo menos 8 caracteres." }, "masterPassDoesntMatch": { "message": "A confirmação da senha mestra não corresponde." }, "newAccountCreated": { "message": "A sua nova conta foi criada! Agora você pode iniciar a sessão." }, "masterPassSent": { "message": "Enviamos um e-mail com a dica da sua senha mestra." }, "unexpectedError": { "message": "Ocorreu um erro inesperado." }, "emailAddress": { "message": "Endereço de E-mail" }, "yourVaultIsLocked": { "message": "O seu cofre está bloqueado. Verifique a sua senha mestra para continuar." }, "unlock": { "message": "Desbloquear" }, "loggedInAsEmailOn": { "message": "Entrou como $EMAIL$ em $HOSTNAME$.", "placeholders": { "email": { "content": "$1", "example": "name@example.com" }, "hostname": { "content": "$2", "example": "bitwarden.com" } } }, "invalidMasterPassword": { "message": "Senha mestra inválida" }, "lockNow": { "message": "Bloquear Agora" }, "noItemsInList": { "message": "Não há itens para listar." }, "noCollectionsInList": { "message": "Não há coleções para listar." }, "noGroupsInList": { "message": "Não há grupos para listar." }, "noUsersInList": { "message": "Não há usuários para listar." }, "noEventsInList": { "message": "Não há eventos para listar." }, "newOrganization": { "message": "Nova Organização" }, "noOrganizationsList": { "message": "Você não pertence a nenhuma organização. Organizações permitem-lhe compartilhar itens em segurança com outros usuários." }, "versionNumber": { "message": "Versão $VERSION_NUMBER$", "placeholders": { "version_number": { "content": "$1", "example": "1.2.3" } } }, "enterVerificationCodeApp": { "message": "Insira o código de verificação de 6 dígitos do seu aplicativo de autenticação." }, "enterVerificationCodeEmail": { "message": "Insira o código de verificação de 6 dígitos que foi enviado por e-mail para $EMAIL$.", "placeholders": { "email": { "content": "$1", "example": "example@gmail.com" } } }, "verificationCodeEmailSent": { "message": "E-mail de verificação enviado para $EMAIL$.", "placeholders": { "email": { "content": "$1", "example": "example@gmail.com" } } }, "rememberMe": { "message": "Lembrar de mim" }, "sendVerificationCodeEmailAgain": { "message": "Enviar código de verificação para o e-mail novamente" }, "useAnotherTwoStepMethod": { "message": "Utilizar outro método de verificação em duas etapas" }, "insertYubiKey": { "message": "Insira a sua YubiKey na porta USB do seu computador, e depois toque no botão da mesma." }, "insertU2f": { "message": "Insira a sua chave de segurança na porta USB do seu computador. Se ele tiver um botão, toque nele." }, "loginUnavailable": { "message": "Sessão Indisponível" }, "noTwoStepProviders": { "message": "Esta conta tem a autenticação em duas etapas ativada. No entanto, nenhum dos provedores de autenticação em duas etapas configurados são suportados por este navegador web." }, "noTwoStepProviders2": { "message": "Por favor utilize um navegador web suportado (tal como o Chrome) e/ou inclua provedores adicionais que são melhor suportados entre navegadores web (tal como um aplicativo de autenticação)." }, "twoStepOptions": { "message": "Opções de Login em Duas Etapas" }, "recoveryCodeDesc": { "message": "Perdeu o acesso a todos os seus provedores de duas etapas? Utilize o seu código de recuperação para desativar todos os provedores de duas etapas da sua conta." }, "recoveryCodeTitle": { "message": "Código de Recuperação" }, "authenticatorAppTitle": { "message": "Aplicativo de Autenticação" }, "authenticatorAppDesc": { "message": "Utilize um aplicativo de autenticação (tal como Authy ou Google Authenticator) para gerar códigos de verificação baseados no tempo.", "description": "'Authy' and 'Google Authenticator' are product names and should not be translated." }, "yubiKeyTitle": { "message": "Chave de Segurança YubiKey OTP" }, "yubiKeyDesc": { "message": "Utilize uma YubiKey para acessar a sua conta. Funciona com YubiKey 4, 4 Nano, 4C, e dispositivos NEO." }, "duoDesc": { "message": "Verifique com o Duo Security utilizando o aplicativo Duo Mobile, SMS, chamada telefônica, ou chave de segurança U2F.", "description": "'Duo Security' and 'Duo Mobile' are product names and should not be translated." }, "duoOrganizationDesc": { "message": "Verifique com o Duo Security utilizando o aplicativo Duo Mobile, SMS, chamada telefônica, ou chave de segurança U2F.", "description": "'Duo Security' and 'Duo Mobile' are product names and should not be translated." }, "u2fDesc": { "message": "Utilize qualquer chave de segurança ativada por FIDO U2F para acessar a sua conta." }, "u2fTitle": { "message": "Chave de Segurança FIDO U2F" }, "webAuthnTitle": { "message": "FIDO2 WebAuthn" }, "webAuthnDesc": { "message": "Utilize qualquer chave de segurança ativada por WebAuthn para acessar a sua conta." }, "webAuthnMigrated": { "message": "(Migrado de FIDO)" }, "emailTitle": { "message": "E-mail" }, "emailDesc": { "message": "Os códigos de verificação vão ser enviados por e-mail para você." }, "continue": { "message": "Continuar" }, "organization": { "message": "Organização" }, "organizations": { "message": "Organizações" }, "moveToOrgDesc": { "message": "Escolha uma organização para a qual deseja mover este item. Mudar para uma organização transfere a propriedade do item para essa organização. Você não será mais o proprietário direto deste item depois que ele for movido." }, "moveManyToOrgDesc": { "message": "Escolha uma organização para a qual deseja mover esses itens. Mudar para uma organização transfere a propriedade dos itens para essa organização. Você não será mais o proprietário direto desses itens depois que eles forem movidos." }, "collectionsDesc": { "message": "Edite as coleções com as quais este item está sendo compartilhado. Somente usuários da organização com acesso a estas coleções poderão ver esse item." }, "deleteSelectedItemsDesc": { "message": "Você selecionou $COUNT$ item(ns) para excluir. Tem certeza que deseja excluir todos estes itens?", "placeholders": { "count": { "content": "$1", "example": "150" } } }, "moveSelectedItemsDesc": { "message": "Escolha uma pasta para a qual você deseja mover os $COUNT$ itens selecionados.", "placeholders": { "count": { "content": "$1", "example": "150" } } }, "moveSelectedItemsCountDesc": { "message": "Você selecionou $COUNT$ item(ns). $MOVEABLE_COUNT$ item(ns) podem ser movidos para uma organização, mas, $NONMOVEABLE_COUNT$ não pode.", "placeholders": { "count": { "content": "$1", "example": "10" }, "moveable_count": { "content": "$2", "example": "8" }, "nonmoveable_count": { "content": "$3", "example": "2" } } }, "verificationCodeTotp": { "message": "Código de verificação (TOTP)" }, "copyVerificationCode": { "message": "Copiar código de verificação" }, "warning": { "message": "Aviso" }, "confirmVaultExport": { "message": "Confirmar Exportação de Cofre" }, "exportWarningDesc": { "message": "Esta exportação contém os dados do seu cofre em um formato não criptografado. Você não deve armazenar ou enviar o arquivo exportado por canais inseguros (como e-mail). Exclua o arquivo imediatamente após terminar de usá-lo." }, "encExportKeyWarningDesc": { "message": "Esta exportação criptografa seus dados usando a chave de criptografia da sua conta. Se você rotacionar a chave de criptografia da sua conta, você deve exportar novamente, já que você não será capaz de descriptografar este arquivo de exportação." }, "encExportAccountWarningDesc": { "message": "Chaves de criptografia da conta são únicas para cada conta de usuário do Bitwarden, então você não pode importar uma exportação criptografada para uma conta diferente." }, "export": { "message": "Exportar" }, "exportVault": { "message": "Exportar cofre" }, "fileFormat": { "message": "Formato do arquivo" }, "exportSuccess": { "message": "Os dados do seu cofre foram exportados." }, "passwordGenerator": { "message": "Gerador de senha" }, "minComplexityScore": { "message": "Pontuação Mínima de Complexidade" }, "minNumbers": { "message": "Mínimo de Números" }, "minSpecial": { "message": "Mínimo Especial", "description": "Minimum Special Characters" }, "ambiguous": { "message": "Evitar caracteres ambíguos" }, "regeneratePassword": { "message": "Gerar nova senha" }, "length": { "message": "Comprimento" }, "numWords": { "message": "Número de palavras" }, "wordSeparator": { "message": "Separador de palavra" }, "capitalize": { "message": "Iniciais em Maiúsculas", "description": "Make the first letter of a work uppercase." }, "includeNumber": { "message": "Incluir Número" }, "passwordHistory": { "message": "Histórico de senha" }, "noPasswordsInList": { "message": "Não existem senhas para listar." }, "clear": { "message": "Limpar", "description": "To clear something out. example: To clear browser history." }, "accountUpdated": { "message": "Conta atualizada" }, "changeEmail": { "message": "Alterar e-mail" }, "changeEmailTwoFactorWarning": { "message": "Prosseguir irá alterar o endereço de e-mail da sua conta. Isso não mudará o endereço de e-mail usado para autenticação de dois fatores. Você pode alterar esse endereço de e-mail nas configurações de Login em Duas Etapas." }, "newEmail": { "message": "Novo e-mail" }, "code": { "message": "Código" }, "changeEmailDesc": { "message": "Enviamos um código de verificação por e-mail para $EMAIL$. Por favor, procure no seu e-mail por este código e insira-o abaixo para finalizar sua alteração de endereço de e-mail.", "placeholders": { "email": { "content": "$1", "example": "john.smith@example.com" } } }, "loggedOutWarning": { "message": "O processo desconectará você da sessão atual, exigindo que você inicie a sessão novamente. As sessões ativas em outros dispositivos podem continuar ativas por até uma hora." }, "emailChanged": { "message": "E-mail alterado" }, "logBackIn": { "message": "Por favor, reinicie a sessão." }, "logBackInOthersToo": { "message": "Por favor, reinicie a sessão. Se estiver usando outros aplicativos do Bitwarden, encerre a sessão e reinicie também." }, "changeMasterPassword": { "message": "Alterar senha mestra" }, "masterPasswordChanged": { "message": "Senha Mestra Alterada" }, "currentMasterPass": { "message": "Senha Mestra Atual" }, "newMasterPass": { "message": "Nova Senha Mestra" }, "confirmNewMasterPass": { "message": "Confirme a Nova Senha Mestra" }, "encKeySettings": { "message": "Configurações da Chave de Criptografia" }, "kdfAlgorithm": { "message": "Algoritmo KDF" }, "kdfIterations": { "message": "Iterações KDF" }, "kdfIterationsDesc": { "message": "As iterações KDF mais altas podem ajudar a proteger a sua senha mestra de ser descoberta pela força bruta de um invasor. Recomendamos um valor de $VALUE$ ou mais.", "placeholders": { "value": { "content": "$1", "example": "100,000" } } }, "kdfIterationsWarning": { "message": "Configurar as suas iterações KDF muito alta pode resultar em baixo desempenho ao iniciar sessão (e desbloquear) no Bitwarden em dispositivos com CPUs mais lentas. Recomendamos que você aumente o valor em incrementos de $INCREMENT$ e, em seguida, teste em todos os seus dispositivos.", "placeholders": { "increment": { "content": "$1", "example": "50,000" } } }, "changeKdf": { "message": "Alterar KDF" }, "encKeySettingsChanged": { "message": "As Configurações da Chave de Criptografia foram Alteradas" }, "dangerZone": { "message": "Zona de Perigo" }, "dangerZoneDesc": { "message": "Cuidado, essas ações não são reversíveis!" }, "deauthorizeSessions": { "message": "Desautorizar Sessões" }, "deauthorizeSessionsDesc": { "message": "Preocupado por ter iniciado a sessão em outro dispositivo? Prossiga abaixo para desautorizar todos os computadores e dispositivos que tenha usado. Esta medida de segurança é recomendada se usou um computador público ou guardou acidentalmente a sua senha num dispositivo que não lhe pertence. Esta ação também apagará todas as sessões anteriores registadas iniciadas com autenticação em duas etapas." }, "deauthorizeSessionsWarning": { "message": "O processo também desconectará você da sua sessão atual, exigindo que você inicie a sessão novamente. Você também será solicitado a efetuar login em duas etapas novamente, se estiver ativado. Sessões ativas em outros dispositivos podem continuar ativas por até uma hora." }, "sessionsDeauthorized": { "message": "Todas as sessões desautorizadas" }, "purgeVault": { "message": "Limpar o cofre" }, "purgedOrganizationVault": { "message": "Cofre da organização limpado." }, "vaultAccessedByProvider": { "message": "Cofre acessado pelo provedor." }, "purgeVaultDesc": { "message": "Continue abaixo para excluir todos os itens e pastas do seu cofre. Itens que pertencem a uma organização com a qual você compartilha não serão excluídos." }, "purgeOrgVaultDesc": { "message": "Continue abaixo para excluir todos os itens no cofre da organização." }, "purgeVaultWarning": { "message": "Limpando o seu cofre permanentemente. Não pode ser desfeito." }, "vaultPurged": { "message": "O seu cofre foi limpo." }, "deleteAccount": { "message": "Excluir a conta" }, "deleteAccountDesc": { "message": "Prossiga abaixo para excluir a sua conta e todos os dados associados." }, "deleteAccountWarning": { "message": "A exclusão de sua conta é permanente. Não pode ser desfeito." }, "accountDeleted": { "message": "Conta excluída" }, "accountDeletedDesc": { "message": "A sua conta foi fechada e todos os dados associados foram excluídos." }, "myAccount": { "message": "Minha conta" }, "tools": { "message": "Ferramentas" }, "importData": { "message": "Importar dados" }, "importError": { "message": "Erro de Importação" }, "importErrorDesc": { "message": "Houve um problema com os dados que você tentou importar. Por favor, resolva os erros listados abaixo em seu arquivo de origem e tente novamente." }, "importSuccess": { "message": "Os dados foram importados com sucesso para o seu cofre." }, "importWarning": { "message": "Você está importando dados para $ORGANIZATION$. Seus dados podem ser compartilhados com membros desta organização. Você deseja continuar?", "placeholders": { "organization": { "content": "$1", "example": "My Org Name" } } }, "importFormatError": { "message": "Os dados não estão formatados corretamente. Por favor, verifique o seu arquivo de importação e tente novamente." }, "importNothingError": { "message": "Nada foi importado." }, "importEncKeyError": { "message": "Erro ao descriptografar o arquivo exportado. Sua chave de criptografia não corresponde à chave de criptografia usada para exportar os dados." }, "selectFormat": { "message": "Selecione o formato do arquivo de importação" }, "selectImportFile": { "message": "Selecione o arquivo de importação" }, "orCopyPasteFileContents": { "message": "ou copie/cole o conteúdo do arquivo de importação" }, "instructionsFor": { "message": "$NAME$ instruções", "description": "The title for the import tool instructions.", "placeholders": { "name": { "content": "$1", "example": "LastPass (csv)" } } }, "options": { "message": "Opções" }, "optionsDesc": { "message": "Personalize sua experiência no cofre web." }, "optionsUpdated": { "message": "Opções atualizadas" }, "language": { "message": "Idioma" }, "languageDesc": { "message": "Altere o idioma usado pelo cofre web." }, "disableIcons": { "message": "Desabilitar ícones dos sites" }, "disableIconsDesc": { "message": "O ícone do site fornece um ícone reconhecível ao lado de cada credencial no seu cofre." }, "enableGravatars": { "message": "Habilitar Gravatar", "description": "'Gravatar' is the name of a service. See www.gravatar.com" }, "enableGravatarsDesc": { "message": "Use imagens de avatar carregadas do gravatar.com." }, "enableFullWidth": { "message": "Habilitar Esquema de Largura Total", "description": "Allows scaling the web vault UI's width" }, "enableFullWidthDesc": { "message": "Permitir que o cofre web expanda a largura total da janela do navegador." }, "default": { "message": "Padrão" }, "domainRules": { "message": "Regras de domínio" }, "domainRulesDesc": { "message": "Se você tiver a mesma credencial em vários domínios de sites diferentes, poderá marcar o site como \"equivalente\". Domínios \"globais\" são aqueles já criados para você pelo Bitwarden." }, "globalEqDomains": { "message": "Domínios equivalentes globais" }, "customEqDomains": { "message": "Domínios equivalentes personalizados" }, "exclude": { "message": "Excluir" }, "include": { "message": "Incluir" }, "customize": { "message": "Personalizar" }, "newCustomDomain": { "message": "Novo domínio personalizado" }, "newCustomDomainDesc": { "message": "Digite uma lista de domínios separados por vírgulas. Apenas domínios \"base\" são permitidos. Não insira subdomínios. Por exemplo, digite \"google.com.br\" em vez de \"www.google.com.br\". Você também pode digitar \"androidapp://package.name\" para associar um aplicativo Android a outros domínios de site." }, "customDomainX": { "message": "Domínio Personalizado $INDEX$", "placeholders": { "index": { "content": "$1", "example": "2" } } }, "domainsUpdated": { "message": "Domínios atualizados" }, "twoStepLogin": { "message": "Login em Duas Etapas" }, "twoStepLoginDesc": { "message": "Proteja a sua conta exigindo uma etapa adicional ao iniciar sessão." }, "twoStepLoginOrganizationDesc": { "message": "Exigir login em duas etapas para os usuários da organização, configurando provedores no nível da organização." }, "twoStepLoginRecoveryWarning": { "message": "Ativar o login em duas etapas pode bloquear você permanentemente da sua conta no Bitwarden. Um código de recuperação permite que você acesse sua conta no caso de não poder mais usar seu provedor de login em duas etapas normalmente (por exemplo, você perde seu dispositivo). O suporte do Bitwarden não poderá ajudá-lo se você perder o acesso à sua conta. Recomendamos que você anote ou imprima o código de recuperação e mantenha-o em um local seguro." }, "viewRecoveryCode": { "message": "Ver Código de Recuperação" }, "providers": { "message": "Provedores", "description": "Two-step login providers such as YubiKey, Duo, Authenticator apps, Email, etc." }, "enable": { "message": "Habilitar" }, "enabled": { "message": "Habilitado" }, "premium": { "message": "Premium", "description": "Premium Membership" }, "premiumMembership": { "message": "Assinatura Premium" }, "premiumRequired": { "message": "Requer Assinatura Premium" }, "premiumRequiredDesc": { "message": "Uma conta premium é necessária para usar esse recurso." }, "youHavePremiumAccess": { "message": "Você tem acesso premium" }, "alreadyPremiumFromOrg": { "message": "Você já tem acesso às funcionalidades premium por causa de uma organização da qual é um membro." }, "manage": { "message": "Gerenciar" }, "disable": { "message": "Desabilitar" }, "twoStepLoginProviderEnabled": { "message": "Este provedor de login em duas etapas está ativado em sua conta." }, "twoStepLoginAuthDesc": { "message": "Insira a sua senha mestra para modificar as configurações de login em duas etapas." }, "twoStepAuthenticatorDesc": { "message": "Siga estas etapas para configurar o login em duas etapas com um aplicativo autenticador:" }, "twoStepAuthenticatorDownloadApp": { "message": "Baixar um app autenticador de duas etapas" }, "twoStepAuthenticatorNeedApp": { "message": "Precisa de um aplicativo autenticador de duas etapas? Baixe um dos seguintes" }, "iosDevices": { "message": "Dispositivos iOS" }, "androidDevices": { "message": "Dispositivos Android" }, "windowsDevices": { "message": "Dispositivos Windows" }, "twoStepAuthenticatorAppsRecommended": { "message": "Esses aplicativos são os recomendados, no entanto, outros aplicativos de autenticação também irão funcionar." }, "twoStepAuthenticatorScanCode": { "message": "Escaneie este código QR com o seu aplicativo de duas etapas" }, "key": { "message": "Chave" }, "twoStepAuthenticatorEnterCode": { "message": "Insira o código de verificação de 6 dígitos resultante do aplicativo" }, "twoStepAuthenticatorReaddDesc": { "message": "Caso você precise adicioná-lo a outro dispositivo, abaixo está o código QR (ou chave) exigido pelo aplicativo autenticador." }, "twoStepDisableDesc": { "message": "Tem certeza que deseja desativar este provedor de login em duas etapas?" }, "twoStepDisabled": { "message": "Provedor de login em duas etapas desativado." }, "twoFactorYubikeyAdd": { "message": "Adicionar um novo Yubikey à sua conta" }, "twoFactorYubikeyPlugIn": { "message": "Conecte o YubiKey na porta USB do seu computador." }, "twoFactorYubikeySelectKey": { "message": "Selecione o YubiKey no primeiro campo vazio abaixo." }, "twoFactorYubikeyTouchButton": { "message": "Toque o botão do Yubikey." }, "twoFactorYubikeySaveForm": { "message": "Salve o formulário." }, "twoFactorYubikeyWarning": { "message": "Devido as limitações da plataforma, YubiKeys não podem ser usados em todos os aplicativos do Bitwarden. Você deve habilitar outro provedor de login em duas etapas, para que você possa acessar a sua conta quando YubiKeys não puderem ser usados. Plataformas suportadas:" }, "twoFactorYubikeySupportUsb": { "message": "Cofre Web, aplicativo de desktop, CLI e todas as extensões do navegador em um dispositivo com uma porta USB que pode aceitar o seu YubiKey." }, "twoFactorYubikeySupportMobile": { "message": "Aplicativos móveis em um dispositivo com capacidades de NFC ou uma porta USB que pode aceitar o seu YubiKey." }, "yubikeyX": { "message": "YubiKey $INDEX$", "placeholders": { "index": { "content": "$1", "example": "2" } } }, "u2fkeyX": { "message": "Chave U2F $INDEX$", "placeholders": { "index": { "content": "$1", "example": "2" } } }, "webAuthnkeyX": { "message": "Chave WebAuthn $INDEX$", "placeholders": { "index": { "content": "$1", "example": "2" } } }, "nfcSupport": { "message": "Suporte a NFC" }, "twoFactorYubikeySupportsNfc": { "message": "Uma das minhas chaves suporta NFC." }, "twoFactorYubikeySupportsNfcDesc": { "message": "Se um dos seus YubiKeys oferece suporte a NFC (como um NEO YubiKey), você será solicitado em dispositivos móveis sempre que for detectada disponibilidade de NFC." }, "yubikeysUpdated": { "message": "YubiKeys atualizado" }, "disableAllKeys": { "message": "Desabilitar Todas as Chaves" }, "twoFactorDuoDesc": { "message": "Insira as informações do aplicativo Bitwarden no painel do administrador do Duo." }, "twoFactorDuoIntegrationKey": { "message": "Chave de Integração" }, "twoFactorDuoSecretKey": { "message": "Chave Secreta" }, "twoFactorDuoApiHostname": { "message": "Servidor API" }, "twoFactorEmailDesc": { "message": "Siga estas etapas para configurar o login em duas etapas com e-mail:" }, "twoFactorEmailEnterEmail": { "message": "Insira o e-mail que você deseja receber o códigos de verificação" }, "twoFactorEmailEnterCode": { "message": "Insira o código de verificação de 6 dígitos que foi enviado pro seu e-mail" }, "sendEmail": { "message": "Enviar E-mail" }, "twoFactorU2fAdd": { "message": "Adicione uma chave de segurança FIDO U2F à sua conta" }, "removeU2fConfirmation": { "message": "Tem certeza que deseja remover esta chave de segurança?" }, "twoFactorWebAuthnAdd": { "message": "Adicione uma chave de segurança WebAuthn à sua conta" }, "readKey": { "message": "Chave de Leitura" }, "keyCompromised": { "message": "A chave está comprometida." }, "twoFactorU2fGiveName": { "message": "Dê à chave de segurança um nome amigável para identificá-la." }, "twoFactorU2fPlugInReadKey": { "message": "Conecte a chave de segurança na porta USB do seu computador e clique no botão \"Ler Chave\"." }, "twoFactorU2fTouchButton": { "message": "Se a chave de segurança tiver um botão, toque nele." }, "twoFactorU2fSaveForm": { "message": "Salvar o formulário." }, "twoFactorU2fWarning": { "message": "Devido as limitações da plataforma, o FIDO U2F não pode ser usado em todas os aplicativos do Bitwarden. Você deve habilitar outro provedor de login em duas etapas para poder acessar sua conta quando o FIDO U2F não puder ser usado. Plataformas Suportadas:" }, "twoFactorU2fSupportWeb": { "message": "Cofre web e extensões de navegador em um desktop/laptop com um navegador habilitado para U2F (Chrome, Opera, Vivaldi ou Firefox com o FIDO U2F ativado)." }, "twoFactorU2fWaiting": { "message": "Esperando que você toque no botão da sua chave de segurança" }, "twoFactorU2fClickSave": { "message": "Clique no botão \"Salvar\" abaixo para ativar essa chave de segurança para o login em duas etapas." }, "twoFactorU2fProblemReadingTryAgain": { "message": "Houve um problema ao ler a chave de segurança. Tente novamente." }, "twoFactorWebAuthnWarning": { "message": "Devido às limitações da plataforma, o WebAuthn não pode ser usado em todos os aplicativos do Bitwarden. Você deve habilitar outro provedor de login em duas etapas, para que você possa acessar a sua conta quando o WebAuthn não puder ser usado. Plataformas suportadas:" }, "twoFactorWebAuthnSupportWeb": { "message": "Cofre web e extensões de navegador em um desktop/laptop com um navegador habilitado para WebAuthn (Chrome, Opera, Vivaldi ou Firefox com o FIDO U2F ativado)." }, "twoFactorRecoveryYourCode": { "message": "Seu código de recuperação de login em duas etapas do Bitwarden" }, "twoFactorRecoveryNoCode": { "message": "Você ainda não habilitou nenhum provedor de login em duas etapas. Depois de ativar um provedor de login em duas etapas, você pode conferir aqui o seu código de recuperação." }, "printCode": { "message": "Imprimir Código", "description": "Print 2FA recovery code" }, "reports": { "message": "Relatórios" }, "reportsDesc": { "message": "Identify and close security gaps in your online accounts by clicking the reports below." }, "unsecuredWebsitesReport": { "message": "Relatório de Sites Inseguros" }, "unsecuredWebsitesReportDesc": { "message": "Usar sites inseguros com o esquema http:// pode ser perigoso. Se o site permitir, você deve sempre acessá-lo utilizando o esquema https:// para que a sua conexão seja criptografada." }, "unsecuredWebsitesFound": { "message": "Sites Inseguros Encontrados" }, "unsecuredWebsitesFoundDesc": { "message": "Nós encontramos $COUNT$ item(ns) no seu cofre com URIs não protegido(s). Você deve alterar o esquema de URI para https:// se o site permitir.", "placeholders": { "count": { "content": "$1", "example": "8" } } }, "noUnsecuredWebsites": { "message": "Nenhum item no seu cofre tem URIs inseguros." }, "inactive2faReport": { "message": "Relatório de 2FA Inativo" }, "inactive2faReportDesc": { "message": "A autenticação de duas etapas (2FA) é uma configuração de segurança importante que ajuda a proteger suas contas. Se o site oferecer, você deve sempre ativar a autenticação de duas etapas." }, "inactive2faFound": { "message": "Credenciais Sem 2FA Encontradas" }, "inactive2faFoundDesc": { "message": "Nós encontramos $COUNT$ site(s) no seu cofre que pode não estar configurado com autenticação de duas etapas (de acordo com twofactorauth.org). Para proteger ainda mais essas contas, você deve habilitar a autenticação de duas etapas.", "placeholders": { "count": { "content": "$1", "example": "8" } } }, "noInactive2fa": { "message": "Nenhum site foi encontrado em seu cofre com a configuração de autenticação de duas etapas ausente." }, "instructions": { "message": "Instruções" }, "exposedPasswordsReport": { "message": "Relatório de Senhas Expostas" }, "exposedPasswordsReportDesc": { "message": "Senhas expostas são senhas que foram descobertas em violações de dados conhecidas que foram divulgadas publicamente ou vendidas na \"dark web\" por hackers." }, "exposedPasswordsFound": { "message": "Senhas Expostas Encontradas" }, "exposedPasswordsFoundDesc": { "message": "Encontramos no seu cofre $COUNT$ item(ns) com senha(s) que foi(ram) exposta(s) em violações de dado conhecida. Você deve alterá-las para usar uma nova senha.", "placeholders": { "count": { "content": "$1", "example": "8" } } }, "noExposedPasswords": { "message": "Nenhum item no seu cofre tem senhas que foram expostas em violações de dados conhecidas." }, "checkExposedPasswords": { "message": "Verificar Senhas Expostas" }, "exposedXTimes": { "message": "Exposta $COUNT$ vez(es)", "placeholders": { "count": { "content": "$1", "example": "52" } } }, "weakPasswordsReport": { "message": "Relatório de Senhas Fracas" }, "weakPasswordsReportDesc": { "message": "Senhas fracas podem ser facilmente descobertas por hackers e ferramentas automatizadas que são usadas para quebrar senhas. O gerador de senhas do Bitwarden pode ajudá-lo a criar senhas fortes." }, "weakPasswordsFound": { "message": "Senhas Fracas Encontrada" }, "weakPasswordsFoundDesc": { "message": "Encontramos $COUNT$ item(ns) no seu cofre com senha(s) que não é/são fortes. Você deve atualizá-las para usar senhas mais fortes.", "placeholders": { "count": { "content": "$1", "example": "8" } } }, "noWeakPasswords": { "message": "Nenhum item no seu cofre tem senhas fracas." }, "reusedPasswordsReport": { "message": "Relatório de Senhas Reutilizadas" }, "reusedPasswordsReportDesc": { "message": "Se um serviço que você usa for comprometido, a reutilização da mesma senha em outro local pode permitir que hackers acessem facilmente mais de suas contas online. Você deve usar uma senha exclusiva para cada conta ou serviço." }, "reusedPasswordsFound": { "message": "Senhas Reutilizadas Encontradas" }, "reusedPasswordsFoundDesc": { "message": "Nós encontramos $COUNT$ senha(s) que esta(ão) sendo reutilizadas no seu cofre. Você deve alterá-los para um valor único.", "placeholders": { "count": { "content": "$1", "example": "8" } } }, "noReusedPasswords": { "message": "Nenhuma credencial no seu cofre tem senhas que estão sendo reutilizadas." }, "reusedXTimes": { "message": "Reutilizada $COUNT$ vez(es)", "placeholders": { "count": { "content": "$1", "example": "8" } } }, "dataBreachReport": { "message": "Relatório de Violação de Dados" }, "breachDesc": { "message": "Uma \"brecha\" é um incidente em que os dados de um site foram acessados ilegalmente por hackers e liberados publicamente. Revise os tipos de dados que foram comprometidos (endereços de e-mail, senhas, cartões de crédito etc.) e tome as medidas adequadas, como a alteração de senhas." }, "breachCheckUsernameEmail": { "message": "Verifique qualquer nome de usuário ou endereço de e-mail que você usa." }, "checkBreaches": { "message": "Verificar Brechas" }, "breachUsernameNotFound": { "message": "$USERNAME$ não foi encontrado em nenhuma violação de dados conhecida.", "placeholders": { "username": { "content": "$1", "example": "user@example.com" } } }, "goodNews": { "message": "Boas Notícias", "description": "ex. Good News, No Breached Accounts Found!" }, "breachUsernameFound": { "message": "$USERNAME$ foi encontrado em $COUNT$ violações de dados diferentes on-line.", "placeholders": { "username": { "content": "$1", "example": "user@example.com" }, "count": { "content": "$2", "example": "7" } } }, "breachFound": { "message": "Contas com Brechas Encontradas" }, "compromisedData": { "message": "Dados comprometidos" }, "website": { "message": "Site" }, "affectedUsers": { "message": "Usuários Afetados" }, "breachOccurred": { "message": "Ocorreu uma Brecha" }, "breachReported": { "message": "Brecha Reportada" }, "reportError": { "message": "Ocorreu um erro ao tentar carregar o relatório. Tente novamente" }, "billing": { "message": "Cobrança" }, "accountCredit": { "message": "Crédito da Conta", "description": "Financial term. In the case of Bitwarden, a positive balance means that you owe money, while a negative balance means that you have a credit (Bitwarden owes you money)." }, "accountBalance": { "message": "Saldo da Conta", "description": "Financial term. In the case of Bitwarden, a positive balance means that you owe money, while a negative balance means that you have a credit (Bitwarden owes you money)." }, "addCredit": { "message": "Adicionar Crédito", "description": "Add more credit to your account's balance." }, "amount": { "message": "Montante", "description": "Dollar amount, or quantity." }, "creditDelayed": { "message": "O crédito adicionado aparecerá em sua conta após o pagamento ser totalmente processado. Alguns métodos de pagamento são mais lentos e podem levar mais tempo para processar do que outros." }, "makeSureEnoughCredit": { "message": "Por favor, certifique-se de que sua conta tenha crédito suficiente para esta compra. Se sua conta não tiver crédito suficiente disponível, seu método de pagamento padrão será usado para completar a diferença. Você pode adicionar crédito à sua conta na página de Cobrança." }, "creditAppliedDesc": { "message": "O crédito da sua conta pode ser usado para efetuar compras. Qualquer crédito disponível será automaticamente usado em faturas geradas nesta conta." }, "goPremium": { "message": "Torne-se Premium", "description": "Another way of saying \"Get a premium membership\"" }, "premiumUpdated": { "message": "Você atualizou para premium." }, "premiumUpgradeUnlockFeatures": { "message": "Atualize a sua conta para uma conta premium e desbloqueie ótimos recursos adicionais." }, "premiumSignUpStorage": { "message": "1 GB de armazenamento de arquivos encriptados." }, "premiumSignUpTwoStep": { "message": "Opções adicionais de login em duas etapas, como YubiKey, FIDO U2F e Duo." }, "premiumSignUpEmergency": { "message": "Acesso de Emergência" }, "premiumSignUpReports": { "message": "Higiene de senha, saúde da conta, e relatórios sobre violação de dados para manter o seu cofre seguro." }, "premiumSignUpTotp": { "message": "Gerador de código de verificação TOTP (2FA) para logins no seu cofre." }, "premiumSignUpSupport": { "message": "Prioridade no suporte ao cliente." }, "premiumSignUpFuture": { "message": "Todos os recursos premium no futuro. Mais em breve!" }, "premiumPrice": { "message": "Tudo por apenas $PRICE$ /ano!", "placeholders": { "price": { "content": "$1", "example": "$10" } } }, "addons": { "message": "Complementos" }, "premiumAccess": { "message": "Acesso Premium" }, "premiumAccessDesc": { "message": "Você pode adicionar acesso premium a todos os membros da sua organização por $PRICE$ /$INTERVAL$.", "placeholders": { "price": { "content": "$1", "example": "$3.33" }, "interval": { "content": "$2", "example": "'month' or 'year'" } } }, "additionalStorageGb": { "message": "Armazenamento Adicional (GB)" }, "additionalStorageGbDesc": { "message": "# de GB adicional" }, "additionalStorageIntervalDesc": { "message": "Seu plano tem $SIZE$ de armazenamento criptografado de arquivos. Você pode adicionar armazenamento adicional por $PRICE$ por GB /$INTERVAL$.", "placeholders": { "size": { "content": "$1", "example": "1 GB" }, "price": { "content": "$2", "example": "$4.00" }, "interval": { "content": "$3", "example": "'month' or 'year'" } } }, "summary": { "message": "Resumo" }, "total": { "message": "Total" }, "year": { "message": "ano" }, "month": { "message": "mês" }, "monthAbbr": { "message": "mês.", "description": "Short abbreviation for 'month'" }, "paymentChargedAnnually": { "message": "O seu método de pagamento será cobrado imediatamente e de forma recorrente a cada ano. Você pode cancelar a qualquer momento." }, "paymentCharged": { "message": "Seu método de pagamento será cobrado imediatamente e, em seguida, de forma recorrente, a cada $INTERVAL$. Você pode cancelar a qualquer momento.", "placeholders": { "interval": { "content": "$1", "example": "month or year" } } }, "paymentChargedWithTrial": { "message": "Seu plano vem com um teste gratuito de 7 dias. Seu cartão não será cobrado até que o período de teste termine e de forma recorrente a cada $INTERVAL$. Você pode cancelar a qualquer momento." }, "paymentInformation": { "message": "Informação de Pagamento" }, "billingInformation": { "message": "Informações de Pagamento" }, "creditCard": { "message": "Cartão de Crédito" }, "paypalClickSubmit": { "message": "Clique no botão PayPal para entrar na sua conta do PayPal e, em seguida, clique no botão Enviar abaixo para continuar." }, "cancelSubscription": { "message": "Cancelar Assinatura" }, "subscriptionCanceled": { "message": "A assinatura foi cancelada." }, "pendingCancellation": { "message": "Cancelamento Pendente" }, "subscriptionPendingCanceled": { "message": "A assinatura foi marcada para ser cancelada no final do período de faturamento atual." }, "reinstateSubscription": { "message": "Restabelecer Assinatura" }, "reinstateConfirmation": { "message": "Você tem certeza que deseja remover a solicitação de cancelamento pendente e restabelecer sua assinatura?" }, "reinstated": { "message": "A assinatura foi restabelecida." }, "cancelConfirmation": { "message": "Você tem certeza que deseja cancelar? Você perderá o acesso a todos os recursos dessa assinatura no final deste ciclo de faturamento." }, "canceledSubscription": { "message": "A assinatura foi cancelada." }, "neverExpires": { "message": "Nunca Expirar" }, "status": { "message": "Estado" }, "nextCharge": { "message": "Próxima Cobrança" }, "details": { "message": "Detalhes" }, "downloadLicense": { "message": "Baixar Licença" }, "updateLicense": { "message": "Atualizar Licença" }, "updatedLicense": { "message": "Licença atualizada" }, "manageSubscription": { "message": "Gerenciar Assinatura" }, "storage": { "message": "Armazenamento" }, "addStorage": { "message": "Adicionar Armazenamento" }, "removeStorage": { "message": "Remover Armazenamento" }, "subscriptionStorage": { "message": "A sua assinatura tem um total de $MAX_STORAGE$ GB de armazenamento de arquivos criptografados. Você está usando $USED_STORAGE$ no momento.", "placeholders": { "max_storage": { "content": "$1", "example": "4" }, "used_storage": { "content": "$2", "example": "65 MB" } } }, "paymentMethod": { "message": "Forma de Pagamento" }, "noPaymentMethod": { "message": "Nenhum método de pagamento selecionado." }, "addPaymentMethod": { "message": "Adicionar Forma de Pagamento" }, "changePaymentMethod": { "message": "Alterar Forma de Pagamento" }, "invoices": { "message": "Faturas" }, "noInvoices": { "message": "Sem faturas." }, "paid": { "message": "Pago", "description": "Past tense status of an invoice. ex. Paid or unpaid." }, "unpaid": { "message": "Por pagar", "description": "Past tense status of an invoice. ex. Paid or unpaid." }, "transactions": { "message": "Transações", "description": "Payment/credit transactions." }, "noTransactions": { "message": "Sem transações." }, "chargeNoun": { "message": "Carregar", "description": "Noun. A charge from a payment method." }, "refundNoun": { "message": "Reembolso", "description": "Noun. A refunded payment that was charged." }, "chargesStatement": { "message": "Quaisquer cobranças aparecerão no seu extrato como $STATEMENT_NAME$.", "placeholders": { "statement_name": { "content": "$1", "example": "BITWARDEN" } } }, "gbStorageAdd": { "message": "GB de Armazenamento Para Adicionar" }, "gbStorageRemove": { "message": "GB de Armazenamento Para Remover" }, "storageAddNote": { "message": "A adição de armazenamento resultará em ajustes no valor total da fatura e será cobrado imediatamente pela forma de pagamento registrada. A primeira cobrança será rateada pelo restante do ciclo de faturamento atual." }, "storageRemoveNote": { "message": "A remoção do armazenamento resultará em ajustes no valor total da fatura que serão divididos em sua próxima cobrança de faturamento." }, "adjustedStorage": { "message": "Ajustado $AMOUNT$ GB de armazenamento.", "placeholders": { "amount": { "content": "$1", "example": "5" } } }, "contactSupport": { "message": "Contato com o Suporte ao Cliente" }, "updatedPaymentMethod": { "message": "Atualizar forma de pagamento." }, "purchasePremium": { "message": "Comprar Premium" }, "licenseFile": { "message": "Arquivo de Licença" }, "licenseFileDesc": { "message": "Seu arquivo de licença terá o nome de algo como $FILE_NAME$", "placeholders": { "file_name": { "content": "$1", "example": "bitwarden_premium_license.json" } } }, "uploadLicenseFilePremium": { "message": "Para atualizar sua conta para uma assinatura premium, você precisa fazer o upload de um arquivo de licença válido." }, "uploadLicenseFileOrg": { "message": "Para criar uma organização hospedada localmente, você precisa fazer o upload de um arquivo de licença válido." }, "accountEmailMustBeVerified": { "message": "O endereço de e-mail da sua conta deve ser verificado." }, "newOrganizationDesc": { "message": "As organizações permitem que você compartilhe partes do seu cofre com outras pessoas, além de gerenciar usuários relacionados para uma entidade específica, como uma família, uma equipe pequena ou uma empresa grande." }, "generalInformation": { "message": "Informação Geral" }, "organizationName": { "message": "Nome da Organização" }, "accountOwnedBusiness": { "message": "Esta conta pertence a uma empresa." }, "billingEmail": { "message": "E-mail de Cobrança" }, "businessName": { "message": "Nome da Empresa" }, "chooseYourPlan": { "message": "Escolha Seu Plano" }, "users": { "message": "Usuários" }, "userSeats": { "message": "Assentos de Usuário" }, "additionalUserSeats": { "message": "Assentos de Usuário Adicionais" }, "userSeatsDesc": { "message": "# de assentos de usuário" }, "userSeatsAdditionalDesc": { "message": "O seu plano vem com assentos de usuário de $BASE_SEATS$. Você pode adicionar mais usuários por $SEAT_PRICE$ por usuário /mês.", "placeholders": { "base_seats": { "content": "$1", "example": "5" }, "seat_price": { "content": "$2", "example": "$2.00" } } }, "userSeatsHowManyDesc": { "message": "Quanto mais assentos de usuário você precisa? Você também pode adicionar mais assentos depois, se necessário." }, "planNameFree": { "message": "Grátis", "description": "Free as in 'free beer'." }, "planDescFree": { "message": "Para usuários de testes ou pessoais para compartilhar com $COUNT$ outro usuário.", "placeholders": { "count": { "content": "$1", "example": "1" } } }, "planNameFamilies": { "message": "Families" }, "planDescFamilies": { "message": "Para uso pessoal, para compartilhar com a família & amigos." }, "planNameTeams": { "message": "Equipes" }, "planDescTeams": { "message": "Para empresas e outras organizações de equipe." }, "planNameEnterprise": { "message": "Empresarial" }, "planDescEnterprise": { "message": "Para empresas e outras organizações de grande porte." }, "freeForever": { "message": "Grátis para Sempre" }, "includesXUsers": { "message": "inclui $COUNT$ usuários", "placeholders": { "count": { "content": "$1", "example": "5" } } }, "additionalUsers": { "message": "Usuários Adicionais" }, "costPerUser": { "message": "$COST$ por usuário", "placeholders": { "cost": { "content": "$1", "example": "$3" } } }, "limitedUsers": { "message": "Limitado a $COUNT$ usuários (incluindo você)", "placeholders": { "count": { "content": "$1", "example": "2" } } }, "limitedCollections": { "message": "Limitado a $COUNT$ coleções", "placeholders": { "count": { "content": "$1", "example": "2" } } }, "addShareLimitedUsers": { "message": "Adicione e compartilhe com até $COUNT$ usuários", "placeholders": { "count": { "content": "$1", "example": "5" } } }, "addShareUnlimitedUsers": { "message": "Adicione e compartilhe com usuários ilimitados" }, "createUnlimitedCollections": { "message": "Crie Coleções ilimitadas" }, "gbEncryptedFileStorage": { "message": "$SIZE$ de armazenamento encriptado", "placeholders": { "size": { "content": "$1", "example": "1 GB" } } }, "onPremHostingOptional": { "message": "Hospedagem Local (opcional)" }, "usersGetPremium": { "message": "Usuários obtém acesso a Funcionalidades Premium" }, "controlAccessWithGroups": { "message": "Controle o acesso do usuário com Grupos" }, "syncUsersFromDirectory": { "message": "Sincronize seus usuários e Grupos de um diretório" }, "trackAuditLogs": { "message": "Acompanhe as ações do usuário com os registros de auditoria" }, "enforce2faDuo": { "message": "Reforçar o 2FA com o Duo" }, "priorityCustomerSupport": { "message": "Suporte prioritário ao cliente" }, "xDayFreeTrial": { "message": "Avaliação gratuita de $COUNT$ dia(s), cancele a qualquer momento", "placeholders": { "count": { "content": "$1", "example": "7" } } }, "monthly": { "message": "Mensal" }, "annually": { "message": "Anual" }, "basePrice": { "message": "Preço Base" }, "organizationCreated": { "message": "Organização Criada" }, "organizationReadyToGo": { "message": "A sua nova organização está pronta!" }, "organizationUpgraded": { "message": "Sua organização foi atualizada." }, "leave": { "message": "Sair" }, "leaveOrganizationConfirmation": { "message": "Você tem certeza que deseja sair desta organização?" }, "leftOrganization": { "message": "Você saiu da organização." }, "defaultCollection": { "message": "Coleção Padrão" }, "getHelp": { "message": "Obter Ajuda" }, "getApps": { "message": "Obtenha os Aplicativos" }, "loggedInAs": { "message": "Sessão iniciada como" }, "eventLogs": { "message": "Registro de Eventos" }, "people": { "message": "Pessoas" }, "policies": { "message": "Políticas" }, "singleSignOn": { "message": "Logon Único" }, "editPolicy": { "message": "Editar Política" }, "groups": { "message": "Grupos" }, "newGroup": { "message": "Novo Grupo" }, "addGroup": { "message": "Adicionar Grupo" }, "editGroup": { "message": "Editar Grupo" }, "deleteGroupConfirmation": { "message": "Você tem certeza que deseja excluir este grupo?" }, "removeUserConfirmation": { "message": "Você tem certeza que deseja remover este(a) usuário(a)?" }, "removeUserConfirmationKeyConnector": { "message": "Aviso! Este usuário precisa do Conector de Chave para gerenciar sua criptografia. Remover este usuário de sua organização desativará permanentemente sua conta. Essa ação não pode ser desfeita. Você quer prosseguir?" }, "externalId": { "message": "ID externa" }, "externalIdDesc": { "message": "O ID externo pode ser usado como referência ou vincular esse recurso a um sistema externo, como um diretório de usuários." }, "accessControl": { "message": "Controle de Acesso" }, "groupAccessAllItems": { "message": "Este grupo pode acessar e modificar todos os itens." }, "groupAccessSelectedCollections": { "message": "Este grupo pode acessar apenas as coleções selecionadas." }, "readOnly": { "message": "Somente Leitura" }, "newCollection": { "message": "Nova Coleção" }, "addCollection": { "message": "Adicionar Coleção" }, "editCollection": { "message": "Editar Coleção" }, "deleteCollectionConfirmation": { "message": "Você tem certeza que deseja excluir esta coleção?" }, "editUser": { "message": "Editar Usuário" }, "inviteUser": { "message": "Convidar Usuário" }, "inviteUserDesc": { "message": "Convide um novo usuário para sua organização digitando o endereço de e-mail da conta Bitwarden dele abaixo. Se ele não tiver uma conta no Bitwarden, ele será solicitado a criar uma nova conta." }, "inviteMultipleEmailDesc": { "message": "Você pode convidar até $COUNT$ usuários por vez. Utilize a vírgula para separar uma lista de endereços de e-mail.", "placeholders": { "count": { "content": "$1", "example": "20" } } }, "userUsingTwoStep": { "message": "Este usuário está usando o login em duas etapas para proteger a sua conta." }, "userAccessAllItems": { "message": "Este usuário pode acessar e modificar todos os itens." }, "userAccessSelectedCollections": { "message": "Este usuário pode acessar apenas as coleções selecionadas." }, "search": { "message": "Pesquisar" }, "invited": { "message": "Convidado" }, "accepted": { "message": "Aceito" }, "confirmed": { "message": "Confirmado" }, "clientOwnerEmail": { "message": "Email do Proprietário do Cliente" }, "owner": { "message": "Proprietário" }, "ownerDesc": { "message": "O maior usuário de acesso que pode gerenciar todos os aspectos da sua organização." }, "clientOwnerDesc": { "message": "Este usuário deve ser independente do Provedor. Se o Provedor estiver desassociado da organização, este usuário manterá a propriedade da organização." }, "admin": { "message": "Administrador" }, "adminDesc": { "message": " Os administradores podem acessar e gerenciar todos os itens, coleções e usuários em sua organização." }, "user": { "message": "Usuário" }, "userDesc": { "message": "Um usuário comum com acesso às coleções da sua organização." }, "manager": { "message": "Gerente" }, "managerDesc": { "message": "Os gerentes podem acessar e gerenciar coleções atribuídas em sua organização." }, "all": { "message": "Todos" }, "refresh": { "message": "Atualizar" }, "timestamp": { "message": "Timestamp" }, "event": { "message": "Evento" }, "unknown": { "message": "Desconhecido" }, "loadMore": { "message": "Carregar Mais" }, "mobile": { "message": "Celular", "description": "Mobile app" }, "extension": { "message": "Extensão", "description": "Browser extension/addon" }, "desktop": { "message": "Área de Trabalho", "description": "Desktop app" }, "webVault": { "message": "Cofre Web" }, "loggedIn": { "message": "Conectado(a)." }, "changedPassword": { "message": "Senha da conta alterada." }, "enabledUpdated2fa": { "message": "Habilitado/atualizado o login em duas etapas." }, "disabled2fa": { "message": "Desabilitar login em duas etapas." }, "recovered2fa": { "message": "Conta recuperada do login em duas etapas." }, "failedLogin": { "message": "Falha na tentativa de login com senha incorreta." }, "failedLogin2fa": { "message": "A tentativa de login falhou com o login incorreto em duas etapas." }, "exportedVault": { "message": "Cofre exportado." }, "exportedOrganizationVault": { "message": "Cofre da organização exportado." }, "editedOrgSettings": { "message": "Configurações de organização editadas." }, "createdItemId": { "message": "Item criado $ID$.", "placeholders": { "id": { "content": "$1", "example": "Google" } } }, "editedItemId": { "message": "Item editado $ID$.", "placeholders": { "id": { "content": "$1", "example": "Google" } } }, "deletedItemId": { "message": "Item $ID$ enviado para lixeira.", "placeholders": { "id": { "content": "$1", "example": "Google" } } }, "movedItemIdToOrg": { "message": "Item $ID$ movido para uma organização.", "placeholders": { "id": { "content": "$1", "example": "'Google'" } } }, "viewedItemId": { "message": "Item $ID$ visualizado.", "placeholders": { "id": { "content": "$1", "example": "Google" } } }, "viewedPasswordItemId": { "message": "Senha visualizada para o item $ID$.", "placeholders": { "id": { "content": "$1", "example": "Google" } } }, "viewedHiddenFieldItemId": { "message": "Campo oculto visualizado para o item $ID$.", "placeholders": { "id": { "content": "$1", "example": "Google" } } }, "viewedSecurityCodeItemId": { "message": "Código de segurança visualizado para o item $ID$.", "placeholders": { "id": { "content": "$1", "example": "Google" } } }, "copiedPasswordItemId": { "message": "Senha copiada para o item $ID$.", "placeholders": { "id": { "content": "$1", "example": "Google" } } }, "copiedHiddenFieldItemId": { "message": "Campo oculto copiado para o item $ID$.", "placeholders": { "id": { "content": "$1", "example": "Google" } } }, "copiedSecurityCodeItemId": { "message": "Código de segurança copiado para o item $ID$.", "placeholders": { "id": { "content": "$1", "example": "Google" } } }, "autofilledItemId": { "message": "Item $ID$ auto-preenchido.", "placeholders": { "id": { "content": "$1", "example": "Google" } } }, "createdCollectionId": { "message": "Coleção criada $ID$.", "placeholders": { "id": { "content": "$1", "example": "Server Passwords" } } }, "editedCollectionId": { "message": "Coleção editada $ID$.", "placeholders": { "id": { "content": "$1", "example": "Server Passwords" } } }, "deletedCollectionId": { "message": "Coleção excluída $ID$.", "placeholders": { "id": { "content": "$1", "example": "Server Passwords" } } }, "editedPolicyId": { "message": "Política $ID$ editada.", "placeholders": { "id": { "content": "$1", "example": "Master Password" } } }, "createdGroupId": { "message": "Grupo criado $ID$.", "placeholders": { "id": { "content": "$1", "example": "Developers" } } }, "editedGroupId": { "message": "Grupo editado $ID$.", "placeholders": { "id": { "content": "$1", "example": "Developers" } } }, "deletedGroupId": { "message": "Grupo excluído $ID$.", "placeholders": { "id": { "content": "$1", "example": "Developers" } } }, "removedUserId": { "message": "Usuário removido $ID$.", "placeholders": { "id": { "content": "$1", "example": "John Smith" } } }, "createdAttachmentForItem": { "message": "Anexo criado para o item $ID$.", "placeholders": { "id": { "content": "$1", "example": "Google" } } }, "deletedAttachmentForItem": { "message": "Anexo excluído para o item $ID$.", "placeholders": { "id": { "content": "$1", "example": "Google" } } }, "editedCollectionsForItem": { "message": "Coleção editada para o item $ID$.", "placeholders": { "id": { "content": "$1", "example": "Google" } } }, "invitedUserId": { "message": "Usuário(a) convidado(a) $ID$.", "placeholders": { "id": { "content": "$1", "example": "John Smith" } } }, "confirmedUserId": { "message": "Usuário(a) confirmado(a) $ID$.", "placeholders": { "id": { "content": "$1", "example": "John Smith" } } }, "editedUserId": { "message": "Usuário(a) editado(a) $ID$.", "placeholders": { "id": { "content": "$1", "example": "John Smith" } } }, "editedGroupsForUser": { "message": "Grupo editado para usuário(a) $ID$.", "placeholders": { "id": { "content": "$1", "example": "John Smith" } } }, "unlinkedSsoUser": { "message": "SSO desvinculado para o usuário $ID$.", "placeholders": { "id": { "content": "$1", "example": "John Smith" } } }, "createdOrganizationId": { "message": "A organização $ID$ foi criada.", "placeholders": { "id": { "content": "$1", "example": "Google" } } }, "addedOrganizationId": { "message": "A organização $ID$ foi adicionada.", "placeholders": { "id": { "content": "$1", "example": "Google" } } }, "removedOrganizationId": { "message": "Organização $ID$ removida.", "placeholders": { "id": { "content": "$1", "example": "Google" } } }, "accessedClientVault": { "message": "Cofre da organização $ID$ acessado.", "placeholders": { "id": { "content": "$1", "example": "Google" } } }, "device": { "message": "Dispositivo" }, "view": { "message": "Ver" }, "invalidDateRange": { "message": "Intervalo de datas inválido." }, "errorOccurred": { "message": "Ocorreu um erro." }, "userAccess": { "message": "Acesso de Usuário" }, "userType": { "message": "Tipo de Usuário" }, "groupAccess": { "message": "Grupo de Acesso" }, "groupAccessUserDesc": { "message": "Edite os grupos aos quais este usuário pertence." }, "invitedUsers": { "message": "Usuário(a)(s) convidado(a)(s)." }, "resendInvitation": { "message": "Reenviar o Convite" }, "resendEmail": { "message": "Reenviar E-mail" }, "hasBeenReinvited": { "message": "$USER$ foi convidado(a).", "placeholders": { "user": { "content": "$1", "example": "John Smith" } } }, "confirm": { "message": "Confirmar" }, "confirmUser": { "message": "Confirmar Usuário" }, "hasBeenConfirmed": { "message": "$USER$ foi confirmado(a).", "placeholders": { "user": { "content": "$1", "example": "John Smith" } } }, "confirmUsers": { "message": "Confirmar Usuários" }, "usersNeedConfirmed": { "message": "Você tem usuários que aceitaram o convite, mas ainda precisam ser confirmados. Os usuários não terão acesso à organização até que sejam confirmados." }, "startDate": { "message": "Data de Início" }, "endDate": { "message": "Data do Término" }, "verifyEmail": { "message": "Verificar E-mail" }, "verifyEmailDesc": { "message": "Confirme o endereço de e-mail da sua conta para desbloquear o acesso a todos os recursos." }, "verifyEmailFirst": { "message": "Primeiro, o endereço de e-mail da sua conta precisa ser confirmado." }, "checkInboxForVerification": { "message": "Verifique sua caixa de entrada do e-mail para obter o código de verificação." }, "emailVerified": { "message": "O seu e-mail foi verificado." }, "emailVerifiedFailed": { "message": "Não é possível confirmar o seu e-mail. Tente enviar um novo e-mail de verificação." }, "emailVerificationRequired": { "message": "Verificação de E-mail Necessária" }, "emailVerificationRequiredDesc": { "message": "Você precisa verificar o seu e-mail para usar este recurso." }, "updateBrowser": { "message": "Atualizar Navegador" }, "updateBrowserDesc": { "message": "Você está usando um navegador da Web não suportado. O cofre web pode não funcionar corretamente." }, "joinOrganization": { "message": "Junte-se a Organização" }, "joinOrganizationDesc": { "message": "Você foi convidado para participar da organização listada acima. Para aceitar o convite, você precisa iniciar sessão ou criar uma nova conta no Bitwarden." }, "inviteAccepted": { "message": "Convite Aceito" }, "inviteAcceptedDesc": { "message": "Você pode acessar essa organização quando um administrador confirmar sua associação. Enviaremos um e-mail quando isso acontecer." }, "inviteAcceptFailed": { "message": "Não é possível aceitar o convite. Peça a um administrador da organização para enviar um novo convite." }, "inviteAcceptFailedShort": { "message": "Não foi possível aceitar o convite. $DESCRIPTION$", "placeholders": { "description": { "content": "$1", "example": "You must enable 2FA on your user account before you can join this organization." } } }, "rememberEmail": { "message": "Lembrar e-mail" }, "recoverAccountTwoStepDesc": { "message": "Se você não puder acessar sua conta por meio de seus métodos normais de login em duas etapas, poderá usar seu código de recuperação de login em duas etapas para desativar a funcionalidade de duas etapas da sua conta." }, "recoverAccountTwoStep": { "message": "Recuperar login em duas etapas da conta" }, "twoStepRecoverDisabled": { "message": "O login em duas etapas foi desativado em sua conta." }, "learnMore": { "message": "Saiba mais" }, "deleteRecoverDesc": { "message": "Insira seu endereço de e-mail abaixo para recuperar e excluir sua conta." }, "deleteRecoverEmailSent": { "message": "Se a sua conta existir, enviamos um e-mail para você com mais instruções." }, "deleteRecoverConfirmDesc": { "message": "Você pediu para excluir a sua conta no Bitwarden. Clique no botão abaixo para confirmar." }, "myOrganization": { "message": "Minha Organização" }, "deleteOrganization": { "message": "Excluir Organização" }, "deletingOrganizationContentWarning": { "message": "Digite a senha mestra para confirmar a exclusão de $ORGANIZATION$ e todos os dados associados. Os dados do cofre no $ORGANIZATION$ incluem:", "placeholders": { "organization": { "content": "$1", "example": "My Org Name" } } }, "deletingOrganizationActiveUserAccountsWarning": { "message": "As contas de usuários permanecerão ativas após a exclusão, mas não estarão mais associadas a essa organização." }, "deletingOrganizationIsPermanentWarning": { "message": "A exclusão de $ORGANIZATION$ é permanente e irreversível.", "placeholders": { "organization": { "content": "$1", "example": "My Org Name" } } }, "organizationDeleted": { "message": "Organização Excluida" }, "organizationDeletedDesc": { "message": "A organização e todos os dados associados foram excluídos." }, "organizationUpdated": { "message": "Organização atualizada" }, "taxInformation": { "message": "Informações de Impostos" }, "taxInformationDesc": { "message": "Para clientes dentro dos EUA, o código postal (ZIP code) é necessário para satisfazer os requisitos fiscais das vendas. para outros países você pode opcionalmente fornecer um número de identificação fiscal (VAT/GST) e/ou um endereço para aparecer nas suas faturas." }, "billingPlan": { "message": "Plano", "description": "A billing plan/package. For example: families, teams, enterprise, etc." }, "changeBillingPlan": { "message": "Atualizar Plano", "description": "A billing plan/package. For example: families, teams, enterprise, etc." }, "changeBillingPlanUpgrade": { "message": "Atualize sua conta para outro plano fornecendo as informações abaixo. Por favor, verifique se você tem um método de pagamento ativo adicionado à conta.", "description": "A billing plan/package. For example: families, teams, enterprise, etc." }, "invoiceNumber": { "message": "Fatura #$NUMBER$", "description": "ex. Invoice #79C66F0-0001", "placeholders": { "number": { "content": "$1", "example": "79C66F0-0001" } } }, "viewInvoice": { "message": "Ver Fatura" }, "downloadInvoice": { "message": "Baixar Fatura" }, "verifyBankAccount": { "message": "Verificar Conta Bancária" }, "verifyBankAccountDesc": { "message": "Fizemos dois micro-depósitos em sua conta bancária (pode demorar de 1 a 2 dias úteis para aparecer). Insira esses valores para confirmar a conta bancária." }, "verifyBankAccountInitialDesc": { "message": "O pagamento com uma conta bancária só está disponível para clientes nos Estados Unidos. Você será solicitado a confirmar sua conta bancária. Vamos fazer dois micro-depósitos nos próximos 1-2 dias úteis. Insira esses valores na página de faturamento da organização para confirmar a conta bancária." }, "verifyBankAccountFailureWarning": { "message": "A não verificação da conta bancária resultará em um pagamento não atendido e sua assinatura será desativada." }, "verifiedBankAccount": { "message": "A conta bancária foi verificada." }, "bankAccount": { "message": "Conta Bancária" }, "amountX": { "message": "Montante $COUNT$", "description": "Used in bank account verification of micro-deposits. Amount, as in a currency amount. Ex. Amount 1 is $2.00, Amount 2 is $1.50", "placeholders": { "count": { "content": "$1", "example": "1" } } }, "routingNumber": { "message": "Routing Number", "description": "Bank account routing number" }, "accountNumber": { "message": "Numero da Conta" }, "accountHolderName": { "message": "Nome do Titular da Conta" }, "bankAccountType": { "message": "Tipo de Conta" }, "bankAccountTypeCompany": { "message": "Empresa (Profissional)" }, "bankAccountTypeIndividual": { "message": "Individual (Pessoal)" }, "enterInstallationId": { "message": "Insira o seu ID de instalação" }, "limitSubscriptionDesc": { "message": "Defina um limite de vagas para sua assinatura. Quando esse limite for atingido, você não poderá convidar novos usuários." }, "maxSeatLimit": { "message": "Limite Máximo de Vaga (opcional)", "description": "Upper limit of seats to allow through autoscaling" }, "maxSeatCost": { "message": "Custo de vaga máximo potencial" }, "addSeats": { "message": "Adicionar Assentos", "description": "Seat = User Seat" }, "removeSeats": { "message": "Remover Assentos", "description": "Seat = User Seat" }, "subscriptionDesc": { "message": "Ajustes em sua assinatura resultarão em alterações rateadas em seus totais de cobrança. Se os usuários recém-convidados excederem o número de vagas de sua assinatura, você receberá imediatamente uma cobrança proporcional pelos usuários adicionais." }, "subscriptionUserSeats": { "message": "Sua assinatura permite um total de $COUNT$ usuários.", "placeholders": { "count": { "content": "$1", "example": "50" } } }, "limitSubscription": { "message": "Assinatura Limite (Opcional)" }, "subscriptionSeats": { "message": "Vagas de Assinatura" }, "subscriptionUpdated": { "message": "Assinatura atualizada" }, "additionalOptions": { "message": "Opções Adicionais" }, "additionalOptionsDesc": { "message": "Para ajuda adicional no gerenciamento de sua assinatura, entre em contato com o suporte ao cliente." }, "subscriptionUserSeatsUnlimitedAutoscale": { "message": "Ajustes em sua assinatura resultarão em alterações rateadas em seus totais de cobrança. Se os usuários recém-convidados excederem o número de vagas de sua assinatura, você receberá imediatamente uma cobrança proporcional pelos usuários adicionais." }, "subscriptionUserSeatsLimitedAutoscale": { "message": "Ajustes em sua assinatura resultarão em alterações rateadas em seus totais de cobrança. Se os usuários recém-convidados excederem o número de vagas de sua assinatura, você receberá imediatamente uma cobrança proporcional para os usuários adicionais até que seu limite de $MAX$ de vaga seja atingido.", "placeholders": { "max": { "content": "$1", "example": "50" } } }, "subscriptionFreePlan": { "message": "Você não pode convidar mais do que $COUNT$ usuários sem atualizar seu plano.", "placeholders": { "count": { "content": "$1", "example": "2" } } }, "subscriptionFamiliesPlan": { "message": "Você não pode convidar mais de $COUNT$ usuários sem atualizar seu plano. Entre em contato com o Suporte ao Cliente para atualizar.", "placeholders": { "count": { "content": "$1", "example": "6" } } }, "subscriptionSponsoredFamiliesPlan": { "message": "Sua assinatura permite um total de $COUNT$ usuários. Seu plano é patrocinado e cobrado por uma organização externa.", "placeholders": { "count": { "content": "$1", "example": "6" } } }, "subscriptionMaxReached": { "message": "Ajustes em sua assinatura resultarão em alterações rateadas em seus totais de cobrança. Você não pode convidar mais de $COUNT$ usuários sem aumentar suas vagas de assinatura.", "placeholders": { "count": { "content": "$1", "example": "50" } } }, "seatsToAdd": { "message": "Assentos Para Adicionar" }, "seatsToRemove": { "message": "Assentos Para Remover" }, "seatsAddNote": { "message": "A adição de assentos de usuário resultará em ajustes no total da cobrança, e será cobrada imediatamente pela sua forma de pagamento registrada. A primeira cobrança será rateada pelo restante do ciclo do faturamento atual." }, "seatsRemoveNote": { "message": "A remoção dos assentos de usuário resultará em ajustes no total do faturamento, que será rateado como crédito para sua próxima cobrança." }, "adjustedSeats": { "message": "Ajustado $AMOUNT$ assentos de usuário.", "placeholders": { "amount": { "content": "$1", "example": "15" } } }, "keyUpdated": { "message": "Chave Atualizada" }, "updateKeyTitle": { "message": "Atualizar Chave" }, "updateEncryptionKey": { "message": "Atualizar Chave de Criptografia" }, "updateEncryptionKeyShortDesc": { "message": "Você está usando atualmente um esquema de criptografia desatualizado." }, "updateEncryptionKeyDesc": { "message": "Passamos para chaves de criptografia maiores, que oferecem melhor segurança e acesso a recursos mais recentes. Atualizar sua chave de criptografia é rápido e fácil. Basta inserir sua senha mestra abaixo. Esta atualização eventualmente se tornará obrigatória." }, "updateEncryptionKeyWarning": { "message": "Depois de atualizar sua chave de criptografia, é necessário encerrar e iniciar a sessão em todos os aplicativos do Bitwarden que você está usando atualmente (como o aplicativo móvel ou as extensões do navegador). Não encerrar e iniciar sessão (que baixa sua nova chave de criptografia) pode resultar em corrupção de dados. Nós tentaremos desconectá-lo automaticamente, mas isso pode demorar um pouco." }, "updateEncryptionKeyExportWarning": { "message": "Quaisquer exportações criptografadas que você tenha salvo também se tornarão inválidas." }, "subscription": { "message": "Assinatura" }, "loading": { "message": "Carregando" }, "upgrade": { "message": "Atualizar" }, "upgradeOrganization": { "message": "Atualizar Organização" }, "upgradeOrganizationDesc": { "message": "Este recurso não está disponível para organizações gratuitas. Mude para um plano pago para desbloquear mais recursos." }, "createOrganizationStep1": { "message": "Criar Organização: Passo 1" }, "createOrganizationCreatePersonalAccount": { "message": "Antes de criar sua organização, primeiro você precisa criar uma conta pessoal gratuita." }, "refunded": { "message": "Reembolsado" }, "nothingSelected": { "message": "Você selecionou nada." }, "acceptPolicies": { "message": "Ao marcar esta caixa, você concorda com o seguinte:" }, "acceptPoliciesError": { "message": "Os Termos de Serviço e a Política de Privacidade não foram reconhecidos." }, "termsOfService": { "message": "Termos de Serviço" }, "privacyPolicy": { "message": "Política de Privacidade" }, "filters": { "message": "Filtros" }, "vaultTimeout": { "message": "Tempo Limite do Cofre" }, "vaultTimeoutDesc": { "message": "Escolha quando o tempo limite do seu cofre irá se esgotar e execute a ação selecionada." }, "oneMinute": { "message": "1 minuto" }, "fiveMinutes": { "message": "5 minutos" }, "fifteenMinutes": { "message": "15 minutos" }, "thirtyMinutes": { "message": "30 minutos" }, "oneHour": { "message": "1 hora" }, "fourHours": { "message": "4 horas" }, "onRefresh": { "message": "Quando Reiniciar o Navegador" }, "dateUpdated": { "message": "Atualizado", "description": "ex. Date this item was updated" }, "datePasswordUpdated": { "message": "Senha Atualizada", "description": "ex. Date this password was updated" }, "organizationIsDisabled": { "message": "Organização está desabilitada." }, "licenseIsExpired": { "message": "A licença está expirada." }, "updatedUsers": { "message": "Usuários atualizados" }, "selected": { "message": "Selecionado" }, "ownership": { "message": "Propriedade" }, "whoOwnsThisItem": { "message": "Quem possui este item?" }, "strong": { "message": "Forte", "description": "ex. A strong password. Scale: Very Weak -> Weak -> Good -> Strong" }, "good": { "message": "Boa", "description": "ex. A good password. Scale: Very Weak -> Weak -> Good -> Strong" }, "weak": { "message": "Fraca", "description": "ex. A weak password. Scale: Very Weak -> Weak -> Good -> Strong" }, "veryWeak": { "message": "Muito Fraca", "description": "ex. A very weak password. Scale: Very Weak -> Weak -> Good -> Strong" }, "weakMasterPassword": { "message": "Senha Mestra Fraca" }, "weakMasterPasswordDesc": { "message": "A senha mestra que você selecionou está fraca. Você deve usar uma senha mestra forte (ou uma frase-passe) para proteger a sua conta Bitwarden adequadamente. Tem certeza que deseja usar esta senha mestra?" }, "rotateAccountEncKey": { "message": "Também rodar a chave de encriptação da minha conta" }, "rotateEncKeyTitle": { "message": "Rodar Chave de Encriptação" }, "rotateEncKeyConfirmation": { "message": "Você tem certeza que quer rodar a chave de encriptação da sua conta?" }, "attachmentsNeedFix": { "message": "Este item tem anexos de arquivos antigos que precisam ser corrigidos." }, "attachmentFixDesc": { "message": "Este é um anexo de arquivo antigo que precisa ser corrigido. Clique para saber mais." }, "fix": { "message": "Corrigir", "description": "This is a verb. ex. 'Fix The Car'" }, "oldAttachmentsNeedFixDesc": { "message": "Há anexos de arquivos antigos no seu cofre que precisam ser corrigidos antes que você possa girar a chave de criptografia da sua conta." }, "yourAccountsFingerprint": { "message": "A sua frase biométrica", "description": "A 'fingerprint phrase' is a unique word phrase (similar to a passphrase) that a user can use to authenticate their public key with another user, for the purposes of sharing." }, "fingerprintEnsureIntegrityVerify": { "message": "Para garantir a integridade de suas chaves de criptografia, verifique a frase biométrica do usuário antes de continuar.", "description": "A 'fingerprint phrase' is a unique word phrase (similar to a passphrase) that a user can use to authenticate their public key with another user, for the purposes of sharing." }, "dontAskFingerprintAgain": { "message": "Não peça para verificar a frase biométrica novamente", "description": "A 'fingerprint phrase' is a unique word phrase (similar to a passphrase) that a user can use to authenticate their public key with another user, for the purposes of sharing." }, "free": { "message": "Gratuito", "description": "Free, as in 'Free beer'" }, "apiKey": { "message": "Chave API" }, "apiKeyDesc": { "message": "Sua chave API pode ser usada para autenticar na API pública do Bitwarden." }, "apiKeyRotateDesc": { "message": "Girar a chave da API invalidará a chave anterior. Você pode girar sua chave de API se acreditar que a chave atual não é mais segura de usar." }, "apiKeyWarning": { "message": "Sua chave de API tem acesso total à organização. Deve ser mantido em segredo." }, "userApiKeyDesc": { "message": "Sua chave API pode ser usada para autenticar no Bitwarden CLI." }, "userApiKeyWarning": { "message": "Sua chave de API é um mecanismo de autenticação alternativo. Deve ser mantido em segredo." }, "oauth2ClientCredentials": { "message": "Credenciais do cliente OAuth 2.0", "description": "'OAuth 2.0' is a programming protocol. It should probably not be translated." }, "viewApiKey": { "message": "Ver chave API" }, "rotateApiKey": { "message": "Girar chave API" }, "selectOneCollection": { "message": "Você deve selecionar pelo menos uma coleção." }, "couldNotChargeCardPayInvoice": { "message": "Não foi possível cobrar no seu cartão. Por favor, veja e pague a fatura pendente listada abaixo." }, "inAppPurchase": { "message": "Compra no Aplicativo" }, "cannotPerformInAppPurchase": { "message": "Você não pode executar esta ação enquanto usa um método de pagamento de compra dentro do aplicativo." }, "manageSubscriptionFromStore": { "message": "Você deve gerenciar sua assinatura na loja onde sua compra pelo aplicativo foi feita." }, "minLength": { "message": "Comprimento Mínimo" }, "clone": { "message": "Clonar" }, "masterPassPolicyDesc": { "message": "Defina os requisitos mínimos para a força da senha mestra." }, "twoStepLoginPolicyDesc": { "message": "Exigir que os usuários definam a autenticação de dois passos nas suas contas pessoais." }, "twoStepLoginPolicyWarning": { "message": "Os membros da organização que não possuam a autenticação de dois passos ativa para sua conta pessoal serão removidos da organização e receberão um e-mail notificando-os da mudança." }, "twoStepLoginPolicyUserWarning": { "message": "Você é um membro de uma organização que exige que a autenticação de dois passos seja ativada na sua conta de usuário. Se desativar todos os serviços de autenticação de dois passos, você será automaticamente removido dessas organizações." }, "passwordGeneratorPolicyDesc": { "message": "Defina os requisitos mínimos para configuração do gerador de senhas." }, "passwordGeneratorPolicyInEffect": { "message": "Uma ou mais políticas da organização estão afetando as suas configurações do gerador." }, "masterPasswordPolicyInEffect": { "message": "Uma ou mais políticas da organização exigem que a sua senha mestra cumpra aos seguintes requisitos:" }, "policyInEffectMinComplexity": { "message": "Pontuação mínima de complexidade de $SCORE$", "placeholders": { "score": { "content": "$1", "example": "4" } } }, "policyInEffectMinLength": { "message": "Comprimento mínimo de $LENGTH$", "placeholders": { "length": { "content": "$1", "example": "14" } } }, "policyInEffectUppercase": { "message": "Contém um ou mais caracteres em maiúsculo" }, "policyInEffectLowercase": { "message": "Contém um ou mais caracteres em minúsculo" }, "policyInEffectNumbers": { "message": "Contém um ou mais números" }, "policyInEffectSpecial": { "message": "Contém um ou mais dos seguintes caracteres especiais $CHARS$", "placeholders": { "chars": { "content": "$1", "example": "!@#$%^&*" } } }, "masterPasswordPolicyRequirementsNotMet": { "message": "A sua nova senha mestra não cumpre aos requisitos da política." }, "minimumNumberOfWords": { "message": "Número Mínimo de Palavras" }, "defaultType": { "message": "Tipo Padrão" }, "userPreference": { "message": "Preferência do Usuário" }, "vaultTimeoutAction": { "message": "Ação de Tempo Limite do Cofre" }, "vaultTimeoutActionLockDesc": { "message": "Um cofre bloqueado requer que você reinsira a sua senha mestra para entrar novamente." }, "vaultTimeoutActionLogOutDesc": { "message": "Uma sessão encerrada com o cofre requer que você autentique-se novamente para acessá-lo de novo." }, "lock": { "message": "Bloquear", "description": "Verb form: to make secure or inaccesible by" }, "trash": { "message": "Lixeira", "description": "Noun: A special folder for holding deleted items that have not yet been permanently deleted" }, "searchTrash": { "message": "Pesquisar na Lixeira" }, "permanentlyDelete": { "message": "Excluir Permanentemente" }, "permanentlyDeleteSelected": { "message": "Excluir Permanentemente Selecionados" }, "permanentlyDeleteItem": { "message": "Excluir o Item Permanentemente" }, "permanentlyDeleteItemConfirmation": { "message": "Você tem certeza que deseja excluir permanentemente esse item?" }, "permanentlyDeletedItem": { "message": "Item Permanentemente Excluído" }, "permanentlyDeletedItems": { "message": "Itens Permanentemente Excluídos" }, "permanentlyDeleteSelectedItemsDesc": { "message": "Você selecionou $COUNT$ item(ns) para excluir permanentemente. Tem certeza que deseja excluir permanentemente todos estes itens?", "placeholders": { "count": { "content": "$1", "example": "150" } } }, "permanentlyDeletedItemId": { "message": "Item $ID$ Excluído Permanentemente.", "placeholders": { "id": { "content": "$1", "example": "Google" } } }, "restore": { "message": "Restaurar" }, "restoreSelected": { "message": "Restaurar Selecionados" }, "restoreItem": { "message": "Restaurar Item" }, "restoredItem": { "message": "Item Restaurado" }, "restoredItems": { "message": "Itens Restaurados" }, "restoreItemConfirmation": { "message": "Você tem certeza que deseja restaurar esse item?" }, "restoreItems": { "message": "Restaurar itens" }, "restoreSelectedItemsDesc": { "message": "Você selecionou $COUNT$ item(ns) para restaurar. Tem certeza que deseja restaurar todos esses itens?", "placeholders": { "count": { "content": "$1", "example": "150" } } }, "restoredItemId": { "message": "Item $ID$ restaurado.", "placeholders": { "id": { "content": "$1", "example": "Google" } } }, "vaultTimeoutLogOutConfirmation": { "message": "Sair irá remover todo o acesso ao seu cofre e requer autenticação online após o período de tempo limite. Tem certeza de que deseja usar esta configuração?" }, "vaultTimeoutLogOutConfirmationTitle": { "message": "Confirmação de Ação de Tempo Limite" }, "hidePasswords": { "message": "Esconder Senhas" }, "countryPostalCodeRequiredDesc": { "message": "Exigimos essa informação apenas para o cálculo do imposto sobre as vendas e informação financeira." }, "includeVAT": { "message": "Incluir informações sobre IVA/GST (opcional)" }, "taxIdNumber": { "message": "ID de Imposto VAT/GST" }, "taxInfoUpdated": { "message": "Informações de impostos atualizadas." }, "setMasterPassword": { "message": "Definir Senha Mestra" }, "ssoCompleteRegistration": { "message": "Para concluir o login com o SSO, defina uma senha mestra para acessar e proteger o seu cofre." }, "identifier": { "message": "Identificador" }, "organizationIdentifier": { "message": "Identificador da Organização" }, "ssoLogInWithOrgIdentifier": { "message": "Faça o login usando o portal de login único da sua organização. Por favor, insira o identificador da sua organização para começar." }, "enterpriseSingleSignOn": { "message": "Iniciar Sessão Empresarial Única" }, "ssoHandOff": { "message": "Agora você pode fechar esta aba e continuar na extensão." }, "includeAllTeamsFeatures": { "message": "Recursos para Todas as Equipes, além de:" }, "includeSsoAuthentication": { "message": "Autenticação SSO via SAML2.0 e OpenID Connect" }, "includeEnterprisePolicies": { "message": "Políticas Empresariais" }, "ssoValidationFailed": { "message": "Falha na Validação SSO" }, "ssoIdentifierRequired": { "message": "O Identificador da Organização é obrigatório." }, "unlinkSso": { "message": "Desvincular SSO" }, "unlinkSsoConfirmation": { "message": "Você tem certeza que deseja desvincular o SSO para esta organização?" }, "linkSso": { "message": "Vincular SSO" }, "singleOrg": { "message": "Organização Única" }, "singleOrgDesc": { "message": "Restringir os usuários de poderem entrar em outras organizações." }, "singleOrgBlockCreateMessage": { "message": "Sua organização atual tem uma política que não permite que você entre em mais de uma organização. Por favor, entre em contato com os administradores da sua organização ou cadastre-se a partir de uma conta do Bitwarden diferente." }, "singleOrgPolicyWarning": { "message": "Os membros da organização que não são Donos ou Administradores, e já são membros de outra organização serão removidos da sua organização." }, "requireSso": { "message": "Autenticação de Acesso Único" }, "requireSsoPolicyDesc": { "message": "Exige que os usuários façam login com o método de Login Único da Empresa." }, "prerequisite": { "message": "Pré-requisito" }, "requireSsoPolicyReq": { "message": "A política das empresas da Organização Única tem de ser viabilizada antes da ativação desta política." }, "requireSsoPolicyReqError": { "message": "Política da Organização Única não ativada." }, "requireSsoExemption": { "message": "Os Proprietários e Administradores da Organização estão isentos da aplicação desta política." }, "sendTypeFile": { "message": "Arquivo" }, "sendTypeText": { "message": "Texto" }, "createSend": { "message": "Criar Novo Send", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "editSend": { "message": "Editar Send", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "createdSend": { "message": "Send Criado", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "editedSend": { "message": "Send Editado", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "deletedSend": { "message": "Send Excluído", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "deleteSend": { "message": "Excluir Send", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "deleteSendConfirmation": { "message": "Você tem certeza que deseja excluir este Send?", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "whatTypeOfSend": { "message": "Que tipo de Send é este?", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "deletionDate": { "message": "Data de Exclusão" }, "deletionDateDesc": { "message": "O Send será eliminado permanentemente na data e hora especificadas.", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "expirationDate": { "message": "Data de Validade" }, "expirationDateDesc": { "message": "Se definido, o acesso a este Send expirará na data e hora especificadas.", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "maxAccessCount": { "message": "Contagem Máxima de Acessos" }, "maxAccessCountDesc": { "message": "Se atribuído, usuários não poderão mais acessar este Send assim que o número máximo de acessos for atingido.", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "currentAccessCount": { "message": "Contagem Atual de Acesso" }, "sendPasswordDesc": { "message": "Opcionalmente exigir uma senha para os usuários acessarem este Send.", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "sendNotesDesc": { "message": "Notas privadas sobre esse Send.", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "disabled": { "message": "Desativado" }, "sendLink": { "message": "Link do Send", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "copySendLink": { "message": "Copiar Link do Send", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "removePassword": { "message": "Remover Senha" }, "removedPassword": { "message": "Senha Removida" }, "removePasswordConfirmation": { "message": "Você tem certeza que deseja remover a senha?" }, "hideEmail": { "message": "Ocultar meu endereço de e-mail dos destinatários." }, "disableThisSend": { "message": "Desabilite este Send para que ninguém possa acessá-lo.", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "allSends": { "message": "Todos os Sends" }, "maxAccessCountReached": { "message": "Número máximo de acessos atingido", "description": "This text will be displayed after a Send has been accessed the maximum amount of times." }, "pendingDeletion": { "message": "Exclusão pendente" }, "expired": { "message": "Expirado" }, "searchSends": { "message": "Pesquisar Sends", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "sendProtectedPassword": { "message": "Este Send está protegido com uma senha. Por favor, digite a senha abaixo para continuar.", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "sendProtectedPasswordDontKnow": { "message": "Não sabe a senha? Peça ao Remetente a senha necessária para acessar esse Send.", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "sendHiddenByDefault": { "message": "Este Send é oculto por padrão. Você pode alternar a visibilidade usando o botão abaixo.", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "downloadFile": { "message": "Baixar Arquivo" }, "sendAccessUnavailable": { "message": "O Send que você está tentando acessar não existe ou não está mais disponível.", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "missingSendFile": { "message": "O arquivo associado a este Send não foi encontrado.", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "noSendsInList": { "message": "Não há Sends para listar.", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "emergencyAccess": { "message": "Acesso de Emergência" }, "emergencyAccessDesc": { "message": "Conceda e gerencie o acesso de emergência para contatos confiáveis. Contatos confiáveis podem solicitar acesso a Visualizar ou Assumir o Controle da sua conta em caso de emergência. Visite a nossa página de ajuda para obter mais informações e detalhes sobre como o compartilhamento de conhecimento zero funciona." }, "emergencyAccessOwnerWarning": { "message": "Você é o Proprietário de uma ou mais organizações. Se você conceder acesso a um contato de emergência, eles serão capazes de usar todas as suas permissões como Proprietário após uma concessão." }, "trustedEmergencyContacts": { "message": "Contatos de emergência confiáveis" }, "noTrustedContacts": { "message": "Você ainda não adicionou nenhum contato de emergência, convide um contato confiável para começar." }, "addEmergencyContact": { "message": "Adicionar contato de emergência" }, "designatedEmergencyContacts": { "message": "Designado como contato de emergência" }, "noGrantedAccess": { "message": "Você ainda não foi designado como um contato de emergência para ninguém." }, "inviteEmergencyContact": { "message": "Convidar contato de emergência" }, "editEmergencyContact": { "message": "Editar contato de emergência" }, "inviteEmergencyContactDesc": { "message": "Convide um novo contato de emergência digitando o endereço de e-mail da conta Bitwarden abaixo. Se eles não tiverem uma conta no Bitwarden, eles serão solicitados a criar uma nova conta." }, "emergencyAccessRecoveryInitiated": { "message": "Acesso de Emergência Iniciado" }, "emergencyAccessRecoveryApproved": { "message": "Acesso de Emergência Aprovado" }, "viewDesc": { "message": "Você pode ver todos os itens no seu próprio cofre." }, "takeover": { "message": "Assumir o Controle" }, "takeoverDesc": { "message": "Pode redefinir a sua conta com uma nova senha mestra." }, "waitTime": { "message": "Tempo de Espera" }, "waitTimeDesc": { "message": "Tempo necessário antes de conceder acesso automaticamente." }, "oneDay": { "message": "1 dia" }, "days": { "message": "$DAYS$ dias", "placeholders": { "days": { "content": "$1", "example": "1" } } }, "invitedUser": { "message": "Usuário convidado." }, "acceptEmergencyAccess": { "message": "Você foi convidado para se tornar um contato de emergência para o usuário listado acima. Para aceitar o convite, você precisa iniciar sessão ou criar uma nova conta no Bitwarden." }, "emergencyInviteAcceptFailed": { "message": "Não foi possível aceitar o convite. Peça ao usuário para enviar um novo convite." }, "emergencyInviteAcceptFailedShort": { "message": "Não foi possível aceitar o convite. $DESCRIPTION$", "placeholders": { "description": { "content": "$1", "example": "You must enable 2FA on your user account before you can join this organization." } } }, "emergencyInviteAcceptedDesc": { "message": "Você pode acessar as opções de emergência para esse usuário após a confirmação da sua identidade. Enviaremos um e-mail a você quando isso acontecer." }, "requestAccess": { "message": "Solicitar Acesso" }, "requestAccessConfirmation": { "message": "Tem certeza que deseja solicitar acesso de emergência? Você receberá acesso após $WAITTIME$ dia(s) ou sempre que o usuário aprovar manualmente a solicitação.", "placeholders": { "waittime": { "content": "$1", "example": "1" } } }, "requestSent": { "message": "Acesso de emergência solicitado para $USER$. Nós o notificaremos por e-mail quando for possível continuar.", "placeholders": { "user": { "content": "$1", "example": "John Smith" } } }, "approve": { "message": "Aprovar" }, "reject": { "message": "Rejeitar" }, "approveAccessConfirmation": { "message": "Tem certeza de que deseja aprovar o acesso de emergência? Isto permitirá que $USER$ possa $ACTION$ da sua conta.", "placeholders": { "user": { "content": "$1", "example": "John Smith" }, "action": { "content": "$2", "example": "View" } } }, "emergencyApproved": { "message": "Acesso de emergência aprovado." }, "emergencyRejected": { "message": "Acesso de emergência rejeitado" }, "passwordResetFor": { "message": "Redefinição de senha para $USER$. Agora você pode acessar usando a nova senha.", "placeholders": { "user": { "content": "$1", "example": "John Smith" } } }, "personalOwnership": { "message": "Propriedade Pessoal" }, "personalOwnershipPolicyDesc": { "message": "Exigir que os usuários salvem itens de cofre em uma organização removendo a opção de propriedade pessoal." }, "personalOwnershipExemption": { "message": "Os proprietários e administradores da organização estão isentos da aplicação desta política." }, "personalOwnershipSubmitError": { "message": "Devido a uma Política Empresarial, você está restrito de salvar itens para seu cofre pessoal. Altere a opção de propriedade para uma organização e escolha entre as Coleções disponíveis." }, "disableSend": { "message": "Desabilitar Send" }, "disableSendPolicyDesc": { "message": "Não permite que usuários criem ou editem um Send no Bitwarden. Excluir um Send existente ainda é permitido.", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "disableSendExemption": { "message": "Os usuários da organização que podem gerenciar as políticas da organização estão isentos da aplicação desta política." }, "sendDisabled": { "message": "Send desabilitado", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "sendDisabledWarning": { "message": "Devido a uma política corporativa, você só é capaz de excluir um Send existente.", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "sendOptions": { "message": "Opções de Send", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "sendOptionsPolicyDesc": { "message": "Definir opções para a criação e edição de Sends.", "description": "'Sends' is a plural noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "sendOptionsExemption": { "message": "Os usuários da organização que podem gerenciar as políticas da organização estão isentos da aplicação desta política." }, "disableHideEmail": { "message": "Não permitir que os usuários ocultem seus endereços de e-mail dos destinatários ao criar ou editar um Send.", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "sendOptionsPolicyInEffect": { "message": "As seguintes políticas da organização estão em vigor atualmente:" }, "sendDisableHideEmailInEffect": { "message": "Os usuários não têm permissão para ocultar seus endereços de e-mail dos destinatários ao criar ou editar um Send.", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "modifiedPolicyId": { "message": "Política modificada $ID$.", "placeholders": { "id": { "content": "$1", "example": "Master Password" } } }, "planPrice": { "message": "Valor do plano" }, "estimatedTax": { "message": "Impostos estimados" }, "custom": { "message": "Personalizado" }, "customDesc": { "message": "Permite controle mais granular das permissões de usuário para configurações avançadas." }, "permissions": { "message": "Permissões" }, "accessEventLogs": { "message": "Acessar Registro de Eventos" }, "accessImportExport": { "message": "Acessar Importar/Exportar" }, "accessReports": { "message": "Acessar Relatórios" }, "missingPermissions": { "message": "Você não tem a permissão necessária para executar esta ação." }, "manageAllCollections": { "message": "Gerenciar Todas as Coleções" }, "createNewCollections": { "message": "Criar Novas Coleções" }, "editAnyCollection": { "message": "Editar Qualquer Coleção" }, "deleteAnyCollection": { "message": "Excluir Qualquer Coleção" }, "manageAssignedCollections": { "message": "Gerenciar Coleções Atribuídas" }, "editAssignedCollections": { "message": "Editar Coleções Atribuídas" }, "deleteAssignedCollections": { "message": "Excluir Coleções Atribuídas" }, "manageGroups": { "message": "Gerenciar Grupos" }, "managePolicies": { "message": "Gerenciar Políticas" }, "manageSso": { "message": "Gerenciar SSO" }, "manageUsers": { "message": "Gerenciar Usuários" }, "manageResetPassword": { "message": "Gerenciar Redefinição de Senha" }, "disableRequiredError": { "message": "Você deve desativar manualmente a política $POLICYNAME$ antes que esta política possa ser desativada.", "placeholders": { "policyName": { "content": "$1", "example": "Single Sign-On Authentication" } } }, "personalOwnershipPolicyInEffect": { "message": "Uma política de organização está afetando suas opções de propriedade." }, "personalOwnershipPolicyInEffectImports": { "message": "Uma política da organização desativou a importação de itens para o seu cofre pessoal." }, "personalOwnershipCheckboxDesc": { "message": "Desativar propriedade pessoal para usuários da organização" }, "textHiddenByDefault": { "message": "Ao acessar o Send, ocultar o texto por padrão", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "sendNameDesc": { "message": "Um nome amigável para descrever este Send.", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "sendTextDesc": { "message": "O texto que você deseja enviar." }, "sendFileDesc": { "message": "O arquivo que você deseja enviar." }, "copySendLinkOnSave": { "message": "Copie o link para compartilhar este Send para minha área de transferência depois de salvar." }, "sendLinkLabel": { "message": "Link do Send", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "send": { "message": "Send", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "sendAccessTaglineProductDesc": { "message": "O Bitwarden Send transmite informações sensíveis e temporárias para outras pessoas de forma fácil e segura.", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "sendAccessTaglineLearnMore": { "message": "Saiba mais", "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read '**Learn more about** Bitwarden Send or sign up to try it today.'" }, "sendVaultCardProductDesc": { "message": "Compartilhe texto ou arquivos diretamente com qualquer um." }, "sendVaultCardLearnMore": { "message": "Saiba mais", "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read '**Learn more**, see how it works, or try it now. '" }, "sendVaultCardSee": { "message": "veja", "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Learn more, **see** how it works, or try it now.'" }, "sendVaultCardHowItWorks": { "message": "como funciona", "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Learn more, see **how it works**, or try it now.'" }, "sendVaultCardOr": { "message": "ou", "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Learn more, see how it works, **or** try it now.'" }, "sendVaultCardTryItNow": { "message": "teste agora", "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Learn more, see how it works, or **try it now**.'" }, "sendAccessTaglineOr": { "message": "ou", "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Learn more about Bitwarden Send **or** sign up to try it today.'" }, "sendAccessTaglineSignUp": { "message": "registre-se", "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Learn more about Bitwarden Send or **sign up** to try it today.'" }, "sendAccessTaglineTryToday": { "message": "para testar hoje mesmo.", "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Learn more about Bitwarden Send or sign up to **try it today.**'" }, "sendCreatorIdentifier": { "message": "O usuário $USER_IDENTIFIER$ do Bitwarden compartilhou o seguinte com você", "placeholders": { "user_identifier": { "content": "$1", "example": "An email address" } } }, "viewSendHiddenEmailWarning": { "message": "O usuário Bitwarden que criou este Send optou por ocultar seu endereço de e-mail. Você deve certificar-se de que confia na fonte deste link antes de usar ou baixar seu conteúdo.", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, "expirationDateIsInvalid": { "message": "A data de validade fornecida não é válida." }, "deletionDateIsInvalid": { "message": "A data de exclusão fornecida não é válida." }, "expirationDateAndTimeRequired": { "message": "Uma data e hora de expiração são obrigatórias." }, "deletionDateAndTimeRequired": { "message": "Uma data e hora de exclusão são obrigatórias." }, "dateParsingError": { "message": "Ocorreu um erro ao salvar as suas datas de exclusão e validade." }, "webAuthnFallbackMsg": { "message": "Para verificar seu 2FA, por favor, clique no botão abaixo." }, "webAuthnAuthenticate": { "message": "Autenticar WebAuthn" }, "webAuthnNotSupported": { "message": "O WebAuthn não é suportado neste navegador." }, "webAuthnSuccess": { "message": "<strong>WebAuthn verificado com sucesso!</strong><br>Você pode fechar esta guia." }, "hintEqualsPassword": { "message": "Sua dica de senha senha não pode ser a mesma que a sua senha." }, "enrollPasswordReset": { "message": "Inscrever-se na Redefinição de Senha" }, "enrolledPasswordReset": { "message": "Inscrito na Redefinição de Senha" }, "withdrawPasswordReset": { "message": "Retirar da Redefinição de Senha" }, "enrollPasswordResetSuccess": { "message": "Inscrição com sucesso!" }, "withdrawPasswordResetSuccess": { "message": "Retirada com sucesso!" }, "eventEnrollPasswordReset": { "message": "O usuário $ID$ inscreveu-se na assistência para redefinição de senha.", "placeholders": { "id": { "content": "$1", "example": "John Smith" } } }, "eventWithdrawPasswordReset": { "message": "O usuário $ID$ retirou-se da assistência para redefinição de senha.", "placeholders": { "id": { "content": "$1", "example": "John Smith" } } }, "eventAdminPasswordReset": { "message": "Redefinir senha mestra para o usuário $ID$.", "placeholders": { "id": { "content": "$1", "example": "John Smith" } } }, "eventResetSsoLink": { "message": "Redefinir link Sso para o usuário $ID$", "placeholders": { "id": { "content": "$1", "example": "John Smith" } } }, "firstSsoLogin": { "message": "$ID$ se conectou usando o Sso pela primeira vez", "placeholders": { "id": { "content": "$1", "example": "John Smith" } } }, "resetPassword": { "message": "Redefinir Senha" }, "resetPasswordLoggedOutWarning": { "message": "O processo desconectará $NAME$ de sua sessão atual, exigindo que eles iniciem a sessão novamente. As sessões ativas em outros dispositivos podem continuar ativas por até uma hora.", "placeholders": { "name": { "content": "$1", "example": "John Smith" } } }, "thisUser": { "message": "este usuário" }, "resetPasswordMasterPasswordPolicyInEffect": { "message": "Uma ou mais políticas da organização exigem que a senha mestra cumpra aos seguintes requisitos:" }, "resetPasswordSuccess": { "message": "Senha redefinida com sucesso!" }, "resetPasswordEnrollmentWarning": { "message": "A inscrição permitirá que os administradores da organização alterem sua senha mestra. Tem certeza que deseja se inscrever?" }, "resetPasswordPolicy": { "message": "Redefinir Senha Mestra" }, "resetPasswordPolicyDescription": { "message": "Permitir que os administradores da organização redefinam a senha mestra dos usuários da organização." }, "resetPasswordPolicyWarning": { "message": "Os usuários da organização terão de se inscrever automaticamente ou serem inscritos automaticamente para que os administradores possam redefinir sua senha mestra." }, "resetPasswordPolicyAutoEnroll": { "message": "Inscrição Automática" }, "resetPasswordPolicyAutoEnrollDescription": { "message": "Todos os usuários serão inscritos automaticamente na redefinição de senha assim que o convite for aceito." }, "resetPasswordPolicyAutoEnrollWarning": { "message": "Os usuários que já estão na organização não serão inscritos retroativamente na redefinição de senha. Eles precisarão se inscrever para que os administradores possam redefinir sua senha mestra." }, "resetPasswordPolicyAutoEnrollCheckbox": { "message": "Inscrever automaticamente novos usuários" }, "resetPasswordAutoEnrollInviteWarning": { "message": "Esta organização possui uma política empresarial que irá inscrevê-lo automaticamente na redefinição de senha. A inscrição permitirá que os administradores da organização alterem sua senha mestra." }, "resetPasswordOrgKeysError": { "message": "A resposta das Chaves da Organização é nula" }, "resetPasswordDetailsError": { "message": "A resposta para Redefinir os Detalhes da Senha é nula" }, "trashCleanupWarning": { "message": "As cifras que ficarem na lixeira por mais de 30 dias serão excluídas automaticamente." }, "trashCleanupWarningSelfHosted": { "message": "As cifras que estiverem na Lixeira por um tempo serão excluídas automaticamente." }, "passwordPrompt": { "message": "Nova solicitação de senha mestra" }, "passwordConfirmation": { "message": "Confirmação de senha mestra" }, "passwordConfirmationDesc": { "message": "Esta ação está protegida. Para continuar, por favor, reinsira a sua senha mestra para verificar sua identidade." }, "reinviteSelected": { "message": "Reenviar Convites" }, "noSelectedUsersApplicable": { "message": "Esta ação não é aplicável a nenhum dos usuários selecionados." }, "removeUsersWarning": { "message": "Tem certeza de que deseja remover os seguintes usuários? O processo pode levar alguns segundos para ser concluído e não pode ser interrompido ou cancelado." }, "theme": { "message": "Tema" }, "themeDesc": { "message": "Escolha um tema para o seu cofre web." }, "themeSystem": { "message": "Usar Tema do Sistema" }, "themeDark": { "message": "Escuro" }, "themeLight": { "message": "Claro" }, "confirmSelected": { "message": "Confirmar Selecionado(s)" }, "bulkConfirmStatus": { "message": "Status de ação em massa" }, "bulkConfirmMessage": { "message": "Confirmado com sucesso." }, "bulkReinviteMessage": { "message": "Convidado novamente com sucesso." }, "bulkRemovedMessage": { "message": "Removido com sucesso" }, "bulkFilteredMessage": { "message": "Excluído, não aplicável para esta ação." }, "fingerprint": { "message": "Impressão digital" }, "removeUsers": { "message": "Remover Usuários" }, "error": { "message": "Erro" }, "resetPasswordManageUsers": { "message": "Gerenciar Usuários também deve ser habilitado com a permissão para Gerenciar a Redefinição de Senha" }, "setupProvider": { "message": "Configuração do Provedor" }, "setupProviderLoginDesc": { "message": "Você foi convidado para configurar um novo provedor. Para continuar, você precisa iniciar sessão ou criar uma nova conta no Bitwarden." }, "setupProviderDesc": { "message": "Por favor, insira os detalhes abaixo para completar a configuração do provedor. Entre em Contato com o Suporte ao Cliente se tiver alguma dúvida." }, "providerName": { "message": "Nome do Provedor" }, "providerSetup": { "message": "O provedor foi configurado." }, "clients": { "message": "Clientes" }, "providerAdmin": { "message": "Administrador do Provedor" }, "providerAdminDesc": { "message": "O usuário de maior acesso que pode gerenciar todos os aspectos do seu provedor, bem como acessar e gerenciar organizações de clientes." }, "serviceUser": { "message": "Usuário de Serviço" }, "serviceUserDesc": { "message": "Os usuários do serviço podem acessar e gerenciar todas as organizações de clientes." }, "providerInviteUserDesc": { "message": "Convide um novo usuário para seu provedor digitando o endereço de e-mail da conta Bitwarden dele abaixo. Se ele não tiver uma conta no Bitwarden, ele será solicitado a criar uma nova conta." }, "joinProvider": { "message": "Participar do Provedor" }, "joinProviderDesc": { "message": "Você foi convidado para participar do provedor listado acima. Para aceitar o convite, você precisa iniciar sessão ou criar uma nova conta no Bitwarden." }, "providerInviteAcceptFailed": { "message": "Não foi possível aceitar o convite. Peça ao administrador do provedor para enviar um novo convite." }, "providerInviteAcceptedDesc": { "message": "Você pode acessar este provedor quando um administrador confirmar sua associação. Enviaremos um e-mail quando isso acontecer." }, "providerUsersNeedConfirmed": { "message": "Você tem usuários que aceitaram o convite, mas ainda precisam ser confirmados. Os usuários não terão acesso ao provedor até que sejam confirmados." }, "provider": { "message": "Provedor" }, "newClientOrganization": { "message": "Nova Organização de Cliente" }, "newClientOrganizationDesc": { "message": "Crie uma nova organização de cliente que será associada a você como o provedor. Você poderá acessar e gerenciar esta organização." }, "addExistingOrganization": { "message": "Adicionar Organização Existente" }, "myProvider": { "message": "Meu Provedor" }, "addOrganizationConfirmation": { "message": "Tem certeza de que deseja adicionar $ORGANIZATION$ como um cliente a $PROVIDER$?", "placeholders": { "organization": { "content": "$1", "example": "My Org Name" }, "provider": { "content": "$2", "example": "My Provider Name" } } }, "organizationJoinedProvider": { "message": "Organização foi adicionada com sucesso ao provedor" }, "accessingUsingProvider": { "message": "Acessando a organização usando o provedor $PROVIDER$", "placeholders": { "provider": { "content": "$1", "example": "My Provider Name" } } }, "providerIsDisabled": { "message": "O provedor está desativado." }, "providerUpdated": { "message": "Provedor atualizado" }, "yourProviderIs": { "message": "Seu provedor é $PROVIDER$. Eles têm privilégios administrativos e de cobrança para sua organização.", "placeholders": { "provider": { "content": "$1", "example": "My Provider Name" } } }, "detachedOrganization": { "message": "A organização $ORGANIZATION$ foi desanexada do seu provedor.", "placeholders": { "organization": { "content": "$1", "example": "My Org Name" } } }, "detachOrganizationConfirmation": { "message": "Tem certeza de que deseja desanexar esta organização? A organização continuará existindo, mas não será mais gerenciada pelo provedor." }, "add": { "message": "Adicionar" }, "updatedMasterPassword": { "message": "Senha Mestra Atualizada" }, "updateMasterPassword": { "message": "Atualizar Senha Mestra" }, "updateMasterPasswordWarning": { "message": "Sua Senha Mestra foi alterada recentemente por um administrador em sua organização. Para acessar o cofre, você deve atualizar sua Senha Mestra agora. Prosseguir irá desconectá-lo da sessão atual, exigindo que você faça login novamente. As sessões ativas em outros dispositivos podem continuar ativas por até uma hora." }, "masterPasswordInvalidWarning": { "message": "Sua Senha Mestra foi alterada recentemente por um administrador de sua organização. Para acessar o cofre, você precisa atualizar sua Senha Mestra agora. O processo desconectará você da sessão atual, exigindo que você inicie a sessão novamente. Sessões ativas em outros dispositivos podem continuar ativas por até uma hora." }, "maximumVaultTimeout": { "message": "Tempo Limite do Cofre" }, "maximumVaultTimeoutDesc": { "message": "Configure o tempo máximo para o cofre para todos os usuários." }, "maximumVaultTimeoutLabel": { "message": "Tempo Limite Máximo do Cofre" }, "invalidMaximumVaultTimeout": { "message": "Tempo Máximo de Cofre Inválido." }, "hours": { "message": "Horas" }, "minutes": { "message": "Minutos" }, "vaultTimeoutPolicyInEffect": { "message": "As políticas da sua organização estão afetando o tempo limite do seu cofre. O Tempo Limite Máximo permitido do Cofre é $HOURS$ hora(s) e $MINUTES$ minuto(s)", "placeholders": { "hours": { "content": "$1", "example": "5" }, "minutes": { "content": "$2", "example": "5" } } }, "customVaultTimeout": { "message": "Tempo Limite do Cofre Personalizado" }, "vaultTimeoutToLarge": { "message": "O tempo limite do seu cofre excede a restrição definida por sua organização." }, "disablePersonalVaultExport": { "message": "Desabilitar Exportação de Cofre Pessoal" }, "disablePersonalVaultExportDesc": { "message": "Proíbe os usuários de exportar seus dados de cofre privados." }, "vaultExportDisabled": { "message": "Exportação de Cofre Desabilitada" }, "personalVaultExportPolicyInEffect": { "message": "Uma ou mais políticas da organização impdem que você exporte seu cofre pessoal." }, "selectType": { "message": "Selecionar Tipo de SSO" }, "type": { "message": "Tipo" }, "openIdConnectConfig": { "message": "Configuração OpenID Connect" }, "samlSpConfig": { "message": "Configuração do Provedor de Serviço SAML" }, "samlIdpConfig": { "message": "Configuração do Provedor de Identidade SAML" }, "callbackPath": { "message": "Caminho de Retorno" }, "signedOutCallbackPath": { "message": "Caminho de Retorno de Chamada Desconectado" }, "authority": { "message": "Autoridade" }, "clientId": { "message": "ID do Cliente" }, "clientSecret": { "message": "Segredo do Cliente" }, "metadataAddress": { "message": "Endereço dos Metadados" }, "oidcRedirectBehavior": { "message": "Comportamento de Redirecionamento OIDC" }, "getClaimsFromUserInfoEndpoint": { "message": "Obter Reivindicações do Terminal de Informações do Usuário" }, "additionalScopes": { "message": "Escopos Adicionais/Personalizados (delimitado por vírgulas)" }, "additionalUserIdClaimTypes": { "message": "Tipos de Reivindicação de ID de Usuário Adicionais/Personalizados (delimitado por vírgulas)" }, "additionalEmailClaimTypes": { "message": "Tipos de Reivindicação de E-mail Adicionais/Personalizados (delimitado por vírgulas)" }, "additionalNameClaimTypes": { "message": "Tipos de Reivindicação de Nome Adicionais/Personalizados (delimitado por vírgulas)" }, "acrValues": { "message": "Valores de Referência de Classe de Contexto de Autenticação Solicitada (acr_values)" }, "expectedReturnAcrValue": { "message": "Esperado Valor de Reivindicação \"acr\" Na Resposta (validação acr)" }, "spEntityId": { "message": "ID da Entidade SP" }, "spMetadataUrl": { "message": "URL de Metadados SAML 2.0" }, "spAcsUrl": { "message": "URL do Serviço de Declaração de Consumidor (ACS)" }, "spNameIdFormat": { "message": "Formato ID do Nome" }, "spOutboundSigningAlgorithm": { "message": "Algoritmo de Assinatura de Saída" }, "spSigningBehavior": { "message": "Comportamento de Assinatura" }, "spMinIncomingSigningAlgorithm": { "message": "Algoritmo de Assinatura de Entrada Mínima" }, "spWantAssertionsSigned": { "message": "Precisa de Declarações Assinadas" }, "spValidateCertificates": { "message": "Validar Certificados" }, "idpEntityId": { "message": "ID da Entidade" }, "idpBindingType": { "message": "Tipo de Ligação" }, "idpSingleSignOnServiceUrl": { "message": "URL de Serviço de Logon Único" }, "idpSingleLogoutServiceUrl": { "message": "URL de Serviço de Desconexão Único" }, "idpX509PublicCert": { "message": "Certificado Público X509" }, "idpOutboundSigningAlgorithm": { "message": "Algoritmo de Assinatura de Saída" }, "idpAllowUnsolicitedAuthnResponse": { "message": "Permitir Retorno de Autenticação Não Solicitada" }, "idpAllowOutboundLogoutRequests": { "message": "Allow outbound logout requests" }, "idpSignAuthenticationRequests": { "message": "Assinar pedidos de autenticação" }, "ssoSettingsSaved": { "message": "Configuração de logon único foi salva." }, "sponsoredFamilies": { "message": "Bitwarden Families Gratuito" }, "sponsoredFamiliesEligible": { "message": "Você e sua família estão elegíveis para o Bitwarden Families Gratuito. Resgate com seu e-mail pessoal para manter seus dados seguros mesmo quando você não estiver no trabalho." }, "sponsoredFamiliesEligibleCard": { "message": "Resgate o seu plano Bitwarden for Families Grátis hoje para manter seus dados seguros mesmo quando você não estiver no trabalho." }, "sponsoredFamiliesInclude": { "message": "O plano Bitwarden Families inclui" }, "sponsoredFamiliesPremiumAccess": { "message": "Acesso premium para até 6 usuários" }, "sponsoredFamiliesSharedCollections": { "message": "Coleções compartilhadas de segredos de Família" }, "badToken": { "message": "O link não é mais válido. Peça ao patrocinador para reenviar a oferta." }, "reclaimedFreePlan": { "message": "Plano gratuito recuperado" }, "redeem": { "message": "Resgatar" }, "sponsoredFamiliesSelectOffer": { "message": "Selecione a organização que você gostaria de patrocinar" }, "familiesSponsoringOrgSelect": { "message": "Qual oferta do Families Grátis você gostaria de resgatar?" }, "sponsoredFamiliesEmail": { "message": "Digite seu e-mail pessoal para resgatar o Bitwarden Families" }, "sponsoredFamiliesLeaveCopy": { "message": "Se você sair ou for removido desta organização, seu plano do Families irá expirar no final do período de cobrança." }, "acceptBitwardenFamiliesHelp": { "message": "Aceite a oferta de uma organização existente ou crie uma nova organização de Famílias." }, "setupSponsoredFamiliesLoginDesc": { "message": "Foi oferecida a você uma Organização do Plano Bitwarden Families gratuita. Para continuar, você precisa entrar na conta que recebeu a oferta." }, "sponsoredFamiliesAcceptFailed": { "message": "Não é possível aceitar a oferta. Reenvie o e-mail da oferta da conta corporativa e tente novamente." }, "sponsoredFamiliesAcceptFailedShort": { "message": "Não é possível aceitar a oferta. $DESCRIPTION$", "placeholders": { "description": { "content": "$1", "example": "You must have at least one existing Families Organization." } } }, "sponsoredFamiliesOffer": { "message": "Resgatar Oferta de Organização do Bitwarden Families Gratuita" }, "sponsoredFamiliesOfferRedeemed": { "message": "A Oferta Gratuita do Bitwarden Families foi resgatada com sucesso" }, "redeemed": { "message": "Resgatado" }, "redeemedAccount": { "message": "Conta Resgatada" }, "revokeAccount": { "message": "Revogar conta $NAME$", "placeholders": { "name": { "content": "$1", "example": "My Sponsorship Name" } } }, "resendEmailLabel": { "message": "Reenviar e-mail de Patrocínio para $NAME$ patrocínio", "placeholders": { "name": { "content": "$1", "example": "My Sponsorship Name" } } }, "freeFamiliesPlan": { "message": "Plano Familiar Gratuito" }, "redeemNow": { "message": "Resgatar Agora" }, "recipient": { "message": "Destinatário" }, "removeSponsorship": { "message": "Remover Patrocínio" }, "removeSponsorshipConfirmation": { "message": "Depois de remover um patrocínio, você será responsável por essa assinatura e faturas relacionadas. Tem certeza de que quer continuar?" }, "sponsorshipCreated": { "message": "Patrocínio Criado" }, "revoke": { "message": "Revogar" }, "emailSent": { "message": "E-mail Enviado" }, "revokeSponsorshipConfirmation": { "message": "Depois de remover esta conta, o proprietário da organização das Famílias será responsável por essa assinatura e faturas relacionadas. Tem certeza de que quer continuar?" }, "removeSponsorshipSuccess": { "message": "Patrocínio Removido" }, "ssoKeyConnectorUnavailable": { "message": "Não foi possível acessar o Conector de Chave, tente novamente mais tarde." }, "keyConnectorUrl": { "message": "URL de Conector de Chave" }, "sendVerificationCode": { "message": "Enviar um código de verificação para o seu e-mail" }, "sendCode": { "message": "Enviar Código" }, "codeSent": { "message": "Código Enviado" }, "verificationCode": { "message": "Código de Verificação" }, "confirmIdentity": { "message": "Confirme a sua identidade para continuar." }, "verificationCodeRequired": { "message": "O código de verificação é necessário." }, "invalidVerificationCode": { "message": "Código de verificação inválido" }, "convertOrganizationEncryptionDesc": { "message": "$ORGANIZATION$ está usando SSO com um servidor de chaves auto-hospedado. Não é mais necessária uma senha mestra para os membros desta organização entrarem.", "placeholders": { "organization": { "content": "$1", "example": "My Org Name" } } }, "leaveOrganization": { "message": "Sair da Organização" }, "removeMasterPassword": { "message": "Remover Senha Mestra" }, "removedMasterPassword": { "message": "Senha mestra removida." }, "allowSso": { "message": "Permitir autenticação por SSO" }, "allowSsoDesc": { "message": "Uma vez definida, sua configuração será salva e os membros poderão se autenticar usando suas credenciais de Provedor de Identidade." }, "ssoPolicyHelpStart": { "message": "Ativar o", "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Enable the SSO Authentication policy to require all members to log in with SSO.'" }, "ssoPolicyHelpLink": { "message": "Política de SSO", "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Enable the SSO Authentication policy to require all members to log in with SSO.'" }, "ssoPolicyHelpEnd": { "message": "para exigir que todos os membros entrem com o SSO.", "description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Enable the SSO Authentication policy to require all members to log in with SSO.'" }, "ssoPolicyHelpKeyConnector": { "message": "As políticas de Autenticação de SSO e Organização Única são necessárias para configurar a descriptografia do Conector de Chave." }, "memberDecryptionOption": { "message": "Opções de Descriptografia de Membro" }, "memberDecryptionPassDesc": { "message": "Uma vez autenticados, os membros irão descriptografar os dados do cofre usando suas Senhas Mestras." }, "keyConnector": { "message": "Conector de Chave" }, "memberDecryptionKeyConnectorDesc": { "message": "Conecte o Login com o SSO ao seu servidor de chave de descriptografia auto-hospedado. Usando esta opção, os membros não precisarão usar suas senhas mestras para descriptografar os dados do cofre." }, "keyConnectorPolicyRestriction": { "message": "\"Entrar com o SSO e Descriptografia de Conector de Chave\" está habilitado. Esta política se aplica apenas a Proprietários e Administradores." }, "enabledSso": { "message": "Ativado o SSO" }, "disabledSso": { "message": "Desativado o SSO" }, "enabledKeyConnector": { "message": "Ativado o Conector de Chave" }, "disabledKeyConnector": { "message": "Desativado o Conector de Chave" }, "keyConnectorWarning": { "message": "Depois que o Conector de Chave é configurado, as Opções de Descriptografia de Membro não podem ser alteradas." }, "migratedKeyConnector": { "message": "Migrado para o Conector de Chave" }, "paymentSponsored": { "message": "Por favor, forneça uma forma de pagamento para associar à organização. Não se preocupe, não cobraremos nada, a menos que você selecione recursos adicionais ou seu patrocínio expire. " }, "orgCreatedSponsorshipInvalid": { "message": "A oferta de patrocínio expirou, você pode excluir a organização que criou para evitar uma cobrança no final do seu teste de 7 dias. Caso contrário, você pode fechar este alerta para manter a organização e assumir a responsabilidade pela cobrança." }, "newFamiliesOrganization": { "message": "Nova Organização de Famílias" }, "acceptOffer": { "message": "Aceitar Oferta" }, "sponsoringOrg": { "message": "Organização Patrocinadora" }, "keyConnectorTest": { "message": "Testar" }, "keyConnectorTestSuccess": { "message": "Sucesso! Conector de Chave acessado." }, "keyConnectorTestFail": { "message": "Não foi possível acessar o Conector de Chave. Verifique a URL." }, "sponsorshipTokenHasExpired": { "message": "A oferta de patrocínio expirou." }, "freeWithSponsorship": { "message": "GRÁTIS com patrocínio" }, "formErrorSummaryPlural": { "message": "$COUNT$ fields above need your attention.", "placeholders": { "count": { "content": "$1", "example": "5" } } }, "formErrorSummarySingle": { "message": "1 field above needs your attention." }, "fieldRequiredError": { "message": "$FIELDNAME$ is required.", "placeholders": { "fieldname": { "content": "$1", "example": "Full name" } } }, "required": { "message": "required" }, "idpSingleSignOnServiceUrlRequired": { "message": "Required if Entity ID is not a URL." }, "openIdOptionalCustomizations": { "message": "Optional Customizations" }, "openIdAuthorityRequired": { "message": "Required if Authority is not valid." }, "separateMultipleWithComma": { "message": "Separate multiple with a comma." }, "sessionTimeout": { "message": "Your session has timed out. Please go back and try logging in again." }, "exportingPersonalVaultTitle": { "message": "Exporting Personal Vault" }, "exportingOrganizationVaultTitle": { "message": "Exporting Organization Vault" }, "exportingPersonalVaultDescription": { "message": "Only the personal vault items associated with $EMAIL$ will be exported. Organization vault items will not be included.", "placeholders": { "email": { "content": "$1", "example": "name@example.com" } } }, "exportingOrganizationVaultDescription": { "message": "Only the organization vault associated with $ORGANIZATION$ will be exported. Personal vault items and items from other organizations will not be included.", "placeholders": { "organization": { "content": "$1", "example": "My Org Name" } } }, "backToReports": { "message": "Back to Reports" }, "generator": { "message": "Generator" }, "whatWouldYouLikeToGenerate": { "message": "What would you like to generate?" }, "passwordType": { "message": "Password Type" }, "regenerateUsername": { "message": "Recriar Usuário" }, "generateUsername": { "message": "Generate Username" }, "usernameType": { "message": "Username Type" }, "plusAddressedEmail": { "message": "Plus Addressed Email", "description": "Username generator option that appends a random sub-address to the username. For example: address+subaddress@email.com" }, "plusAddressedEmailDesc": { "message": "Use your email provider's sub-addressing capabilities." }, "catchallEmail": { "message": "Catch-all Email" }, "catchallEmailDesc": { "message": "Use your domain's configured catch-all inbox." }, "random": { "message": "Random" }, "randomWord": { "message": "Random Word" }, "service": { "message": "Service" } }
bitwarden/web/src/locales/pt_BR/messages.json/0
{ "file_path": "bitwarden/web/src/locales/pt_BR/messages.json", "repo_id": "bitwarden", "token_count": 62040 }
157
import { ThemeType } from "jslib-common/enums/themeType"; import { GlobalState as BaseGlobalState } from "jslib-common/models/domain/globalState"; export class GlobalState extends BaseGlobalState { theme?: ThemeType = ThemeType.Light; rememberEmail = true; }
bitwarden/web/src/models/globalState.ts/0
{ "file_path": "bitwarden/web/src/models/globalState.ts", "repo_id": "bitwarden", "token_count": 77 }
158
$dark-icon-themes: "theme_dark"; $primary: #175ddc; $primary-accent: #1252a3; $secondary: #ced4da; $secondary-alt: #1a3b66; $success: #00a65a; $info: #555555; $warning: #bf7e16; $danger: #dd4b39; $white: #ffffff; // Bootstrap Variable Overrides $theme-colors: ( "primary-accent": $primary-accent, "secondary-alt": $secondary-alt, ); $body-bg: $white; $body-color: #333333; $font-family-sans-serif: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; $h1-font-size: 1.7rem; $h2-font-size: 1.3rem; $h3-font-size: 1rem; $h4-font-size: 1rem; $h5-font-size: 1rem; $h6-font-size: 1rem; $small-font-size: 90%; $font-size-lg: 1.15rem; $code-font-size: 100%; $navbar-padding-y: 0.75rem; $grid-gutter-width: 20px; $card-spacer-y: 0.6rem; $list-group-item-padding-y: 0.6rem; $list-group-active-color: $body-color; $list-group-active-bg: $white; $list-group-active-border-color: rgba(#000000, 0.125); $dropdown-link-color: $body-color; $dropdown-link-hover-bg: rgba(#000000, 0.06); $dropdown-link-active-color: $dropdown-link-color; $dropdown-link-active-bg: rgba(#000000, 0.1); $dropdown-item-padding-x: 1rem; $navbar-brand-font-size: 35px; $navbar-brand-height: 35px; $navbar-brand-padding-y: 0; $navbar-dark-color: rgba($white, 0.7); $navbar-dark-hover-color: rgba($white, 0.9); $navbar-nav-link-padding-x: 0.8rem; $input-bg: #fbfbfb; $input-focus-bg: $white; $input-disabled-bg: #e0e0e0; $input-placeholder-color: #b4b4b4; $table-accent-bg: rgba(#000000, 0.02); $table-hover-bg: rgba(#000000, 0.03); $modal-backdrop-opacity: 0.3; $btn-font-weight: 600; $lead-font-weight: normal; $grid-breakpoints: ( xs: 0, sm: 1px, md: 2px, lg: 3px, xl: 4px, ); $border-color: $secondary; // MFA Types for logo styling with no dark theme alternative $mfaTypes: 0, 2, 3, 4, 6; // Theme Variables // Light $lightDangerHover: #c43421; $lightInputColor: #465057; $lightInputPlaceholderColor: #b6b8b8; // Dark $darkPrimary: #6a99f0; $darkPrimary-alt: #b4ccf9; $darkDanger: #ff8d85; $darkDangerHover: #ffbfbb; $darkSuccess: #52e07c; $darkWarning: #ffeb66; $darkInfo: #a4b0c6; $darkLinks: #6a99f0; $darkGrey1: #bac0ce; $darkGrey2: #8d94a5; $darkBlue1: #4c525f; $darkBlue2: #3c424e; $darkDarkBlue1: #2f343d; $darkDarkBlue2: #1f242e; $darkInputColor: $white; $darkInputPlaceholderColor: $darkGrey1; $themes: ( light: ( primary: $primary, primaryAlt: $primary-accent, danger: $danger, info: #343a40, success: $success, warning: $warning, backgroundColor: $white, badgeDangerBackground: $danger, badgeDangerText: $white, badgeInfoBackground: #555555, badgeInfoText: $white, badgePrimaryBackground: $primary, badgePrimaryBackgroundHover: #134eb9, badgePrimaryText: $white, badgeSecondaryBackground: #ced4da, badgeSecondaryText: #212529, bgLightColor: #f8f9fa, bgPrimaryColor: $primary, borderColor: $border-color, borderPrimaryColor: $primary, browserInputIconsFilter: invert(0), btnDanger: $danger, btnDangerHover: $lightDangerHover, btnDangerText: $white, btnLinkText: $primary, btnLinkTextHover: #104097, btnOutlineDangerBackground: $input-bg, btnOutlineDangerBackgroundHover: $danger, btnOutlineDangerBorder: #ced4da, btnOutlineDangerBorderHover: $danger, btnOutlineDangerText: $danger, btnOutlineDangerTextHover: $white, btnOutlinePrimaryBackground: $input-bg, btnOutlinePrimaryBackgroundHover: $primary, btnOutlinePrimaryBorder: #ced4da, btnOutlinePrimaryBorderHover: $primary, btnOutlinePrimaryText: $primary, btnOutlinePrimaryTextHover: $white, btnOutlineSecondaryBackground: $input-bg, btnOutlineSecondaryBackgroundHover: #ced4da, btnOutlineSecondaryBorder: #ced4da, btnOutlineSecondaryBorderHover: #ced4da, btnOutlineSecondaryText: #6c757d, btnOutlineSecondaryTextHover: #333333, btnPrimary: $primary, btnPrimaryBorderHover: #1249ae, btnPrimaryHover: #134eb9, btnPrimaryText: $white, btnSecondary: $secondary, btnSecondaryBorder: $secondary, btnSecondaryBorderHover: #b1bbc4, btnSecondaryHover: #b8c1ca, btnSecondaryText: #212529, btnSecondaryTextHover: #212529, calloutBackground: #fafafa, calloutColor: #212529, cdkDraggingBackground: $white, codeColor: #e83e8c, dropdownBackground: $white, dropdownHover: rgba(0, 0, 0, 0.06), dropdownTextColor: $body-color, dropdownTextMuted: #6c757d, focus: rgb(23 93 220 / 25%), footerBackgroundColor: #fbfbfb, foregroundColor: $white, headerColor: rgba(0, 0, 0, 0.03), iconColor: #777777, iconHover: $body-color, imgFilter: invert(0) grayscale(0), inputBackgroundColor: $input-bg, inputBorderColor: $border-color, inputDisabledBackground: #e0e0e0, inputDisabledColor: #6c757d, inputPlaceholderColor: $lightInputPlaceholderColor, inputTextColor: $lightInputColor, layoutFrontendColor: #ecf0f5, learnMoreHover: #104097, linkColor: $primary, linkColorHover: #104097, linkWeight: 400, listItemActive: $body-color, listItemBorder: rgba(0, 0, 0, 0.125), loadingSvg: url("../images/loading.svg"), logoSuffix: "dark", mfaLogoSuffix: ".png", navActiveBackground: $white, navActiveWeight: 600, navBackground: $primary, navBackgroundAlt: $secondary-alt, navOrgBackgroundColor: #fbfbfb, navWeight: 600, pwLetter: $body-color, pwNumber: #007fde, pwSpecial: #c40800, pwStrengthBackground: #e9ecef, separator: $secondary, separatorHr: rgb(0, 0, 0, 0.1), tableColorHover: #333333, tableLinkColor: $primary, tableLinkColorHover: #104097, tableRowHover: rgba(0, 0, 0, 0.03), tableSeparator: #dee2e6, textColor: $body-color, textDangerColor: $white, textInfoColor: $white, textHeadingColor: #333333, textMuted: #6c757d, textSuccessColor: $white, textWarningColor: $white, ), dark: ( primary: $darkPrimary, primaryAlt: $darkPrimary-alt, danger: $darkDanger, info: $darkInfo, success: $darkSuccess, warning: $darkWarning, backgroundColor: $darkDarkBlue2, badgeDangerBackground: $darkDanger, badgeDangerText: $darkDarkBlue2, badgeInfoBackground: $darkInfo, badgeInfoText: $darkDarkBlue2, badgePrimaryBackground: $darkLinks, badgePrimaryBackgroundHover: $darkPrimary-alt, badgePrimaryText: $darkDarkBlue2, badgeSecondaryBackground: $darkGrey2, badgeSecondaryText: $darkDarkBlue2, bgLightColor: $darkDarkBlue2, bgPrimaryColor: $darkPrimary, borderColor: $darkBlue1, borderPrimaryColor: $darkPrimary, browserInputIconsFilter: invert(1), btnDanger: $darkDanger, btnDangerHover: $darkDangerHover, btnDangerText: $darkDarkBlue2, btnLinkText: $white, btnLinkTextHover: $darkGrey1, btnOutlineDangerBackground: $darkDanger, btnOutlineDangerBackgroundHover: $darkDangerHover, btnOutlineDangerBorder: $darkDanger, btnOutlineDangerBorderHover: $darkDangerHover, btnOutlineDangerText: $darkDarkBlue2, btnOutlineDangerTextHover: $darkDarkBlue2, btnOutlinePrimaryBackground: $darkPrimary, btnOutlinePrimaryBackgroundHover: $darkPrimary-alt, btnOutlinePrimaryBorder: $darkPrimary, btnOutlinePrimaryBorderHover: $darkPrimary-alt, btnOutlinePrimaryText: $darkDarkBlue2, btnOutlinePrimaryTextHover: $darkDarkBlue2, btnOutlineSecondaryBackground: transparent, btnOutlineSecondaryBackgroundHover: transparent, btnOutlineSecondaryBorder: $darkGrey1, btnOutlineSecondaryBorderHover: $darkGrey2, btnOutlineSecondaryText: $white, btnOutlineSecondaryTextHover: $darkGrey2, btnPrimary: $darkLinks, btnPrimaryBorderHover: $darkPrimary-alt, btnPrimaryHover: $darkPrimary-alt, btnPrimaryText: $darkDarkBlue2, btnSecondary: transparent, btnSecondaryBorder: $darkGrey1, btnSecondaryBorderHover: $darkGrey2, btnSecondaryHover: transparent, btnSecondaryText: $white, btnSecondaryTextHover: $darkGrey2, calloutBackground: $darkBlue2, calloutColor: $white, cdkDraggingBackground: $darkDarkBlue1, codeColor: #e83e8c, dropdownBackground: $darkDarkBlue1, dropdownHover: rgba(255, 255, 255, 0.03), dropdownTextColor: $white, dropdownTextMuted: #bec6cf, focus: rgb(106 153 240 / 25%), footerBackgroundColor: $darkBlue1, foregroundColor: $darkDarkBlue1, headerColor: $darkBlue1, iconColor: #777777, iconHover: $darkGrey2, imgFilter: invert(1) grayscale(1), inputBackgroundColor: transparent, inputBorderColor: $darkGrey1, inputDisabledBackground: $darkBlue2, inputDisabledColor: $darkGrey1, inputPlaceholderColor: $darkInputPlaceholderColor, inputTextColor: $darkInputColor, layoutFrontendColor: $darkDarkBlue2, learnMoreHover: $darkPrimary-alt, linkColor: $darkLinks, linkColorHover: $darkLinks, linkWeight: 600, listItemActive: $darkPrimary, listItemBorder: $darkBlue1, loadingSvg: url("../images/loading-white.svg"), logoSuffix: "white", mfaLogoSuffix: "-w.png", navActiveBackground: $darkDarkBlue2, navActiveWeight: 600, navBackground: $darkDarkBlue1, navBackgroundAlt: $darkDarkBlue1, navOrgBackgroundColor: #161c26, navWeight: 400, pwLetter: $white, pwNumber: #52bdfb, pwSpecial: #ff7c70, pwStrengthBackground: $darkBlue2, separator: $darkBlue1, separatorHr: $darkBlue1, tableColorHover: $darkGrey1, tableLinkColor: $white, tableLinkColorHover: $white, tableRowHover: rgba(255, 255, 255, 0.03), tableSeparator: $darkBlue1, textColor: $darkGrey1, textDangerColor: $darkDarkBlue2, textHeadingColor: $white, textInfoColor: $darkDarkBlue2, textMuted: $darkGrey1, textSuccessColor: $darkDarkBlue2, textWarningColor: $darkDarkBlue2, ), ); @mixin themify($themes: $themes) { @each $theme, $map in $themes { html.theme_#{$theme} & { $theme-map: () !global; @each $key, $submap in $map { $value: map-get(map-get($themes, $theme), "#{$key}"); $theme-map: map-merge( $theme-map, ( $key: $value, ) ) !global; } @content; $theme-map: null !global; } } } @function themed($key) { @return map-get($theme-map, $key); } ;
bitwarden/web/src/scss/variables.scss/0
{ "file_path": "bitwarden/web/src/scss/variables.scss", "repo_id": "bitwarden", "token_count": 4479 }
159
package com.aitongyi.web.back.conf; import com.aitongyi.web.cache.conf.CacheConfig; import com.aitongyi.web.dao.conf.DatabaseConfig; import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; import javax.servlet.Filter; /** * 项目启动基类 * -- 整个项目的入口 */ public class WebApplicationInitializer extends AbstractAnnotationConfigDispatcherServletInitializer { /** * 获取配置信息 * @return */ @Override protected Class<?>[] getRootConfigClasses() { return new Class[] { BackConfig.class, DatabaseConfig.class, SecurityConfig.class, CacheConfig.class}; } @Override protected Class<?>[] getServletConfigClasses() { return new Class[] { MvcConfig.class }; } @Override protected String[] getServletMappings() { return new String[] { "/" }; } @Override protected Filter[] getServletFilters() { return null; } }
chwshuang/web/back/src/main/java/com/aitongyi/web/back/conf/WebApplicationInitializer.java/0
{ "file_path": "chwshuang/web/back/src/main/java/com/aitongyi/web/back/conf/WebApplicationInitializer.java", "repo_id": "chwshuang", "token_count": 320 }
160
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.aitongyi.web</groupId> <artifactId>web</artifactId> <version>1.0-SNAPSHOT</version> <!-- 将项目定义为公共项目 --> <packaging>pom</packaging> <modules> <module>back</module> <module>dao</module> <module>bean</module> <module>cache</module> <module>service</module> <module>task</module> </modules> <!-- 项目的依赖包 --> <dependencies> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>4.1.6.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>4.1.6.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>4.1.6.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> <version>4.1.6.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>4.1.6.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-support</artifactId> <version>4.1.6.RELEASE</version> </dependency> <dependency> <groupId>org.quartz-scheduler</groupId> <artifactId>quartz</artifactId> <version>2.2.2</version> </dependency> <dependency> <groupId>org.quartz-scheduler</groupId> <artifactId>quartz-jobs</artifactId> <version>2.2.2</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> <version>1.1.3</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.1.3</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-access</artifactId> <version>1.1.3</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.6</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>1.6.6</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.3</version> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.4</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.6</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>3.3.0</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>1.2.3</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-dbcp2</artifactId> <version>2.1.1</version> </dependency> <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>1.2.2</version> </dependency> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjweaver</artifactId> <version>1.8.6</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> <scope>provided</scope> </dependency> <!-- end --> </dependencies> <!-- repositories节点是配置maven下载jar的中央仓库, 默认的是国外的,下载奇慢无比,推荐使用自己搭建sonatype nexus中央仓库 --> <repositories> <repository> <id>public</id> <name>public</name> <url>http://172.18.100.83:8081/nexus/content/groups/public/</url> <snapshots> <enabled>true</enabled> </snapshots> </repository> <repository> <id>central</id> <name>Central Repository</name> <url>http://repo1.maven.org/maven2/</url> <snapshots> <enabled>false</enabled> </snapshots> </repository> <repository> <id>jboss-public-repository-group</id> <name>JBoss Public Repository Group</name> <url>http://repository.jboss.org/nexus/content/groups/public/</url> <layout>default</layout> <releases> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </releases> <snapshots> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </snapshots> </repository> <repository> <id>jboss-deprecated</id> <name>JBoss Deprecated</name> <url>https://repository.jboss.org/nexus/content/repositories/deprecated/</url> <layout>default</layout> <releases> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> <repository> <id>jboss-maven2-brew</id> <name>JBoss Maven 2 Brew Repository</name> <url>http://repository.jboss.org/maven2-brew/</url> <layout>default</layout> <releases> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> <repository> <id>io.spring.repo.maven.release</id> <url>http://repo.spring.io/release/</url> <snapshots> <enabled>false</enabled> </snapshots> </repository> <repository> <id>io.spring.repo.maven.milestone</id> <url>http://repo.spring.io/milestone/</url> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories> <build> <plugins> <!-- 指定Maven编译插件,如果不设置,它就会用maven-compiler-plugin默认的jdk版本来进行处理 --> <!-- 这样就容易出现版本不匹配的问题,以至于可能导致编译不通过的问题 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.7</source> <target>1.7</target> <fork>true</fork> <verbose>true</verbose> <encoding>UTF-8</encoding> <compilerArguments> <sourcepath>${project.basedir}/src/main/java</sourcepath> </compilerArguments> </configuration> </plugin> <!-- maven-resources-plugin则用来处理资源文件。默认的主资源文件目录是src/main/resources, 很多用户会需要添加额外的资源文件目录,这个时候就可以通过配置maven-resources-plugin来实现。 此外,资源文件过滤也是Maven的一大特性,你可以在资源文件中使用${propertyName}形式的Maven属性, 然后配置maven-resources-plugin开启对资源文件的过滤,之后就可以针对不同环境通过命令行或者Profile传入属性的值, 以实现更为灵活的构建。 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>2.6</version> <configuration> <encoding>UTF-8</encoding> </configuration> </plugin> </plugins> </build> </project>
chwshuang/web/pom.xml/0
{ "file_path": "chwshuang/web/pom.xml", "repo_id": "chwshuang", "token_count": 5453 }
161
Result of running `go test speed_test.go -test.bench=.* -test.benchmem=true` on my 2.3 GHz Macbook Pro. 2014/08/30 commit 056ab3d12ad9e8120f7818454ee5c27c478e2b3d (minor tweaks) BenchmarkGocraftWeb_Simple 2000000 788 ns/op 347 B/op 7 allocs/op BenchmarkGocraftWeb_Route15 1000000 2329 ns/op 736 B/op 10 allocs/op BenchmarkGocraftWeb_Route75 1000000 2339 ns/op 735 B/op 10 allocs/op BenchmarkGocraftWeb_Route150 1000000 2331 ns/op 737 B/op 10 allocs/op BenchmarkGocraftWeb_Route300 1000000 2329 ns/op 736 B/op 10 allocs/op BenchmarkGocraftWeb_Route3000 1000000 2392 ns/op 738 B/op 10 allocs/op BenchmarkGocraftWeb_Middleware 200000 6533 ns/op 1690 B/op 23 allocs/op BenchmarkGocraftWeb_Generic 1000000 1428 ns/op 486 B/op 9 allocs/op BenchmarkGocraftWeb_Composite 200000 8018 ns/op 1851 B/op 23 allocs/op // // Everything below is via a slower Macbook Air (1.8 GHz): // 2013/12/15 commit a32b88c2a5e1df88a16cd909f800460ff79edbaf (playing with how dynamic handlers are invoked. middleware/composite seem to be mutually exclusive for 5k ns/op) BenchmarkGocraftWeb_Simple 1000000 1216 ns/op 333 B/op 7 allocs/op BenchmarkGocraftWeb_Route15 500000 3337 ns/op 612 B/op 9 allocs/op BenchmarkGocraftWeb_Route75 500000 3234 ns/op 612 B/op 9 allocs/op BenchmarkGocraftWeb_Route150 500000 3298 ns/op 612 B/op 9 allocs/op BenchmarkGocraftWeb_Route300 500000 3217 ns/op 612 B/op 9 allocs/op BenchmarkGocraftWeb_Route3000 500000 3478 ns/op 615 B/op 9 allocs/op BenchmarkGocraftWeb_Middleware 200000 14566 ns/op 779 B/op 16 allocs/op BenchmarkGocraftWeb_Generic 1000000 1885 ns/op 457 B/op 9 allocs/op BenchmarkGocraftWeb_Composite 200000 9750 ns/op 917 B/op 16 allocs/op 2013/12/15 commit 51a79f5dae0bc4847a5eb7cc8b44b6eeb70c13fc (fast generic action handlers. Don't call generic action handlers via reflection) BenchmarkGocraftWeb_Simple 1000000 1271 ns/op 333 B/op 7 allocs/op BenchmarkGocraftWeb_Route15 500000 2955 ns/op 633 B/op 9 allocs/op BenchmarkGocraftWeb_Route75 500000 2959 ns/op 633 B/op 9 allocs/op BenchmarkGocraftWeb_Route150 500000 2982 ns/op 633 B/op 9 allocs/op BenchmarkGocraftWeb_Route300 500000 3046 ns/op 633 B/op 9 allocs/op BenchmarkGocraftWeb_Route3000 500000 3459 ns/op 633 B/op 9 allocs/op BenchmarkGocraftWeb_Middleware 200000 9438 ns/op 779 B/op 16 allocs/op BenchmarkGocraftWeb_Generic 1000000 1933 ns/op 457 B/op 9 allocs/op BenchmarkGocraftWeb_Composite 100000 15030 ns/op 1072 B/op 17 allocs/op 2013/12/15 commit 0e41f71c706db24fd56979361bb5cfa19b4828e2 (fast generic middleware. Don't call generic middleware via reflection) BenchmarkGocraftWeb_Simple 1000000 2036 ns/op 366 B/op 8 allocs/op BenchmarkGocraftWeb_Route15 500000 3080 ns/op 713 B/op 10 allocs/op BenchmarkGocraftWeb_Route75 500000 3452 ns/op 713 B/op 10 allocs/op BenchmarkGocraftWeb_Route150 500000 3199 ns/op 713 B/op 10 allocs/op BenchmarkGocraftWeb_Route300 500000 3212 ns/op 713 B/op 10 allocs/op BenchmarkGocraftWeb_Route3000 500000 3667 ns/op 713 B/op 10 allocs/op BenchmarkGocraftWeb_Middleware 200000 8888 ns/op 862 B/op 17 allocs/op BenchmarkGocraftWeb_Generic 1000000 2853 ns/op 490 B/op 10 allocs/op BenchmarkGocraftWeb_Composite 200000 12352 ns/op 1152 B/op 18 allocs/op 2013/12/15 commit e75a372bb80dc50627730b52adfcbdc4a6a723f5 (optimization pass. reduce allocations. manual closure.) BenchmarkGocraftWeb_Simple 1000000 2042 ns/op 366 B/op 8 allocs/op BenchmarkGocraftWeb_Route15 500000 3203 ns/op 713 B/op 10 allocs/op BenchmarkGocraftWeb_Route75 500000 3237 ns/op 713 B/op 10 allocs/op BenchmarkGocraftWeb_Route150 500000 3231 ns/op 713 B/op 10 allocs/op BenchmarkGocraftWeb_Route300 500000 3263 ns/op 713 B/op 10 allocs/op BenchmarkGocraftWeb_Route3000 500000 3719 ns/op 713 B/op 10 allocs/op BenchmarkGocraftWeb_Middleware 200000 9148 ns/op 862 B/op 17 allocs/op BenchmarkGocraftWeb_Generic 200000 8229 ns/op 680 B/op 16 allocs/op BenchmarkGocraftWeb_Composite 200000 10038 ns/op 1152 B/op 18 allocs/op 2013/12/14 commit fb4b15ee25ce11e3ea583f38cecebec8979ebb12 (no functional changes; just revamping benches) BenchmarkGocraftWeb_Simple 1000000 2517 ns/op 472 B/op 16 allocs/op BenchmarkGocraftWeb_Route15 500000 3829 ns/op 859 B/op 20 allocs/op BenchmarkGocraftWeb_Route75 500000 3944 ns/op 859 B/op 20 allocs/op BenchmarkGocraftWeb_Route150 500000 3977 ns/op 859 B/op 20 allocs/op BenchmarkGocraftWeb_Route300 500000 3948 ns/op 859 B/op 20 allocs/op BenchmarkGocraftWeb_Route3000 500000 4492 ns/op 860 B/op 20 allocs/op BenchmarkGocraftWeb_Middleware 200000 11068 ns/op 1683 B/op 35 allocs/op BenchmarkGocraftWeb_Generic 200000 9336 ns/op 913 B/op 28 allocs/op BenchmarkGocraftWeb_Composite 200000 11572 ns/op 1890 B/op 34 allocs/op 2013/11/27 commit 0991ee88750eb6b054c715ef03cf8f9fba47c6e5 (after implementing regexp segment conditions) BenchmarkSimple 500000 2749 ns/op 537 B/op 16 allocs/op BenchmarkRouting 500000 3915 ns/op 843 B/op 19 allocs/op BenchmarkMiddleware 200000 9281 ns/op 897 B/op 27 allocs/op 2013/11/25 commit 49658cd6cd345d4e779a7033c6b5d1e3077f56f3 (baseline) BenchmarkSimple 500000 2760 ns/op 537 B/op 16 allocs/op BenchmarkRouting 500000 3896 ns/op 843 B/op 19 allocs/op BenchmarkMiddleware 200000 9177 ns/op 897 B/op 27 allocs/op NOTES ON PROFILING: go test -bench=BenchmarkGocraftWeb_Composite -benchmem -memprofile mem.out go tool pprof web.test mem.out rm myprof* && go build -o myprof examples/prof/main.go && ./myprof && go tool pprof myprof myprof.out
gocraft/web/BENCHMARK_RESULTS/0
{ "file_path": "gocraft/web/BENCHMARK_RESULTS", "repo_id": "gocraft", "token_count": 3198 }
162
package web import ( "fmt" "net/http" "reflect" "runtime" ) type middlewareClosure struct { appResponseWriter Request Routers []*Router Contexts []reflect.Value currentMiddlewareIndex int currentRouterIndex int currentMiddlewareLen int RootRouter *Router Next NextMiddlewareFunc } // This is the entry point for servering all requests. func (rootRouter *Router) ServeHTTP(rw http.ResponseWriter, r *http.Request) { // Manually create a closure. These variables are needed in middlewareStack. // The reason we put these here instead of in the middleware stack, is Go (as of 1.2) // creates a heap variable for each varaiable in the closure. To minimize that, we'll // just have one (closure *middlewareClosure). var closure middlewareClosure closure.Request.Request = r closure.appResponseWriter.ResponseWriter = rw closure.Routers = make([]*Router, 1, rootRouter.maxChildrenDepth) closure.Routers[0] = rootRouter closure.Contexts = make([]reflect.Value, 1, rootRouter.maxChildrenDepth) closure.Contexts[0] = reflect.New(rootRouter.contextType) closure.currentMiddlewareLen = len(rootRouter.middleware) closure.RootRouter = rootRouter closure.Request.rootContext = closure.Contexts[0] // Handle errors defer func() { if recovered := recover(); recovered != nil { rootRouter.handlePanic(&closure.appResponseWriter, &closure.Request, recovered) } }() next := middlewareStack(&closure) next(&closure.appResponseWriter, &closure.Request) } // This function executes the middleware stack. It does so creating/returning an anonymous function/closure. // This closure can be called multiple times (eg, next()). Each time it is called, the next middleware is called. // Each time a middleware is called, this 'next' function is passed into it, which will/might call it again. // There are two 'virtual' middlewares in this stack: the route choosing middleware, and the action invoking middleware. // The route choosing middleware is executed after all root middleware. It picks the route. // The action invoking middleware is executed after all middleware. It executes the final handler. func middlewareStack(closure *middlewareClosure) NextMiddlewareFunc { closure.Next = func(rw ResponseWriter, req *Request) { if closure.currentRouterIndex >= len(closure.Routers) { return } // Find middleware to invoke. The goal of this block is to set the middleware variable. If it can't be done, it will be nil. // Side effects of this block: // - set currentMiddlewareIndex, currentRouterIndex, currentMiddlewareLen // - calculate route, setting routers/contexts, and fields in req. var middleware *middlewareHandler if closure.currentMiddlewareIndex < closure.currentMiddlewareLen { middleware = closure.Routers[closure.currentRouterIndex].middleware[closure.currentMiddlewareIndex] } else { // We ran out of middleware on the current router if closure.currentRouterIndex == 0 { // If we're still on the root router, it's time to actually figure out what the route is. // Do so, and update the various variables. // We could also 404 at this point: if so, run NotFound handlers and return. theRoute, wildcardMap := calculateRoute(closure.RootRouter, req) if theRoute == nil && httpMethod(req.Method) == httpMethodOptions { optionsMethod := req.Header.Get("Access-Control-Request-Method") methods := make([]string, 0, len(httpMethods)) var lastLeaf *pathLeaf for _, method := range httpMethods { if method == httpMethodOptions { continue } tree := closure.RootRouter.root[method] leaf, wildcards := tree.Match(req.URL.Path) if leaf != nil { methods = append(methods, string(method)) lastLeaf = leaf if optionsMethod == string(method) { wildcardMap = wildcards } } } if len(methods) > 0 { handler := &actionHandler{Generic: true, GenericHandler: closure.RootRouter.genericOptionsHandler(closure.Contexts[0], methods)} theRoute = &route{Method: httpMethodOptions, Path: lastLeaf.route.Path, Router: lastLeaf.route.Router, Handler: handler} } } if theRoute == nil { if closure.RootRouter.notFoundHandler.IsValid() { invoke(closure.RootRouter.notFoundHandler, closure.Contexts[0], []reflect.Value{reflect.ValueOf(rw), reflect.ValueOf(req)}) } else { rw.WriteHeader(http.StatusNotFound) fmt.Fprintf(rw, DefaultNotFoundResponse) } return } closure.Routers = routersFor(theRoute, closure.Routers) closure.Contexts = contextsFor(closure.Contexts, closure.Routers) req.targetContext = closure.Contexts[len(closure.Contexts)-1] req.route = theRoute req.PathParams = wildcardMap } closure.currentMiddlewareIndex = 0 closure.currentRouterIndex++ routersLen := len(closure.Routers) for closure.currentRouterIndex < routersLen { closure.currentMiddlewareLen = len(closure.Routers[closure.currentRouterIndex].middleware) if closure.currentMiddlewareLen > 0 { break } closure.currentRouterIndex++ } if closure.currentRouterIndex < routersLen { middleware = closure.Routers[closure.currentRouterIndex].middleware[closure.currentMiddlewareIndex] } else { // We're done! invoke the action handler := req.route.Handler if handler.Generic { handler.GenericHandler(rw, req) } else { handler.DynamicHandler.Call([]reflect.Value{closure.Contexts[len(closure.Contexts)-1], reflect.ValueOf(rw), reflect.ValueOf(req)}) } } } closure.currentMiddlewareIndex++ // Invoke middleware. if middleware != nil { middleware.invoke(closure.Contexts[closure.currentRouterIndex], rw, req, closure.Next) } } return closure.Next } func (mw *middlewareHandler) invoke(ctx reflect.Value, rw ResponseWriter, req *Request, next NextMiddlewareFunc) { if mw.Generic { mw.GenericMiddleware(rw, req, next) } else { mw.DynamicMiddleware.Call([]reflect.Value{ctx, reflect.ValueOf(rw), reflect.ValueOf(req), reflect.ValueOf(next)}) } } // Strange performance characteristics: this hurts benchmark scores. // func (ah *actionHandler) invoke(ctx reflect.Value, rw ResponseWriter, req *Request) { // if ah.Generic { // ah.GenericHandler(rw, req) // } else { // ah.DynamicHandler.Call([]reflect.Value{ctx, reflect.ValueOf(rw), reflect.ValueOf(req)}) // } // } func calculateRoute(rootRouter *Router, req *Request) (*route, map[string]string) { var leaf *pathLeaf var wildcardMap map[string]string method := httpMethod(req.Method) tree, ok := rootRouter.root[method] if ok { leaf, wildcardMap = tree.Match(req.URL.Path) } // If no match and this is a HEAD, route on GET. if leaf == nil && method == httpMethodHead { tree, ok := rootRouter.root[httpMethodGet] if ok { leaf, wildcardMap = tree.Match(req.URL.Path) } } if leaf == nil { return nil, nil } return leaf.route, wildcardMap } // given the route (and target router), return [root router, child router, ..., leaf route's router] // Use the memory in routers to store this information func routersFor(route *route, routers []*Router) []*Router { routers = routers[:0] curRouter := route.Router for curRouter != nil { routers = append(routers, curRouter) curRouter = curRouter.parent } // Reverse the slice s := 0 e := len(routers) - 1 for s < e { routers[s], routers[e] = routers[e], routers[s] s++ e-- } return routers } // contexts is initially filled with a single context for the root // routers is [root, child, ..., leaf] with at least 1 element // Returns [ctx for root, ... ctx for leaf] // NOTE: if two routers have the same contextType, then they'll share the exact same context. func contextsFor(contexts []reflect.Value, routers []*Router) []reflect.Value { routersLen := len(routers) for i := 1; i < routersLen; i++ { var ctx reflect.Value if routers[i].contextType == routers[i-1].contextType { ctx = contexts[i-1] } else { ctx = reflect.New(routers[i].contextType) // set the first field to the parent f := reflect.Indirect(ctx).Field(0) f.Set(contexts[i-1]) } contexts = append(contexts, ctx) } return contexts } // If there's a panic in the root middleware (so that we don't have a route/target), then invoke the root handler or default. // If there's a panic in other middleware, then invoke the target action's function. // If there's a panic in the action handler, then invoke the target action's function. func (rootRouter *Router) handlePanic(rw *appResponseWriter, req *Request, err interface{}) { var targetRouter *Router // This will be set to the router we want to use the errorHandler on. var context reflect.Value // this is the context of the target router if req.route == nil { targetRouter = rootRouter context = req.rootContext } else { targetRouter = req.route.Router context = req.targetContext for !targetRouter.errorHandler.IsValid() && targetRouter.parent != nil { targetRouter = targetRouter.parent // Need to set context to the next context, UNLESS the context is the same type. curContextStruct := reflect.Indirect(context) if targetRouter.contextType != curContextStruct.Type() { context = curContextStruct.Field(0) if reflect.Indirect(context).Type() != targetRouter.contextType { panic("bug: shouldn't get here") } } } } if targetRouter.errorHandler.IsValid() { invoke(targetRouter.errorHandler, context, []reflect.Value{reflect.ValueOf(rw), reflect.ValueOf(req), reflect.ValueOf(err)}) } else { http.Error(rw, DefaultPanicResponse, http.StatusInternalServerError) } const size = 4096 stack := make([]byte, size) stack = stack[:runtime.Stack(stack, false)] PanicHandler.Panic(fmt.Sprint(req.URL), err, string(stack)) } func invoke(handler reflect.Value, ctx reflect.Value, values []reflect.Value) { handlerType := handler.Type() numIn := handlerType.NumIn() if numIn == len(values) { handler.Call(values) } else { values = append([]reflect.Value{ctx}, values...) handler.Call(values) } } // DefaultNotFoundResponse is the default text rendered when no route is found and no NotFound handlers are present. var DefaultNotFoundResponse = "Not Found" // DefaultPanicResponse is the default text rendered when a panic occurs and no Error handlers are present. var DefaultPanicResponse = "Application Error"
gocraft/web/router_serve.go/0
{ "file_path": "gocraft/web/router_serve.go", "repo_id": "gocraft", "token_count": 3551 }
163
--- layout: layout-404 permalink: 404.html ---
modernweb-dev/web/docs/404.md/0
{ "file_path": "modernweb-dev/web/docs/404.md", "repo_id": "modernweb-dev", "token_count": 17 }
164
{ "name": "Modern Web", "short_name": "@web", "theme_color": "#e63946", "background_color": "#1d3557", "display": "standalone", "orientation": "portrait", "Scope": "/", "start_url": "/", "icons": [ { "src": "../_merged_assets/_static/icons/android-chrome-192x192.png", "sizes": "128x128", "type": "image/png" }, { "src": "../_merged_assets/_static/icons/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" }, { "src": "../_merged_assets/_static/icons/maskable-icon.jpg", "sizes": "1024x1024", "type": "image/jpg", "purpose": "any maskable" } ], "splash_pages": null }
modernweb-dev/web/docs/_assets/webmanifest.json/0
{ "file_path": "modernweb-dev/web/docs/_assets/webmanifest.json", "repo_id": "modernweb-dev", "token_count": 323 }
165
# Building >> Overview ||10 Building for production is important to ensure that the smallest possible payload gets shipped to your users.
modernweb-dev/web/docs/docs/building/overview.md/0
{ "file_path": "modernweb-dev/web/docs/docs/building/overview.md", "repo_id": "modernweb-dev", "token_count": 27 }
166
# Dev Server >> Plugins >> Overview ||1 Web Dev Server comes with a few plugins out of the box. See - [esbuild](./esbuild.md) - [rollup](./rollup.md) - [import-maps](./import-maps.md) - [legacy](./legacy.md) - [hmr](./hmr.md) If you have more specific needs it's best to [write your own plugin](../writing-plugins/overview.md).
modernweb-dev/web/docs/docs/dev-server/plugins/overview.md/0
{ "file_path": "modernweb-dev/web/docs/docs/dev-server/plugins/overview.md", "repo_id": "modernweb-dev", "token_count": 120 }
167
# Test Runner >> Browser Launchers ||5 Browser launchers boot up and control a browser instance to run your tests. By default, tests are run with the locally installed instance of Chrome, controlled via `puppeteer-core`.
modernweb-dev/web/docs/docs/test-runner/browser-launchers/index.md/0
{ "file_path": "modernweb-dev/web/docs/docs/test-runner/browser-launchers/index.md", "repo_id": "modernweb-dev", "token_count": 50 }
168
# Test Runner >> Reporters >> Overview ||10 You can customize the test reporters using the `reporters` option. ```js // import the browser launcher you want to use import { defaultReporter } from '@web/test-runner'; import { myReporter } from 'my-reporter'; export default { reporters: [ // use the default reporter only for reporting test progress defaultReporter({ reportTestResults: false, reportTestProgress: true }), // use another reporter to report test results myReporter(), ], }; ```
modernweb-dev/web/docs/docs/test-runner/reporters/overview.md/0
{ "file_path": "modernweb-dev/web/docs/docs/test-runner/reporters/overview.md", "repo_id": "modernweb-dev", "token_count": 146 }
169
# Dev Server ||30
modernweb-dev/web/docs/guides/dev-server/index.md/0
{ "file_path": "modernweb-dev/web/docs/guides/dev-server/index.md", "repo_id": "modernweb-dev", "token_count": 6 }
170
# Test Runner >> Dev Server ||60 Web Test Runner is based on Web Dev Server and shares the same configuration. You can view the dev server documentation to learn how to set this up. **Guides:** - [Using plugins](../dev-server/using-plugins.md) - [Typescript and JSX](../dev-server/typescript-and-jsx.md) - [Browser support](../dev-server/browser-support.md) **Documentation:** - [Configuration](../../docs/dev-server/cli-and-configuration.md) - [Middleware](../../docs/dev-server/middleware.md) - [Rollup plugin](../../docs/dev-server/plugins/rollup.md) - [Esbuild plugin](../../docs/dev-server/plugins/esbuild.md)
modernweb-dev/web/docs/guides/test-runner/dev-server.md/0
{ "file_path": "modernweb-dev/web/docs/guides/test-runner/dev-server.md", "repo_id": "modernweb-dev", "token_count": 204 }
171
import { expect } from '../../../../../node_modules/@esm-bundle/chai/esm/chai.js'; afterEach(() => { throw new Error('error thrown in afterEach hook'); }); it('true is true', () => { expect(true).to.equal(true); }); it('true is really true', () => { expect(true).to.equal(true); });
modernweb-dev/web/integration/test-runner/tests/test-failure/browser-tests/fail-after-each.test.js/0
{ "file_path": "modernweb-dev/web/integration/test-runner/tests/test-failure/browser-tests/fail-after-each.test.js", "repo_id": "modernweb-dev", "token_count": 106 }
172
# @web/config-loader ## 0.3.1 ### Patch Changes - 5b6e1bcd: Drop support for older node runtimes (12 and earlier) ## 0.3.0 ### Minor Changes - c185cbaa: Set minimum node version to 18 ## 0.2.2 ### Patch Changes - 640ba85f: added types for main entry point ## 0.2.1 ### Patch Changes - c26d3730: Update TypeScript ## 0.2.0 ### Minor Changes - febd9d9d: Set node 16 as the minimum version. ## 0.1.3 ### Patch Changes - 6e313c18: improve error message ## 0.1.2 ### Patch Changes - 132c43c: export map entry for import needs to be valid ## 0.1.1 ### Patch Changes - aa65fd1: run build before publishing ## 0.1.0 ### Minor Changes - 9be1f95: Added native node es module entrypoints. This is a breaking change. Before, native node es module imports would import a CJS module as a default import and require destructuring afterwards: ```js import playwrightModule from '@web/test-runner-playwright'; const { playwrightLauncher } = playwrightModule; ``` Now, the exports are only available directly as a named export: ```js import { playwrightLauncher } from '@web/test-runner-playwright'; ``` ## 0.0.4 ### Patch Changes - 4112c2b: feat(config-loader): add jsdoc type checking ## 0.0.3 ### Patch Changes - 588a971: fix loading esm config on windows ## 0.0.2 ### Patch Changes - 095f80d: remove unneeded try catch ## 0.0.1 ### Patch Changes - f7c3e08: Create a separate config loader package
modernweb-dev/web/packages/config-loader/CHANGELOG.md/0
{ "file_path": "modernweb-dev/web/packages/config-loader/CHANGELOG.md", "repo_id": "modernweb-dev", "token_count": 499 }
173
export default { foo: 'bar' };
modernweb-dev/web/packages/config-loader/test/fixtures/package-cjs/module-in-.js/my-project.config.js/0
{ "file_path": "modernweb-dev/web/packages/config-loader/test/fixtures/package-cjs/module-in-.js/my-project.config.js", "repo_id": "modernweb-dev", "token_count": 10 }
174
console.log('app.js');
modernweb-dev/web/packages/dev-server-core/demo/basic/app.js/0
{ "file_path": "modernweb-dev/web/packages/dev-server-core/demo/basic/app.js", "repo_id": "modernweb-dev", "token_count": 9 }
175
This is a fork of [dom5](https://www.npmjs.com/package/dom5), needed until [issues/3385](https://github.com/Polymer/tools/issues/3385) is resolved.
modernweb-dev/web/packages/dev-server-core/src/dom5/README.md/0
{ "file_path": "modernweb-dev/web/packages/dev-server-core/src/dom5/README.md", "repo_id": "modernweb-dev", "token_count": 52 }
176
import { Middleware } from 'koa'; import { Logger } from '../logger/Logger'; import { Plugin } from '../plugins/Plugin'; /** * Sets up a middleware which allows plugins to resolve the mime type. */ export function pluginMimeTypeMiddleware(logger: Logger, plugins: Plugin[]): Middleware { const mimeTypePlugins = plugins.filter(p => 'resolveMimeType' in p); if (mimeTypePlugins.length === 0) { // nothing to transform return (ctx, next) => next(); } return async (context, next) => { await next(); if (context.status < 200 || context.status >= 300) { return undefined; } for (const plugin of mimeTypePlugins) { const result = await plugin.resolveMimeType?.(context); const type = typeof result === 'object' ? result.type : result; if (type) { logger.debug(`Plugin ${plugin.name} resolved mime type of ${context.path} to ${type}`); context.type = type; } } }; }
modernweb-dev/web/packages/dev-server-core/src/middleware/pluginMimeTypeMiddleware.ts/0
{ "file_path": "modernweb-dev/web/packages/dev-server-core/src/middleware/pluginMimeTypeMiddleware.ts", "repo_id": "modernweb-dev", "token_count": 336 }
177
import { expect } from 'chai'; import { DevServer } from '../../src/server/DevServer.js'; import { createTestServer } from '../helpers.js'; describe('base path middleware', () => { describe('without a trailing /', () => { let host: string; let server: DevServer; beforeEach(async () => { ({ server, host } = await createTestServer({ basePath: '/foo' })); }); afterEach(() => { server.stop(); }); it('strips the base path from requests', async () => { const response = await fetch(`${host}/foo/index.html`); const responseText = await response.text(); expect(response.status).to.equal(200); expect(responseText).to.include('<title>My app</title>'); }); it('can request without base path', async () => { const response = await fetch(`${host}/index.html`); const responseText = await response.text(); expect(response.status).to.equal(200); expect(responseText).to.include('<title>My app</title>'); }); }); context('with a trailing /', () => { let host: string; let server: DevServer; beforeEach(async () => { ({ server, host } = await createTestServer({ basePath: '/foo/' })); }); afterEach(() => { server.stop(); }); it('strips the base path from requests', async () => { const response = await fetch(`${host}/foo/index.html`); const responseText = await response.text(); expect(response.status).to.equal(200); expect(responseText).to.include('<title>My app</title>'); }); it('can request without base path', async () => { const response = await fetch(`${host}/index.html`); const responseText = await response.text(); expect(response.status).to.equal(200); expect(responseText).to.include('<title>My app</title>'); }); }); });
modernweb-dev/web/packages/dev-server-core/test/middleware/basePathMiddleware.test.ts/0
{ "file_path": "modernweb-dev/web/packages/dev-server-core/test/middleware/basePathMiddleware.test.ts", "repo_id": "modernweb-dev", "token_count": 671 }
178
# Dev server esbuild Plugin for using [esbuild](https://github.com/evanw/esbuild) in the dev server. See [our website](https://modern-web.dev/docs/dev-server/plugins/esbuild/) for full documentation.
modernweb-dev/web/packages/dev-server-esbuild/README.md/0
{ "file_path": "modernweb-dev/web/packages/dev-server-esbuild/README.md", "repo_id": "modernweb-dev", "token_count": 63 }
179
import { parseUserAgent } from './parseUserAgent.js'; import { TARGET_LATEST_MODERN, TARGET_LOWEST_ESM_SUPPORT, Browser, isLatestModernBrowser, isLatestSafari, } from './browser-targets.js'; const cache = new Map<string, undefined | string | string[]>(); function getTargetForUserAgent(target: string, userAgent: string): string | string[] { const browser = parseUserAgent(userAgent); if (typeof browser.name === 'string' && typeof browser.version === 'string') { if (target === 'auto') { if (isLatestModernBrowser(browser as Browser)) { // skip compiling on latest chrome/firefox/edge return 'esnext'; } if (isLatestSafari(browser as Browser)) { // we don't skip safari, but we also don't want to compile to the lowest common denominator return `safari${browser.version}`; } } if (target === 'auto-always') { if (isLatestModernBrowser(browser as Browser) || isLatestSafari(browser as Browser)) { // compile to JS compatible with latest chrome/firefox/edge/safari return TARGET_LATEST_MODERN; } } } // fall back to compiling to the lowest compatible with browsers that support es modules return TARGET_LOWEST_ESM_SUPPORT; } export function getEsbuildTarget( targets: string | string[], userAgent?: string, ): string | string[] { const target = typeof targets === 'string' ? targets : targets.length === 1 ? targets[0] : undefined; if (!target || !['auto-always', 'auto'].includes(target)) { // user has defined one or more targets that is not auto, so compile to this target directly return targets; } if (userAgent == null) { // user has auto but there is no user agent, fall back to the lowest compatible with browsers that support es modules return TARGET_LOWEST_ESM_SUPPORT; } const cached = cache.get(userAgent); if (cached != null) { return cached; } const targetForUserAgent = getTargetForUserAgent(target, userAgent); cache.set(userAgent, targetForUserAgent); return targetForUserAgent; }
modernweb-dev/web/packages/dev-server-esbuild/src/getEsbuildTarget.ts/0
{ "file_path": "modernweb-dev/web/packages/dev-server-esbuild/src/getEsbuildTarget.ts", "repo_id": "modernweb-dev", "token_count": 691 }
180
import { expect } from 'chai'; import { expectIncludes, createTestServer } from '@web/dev-server-core/test-helpers'; import { esbuildPlugin } from '../src/index.js'; describe('esbuildPlugin JSX', function () { it('transforms .jsx files', async () => { const { server, host } = await createTestServer({ rootDir: __dirname, plugins: [ { name: 'test', serve(context) { if (context.path === '/foo.jsx') { return ` export function foo(bar) { return <div id="myDiv"><MyElement foo={bar} /></div> } `; } }, }, esbuildPlugin({ jsx: true }), ], }); try { const response = await fetch(`${host}/foo.jsx`); const text = await response.text(); expect(response.status).to.equal(200); expect(response.headers.get('content-type')).to.equal( 'application/javascript; charset=utf-8', ); expectIncludes(text, 'React.createElement("div", {'); expectIncludes(text, 'id: "myDiv"'); expectIncludes(text, 'React.createElement(MyElement, {'); expectIncludes(text, 'foo: bar'); } finally { server.stop(); } }); it('can set the JSX factory', async () => { const { server, host } = await createTestServer({ rootDir: __dirname, plugins: [ { name: 'test', serve(context) { if (context.path === '/foo.jsx') { return ` export function foo(bar) { return <div id="myDiv"><MyElement foo={bar} /></div> } `; } }, }, esbuildPlugin({ jsx: true, jsxFactory: 'h', jsxFragment: 'Fragment' }), ], }); try { const response = await fetch(`${host}/foo.jsx`); const text = await response.text(); expect(response.status).to.equal(200); expect(response.headers.get('content-type')).to.equal( 'application/javascript; charset=utf-8', ); expectIncludes(text, 'h("div", {'); expectIncludes(text, 'id: "myDiv"'); expectIncludes(text, 'h(MyElement, {'); expectIncludes(text, 'foo: bar'); } finally { server.stop(); } }); });
modernweb-dev/web/packages/dev-server-esbuild/test/jsx.test.ts/0
{ "file_path": "modernweb-dev/web/packages/dev-server-esbuild/test/jsx.test.ts", "repo_id": "modernweb-dev", "token_count": 996 }
181
export const sharedTemplate = '<p>Shared template</p>';
modernweb-dev/web/packages/dev-server-hmr/demo/vanilla/sharedTemplate.js/0
{ "file_path": "modernweb-dev/web/packages/dev-server-hmr/demo/vanilla/sharedTemplate.js", "repo_id": "modernweb-dev", "token_count": 17 }
182
{ "name": "@web/dev-server-import-maps", "version": "0.2.0", "publishConfig": { "access": "public" }, "description": "Plugin for using import maps in @web/dev-server", "license": "MIT", "repository": { "type": "git", "url": "https://github.com/modernweb-dev/web.git", "directory": "packages/dev-server-import-maps" }, "author": "modern-web", "homepage": "https://github.com/modernweb-dev/web/tree/master/packages/dev-server-import-maps", "main": "dist/index.js", "exports": { ".": { "types": "./index.d.ts", "import": "./index.mjs", "require": "./dist/index.js" } }, "engines": { "node": ">=18.0.0" }, "scripts": { "build": "tsc", "test": "mocha \"test/**/*.test.ts\" --require ts-node/register", "test:browser": "node ../test-runner/dist/bin.js test-browser/test/**/*.test.{js,html} --config test-browser/web-test-runner.config.mjs", "test:watch": "mocha \"test/**/*.test.ts\" --require ts-node/register --watch --watch-files src,test" }, "files": [ "*.d.ts", "*.js", "*.mjs", "dist", "src" ], "keywords": [ "web", "dev", "server", "test", "runner", "testrunner", "import", "map", "maps", "resolve" ], "dependencies": { "@import-maps/resolve": "^1.0.1", "@types/parse5": "^6.0.1", "@web/dev-server-core": "^0.7.0", "@web/parse5-utils": "^2.1.0", "parse5": "^6.0.1", "picomatch": "^2.2.2" }, "devDependencies": { "@web/test-runner": "^0.18.0" } }
modernweb-dev/web/packages/dev-server-import-maps/package.json/0
{ "file_path": "modernweb-dev/web/packages/dev-server-import-maps/package.json", "repo_id": "modernweb-dev", "token_count": 723 }
183
# Dev Server Legacy Plugin for using the dev server or test runner on legacy browsers, for example on Internet Explorer 11 which does not support modules. See [our website](https://modern-web.dev/docs/dev-server/plugins/legacy/) for full documentation.
modernweb-dev/web/packages/dev-server-legacy/README.md/0
{ "file_path": "modernweb-dev/web/packages/dev-server-legacy/README.md", "repo_id": "modernweb-dev", "token_count": 62 }
184
export const modernUserAgents = { 'Chrome 78': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', 'Chrome 64': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36 ', 'Firefox 70': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:70.0) Gecko/20100101 Firefox/70.0', 'Safari 12.1.2': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.2 Safari/605.1.15', }; export const legacyUserAgents = { 'Chrome 62': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36', 'Chrome 63': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36', 'Safari 10': 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.0 Mobile/14G60 Safari/602.1', 'Edge 18': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/18.17763', 'IE 11': 'Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; NP06; rv:11.0) like Gecko', };
modernweb-dev/web/packages/dev-server-legacy/test/userAgents.ts/0
{ "file_path": "modernweb-dev/web/packages/dev-server-legacy/test/userAgents.ts", "repo_id": "modernweb-dev", "token_count": 573 }
185
export { RollupNodeResolveOptions, nodeResolve } from '@rollup/plugin-node-resolve'; export { fromRollup } from './fromRollup.js'; export { rollupAdapter } from './rollupAdapter.js'; export { rollupBundlePlugin } from './rollupBundlePlugin.js';
modernweb-dev/web/packages/dev-server-rollup/src/index.ts/0
{ "file_path": "modernweb-dev/web/packages/dev-server-rollup/src/index.ts", "repo_id": "modernweb-dev", "token_count": 79 }
186
<html> <body> <script type="module"> import '#internal-a'; </script> </body> </html>
modernweb-dev/web/packages/dev-server-rollup/test/node/fixtures/private-imports/index.html/0
{ "file_path": "modernweb-dev/web/packages/dev-server-rollup/test/node/fixtures/private-imports/index.html", "repo_id": "modernweb-dev", "token_count": 48 }
187
import { rollupBundlePlugin } from '../../src/rollupBundlePlugin.js'; import path from 'path'; import { createTestServer, fetchText, expectIncludes } from './test-helpers.js'; describe('rollupBundlePlugin', () => { it('can bundle a single entrypoint', async () => { const { server, host } = await createTestServer({ rootDir: path.join(__dirname, 'fixtures', 'bundle-basic'), plugins: [ rollupBundlePlugin({ rollupConfig: { input: path.join(__dirname, 'fixtures', 'bundle-basic', 'a.js'), }, }), ], }); try { const text = await fetchText(`${host}/a.js`); expectIncludes(text, "'c'"); expectIncludes(text, '`b ${c}`'); expectIncludes(text, "'d'"); expectIncludes(text, '`a ${bc} ${d}`'); } finally { server.stop(); } }); it('can bundle multiple entrypoint', async () => { const { server, host } = await createTestServer({ rootDir: path.join(__dirname, 'fixtures', 'bundle-multi'), plugins: [ rollupBundlePlugin({ rollupConfig: { input: [ path.join(__dirname, 'fixtures', 'bundle-multi', 'a1.js'), path.join(__dirname, 'fixtures', 'bundle-multi', 'a2.js'), path.join(__dirname, 'fixtures', 'bundle-multi', 'a3.js'), ], output: { chunkFileNames: '[name].js', }, }, }), ], }); try { const textA1 = await fetchText(`${host}/a1.js`); expectIncludes(textA1, "import { b as bc, d } from './__rollup-generated__d.js';"); expectIncludes(textA1, 'var a1 = `a ${bc} ${d}`;'); expectIncludes(textA1, 'export { a1 as default };'); const textA2 = await fetchText(`${host}/a2.js`); expectIncludes(textA2, "import { b as bc, d } from './__rollup-generated__d.js';"); expectIncludes(textA2, 'var a2 = `a ${bc} ${d}`;'); expectIncludes(textA2, 'export { a2 as default };'); const textA3 = await fetchText(`${host}/a3.js`); expectIncludes(textA3, "import { b as bc, d } from './__rollup-generated__d.js';"); expectIncludes(textA3, 'var a3 = `a ${bc} ${d}`;'); expectIncludes(textA3, 'export { a3 as default };'); const textD = await fetchText(`${host}/__rollup-generated__d.js`); expectIncludes(textD, "var c = 'c';"); expectIncludes(textD, 'var bc = `b ${c}`;'); expectIncludes(textD, "var d = 'd';"); expectIncludes(textD, 'export { bc as b, d };'); } finally { server.stop(); } }); it('can serve regular files not bundled by rollup', async () => { const { server, host } = await createTestServer({ rootDir: path.join(__dirname, 'fixtures', 'bundle-basic'), plugins: [ rollupBundlePlugin({ rollupConfig: { input: path.join(__dirname, 'fixtures', 'bundle-basic', 'a.js'), }, }), ], }); try { const text = await fetchText(`${host}/not-bundled.js`); expectIncludes(text, "import a from './a.js';"); expectIncludes(text, 'export default `not bundled ${a}`;'); } finally { server.stop(); } }); it('can serve files emitted by a rollup plugin', async () => { const { server, host } = await createTestServer({ rootDir: path.join(__dirname, 'fixtures', 'bundle-basic'), plugins: [ rollupBundlePlugin({ rollupConfig: { input: path.join(__dirname, 'fixtures', 'bundle-basic', 'a.js'), plugins: [ { name: 'file-plugin', buildStart() { this.emitFile({ type: 'asset', name: 'foo.json', source: '{ "foo": "bar" }', }); }, }, ], }, }), ], }); try { const text = await fetchText(`${host}/__rollup-generated__foo.json`); expectIncludes(text, '{ "foo": "bar" }'); } finally { server.stop(); } }); });
modernweb-dev/web/packages/dev-server-rollup/test/node/rollupBundlePlugin.test.ts/0
{ "file_path": "modernweb-dev/web/packages/dev-server-rollup/test/node/rollupBundlePlugin.test.ts", "repo_id": "modernweb-dev", "token_count": 1935 }
188