From 37d40c17543b0830d49b945cc14965523dcd5bcc Mon Sep 17 00:00:00 2001 From: Ashley Gibson Date: Sat, 22 Jan 2022 14:17:31 +0000 Subject: [PATCH] Build assets. --- assets/build/css/admin.css | 44 +--- assets/build/css/frontend.css | 69 +----- assets/build/js/admin.js | 407 +--------------------------------- languages/edd-sl-releases.pot | 66 +++--- views/admin/release.php | 2 + 5 files changed, 41 insertions(+), 547 deletions(-) diff --git a/assets/build/css/admin.css b/assets/build/css/admin.css index b3c78d7..27d6c8c 100644 --- a/assets/build/css/admin.css +++ b/assets/build/css/admin.css @@ -1,43 +1 @@ -#edd-sl-releases-list { - margin: 1rem 0; -} -#edd-sl-releases-list .edd-sl-releases--release { - background: #f9f9f9; - border: 1px solid #e5e5e5; - border-top-width: 0; - padding: 1rem; -} -#edd-sl-releases-list .edd-sl-releases--release:first-child { - border-top-width: 1px; -} -#edd-sl-releases-list .edd-sl-releases--release h4 { - margin: 0; -} -#edd-sl-releases-list .edd-sl-releases--release--pre-release, #edd-sl-releases-list .edd-sl-releases--release--stable { - border-radius: 6px; - display: inline-block; - font-weight: normal; - line-height: 1.5em; - margin: 0 0.25rem; - padding: 0.15rem 0.5rem; -} -#edd-sl-releases-list .edd-sl-releases--release--pre-release { - background: #f9f3e5; - color: #7d4c01; -} -#edd-sl-releases-list .edd-sl-releases--release--stable { - background: #e5f5f0; - color: #017d5c; -} -#edd-sl-releases-list .edd-sl-releases--release--date { - color: #646970; - font-size: 12px; - font-weight: normal; -} -@media (min-width: 768px) { - #edd-sl-releases-list .edd-sl-releases--release--header { - align-items: center; - display: flex; - justify-content: space-between; - } -} +#edd-sl-releases-list{margin:1rem 0}#edd-sl-releases-list .edd-sl-releases--release{background:#f9f9f9;border:1px solid #e5e5e5;border-top:0 solid #e5e5e5;padding:1rem}#edd-sl-releases-list .edd-sl-releases--release:first-child{border-top-width:1px}#edd-sl-releases-list .edd-sl-releases--release h4{margin:0}#edd-sl-releases-list .edd-sl-releases--release--pre-release,#edd-sl-releases-list .edd-sl-releases--release--stable{border-radius:6px;display:inline-block;font-weight:400;line-height:1.5em;margin:0 .25rem;padding:.15rem .5rem}#edd-sl-releases-list .edd-sl-releases--release--pre-release{background:#f9f3e5;color:#7d4c01}#edd-sl-releases-list .edd-sl-releases--release--stable{background:#e5f5f0;color:#017d5c}#edd-sl-releases-list .edd-sl-releases--release--date{color:#646970;font-size:12px;font-weight:400}@media (min-width:768px){#edd-sl-releases-list .edd-sl-releases--release--header{align-items:center;display:flex;justify-content:space-between}} diff --git a/assets/build/css/frontend.css b/assets/build/css/frontend.css index 8d67a70..91306aa 100644 --- a/assets/build/css/frontend.css +++ b/assets/build/css/frontend.css @@ -1,68 +1 @@ -.edd-sl-releases-product { - margin-bottom: 2rem; -} -.edd-sl-releases-product h2 { - margin: 0 0 0.25rem; -} -@media (min-width: 768px) { - .edd-sl-releases-product { - display: flex; - justify-content: space-between; - align-items: center; - } - .edd-sl-releases-product h2 { - margin: 0; - } -} - -.edd-sl-releases-release { - margin-bottom: 2rem; -} -.edd-sl-releases-release--header { - margin-bottom: 1rem; -} -@media (min-width: 768px) { - .edd-sl-releases-release--header { - display: flex; - justify-content: space-between; - } -} -.edd-sl-releases-release--header h2 { - margin: 0 0 0.125rem; -} - -.edd-sl-releases-requirements { - margin-top: 0.25rem; -} - -.edd-sl-releases-requirement { - background: #f1f5f9; - border-radius: 6px; - color: #64748b; - display: inline-flex; - font-size: 13px; - font-weight: 600; - line-height: 13px; - text-transform: uppercase; -} -.edd-sl-releases-requirement--platform { - border-top-left-radius: 6px; - border-bottom-left-radius: 6px; - padding: 0.25rem 0.3rem 0.25rem 0.5rem; -} -.edd-sl-releases-requirement--php .edd-sl-releases-requirement--platform { - background: #818cf8; - color: white; -} -.edd-sl-releases-requirement--wp .edd-sl-releases-requirement--platform { - background: #60a5fa; - color: white; -} -.edd-sl-releases-requirement--version { - border-top-right-radius: 6px; - border-bottom-right-radius: 6px; - padding: 0.25rem 0.5rem 0.25rem 0.3rem; -} -.edd-sl-releases-requirement > span { - display: inline-block; -} +.edd-sl-releases-product{margin-bottom:2rem}.edd-sl-releases-product h2{margin:0 0 .25rem}@media (min-width:768px){.edd-sl-releases-product{align-items:center;display:flex;justify-content:space-between}.edd-sl-releases-product h2{margin:0}}.edd-sl-releases-release{margin-bottom:2rem}.edd-sl-releases-release--header{margin-bottom:1rem}@media (min-width:768px){.edd-sl-releases-release--header{display:flex;justify-content:space-between}}.edd-sl-releases-release--header h2{margin:0 0 .125rem}.edd-sl-releases-requirements{margin-top:.25rem}.edd-sl-releases-requirement{background:#f1f5f9;border-radius:6px;color:#64748b;display:inline-flex;font-size:13px;font-weight:600;line-height:13px;text-transform:uppercase}.edd-sl-releases-requirement--platform{border-bottom-left-radius:6px;border-top-left-radius:6px;padding:.25rem .3rem .25rem .5rem}.edd-sl-releases-requirement--php .edd-sl-releases-requirement--platform{background:#818cf8;color:#fff}.edd-sl-releases-requirement--wp .edd-sl-releases-requirement--platform{background:#60a5fa;color:#fff}.edd-sl-releases-requirement--version{border-bottom-right-radius:6px;border-top-right-radius:6px;padding:.25rem .5rem .25rem .3rem}.edd-sl-releases-requirement>span{display:inline-block} diff --git a/assets/build/js/admin.js b/assets/build/js/admin.js index 4be09f7..e537369 100644 --- a/assets/build/js/admin.js +++ b/assets/build/js/admin.js @@ -1,406 +1 @@ -/******/ (() => { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ "./assets/src/js/admin.js": -/*!********************************!*\ - !*** ./assets/src/js/admin.js ***! - \********************************/ -/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { - -var _require = __webpack_require__(/*! ./admin/releases */ "./assets/src/js/admin/releases.js"), - renderProductReleases = _require.renderProductReleases; - -var _require2 = __webpack_require__(/*! ./admin/media-upload */ "./assets/src/js/admin/media-upload.js"), - mediaButtonEvent = _require2.mediaButtonEvent; - -document.addEventListener('DOMContentLoaded', function () { - renderProductReleases(); - mediaButtonEvent(); -}); - -/***/ }), - -/***/ "./assets/src/js/admin/media-upload.js": -/*!*********************************************!*\ - !*** ./assets/src/js/admin/media-upload.js ***! - \*********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "mediaButtonEvent": () => (/* binding */ mediaButtonEvent) -/* harmony export */ }); -/* global eddSlReleases */ -function mediaButtonEvent() { - var mediaButtons = document.querySelectorAll('.edd-sl-releases--upload'); - - if (!mediaButtons) { - return; - } - - mediaButtons.forEach(function (button) { - button.addEventListener('click', function (e) { - e.preventDefault(); - var fileIdEl = document.getElementById(button.getAttribute('data-id-el')); - - if (!fileIdEl) { - console.log('Missing file ID element.'); - return; - } - - var mediaFrame = wp.media({ - title: eddSlReleases.uploadReleaseFile, - button: { - text: eddSlReleases.selectFile - }, - multiple: false - }); - mediaFrame.open(); - mediaFrame.on('select', function () { - var selection = mediaFrame.state().get('selection'); - selection.map(function (attachment) { - attachment.toJSON(); - console.log('attachment', attachment); - - if (attachment.id) { - fileIdEl.value = attachment.id; - } - - if (attachment.attributes && attachment.attributes.filename) { - var fileNameEl = document.getElementById('edd-sl-releases-file-name'); - - if (fileNameEl && !fileNameEl.value) { - fileNameEl.value = attachment.attributes.filename; - } - } - }); - }); - }); - }); -} - -/***/ }), - -/***/ "./assets/src/js/admin/releases.js": -/*!*****************************************!*\ - !*** ./assets/src/js/admin/releases.js ***! - \*****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "renderProductReleases": () => (/* binding */ renderProductReleases) -/* harmony export */ }); -/* harmony import */ var _utils_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/api */ "./assets/src/js/utils/api.js"); -/* harmony import */ var _utils_errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/errors */ "./assets/src/js/utils/errors.js"); -/* global eddSlReleases */ - - -function renderProductReleases() { - var wrapper = document.getElementById('edd-sl-releases'); - var loading = document.getElementById('edd-sl-releases-loading'); - var noReleases = document.getElementById('edd-sl-releases-none'); - var listReleases = document.getElementById('edd-sl-releases-list'); - - if (!wrapper || !listReleases) { - return; - } - - var productId = wrapper.getAttribute('data-product'); - - if (!productId) { - return; - } - - (0,_utils_api__WEBPACK_IMPORTED_MODULE_0__["default"])('products/' + productId + '/releases').then(function (response) { - if (!response.releases || response.releases.length === 0) { - if (noReleases) { - noReleases.classList.remove('hidden'); - } - } else { - listReleases.innerHTML = response.releases.map(buildReleaseMarkup).join(''); - listReleases.classList.remove('hidden'); - } - })["catch"](function (error) { - console.log('Error fetching releases', error); - error.json().then(function (response) { - var errorWrap = document.getElementById('edd-sl-releases-errors'); - - if (errorWrap) { - errorWrap.innerText = (0,_utils_errors__WEBPACK_IMPORTED_MODULE_1__.parseErrorMessage)(response); - errorWrap.classList.remove('hidden'); - } - }); - })["finally"](function () { - if (loading) { - loading.classList.add('hidden'); - } - }); -} - -function buildReleaseMarkup(release) { - var releaseType = ''; - - if (release.pre_release) { - releaseType = "".concat(eddSlReleases.preRelease, ""); - } else { - releaseType = "".concat(eddSlReleases.stableRelease, ""); - } - - return "\n
\n
\n

