diff --git a/addon/webextension/buildSettings.js.template b/addon/webextension/buildSettings.js.template index a2b9d1b2d3..1faeb2c396 100644 --- a/addon/webextension/buildSettings.js.template +++ b/addon/webextension/buildSettings.js.template @@ -4,7 +4,7 @@ window.buildSettings = { captureText: (process.env.SCREENSHOTS_CAPTURE_TEXT === "true"), uploadBinary: (process.env.SCREENSHOTS_UPLOAD_BINARY === "true"), pngToJpegCutoff: parseInt(process.env.SCREENSHOTS_PNG_TO_JPEG_CUTOFF || 2500000, 10), - maxImageHeight: parseInt(process.env.SCREENSHOTS_MAX_IMAGE_HEIGHT || 5000, 10), - maxImageWidth: parseInt(process.env.SCREENSHOTS_MAX_IMAGE_WIDTH || 5000, 10) + maxImageHeight: parseInt(process.env.SCREENSHOTS_MAX_IMAGE_HEIGHT || 10000, 10), + maxImageWidth: parseInt(process.env.SCREENSHOTS_MAX_IMAGE_WIDTH || 10000, 10) }; null; diff --git a/addon/webextension/selector/ui.js b/addon/webextension/selector/ui.js index 62819f9b0b..a2c87fbb97 100644 --- a/addon/webextension/selector/ui.js +++ b/addon/webextension/selector/ui.js @@ -91,7 +91,7 @@ this.ui = (function() { // eslint-disable-line no-unused-vars return result; } - function isDownloadOnly() { + let isDownloadOnly = exports.isDownloadOnly = function() { return window.downloadOnly; } @@ -219,6 +219,15 @@ this.ui = (function() { // eslint-disable-line no-unused-vars if (width !== this.sizeTracking.lastWidth) { this.sizeTracking.lastWidth = width; this.element.style.width = width + "px"; + // Since this frame has an absolute position relative to the parent + // document, if the parent document has a max-width that is narrower + // than the viewport, then the x of the parent document is not at 0 of + // the viewport. That makes the frame shifted to the right. This left + // margin negates that. + let boundingRect = document.body.getBoundingClientRect(); + if (boundingRect.x) { + this.element.style.marginLeft = `-${boundingRect.x}px`; + } } if (force && visible) { this.element.style.display = ""; @@ -323,7 +332,6 @@ this.ui = (function() { // eslint-disable-line no-unused-vars resolve(); }), {once: true}); document.body.appendChild(this.element); - this.unhide(); } else { resolve(); } diff --git a/addon/webextension/selector/uicontrol.js b/addon/webextension/selector/uicontrol.js index 08e63a8789..5009092eba 100644 --- a/addon/webextension/selector/uicontrol.js +++ b/addon/webextension/selector/uicontrol.js @@ -967,8 +967,11 @@ this.uicontrol = (function() { sendEvent("cancel-shot", "keyboard-escape"); exports.deactivate(); } - if ((event.key || event.code) === "Enter") { - if (getState.state === "selected") { + if ((event.key || event.code) === "Enter" && getState.state === "selected") { + if (ui.isDownloadOnly()) { + sendEvent("download-shot", "keyboard-enter"); + shooter.downloadShot(selectedPos); + } else { sendEvent("save-shot", "keyboard-enter"); shooter.takeShot("selection", selectedPos); } diff --git a/locales/ach/server.ftl b/locales/ach/server.ftl index 869d876fef..d4e060bea8 100644 --- a/locales/ach/server.ftl +++ b/locales/ach/server.ftl @@ -35,6 +35,7 @@ homePageHowScreenshotsWorks = Kit ma Firefox Screenshots Tiyo Kede homePageGetStartedTitle = Caki // Note: Screenshots is an abbreviation for Firefox Screenshots, and should not be translated. homePageGetStartedDescription = Nong cal Screenshots manyen i gitic mamegi. Yer, ka jami ayera me Screenshots bi nyute i wii dirica me layeny mamegi. +homePageCapturePage = mak potbuk homePageSaveShare = Gwokki ki Nywaki homePageLegalLink = Cik homePagePrivacyLink = Mung @@ -137,6 +138,10 @@ shotIndexPageNoSearchResultsIntro = Hmm shotIndexPageNoSearchResults = Pe watwero nongo cal ma rwate ki yeny mamegi. shotIndexPageClearSearchButton .title = Jwa yeny +shotIndexPagePreviousPage + .title = potbuk mukato +shotIndexPageNextPage + .title = potbuk malubu // all metrics strings are optional for translation @@ -151,4 +156,6 @@ metricsPageUsersQueryTitle = Lutic kudiceng metricsPageUsersQueryCount = Wel Lutic metricsPageUsersQueryDay = Diceng metricsPageUserShotsQueryCount = Wel lutic +metricsPageRetentionQueryUsers = Wel lutic +metricsPageTotalRetentionQueryUsers = Wel lutic metricsPageVersionQueryLastSeen = Nino diff --git a/locales/ia/server.ftl b/locales/ia/server.ftl index 381c8db382..e6601f6f11 100644 --- a/locales/ia/server.ftl +++ b/locales/ia/server.ftl @@ -163,6 +163,9 @@ timeDiffFutureDays = { $num -> [[ Shotindex page ]] +// { $status } is a placeholder for an HTTP status code, like '500'. +// { $statusText } is a text description of the status code, like 'Internal server error'. +shotIndexPageErrorDeletingShot = Error delente le instantaneo: { $status } { $statusText } // { $error } is a placeholder for a non-translated error message that could be shared // with developers when debugging an error. shotIndexPageErrorRendering = Error a generar un pagina: { $error } @@ -198,11 +201,13 @@ metricsPageTotalsQueryExpiredDeletedShots = Expirate (e delite) metricsPageShotsQueryTitle = Instantaneos per die metricsPageShotsQueryCount = Numero de instantaneos metricsPageShotsQueryDay = Die +metricsPageUsersQueryTitle = Usatores pro die metricsPageUsersQueryCount = Numero de usatores metricsPageUsersQueryDay = Die metricsPageUserShotsQueryTitle = Numero de instantaneos per usator metricsPageUserShotsQueryCount = Numero de usatores metricsPageRetentionQueryUsers = Numero de usatores +metricsPageTotalRetentionQueryTitle = Retention total metricsPageTotalRetentionQueryUsers = Numero de usatores metricsPageVersionQueryTitle = Version del additivo metricsPageVersionQueryUsers = Numero de usatores connexe diff --git a/locales/ia/webextension.properties b/locales/ia/webextension.properties index d0846804d0..3b029b5969 100644 --- a/locales/ia/webextension.properties +++ b/locales/ia/webextension.properties @@ -8,6 +8,7 @@ saveScreenshotVisibleArea = Salvar le area visibile saveScreenshotFullPage = Salvar le pagina cancelScreenshot = Cancellar downloadScreenshot = Discargar +downloadOnlyNotice = Tu es actualmente in modo solo-discargamento. # The downloadOnlyDetails string introduces a list of items. The keys # downloadOnlyDetailsPrivate, downloadOnlyDetailsThirdParty, and # downloadOnlyDetailsNeverRemember are list items in that list. @@ -47,6 +48,7 @@ tourDone = Facite # Do not translate {termsAndPrivacyNoticeTermsLink} and # {termsAndPrivacyNoticyPrivacyLink}. They're placeholders replaced by links # using the corresponding translated strings as text. +termsAndPrivacyNotice2 = Usante Firefox Screenshots, tu concorda con nostre {termsAndPrivacyNoticeTermsLink} e {termsAndPrivacyNoticePrivacyLink}. # This string is used as the text for a link in termsAndPrivacyNoticeCloudServices termsAndPrivacyNoticeTermsLink = Terminos # This string is used as the text for a link in termsAndPrivacyNoticeCloudServices diff --git a/server/db-patches/patch-21-22.sql b/server/db-patches/patch-21-22.sql new file mode 100644 index 0000000000..23eb5bbe11 --- /dev/null +++ b/server/db-patches/patch-21-22.sql @@ -0,0 +1,2 @@ +ALTER TABLE data ALTER COLUMN id TYPE character varying(270); +ALTER TABLE images ALTER COLUMN shotid TYPE character varying(270); diff --git a/server/schema.sql b/server/schema.sql index d6b2e9e0c4..b314daf0e4 100644 --- a/server/schema.sql +++ b/server/schema.sql @@ -11,7 +11,7 @@ CREATE TABLE accounts ( email text ); CREATE TABLE data ( - id character varying(120) NOT NULL, + id character varying(270) NOT NULL, deviceid character varying(200), created timestamp without time zone DEFAULT now(), value text NOT NULL, @@ -35,7 +35,7 @@ CREATE TABLE devices ( ); CREATE TABLE images ( id character varying(200) NOT NULL, - shotid character varying(200) NOT NULL, + shotid character varying(270) NOT NULL, clipid character varying(200) NOT NULL, contenttype text NOT NULL, url text, diff --git a/server/src/dbschema.js b/server/src/dbschema.js index a6fe24a7ca..9982f04672 100644 --- a/server/src/dbschema.js +++ b/server/src/dbschema.js @@ -6,7 +6,7 @@ const mozlog = require("./logging").mozlog("dbschema"); // When updating the database, please also run ./bin/dumpschema --record // This updates schema.sql with the latest full database schema -const MAX_DB_LEVEL = exports.MAX_DB_LEVEL = 21; +const MAX_DB_LEVEL = exports.MAX_DB_LEVEL = 22; exports.forceDbVersion = function(version) { mozlog.info("forcing-db-version", {db: db.constr, version}); diff --git a/server/src/server.js b/server/src/server.js index cb0a72c255..b7e51c0133 100644 --- a/server/src/server.js +++ b/server/src/server.js @@ -290,7 +290,7 @@ app.param("id", function(req, res, next, id) { }); app.param("domain", function(req, res, next, domain) { - if (/^[^\s/]{1,100}$/.test(domain)) { + if (/^[^\s/]{1,252}$/.test(domain)) { next(); return; } diff --git a/static/css/shot-index.scss b/static/css/shot-index.scss index 075ba49acf..aa68712a3c 100644 --- a/static/css/shot-index.scss +++ b/static/css/shot-index.scss @@ -258,10 +258,11 @@ h1 { #shots-page-number { margin-left: 40px; margin-right: 40px; + padding: 0; } span { - vertical-align: middle; + padding: 10px; width: 40px; &.shots-page-nav { @@ -272,10 +273,8 @@ h1 { } a { - display: block; border-radius: 3px; height: 40px; - padding: 10px; &:hover { background-color: #d7d7db; @@ -288,8 +287,6 @@ h1 { } img { - display: inline-block; - height: 20px; width: 20px; vertical-align: middle; } diff --git a/test/test.js b/test/test.js index 8393b223ea..b8f12b5f9e 100644 --- a/test/test.js +++ b/test/test.js @@ -87,6 +87,7 @@ function getDriver() { options.setProfile(profile); const builder = new webdriver.Builder() + .withCapabilities({'moz:webdriverClick': false}) .forBrowser("firefox") .setFirefoxOptions(options);