\n ").concat(release.version, "\n ").concat(releaseType, "\n \n –\n ").concat(release.released_at_display, "\n \n

\n \n
\n
\n "); -} - -/***/ }), - -/***/ "./assets/src/js/utils/api.js": -/*!************************************!*\ - !*** ./assets/src/js/utils/api.js ***! - \************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ apiRequest) -/* harmony export */ }); -/* global eddSlReleases */ -function apiRequest(endpoint) { - var method = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'GET'; - var body = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var args = { - method: method, - credentials: 'same-origin', - headers: { - 'Content-Type': 'application/json', - 'X-WP-Nonce': eddSlReleases.restNonce - } - }; - - if (Object.keys(body).length) { - args.body = JSON.stringify(body); - } - - return fetch(eddSlReleases.restBase + endpoint, args).then(function (response) { - if (!response.ok) { - return Promise.reject(response); - } - - return response.json(); - }); -} - -/***/ }), - -/***/ "./assets/src/js/utils/errors.js": -/*!***************************************!*\ - !*** ./assets/src/js/utils/errors.js ***! - \***************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "parseErrorMessage": () => (/* binding */ parseErrorMessage) -/* harmony export */ }); -/* global eddSlReleases */ -function parseErrorMessage(error) { - var errorMessage = eddSlReleases.defaultError; - - if (error.message) { - errorMessage = error.message; - } else if (error.error) { - errorMessage = error.error; - } else if (error.status && error.statusText) { - errorMessage = error.status + ": " + error.statusText; - } - - return errorMessage; -} - -/***/ }), - -/***/ "./assets/src/sass/frontend.scss": -/*!***************************************!*\ - !*** ./assets/src/sass/frontend.scss ***! - \***************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -// extracted by mini-css-extract-plugin - - -/***/ }), - -/***/ "./assets/src/sass/admin.scss": -/*!************************************!*\ - !*** ./assets/src/sass/admin.scss ***! - \************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -// extracted by mini-css-extract-plugin - - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = __webpack_modules__; -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/chunk loaded */ -/******/ (() => { -/******/ var deferred = []; -/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => { -/******/ if(chunkIds) { -/******/ priority = priority || 0; -/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1]; -/******/ deferred[i] = [chunkIds, fn, priority]; -/******/ return; -/******/ } -/******/ var notFulfilled = Infinity; -/******/ for (var i = 0; i < deferred.length; i++) { -/******/ var [chunkIds, fn, priority] = deferred[i]; -/******/ var fulfilled = true; -/******/ for (var j = 0; j < chunkIds.length; j++) { -/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) { -/******/ chunkIds.splice(j--, 1); -/******/ } else { -/******/ fulfilled = false; -/******/ if(priority < notFulfilled) notFulfilled = priority; -/******/ } -/******/ } -/******/ if(fulfilled) { -/******/ deferred.splice(i--, 1) -/******/ var r = fn(); -/******/ if (r !== undefined) result = r; -/******/ } -/******/ } -/******/ return result; -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/define property getters */ -/******/ (() => { -/******/ // define getter functions for harmony exports -/******/ __webpack_require__.d = (exports, definition) => { -/******/ for(var key in definition) { -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ (() => { -/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) -/******/ })(); -/******/ -/******/ /* webpack/runtime/make namespace object */ -/******/ (() => { -/******/ // define __esModule on exports -/******/ __webpack_require__.r = (exports) => { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/jsonp chunk loading */ -/******/ (() => { -/******/ // no baseURI -/******/ -/******/ // object to store loaded and loading chunks -/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched -/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded -/******/ var installedChunks = { -/******/ "/assets/build/js/admin": 0, -/******/ "assets/build/css/admin": 0, -/******/ "assets/build/css/frontend": 0 -/******/ }; -/******/ -/******/ // no chunk on demand loading -/******/ -/******/ // no prefetching -/******/ -/******/ // no preloaded -/******/ -/******/ // no HMR -/******/ -/******/ // no HMR manifest -/******/ -/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0); -/******/ -/******/ // install a JSONP callback for chunk loading -/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { -/******/ var [chunkIds, moreModules, runtime] = data; -/******/ // add "moreModules" to the modules object, -/******/ // then flag all "chunkIds" as loaded and fire callback -/******/ var moduleId, chunkId, i = 0; -/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) { -/******/ for(moduleId in moreModules) { -/******/ if(__webpack_require__.o(moreModules, moduleId)) { -/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; -/******/ } -/******/ } -/******/ if(runtime) var result = runtime(__webpack_require__); -/******/ } -/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); -/******/ for(;i < chunkIds.length; i++) { -/******/ chunkId = chunkIds[i]; -/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { -/******/ installedChunks[chunkId][0](); -/******/ } -/******/ installedChunks[chunkId] = 0; -/******/ } -/******/ return __webpack_require__.O(result); -/******/ } -/******/ -/******/ var chunkLoadingGlobal = self["webpackChunkedd_sl_releases"] = self["webpackChunkedd_sl_releases"] || []; -/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); -/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); -/******/ })(); -/******/ -/************************************************************************/ -/******/ -/******/ // startup -/******/ // Load entry module and return exports -/******/ // This entry module depends on other loaded chunks and execution need to be delayed -/******/ __webpack_require__.O(undefined, ["assets/build/css/admin","assets/build/css/frontend"], () => (__webpack_require__("./assets/src/js/admin.js"))) -/******/ __webpack_require__.O(undefined, ["assets/build/css/admin","assets/build/css/frontend"], () => (__webpack_require__("./assets/src/sass/frontend.scss"))) -/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["assets/build/css/admin","assets/build/css/frontend"], () => (__webpack_require__("./assets/src/sass/admin.scss"))) -/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__); -/******/ -/******/ })() -; \ No newline at end of file +(()=>{var e,s={796:(e,s,t)=>{var n=t(334).renderProductReleases,a=t(8).mediaButtonEvent;document.addEventListener("DOMContentLoaded",(function(){n(),a()}))},8:(e,s,t)=>{"use strict";function n(){var e=document.querySelectorAll(".edd-sl-releases--upload");e&&e.forEach((function(e){e.addEventListener("click",(function(s){s.preventDefault();var t=document.getElementById(e.getAttribute("data-id-el"));if(t){var n=wp.media({title:eddSlReleases.uploadReleaseFile,button:{text:eddSlReleases.selectFile},multiple:!1});n.open(),n.on("select",(function(){n.state().get("selection").map((function(e){if(e.toJSON(),console.log("attachment",e),e.id&&(t.value=e.id),e.attributes&&e.attributes.filename){var s=document.getElementById("edd-sl-releases-file-name");s&&!s.value&&(s.value=e.attributes.filename)}}))}))}else console.log("Missing file ID element.")}))}))}t.r(s),t.d(s,{mediaButtonEvent:()=>n})},334:(e,s,t)=>{"use strict";function n(){var e=document.getElementById("edd-sl-releases"),s=document.getElementById("edd-sl-releases-loading"),t=document.getElementById("edd-sl-releases-none"),n=document.getElementById("edd-sl-releases-list");if(e&&n){var r=e.getAttribute("data-product");r&&function(e){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},t={method:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET",credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":eddSlReleases.restNonce}};return Object.keys(s).length&&(t.body=JSON.stringify(s)),fetch(eddSlReleases.restBase+e,t).then((function(e){return e.ok?e.json():Promise.reject(e)}))}("products/"+r+"/releases").then((function(e){e.releases&&0!==e.releases.length?(n.innerHTML=e.releases.map(a).join(""),n.classList.remove("hidden")):t&&t.classList.remove("hidden")})).catch((function(e){console.log("Error fetching releases",e),e.json().then((function(e){var s=document.getElementById("edd-sl-releases-errors");s&&(s.innerText=function(e){var s=eddSlReleases.defaultError;return e.message?s=e.message:e.error?s=e.error:e.status&&e.statusText&&(s=e.status+": "+e.statusText),s}(e),s.classList.remove("hidden"))}))})).finally((function(){s&&s.classList.add("hidden")}))}}function a(e){var s="";return s=e.pre_release?''.concat(eddSlReleases.preRelease,""):''.concat(eddSlReleases.stableRelease,""),'\n
\n
\n

\n ').concat(e.version,"\n ").concat(s,'\n \n –\n ').concat(e.released_at_display,'\n \n

\n \n
\n
\n ")}t.r(s),t.d(s,{renderProductReleases:()=>n})},446:()=>{},575:()=>{}},t={};function n(e){var a=t[e];if(void 0!==a)return a.exports;var r=t[e]={exports:{}};return s[e](r,r.exports,n),r.exports}n.m=s,e=[],n.O=(s,t,a,r)=>{if(!t){var l=1/0;for(c=0;c=r)&&Object.keys(n.O).every((e=>n.O[e](t[o])))?t.splice(o--,1):(d=!1,r0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[t,a,r]},n.d=(e,s)=>{for(var t in s)n.o(s,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:s[t]})},n.o=(e,s)=>Object.prototype.hasOwnProperty.call(e,s),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={917:0,955:0,911:0};n.O.j=s=>0===e[s];var s=(s,t)=>{var a,r,[l,d,o]=t,i=0;if(l.some((s=>0!==e[s]))){for(a in d)n.o(d,a)&&(n.m[a]=d[a]);if(o)var c=o(n)}for(s&&s(t);in(796))),n.O(void 0,[955,911],(()=>n(446)));var a=n.O(void 0,[955,911],(()=>n(575)));a=n.O(a)})(); \ No newline at end of file diff --git a/languages/edd-sl-releases.pot b/languages/edd-sl-releases.pot index 529aa5c..c5d5b36 100644 --- a/languages/edd-sl-releases.pot +++ b/languages/edd-sl-releases.pot @@ -2,14 +2,14 @@ # This file is distributed under the same license as the EDD Software Licensing Releases plugin. msgid "" msgstr "" -"Project-Id-Version: EDD Software Licensing Releases 0.3\n" +"Project-Id-Version: EDD Software Licensing Releases 0.4\n" "Report-Msgid-Bugs-To: https://github.com/ashleyfae/edd-sl-releases/issues\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2022-01-22T13:58:01+00:00\n" +"POT-Creation-Date: 2022-01-22T14:17:25+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.5.0\n" "X-Domain: edd-sl-releases\n" @@ -144,98 +144,104 @@ msgstr "" msgid "n/a" msgstr "" -#: src/Services/AssetLoader.php:58 -#: views/admin/release.php:125 +#: src/Services/AssetLoader.php:65 +#: views/admin/release.php:133 msgid "Changelog" msgstr "" -#: src/Services/AssetLoader.php:59 +#: src/Services/AssetLoader.php:66 msgid "An unexpected error has occurred. Please try again." msgstr "" -#: src/Services/AssetLoader.php:63 +#: src/Services/AssetLoader.php:70 msgid "Edit" msgstr "" -#: src/Services/AssetLoader.php:64 +#: src/Services/AssetLoader.php:71 msgid "Upload or Select a Release File" msgstr "" -#: src/Services/AssetLoader.php:65 +#: src/Services/AssetLoader.php:72 msgid "Select File" msgstr "" +#: src/Services/AssetLoader.php:73 +msgid "Pre-release" +msgstr "" + +#: src/Services/AssetLoader.php:74 +msgid "Stable" +msgstr "" + #. Translators: %s - list of missing fields #: src/Traits/ValidatesReleaseData.php:33 msgid "Missing the following required fields: %s" msgstr "" -#: views/admin/metabox.php:14 -msgid "Releases" -msgstr "" - -#: views/admin/metabox.php:17 +#: views/admin/metabox.php:16 msgid "Loading releases..." msgstr "" -#: views/admin/metabox.php:21 +#: views/admin/metabox.php:20 msgid "No releases yet." msgstr "" -#: views/admin/metabox.php:32 +#: views/admin/metabox.php:31 msgid "Add Release" msgstr "" -#: views/admin/release.php:19 -msgid "Edit Release" +#. Translators: %s name of the product +#: views/admin/release.php:26 +msgid "Edit \"%s\" Release" msgstr "" -#: views/admin/release.php:21 -msgid "Create Release" +#. Translators: %s name of the product +#: views/admin/release.php:29 +msgid "Create \"%s\" Release" msgstr "" -#: views/admin/release.php:32 +#: views/admin/release.php:40 msgid "Version" msgstr "" -#: views/admin/release.php:48 +#: views/admin/release.php:56 msgid "Pre Release" msgstr "" -#: views/admin/release.php:59 +#: views/admin/release.php:67 msgid "Yes" msgstr "" -#: views/admin/release.php:65 +#: views/admin/release.php:73 msgid "File" msgstr "" -#: views/admin/release.php:71 +#: views/admin/release.php:79 msgid "File Name" msgstr "" -#: views/admin/release.php:86 +#: views/admin/release.php:94 msgid "Download URL" msgstr "" -#: views/admin/release.php:114 +#: views/admin/release.php:122 msgid "Change File" msgstr "" -#: views/admin/release.php:115 +#: views/admin/release.php:123 msgid "Upload File" msgstr "" -#: views/admin/release.php:144 +#: views/admin/release.php:152 msgid "Requirements" msgstr "" #. Translators: %s platform name -#: views/admin/release.php:156 +#: views/admin/release.php:164 msgid "%s Version Required:" msgstr "" -#: views/admin/release.php:179 +#: views/admin/release.php:187 msgid "Release Date" msgstr "" diff --git a/views/admin/release.php b/views/admin/release.php index 4fac343..86a8cee 100644 --- a/views/admin/release.php +++ b/views/admin/release.php @@ -22,8 +22,10 @@

id)) { + /* Translators: %s name of the product */ printf(esc_html__('Edit "%s" Release', 'edd-sl-releases'), $productLink); } else { + /* Translators: %s name of the product */ printf(esc_html__('Create "%s" Release', 'edd-sl-releases'), $productLink); } ?>