Merge branch 'develop' into save-user-wishlists

This commit is contained in:
Jay Trees 2022-04-11 13:22:19 +02:00
commit 20387fda1c
49 changed files with 1066 additions and 671 deletions

View file

@ -4,10 +4,7 @@
<IfModule mod_rewrite.c>
RewriteEngine On
# Wish
RewriteRule ^([a-z\-]+)/(\d+)$ /?page=$1&id=$2 [QSA,L]
# Wishlists
# Wishlists / Wish
RewriteRule ^([a-z\-]+)/(\d+)$ /?page=$1&id=$2 [QSA,L]
# Wishlist

16
CHANGELOG.md Normal file
View file

@ -0,0 +1,16 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Added
- This changelog
### Changed
- Improved card design
### Fixed
- Various small bugs

View file

@ -21,7 +21,7 @@ your wishes for any kind of occasion ([demo](https://wishthis.online)).
:de: German (Germany)
## :heavy_check_mark: Requirements
* Apache or Nginx (pretty URLs don't work on Nginx)
* Apache or Nginx
* PHP 8.1
## :hammer: Installation
@ -93,12 +93,17 @@ For more information see: https://fomantic-ui.com/introduction/build-tools.html
| PHP | PSR-12 |
## :construction: Roadmap
| Item | Status |
| ------------------------------------------ | ------------------- |
| Changelog | Planned |
| Price field for wishes | Planned |
| Save / bookmark wishlists from other users | Planned |
| Activity feed and friends | Under consideration |
| Combined wishes | Under consideration |
| Folders / Subcategories for wishlists | Under consideration |
| Synchronise Steam wishlist | Under consideration |
| Item | Status |
| --------------------------------------------------- | ------------------- |
| Group wishes by store | Planned |
| Option to show/notify when a wish was fulfilled | Planned |
| Price field for wishes | Planned |
| Redirect to original target after login | Planned |
| Save / bookmark wishlists from other users | Planned |
| Temporary undo button after fulfilling a wish | Planned |
| Activity feed and friends | Under consideration |
| Browser extension to quickly create wishes from url | Under consideration |
| Bulk add wishes via link list | Under consideration |
| Combined wishes | Under consideration |
| Folders / Subcategories for wishlists | Under consideration |
| Synchronise Steam wishlist | Under consideration |

View file

@ -1,12 +0,0 @@
Write-Host "second string"
$Version = Read-Host "What version would you like to release?"
$VersionRegEx = "define\('VERSION', '([\d\.]+)'\);"
$IndexPHP = (Get-Content -Path .\index.php -Raw) -Replace $VersionRegEx, "`define('VERSION', '$Version');" | Set-Content -Path .\index.php
IEX 'composer update --no-dev --with-all-dependencies --ignore-platform-req=php'
IEX 'npm update --only=production --no-optional'
Read-Host

View file

@ -119,6 +119,19 @@ if (isset($api)) {
return;
}
/**
* Pretty URLs
*/
$url = new \wishthis\URL($_SERVER['REQUEST_URI']);
if ($url->isPretty()) {
$_SESSION['_GET'] = query_to_key_value_pair($url->getPermalink());
}
if ($_SERVER['QUERY_STRING']) {
$_SESSION['_GET'] = $_GET;
}
/**
* Install
*/
@ -138,7 +151,7 @@ if ($options && $options->getOption('isInstalled')) {
/**
* Wishlist
*/
if (!isset($_GET['page']) && isset($_GET['wishlist'])) {
if (!isset($_SESSION['_GET']['page']) && isset($_SESSION['_GET']['wishlist'])) {
$page = 'wishlist';
}
@ -146,7 +159,7 @@ if (!isset($_GET['page']) && isset($_GET['wishlist'])) {
* Page
*/
if (!isset($page)) {
$page = isset($_GET['page']) ? $_GET['page'] : 'home';
$page = isset($_SESSION['_GET']['page']) ? $_SESSION['_GET']['page'] : 'home';
}
$pagePath = 'src/pages/' . $page . '.php';

6
node_modules/.yarn-integrity generated vendored
View file

@ -141,7 +141,7 @@
"concat-stream@^1.6.0": "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34",
"concat-with-sourcemaps@^1.0.0": "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz#d4ea93f05ae25790951b99e7b3b09e3908a4082e",
"concat-with-sourcemaps@^1.1.0": "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz#d4ea93f05ae25790951b99e7b3b09e3908a4082e",
"config-chain@^1.1.12": "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4",
"config-chain@^1.1.13": "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4",
"convert-source-map@^0.3.3": "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-0.3.5.tgz#f1d802950af7dd2631a1febe0596550c86ab3190",
"convert-source-map@^1.5.0": "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369",
"copy-anything@^2.0.1": "https://registry.yarnpkg.com/copy-anything/-/copy-anything-2.0.6.tgz#092454ea9584a7b7ad5573062b2a87f5900fc480",
@ -375,7 +375,7 @@
"isobject@^3.0.1": "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df",
"istextorbinary@^3.0.0": "https://registry.yarnpkg.com/istextorbinary/-/istextorbinary-3.3.0.tgz#06b1c57d948da11461bd237c00ce09e9902964f2",
"jquery@^3.4.0": "https://registry.yarnpkg.com/jquery/-/jquery-3.6.0.tgz#c72a09f15c1bdce142f49dbf1170bdf8adac2470",
"js-beautify@^1.13.13": "https://registry.yarnpkg.com/js-beautify/-/js-beautify-1.14.2.tgz#8180514fd4c7789c4ac4bcc327b6dda634c55666",
"js-beautify@^1.13.13": "https://registry.yarnpkg.com/js-beautify/-/js-beautify-1.14.3.tgz#3dd11c949178de7f3bdf3f6f752778d3bed95150",
"json-stable-stringify-without-jsonify@^1.0.1": "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651",
"just-debounce@^1.0.0": "https://registry.yarnpkg.com/just-debounce/-/just-debounce-1.1.0.tgz#2f81a3ad4121a76bc7cb45dbf704c0d76a8e5ddf",
"kind-of@^1.1.0": "https://registry.yarnpkg.com/kind-of/-/kind-of-1.1.0.tgz#140a3d2d41a36d2efcfa9377b62c24f8495a5c44",
@ -707,7 +707,7 @@
"type@^1.0.1": "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0",
"type@^2.5.0": "https://registry.yarnpkg.com/type/-/type-2.6.0.tgz#3ca6099af5981d36ca86b78442973694278a219f",
"typedarray@^0.0.6": "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777",
"uglify-js@^3.0.5": "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.15.3.tgz#9aa82ca22419ba4c0137642ba0df800cb06e0471",
"uglify-js@^3.0.5": "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.15.4.tgz#fa95c257e88f85614915b906204b9623d4fa340d",
"unc-path-regex@^0.1.2": "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa",
"undertaker-registry@^1.0.0": "https://registry.yarnpkg.com/undertaker-registry/-/undertaker-registry-1.0.1.tgz#5e4bda308e4a8a2ae584f9b9a4359a499825cc50",
"undertaker@^1.2.1": "https://registry.yarnpkg.com/undertaker/-/undertaker-1.3.0.tgz#363a6e541f27954d5791d6fa3c1d321666f86d18",

20
node_modules/js-beautify/README.md generated vendored
View file

@ -58,17 +58,17 @@ JS Beautifier is hosted on two CDN services: [cdnjs](https://cdnjs.com/libraries
To pull the latest version from one of these services include one set of the script tags below in your document:
```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.2/beautify.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.2/beautify-css.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.2/beautify-html.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.3/beautify.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.3/beautify-css.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.3/beautify-html.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.2/beautify.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.2/beautify-css.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.2/beautify-html.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.3/beautify.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.3/beautify-css.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.3/beautify-html.min.js"></script>
<script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.14.2/js/lib/beautify.js"></script>
<script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.14.2/js/lib/beautify-css.js"></script>
<script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.14.2/js/lib/beautify-html.js"></script>
<script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.14.3/js/lib/beautify.js"></script>
<script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.14.3/js/lib/beautify-css.js"></script>
<script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.14.3/js/lib/beautify-html.js"></script>
```
Older versions are available by changing the version number.
@ -401,4 +401,4 @@ Thanks also to Jason Diamond, Patrick Hof, Nochum Sossonko, Andreas Schneider, D
Vasilevsky, Vital Batmanov, Ron Baldwin, Gabriel Harrison, Chris J. Shull,
Mathias Bynens, Vittorio Gambaletta and others.
(README.md: js-beautify@1.14.2)
(README.md: js-beautify@1.14.3)

View file

@ -805,10 +805,10 @@ Beautifier.prototype.handle_start_block = function(current_token) {
)) {
// We don't support TypeScript,but we didn't break it for a very long time.
// We'll try to keep not breaking it.
if (!in_array(this._last_last_text, ['class', 'interface'])) {
this.set_mode(MODE.ObjectLiteral);
} else {
if (in_array(this._last_last_text, ['class', 'interface']) && !in_array(second_token.text, [':', ','])) {
this.set_mode(MODE.BlockStatement);
} else {
this.set_mode(MODE.ObjectLiteral);
}
} else if (this._flags.last_token.type === TOKEN.OPERATOR && this._flags.last_token.text === '=>') {
// arrow function: (param1, paramN) => { statements }
@ -924,7 +924,7 @@ Beautifier.prototype.handle_word = function(current_token) {
if (current_token.type === TOKEN.RESERVED) {
if (in_array(current_token.text, ['set', 'get']) && this._flags.mode !== MODE.ObjectLiteral) {
current_token.type = TOKEN.WORD;
} else if (current_token.text === 'import' && this._tokens.peek().text === '(') {
} else if (current_token.text === 'import' && in_array(this._tokens.peek().text, ['(', '.'])) {
current_token.type = TOKEN.WORD;
} else if (in_array(current_token.text, ['as', 'from']) && !this._flags.import_block) {
current_token.type = TOKEN.WORD;
@ -2502,7 +2502,7 @@ var digit = /[0-9]/;
var dot_pattern = /[^\d\.]/;
var positionable_operators = (
">>> === !== " +
">>> === !== &&= ??= ||= " +
"<< && >= ** != == <= >> || ?? |> " +
"< / - + > : & % ? ^ | *").split(' ');
@ -2510,7 +2510,7 @@ var positionable_operators = (
// Also, you must update possitionable operators separately from punct
var punct =
">>>= " +
"... >>= <<= === >>> !== **= " +
"... >>= <<= === >>> !== **= &&= ??= ||= " +
"=> ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> " +
"= ! ? > < : / ^ - + * & % ~ |";
@ -4039,6 +4039,9 @@ function Beautifier(source_text, options) {
"@supports": true,
"@document": true
};
this.NON_SEMICOLON_NEWLINE_PROPERTY = [
"grid-template"
];
}
@ -4163,7 +4166,9 @@ Beautifier.prototype.beautify = function() {
var enteringConditionalGroup = false;
var insideAtExtend = false;
var insideAtImport = false;
var insideScssMap = false;
var topCharacter = this._ch;
var insideNonSemiColonValues = false;
var whitespace;
var isAfterSpace;
var previous_ch;
@ -4215,7 +4220,7 @@ Beautifier.prototype.beautify = function() {
// Ensures any new lines following the comment are preserved
this.eatWhitespace(true);
} else if (this._ch === '@') {
} else if (this._ch === '@' || this._ch === '$') {
this.preserveSingleSpace(isAfterSpace);
// deal with less propery mixins @{...}
@ -4286,7 +4291,12 @@ Beautifier.prototype.beautify = function() {
this.indent();
this._output.set_indent(this._indentLevel);
} else {
this.indent();
// inside mixin and first param is object
if (previous_ch === '(') {
this._output.space_before_token = false;
} else if (previous_ch !== ',') {
this.indent();
}
this.print_string(this._ch);
}
@ -4318,7 +4328,21 @@ Beautifier.prototype.beautify = function() {
this._output.add_new_line(true);
}
}
if (this._input.peek() === ')') {
this._output.trim(true);
if (this._options.brace_style === "expand") {
this._output.add_new_line(true);
}
}
} else if (this._ch === ":") {
for (var i = 0; i < this.NON_SEMICOLON_NEWLINE_PROPERTY.length; i++) {
if (this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[i])) {
insideNonSemiColonValues = true;
break;
}
}
if ((insideRule || enteringConditionalGroup) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !insideAtExtend && parenLevel === 0) {
// 'property: value' delimiter
// which could be in a conditional group query
@ -4351,6 +4375,7 @@ Beautifier.prototype.beautify = function() {
this.print_string(this._ch + this.eatString(this._ch));
this.eatWhitespace(true);
} else if (this._ch === ';') {
insideNonSemiColonValues = false;
if (parenLevel === 0) {
if (insidePropertyValue) {
this.outdent();
@ -4392,20 +4417,32 @@ Beautifier.prototype.beautify = function() {
} else {
this.preserveSingleSpace(isAfterSpace);
this.print_string(this._ch);
this.eatWhitespace();
parenLevel++;
this.indent();
// handle scss/sass map
if (insidePropertyValue && previous_ch === "$" && this._options.selector_separator_newline) {
this._output.add_new_line();
insideScssMap = true;
} else {
this.eatWhitespace();
parenLevel++;
this.indent();
}
}
} else if (this._ch === ')') {
if (parenLevel) {
parenLevel--;
this.outdent();
}
if (insideScssMap && this._input.peek() === ";" && this._options.selector_separator_newline) {
insideScssMap = false;
this.outdent();
this._output.add_new_line();
}
this.print_string(this._ch);
} else if (this._ch === ',') {
this.print_string(this._ch);
this.eatWhitespace(true);
if (this._options.selector_separator_newline && !insidePropertyValue && parenLevel === 0 && !insideAtImport && !insideAtExtend) {
if (this._options.selector_separator_newline && (!insidePropertyValue || insideScssMap) && parenLevel === 0 && !insideAtImport && !insideAtExtend) {
this._output.add_new_line();
} else {
this._output.space_before_token = true;
@ -4439,8 +4476,13 @@ Beautifier.prototype.beautify = function() {
this.print_string(' ');
this.print_string(this._ch);
} else {
this.preserveSingleSpace(isAfterSpace);
var preserveAfterSpace = previous_ch === '"' || previous_ch === '\'';
this.preserveSingleSpace(preserveAfterSpace || isAfterSpace);
this.print_string(this._ch);
if (!this._output.just_added_newline() && this._input.peek() === '\n' && insideNonSemiColonValues) {
this._output.add_new_line();
}
}
}

File diff suppressed because one or more lines are too long

View file

@ -1090,6 +1090,9 @@ function Beautifier(source_text, options) {
"@supports": true,
"@document": true
};
this.NON_SEMICOLON_NEWLINE_PROPERTY = [
"grid-template"
];
}
@ -1214,7 +1217,9 @@ Beautifier.prototype.beautify = function() {
var enteringConditionalGroup = false;
var insideAtExtend = false;
var insideAtImport = false;
var insideScssMap = false;
var topCharacter = this._ch;
var insideNonSemiColonValues = false;
var whitespace;
var isAfterSpace;
var previous_ch;
@ -1266,7 +1271,7 @@ Beautifier.prototype.beautify = function() {
// Ensures any new lines following the comment are preserved
this.eatWhitespace(true);
} else if (this._ch === '@') {
} else if (this._ch === '@' || this._ch === '$') {
this.preserveSingleSpace(isAfterSpace);
// deal with less propery mixins @{...}
@ -1337,7 +1342,12 @@ Beautifier.prototype.beautify = function() {
this.indent();
this._output.set_indent(this._indentLevel);
} else {
this.indent();
// inside mixin and first param is object
if (previous_ch === '(') {
this._output.space_before_token = false;
} else if (previous_ch !== ',') {
this.indent();
}
this.print_string(this._ch);
}
@ -1369,7 +1379,21 @@ Beautifier.prototype.beautify = function() {
this._output.add_new_line(true);
}
}
if (this._input.peek() === ')') {
this._output.trim(true);
if (this._options.brace_style === "expand") {
this._output.add_new_line(true);
}
}
} else if (this._ch === ":") {
for (var i = 0; i < this.NON_SEMICOLON_NEWLINE_PROPERTY.length; i++) {
if (this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[i])) {
insideNonSemiColonValues = true;
break;
}
}
if ((insideRule || enteringConditionalGroup) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !insideAtExtend && parenLevel === 0) {
// 'property: value' delimiter
// which could be in a conditional group query
@ -1402,6 +1426,7 @@ Beautifier.prototype.beautify = function() {
this.print_string(this._ch + this.eatString(this._ch));
this.eatWhitespace(true);
} else if (this._ch === ';') {
insideNonSemiColonValues = false;
if (parenLevel === 0) {
if (insidePropertyValue) {
this.outdent();
@ -1443,20 +1468,32 @@ Beautifier.prototype.beautify = function() {
} else {
this.preserveSingleSpace(isAfterSpace);
this.print_string(this._ch);
this.eatWhitespace();
parenLevel++;
this.indent();
// handle scss/sass map
if (insidePropertyValue && previous_ch === "$" && this._options.selector_separator_newline) {
this._output.add_new_line();
insideScssMap = true;
} else {
this.eatWhitespace();
parenLevel++;
this.indent();
}
}
} else if (this._ch === ')') {
if (parenLevel) {
parenLevel--;
this.outdent();
}
if (insideScssMap && this._input.peek() === ";" && this._options.selector_separator_newline) {
insideScssMap = false;
this.outdent();
this._output.add_new_line();
}
this.print_string(this._ch);
} else if (this._ch === ',') {
this.print_string(this._ch);
this.eatWhitespace(true);
if (this._options.selector_separator_newline && !insidePropertyValue && parenLevel === 0 && !insideAtImport && !insideAtExtend) {
if (this._options.selector_separator_newline && (!insidePropertyValue || insideScssMap) && parenLevel === 0 && !insideAtImport && !insideAtExtend) {
this._output.add_new_line();
} else {
this._output.space_before_token = true;
@ -1490,8 +1527,13 @@ Beautifier.prototype.beautify = function() {
this.print_string(' ');
this.print_string(this._ch);
} else {
this.preserveSingleSpace(isAfterSpace);
var preserveAfterSpace = previous_ch === '"' || previous_ch === '\'';
this.preserveSingleSpace(preserveAfterSpace || isAfterSpace);
this.print_string(this._ch);
if (!this._output.just_added_newline() && this._input.peek() === '\n' && insideNonSemiColonValues) {
this._output.add_new_line();
}
}
}

View file

@ -836,10 +836,10 @@ Beautifier.prototype.handle_start_block = function(current_token) {
)) {
// We don't support TypeScript,but we didn't break it for a very long time.
// We'll try to keep not breaking it.
if (!in_array(this._last_last_text, ['class', 'interface'])) {
this.set_mode(MODE.ObjectLiteral);
} else {
if (in_array(this._last_last_text, ['class', 'interface']) && !in_array(second_token.text, [':', ','])) {
this.set_mode(MODE.BlockStatement);
} else {
this.set_mode(MODE.ObjectLiteral);
}
} else if (this._flags.last_token.type === TOKEN.OPERATOR && this._flags.last_token.text === '=>') {
// arrow function: (param1, paramN) => { statements }
@ -955,7 +955,7 @@ Beautifier.prototype.handle_word = function(current_token) {
if (current_token.type === TOKEN.RESERVED) {
if (in_array(current_token.text, ['set', 'get']) && this._flags.mode !== MODE.ObjectLiteral) {
current_token.type = TOKEN.WORD;
} else if (current_token.text === 'import' && this._tokens.peek().text === '(') {
} else if (current_token.text === 'import' && in_array(this._tokens.peek().text, ['(', '.'])) {
current_token.type = TOKEN.WORD;
} else if (in_array(current_token.text, ['as', 'from']) && !this._flags.import_block) {
current_token.type = TOKEN.WORD;
@ -2533,7 +2533,7 @@ var digit = /[0-9]/;
var dot_pattern = /[^\d\.]/;
var positionable_operators = (
">>> === !== " +
">>> === !== &&= ??= ||= " +
"<< && >= ** != == <= >> || ?? |> " +
"< / - + > : & % ? ^ | *").split(' ');
@ -2541,7 +2541,7 @@ var positionable_operators = (
// Also, you must update possitionable operators separately from punct
var punct =
">>>= " +
"... >>= <<= === >>> !== **= " +
"... >>= <<= === >>> !== **= &&= ??= ||= " +
"=> ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> " +
"= ! ? > < : / ^ - + * & % ~ |";

View file

@ -67,6 +67,9 @@ function Beautifier(source_text, options) {
"@supports": true,
"@document": true
};
this.NON_SEMICOLON_NEWLINE_PROPERTY = [
"grid-template"
];
}
@ -191,7 +194,9 @@ Beautifier.prototype.beautify = function() {
var enteringConditionalGroup = false;
var insideAtExtend = false;
var insideAtImport = false;
var insideScssMap = false;
var topCharacter = this._ch;
var insideNonSemiColonValues = false;
var whitespace;
var isAfterSpace;
var previous_ch;
@ -243,7 +248,7 @@ Beautifier.prototype.beautify = function() {
// Ensures any new lines following the comment are preserved
this.eatWhitespace(true);
} else if (this._ch === '@') {
} else if (this._ch === '@' || this._ch === '$') {
this.preserveSingleSpace(isAfterSpace);
// deal with less propery mixins @{...}
@ -314,7 +319,12 @@ Beautifier.prototype.beautify = function() {
this.indent();
this._output.set_indent(this._indentLevel);
} else {
this.indent();
// inside mixin and first param is object
if (previous_ch === '(') {
this._output.space_before_token = false;
} else if (previous_ch !== ',') {
this.indent();
}
this.print_string(this._ch);
}
@ -346,7 +356,21 @@ Beautifier.prototype.beautify = function() {
this._output.add_new_line(true);
}
}
if (this._input.peek() === ')') {
this._output.trim(true);
if (this._options.brace_style === "expand") {
this._output.add_new_line(true);
}
}
} else if (this._ch === ":") {
for (var i = 0; i < this.NON_SEMICOLON_NEWLINE_PROPERTY.length; i++) {
if (this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[i])) {
insideNonSemiColonValues = true;
break;
}
}
if ((insideRule || enteringConditionalGroup) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !insideAtExtend && parenLevel === 0) {
// 'property: value' delimiter
// which could be in a conditional group query
@ -379,6 +403,7 @@ Beautifier.prototype.beautify = function() {
this.print_string(this._ch + this.eatString(this._ch));
this.eatWhitespace(true);
} else if (this._ch === ';') {
insideNonSemiColonValues = false;
if (parenLevel === 0) {
if (insidePropertyValue) {
this.outdent();
@ -420,20 +445,32 @@ Beautifier.prototype.beautify = function() {
} else {
this.preserveSingleSpace(isAfterSpace);
this.print_string(this._ch);
this.eatWhitespace();
parenLevel++;
this.indent();
// handle scss/sass map
if (insidePropertyValue && previous_ch === "$" && this._options.selector_separator_newline) {
this._output.add_new_line();
insideScssMap = true;
} else {
this.eatWhitespace();
parenLevel++;
this.indent();
}
}
} else if (this._ch === ')') {
if (parenLevel) {
parenLevel--;
this.outdent();
}
if (insideScssMap && this._input.peek() === ";" && this._options.selector_separator_newline) {
insideScssMap = false;
this.outdent();
this._output.add_new_line();
}
this.print_string(this._ch);
} else if (this._ch === ',') {
this.print_string(this._ch);
this.eatWhitespace(true);
if (this._options.selector_separator_newline && !insidePropertyValue && parenLevel === 0 && !insideAtImport && !insideAtExtend) {
if (this._options.selector_separator_newline && (!insidePropertyValue || insideScssMap) && parenLevel === 0 && !insideAtImport && !insideAtExtend) {
this._output.add_new_line();
} else {
this._output.space_before_token = true;
@ -467,8 +504,13 @@ Beautifier.prototype.beautify = function() {
this.print_string(' ');
this.print_string(this._ch);
} else {
this.preserveSingleSpace(isAfterSpace);
var preserveAfterSpace = previous_ch === '"' || previous_ch === '\'';
this.preserveSingleSpace(preserveAfterSpace || isAfterSpace);
this.print_string(this._ch);
if (!this._output.just_added_newline() && this._input.peek() === '\n' && insideNonSemiColonValues) {
this._output.add_new_line();
}
}
}

View file

@ -691,10 +691,10 @@ Beautifier.prototype.handle_start_block = function(current_token) {
)) {
// We don't support TypeScript,but we didn't break it for a very long time.
// We'll try to keep not breaking it.
if (!in_array(this._last_last_text, ['class', 'interface'])) {
this.set_mode(MODE.ObjectLiteral);
} else {
if (in_array(this._last_last_text, ['class', 'interface']) && !in_array(second_token.text, [':', ','])) {
this.set_mode(MODE.BlockStatement);
} else {
this.set_mode(MODE.ObjectLiteral);
}
} else if (this._flags.last_token.type === TOKEN.OPERATOR && this._flags.last_token.text === '=>') {
// arrow function: (param1, paramN) => { statements }
@ -810,7 +810,7 @@ Beautifier.prototype.handle_word = function(current_token) {
if (current_token.type === TOKEN.RESERVED) {
if (in_array(current_token.text, ['set', 'get']) && this._flags.mode !== MODE.ObjectLiteral) {
current_token.type = TOKEN.WORD;
} else if (current_token.text === 'import' && this._tokens.peek().text === '(') {
} else if (current_token.text === 'import' && in_array(this._tokens.peek().text, ['(', '.'])) {
current_token.type = TOKEN.WORD;
} else if (in_array(current_token.text, ['as', 'from']) && !this._flags.import_block) {
current_token.type = TOKEN.WORD;

View file

@ -74,7 +74,7 @@ var digit = /[0-9]/;
var dot_pattern = /[^\d\.]/;
var positionable_operators = (
">>> === !== " +
">>> === !== &&= ??= ||= " +
"<< && >= ** != == <= >> || ?? |> " +
"< / - + > : & % ? ^ | *").split(' ');
@ -82,7 +82,7 @@ var positionable_operators = (
// Also, you must update possitionable operators separately from punct
var punct =
">>>= " +
"... >>= <<= === >>> !== **= " +
"... >>= <<= === >>> !== **= &&= ??= ||= " +
"=> ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> " +
"= ! ? > < : / ^ - + * & % ~ |";

View file

@ -1,6 +1,6 @@
{
"name": "js-beautify",
"version": "1.14.2",
"version": "1.14.3",
"description": "beautifier.io for node",
"main": "js/index.js",
"bin": {
@ -49,24 +49,24 @@
},
"browserslist": "ie 11",
"dependencies": {
"config-chain": "^1.1.12",
"config-chain": "^1.1.13",
"editorconfig": "^0.15.3",
"glob": "^7.1.3",
"nopt": "^5.0.0"
},
"devDependencies": {
"ansi-regex": ">=6.0.1",
"ansi-regex": "^6.0.1",
"benchmark": "^2.1.4",
"codemirror": "^5.56.0",
"jquery": "^3.5.1",
"jshint": "^2.12.0",
"minimist": ">=1.2.5",
"mocha": "^9.0.1",
"mustache": "^4.0.1",
"codemirror": "^5.65.2",
"jquery": "^3.6.0",
"jshint": "^2.13.4",
"minimist": "^1.2.6",
"mocha": "^9.2.2",
"mustache": "^4.2.0",
"requirejs": "^2.3.6",
"serve": "^13.0.2",
"strip-ansi": ">=7.0.1",
"webpack": "^5.32.0",
"webpack-cli": "^4.6.0"
"strip-ansi": "^7.0.1",
"webpack": "^5.70.0",
"webpack-cli": "^4.9.2"
}
}

3
node_modules/uglify-js/lib/ast.js generated vendored
View file

@ -851,6 +851,9 @@ var AST_DefClass = DEFNODE("DefClass", null, {
$propdoc: {
name: "[AST_SymbolDefClass] the name of this class",
},
resolve: function(def_class) {
return def_class ? this : this.parent_scope.resolve();
},
_validate: function() {
if (!(this.name instanceof AST_SymbolDefClass)) throw new Error("name must be AST_SymbolDefClass");
},

View file

@ -751,6 +751,34 @@ Compressor.prototype.compress = function(node) {
});
}
function make_fixed(save, fn) {
var prev_save, prev_value;
return function() {
var current = save();
if (prev_save !== current) {
prev_save = current;
prev_value = fn(current);
}
return prev_value;
};
}
function make_fixed_default(compressor, node, save) {
var prev_save, prev_seq;
return function() {
var current = save();
var ev;
if (!is_undefined(current, compressor) && (ev = fuzzy_eval(compressor, current, true)) !== undefined) {
return ev instanceof AST_Node ? node : current;
}
if (prev_save !== current) {
prev_save = current;
prev_seq = make_sequence(node, [ current, node.value ]);
}
return prev_seq;
};
}
function scan_declaration(tw, compressor, lhs, fixed, visit) {
var scanner = new TreeWalker(function(node) {
if (node instanceof AST_DefaultValue) {
@ -759,15 +787,7 @@ Compressor.prototype.compress = function(node) {
node.value.walk(tw);
pop(tw);
var save = fixed;
if (save) fixed = function() {
var value = save();
var ev;
if (is_undefined(value, compressor)
|| (ev = fuzzy_eval(compressor, value, true)) === undefined) {
return make_sequence(node, [ value, node.value ]);
}
return ev instanceof AST_Node ? node : value;
};
if (save) fixed = make_fixed_default(compressor, node, save);
node.name.walk(scanner);
fixed = save;
return true;
@ -777,18 +797,17 @@ Compressor.prototype.compress = function(node) {
var save = fixed;
node.elements.forEach(function(node, index) {
if (node instanceof AST_Hole) return reset_flags(node);
if (save) fixed = function() {
if (save) fixed = make_fixed(save, function(value) {
return make_node(AST_Sub, node, {
expression: save(),
expression: value,
property: make_node(AST_Number, node, { value: index }),
});
};
});
node.walk(scanner);
});
if (node.rest) {
var fixed_node;
if (save) fixed = compressor.option("rests") && function() {
var value = save();
if (save) fixed = compressor.option("rests") && make_fixed(save, function(value) {
if (!(value instanceof AST_Array)) return node;
for (var i = 0, len = node.elements.length; i < len; i++) {
if (value.elements[i] instanceof AST_Spread) return node;
@ -796,7 +815,7 @@ Compressor.prototype.compress = function(node) {
if (!fixed_node) fixed_node = make_node(AST_Array, node);
fixed_node.elements = value.elements.slice(len);
return fixed_node;
};
});
node.rest.walk(scanner);
}
fixed = save;
@ -812,7 +831,7 @@ Compressor.prototype.compress = function(node) {
node.key.walk(tw);
pop(tw);
}
if (save) fixed = function() {
if (save) fixed = make_fixed(save, function(value) {
var key = node.key;
var type = AST_Sub;
if (typeof key == "string") {
@ -823,10 +842,10 @@ Compressor.prototype.compress = function(node) {
}
}
return make_node(type, node, {
expression: save(),
property: key
expression: value,
property: key,
});
};
});
node.value.walk(scanner);
});
if (node.rest) {
@ -2040,13 +2059,17 @@ Compressor.prototype.compress = function(node) {
if (is_lhs(node, parent)) {
if (value_def && !hit_rhs) assign_used = true;
return node;
} else if (value_def) {
}
if (!hit_rhs && verify_ref && node.fixed !== lhs.fixed) {
abort = true;
return node;
}
if (value_def) {
if (stop_if_hit && assign_pos == 0) assign_pos = remaining - replaced;
if (!hit_rhs) replaced++;
return node;
} else {
replaced++;
}
replaced++;
changed = abort = true;
AST_Node.info("Collapsing {node} [{file}:{line},{col}]", {
node: node,
@ -2221,6 +2244,7 @@ Compressor.prototype.compress = function(node) {
var candidate = hit_stack[hit_stack.length - 1];
var assign_pos = -1;
var assign_used = false;
var verify_ref = false;
var remaining;
var value_def = null;
var stop_after = null;
@ -2248,8 +2272,11 @@ Compressor.prototype.compress = function(node) {
var lvalues = get_lvalues(candidate);
var lhs_local = is_lhs_local(lhs);
var rhs_value = get_rvalue(candidate);
var rvalue = !compound && rhs_value instanceof AST_Sequence ? rhs_value.tail_node() : rhs_value;
if (!side_effects) side_effects = value_has_side_effects();
var rvalue = rhs_value;
if (!side_effects) {
if (!compound && rvalue instanceof AST_Sequence) rvalue = rvalue.tail_node();
side_effects = value_has_side_effects();
}
var check_destructured = in_try || !lhs_local ? function(node) {
return node instanceof AST_Destructured;
} : return_false;
@ -2936,6 +2963,7 @@ Compressor.prototype.compress = function(node) {
if (matches < remaining) {
remaining = matches;
assign_pos = 0;
verify_ref = true;
}
}
if (expr.operator == "=") mangleable_var(expr.right);
@ -3163,47 +3191,42 @@ Compressor.prototype.compress = function(node) {
return;
}
var end = hit_stack.length - 1;
if (hit_stack[end - 1].body === hit_stack[end]) end--;
var last = hit_stack[end];
if (last instanceof AST_VarDef || hit_stack[end - 1].body === last) end--;
var tt = new TreeTransformer(function(node, descend, in_list) {
if (hit) return node;
if (node !== hit_stack[hit_index]) return node;
hit_index++;
if (hit_index <= end) return handle_custom_scan_order(node, tt);
hit = true;
if (node instanceof AST_VarDef) {
declare_only.set(node.name.name, (declare_only.get(node.name.name) || 0) + 1);
if (node instanceof AST_Definitions) {
declare_only.set(last.name.name, (declare_only.get(last.name.name) || 0) + 1);
if (value_def) value_def.replaced++;
node = node.clone();
node.value = null;
return value ? List.splice([ value, node ]) : node;
var defns = node.definitions;
var index = defns.indexOf(last);
var defn = last.clone();
defn.value = null;
if (!value) {
node.definitions[index] = defn;
return node;
}
var body = [ make_node(AST_SimpleStatement, value, { body: value }) ];
if (index > 0) {
var head = node.clone();
head.definitions = defns.slice(0, index);
body.unshift(head);
node = node.clone();
node.definitions = defns.slice(index);
}
body.push(node);
node.definitions[0] = defn;
return in_list ? List.splice(body) : make_node(AST_BlockStatement, node, { body: body });
}
if (!value) return in_list ? List.skip : null;
return is_statement(node) ? make_node(AST_SimpleStatement, value, { body: value }) : value;
}, function(node, in_list) {
if (node instanceof AST_Definitions) {
var body = [], defns = node.definitions;
for (var index = 0, pos = 0; index < defns.length; index++) {
var defn = defns[index];
if (defn instanceof AST_VarDef) continue;
flush();
pos = index + 1;
body.push(make_node(AST_SimpleStatement, defn, { body: defn }));
}
if (pos == 0) return;
flush();
if (body.length == 1) return body[0];
return in_list ? List.splice(body) : make_node(AST_BlockStatement, node, { body: body });
}
if (node instanceof AST_For) return patch_for_init(node, in_list);
return patch_sequence(node, this);
function flush() {
if (pos < index) {
var cropped = node.clone();
cropped.definitions = defns.slice(pos, index);
body.push(cropped);
}
}
return patch_sequence(node, tt);
});
abort = false;
hit = false;
@ -3249,9 +3272,13 @@ Compressor.prototype.compress = function(node) {
}
var def = lhs.definition();
if (def.references.length - def.replaced == referenced) return true;
return def.fixed && lhs.fixed && def.references.filter(function(ref) {
if (!def.fixed) return false;
if (!lhs.fixed) return false;
if (def.references.filter(function(ref) {
return ref.fixed === lhs.fixed;
}).length == referenced;
}).length != referenced) return false;
verify_ref = true;
return true;
}
function symbol_in_lvalues(sym, parent) {
@ -3269,7 +3296,7 @@ Compressor.prototype.compress = function(node) {
if (def.scope.resolve() !== scope) return true;
if (modify_toplevel && compressor.exposed(def)) return true;
return !all(def.references, function(ref) {
return ref.scope.resolve() === scope;
return ref.scope.resolve(true) === scope;
});
}
@ -4767,6 +4794,7 @@ Compressor.prototype.compress = function(node) {
});
var scan_modified = new TreeWalker(function(node) {
if (node instanceof AST_Assign) modified(node.left);
if (node instanceof AST_ForEnumeration) modified(node.init);
if (node instanceof AST_Unary && UNARY_POSTFIX[node.operator]) modified(node.expression);
});
function modified(node) {
@ -5425,7 +5453,6 @@ Compressor.prototype.compress = function(node) {
return !(prop instanceof AST_ObjectGetter || prop instanceof AST_Spread);
});
});
def(AST_ObjectIdentity, return_true);
def(AST_Sequence, function() {
return this.tail_node().safe_to_spread();
});
@ -6847,7 +6874,14 @@ Compressor.prototype.compress = function(node) {
});
}
}
if (node instanceof AST_Call) calls_to_drop_args.push(node);
if (node instanceof AST_Call) {
calls_to_drop_args.push(node);
node.args = node.args.map(function(arg) {
return arg.transform(tt);
});
node.expression = node.expression.transform(tt);
return node;
}
if (scope !== self) return;
if (drop_funcs && node !== self && node instanceof AST_DefClass) {
var def = node.name.definition();
@ -7114,6 +7148,7 @@ Compressor.prototype.compress = function(node) {
if (def.orig.length > 1) return null;
if (def.assignments > 0) return false;
if (def.name == name) return def;
if (compressor.option("keep_fnames")) return false;
var forbidden;
switch (name) {
case "await":
@ -7818,7 +7853,7 @@ Compressor.prototype.compress = function(node) {
var consts = new Dictionary();
var dirs = [];
var hoisted = [];
var vars = new Dictionary(), vars_found = 0;
var vars = new Dictionary();
var tt = new TreeTransformer(function(node, descend, in_list) {
if (node === self) return;
if (node instanceof AST_Directive) {
@ -7846,7 +7881,6 @@ Compressor.prototype.compress = function(node) {
})) return node;
node.definitions.forEach(function(defn) {
vars.set(defn.name.name, defn);
++vars_found;
});
var seq = node.to_assignments();
if (p instanceof AST_ForEnumeration && p.init === node) {
@ -7865,7 +7899,7 @@ Compressor.prototype.compress = function(node) {
}
});
self.transform(tt);
if (vars_found > 0) {
if (vars.size() > 0) {
// collect only vars which don't show up in self's arguments list
var defns = [];
if (self instanceof AST_Lambda) self.each_argname(function(argname) {
@ -9633,8 +9667,16 @@ Compressor.prototype.compress = function(node) {
fixed.escaped = def.escaped;
name.fixed = fixed;
def.references.forEach(function(ref) {
var assigns = ref.fixed && ref.fixed.assigns;
if (assigns && assigns[0] === defn) assigns[0] = assign;
if (!ref.fixed) return;
var assigns = ref.fixed.assigns;
if (!assigns) return;
if (assigns[0] !== defn) return;
if (assigns.length > 1 || ref.fixed.to_binary || ref.fixed.to_prefix) {
assigns[0] = assign;
} else {
ref.fixed = fixed;
if (def.fixed === ref.fixed) def.fixed = fixed;
}
});
def.references.push(name);
}
@ -12901,43 +12943,44 @@ Compressor.prototype.compress = function(node) {
AST_PropAccess.DEFMETHOD("flatten_object", function(key, compressor) {
if (!compressor.option("properties")) return;
if (key === "__proto__") return;
var expr = this.expression;
if (expr instanceof AST_Object) {
var props = expr.properties;
for (var i = props.length; --i >= 0;) {
var prop = props[i];
if (prop.key !== key) continue;
if (!all(props, can_hoist_property)) return;
if (!safe_to_flatten(prop.value, compressor)) return;
var scope, values = [];
for (var j = 0; j < props.length; j++) {
var value = props[j].value;
if (props[j] instanceof AST_ObjectMethod) {
var arrow = !(value.uses_arguments || is_generator(value) || value.contains_this());
if (arrow) {
if (!scope) scope = compressor.find_parent(AST_Scope);
var avoid = avoid_await_yield(scope);
value.each_argname(function(argname) {
if (avoid[argname.name]) arrow = false;
});
}
var ctor;
if (arrow) {
ctor = is_async(value) ? AST_AsyncArrow : AST_Arrow;
} else if (i === j && !(compressor.parent() instanceof AST_Call)) {
return;
} else {
ctor = value.CTOR;
}
value = make_node(ctor, value, value);
var self = this;
var expr = self.expression;
if (!(expr instanceof AST_Object)) return;
var props = expr.properties;
for (var i = props.length; --i >= 0;) {
var prop = props[i];
if (prop.key !== key) continue;
if (!all(props, can_hoist_property)) return;
if (!safe_to_flatten(prop.value, compressor)) return;
var call, scope, values = [];
for (var j = 0; j < props.length; j++) {
var value = props[j].value;
if (props[j] instanceof AST_ObjectMethod) {
var arrow = !(value.uses_arguments || is_generator(value) || value.contains_this());
if (arrow) {
if (!scope) scope = compressor.find_parent(AST_Scope);
var avoid = avoid_await_yield(scope);
value.each_argname(function(argname) {
if (avoid[argname.name]) arrow = false;
});
}
values.push(value);
var ctor;
if (arrow) {
ctor = is_async(value) ? AST_AsyncArrow : AST_Arrow;
} else if (i != j
|| (call = compressor.parent()) instanceof AST_Call && call.expression === self) {
ctor = value.CTOR;
} else {
return;
}
value = make_node(ctor, value, value);
}
return make_node(AST_Sub, this, {
expression: make_node(AST_Array, expr, { elements: values }),
property: make_node(AST_Number, this, { value: i }),
});
values.push(value);
}
return make_node(AST_Sub, self, {
expression: make_node(AST_Array, expr, { elements: values }),
property: make_node(AST_Number, self, { value: i }),
});
}
});
@ -13134,6 +13177,19 @@ Compressor.prototype.compress = function(node) {
return found;
}
function insert_assign(def, assign) {
var visited = [];
def.references.forEach(function(ref) {
var fixed = ref.fixed;
if (!fixed || !push_uniq(visited, fixed)) return;
if (fixed.assigns) {
fixed.assigns.unshift(assign);
} else {
fixed.assigns = [ assign ];
}
});
}
function init_ref(compressor, name) {
var sym = make_node(AST_SymbolRef, name, name);
var assign = make_node(AST_Assign, name, {
@ -13147,16 +13203,7 @@ Compressor.prototype.compress = function(node) {
return assign.right;
};
sym.fixed.assigns = [ assign ];
var visited = [];
def.references.forEach(function(ref) {
var fixed = ref.fixed;
if (!fixed || !push_uniq(visited, fixed)) return;
if (fixed.assigns) {
fixed.assigns.unshift(assign);
} else {
fixed.assigns = [ assign ];
}
});
insert_assign(def, assign);
}
def.assignments++;
def.references.push(sym);
@ -13260,6 +13307,7 @@ Compressor.prototype.compress = function(node) {
if (fn.body[0] instanceof AST_Directive) return;
if (fn.contains_this()) return;
if (!scope) scope = find_scope(compressor);
if (in_async_generator(scope)) return;
var defined = new Dictionary();
defined.set("NaN", true);
while (!(scope instanceof AST_Scope)) {
@ -13364,12 +13412,12 @@ Compressor.prototype.compress = function(node) {
if (value) body.push(make_node(AST_SimpleStatement, call, { body: value }));
return;
}
body.push(make_node(AST_Var, call, {
definitions: [ make_node(AST_VarDef, call, {
name: argname.convert_symbol(AST_SymbolVar, process),
value: value || make_node(AST_Undefined, call).transform(compressor),
}) ],
}));
var defn = make_node(AST_VarDef, call, {
name: argname.convert_symbol(AST_SymbolVar, process),
value: value || make_node(AST_Undefined, call).transform(compressor),
});
if (argname instanceof AST_SymbolFunarg) insert_assign(argname.definition(), defn);
body.push(make_node(AST_Var, call, { definitions: [ defn ] }));
});
if (values.length) body.push(make_node(AST_SimpleStatement, call, {
body: make_sequence(call, values),
@ -13500,6 +13548,12 @@ Compressor.prototype.compress = function(node) {
def(AST_LabeledStatement, function(compressor, scope, no_return, in_loop) {
var body = this.body.try_inline(compressor, scope, no_return, in_loop);
if (!body) return;
if (this.body instanceof AST_IterationStatement && body instanceof AST_BlockStatement) {
var loop = body.body.pop();
this.body = loop;
body.body.push(this);
return body;
}
this.body = body;
return this;
});

18
node_modules/uglify-js/lib/minify.js generated vendored
View file

@ -96,15 +96,14 @@ function minify(files, options) {
}, true);
if (options.validate) AST_Node.enable_validation();
var timings = options.timings && { start: Date.now() };
if (options.rename === undefined) options.rename = options.compress && options.mangle;
if (options.annotations !== undefined) set_shorthand("annotations", options, [ "compress", "output" ]);
if (options.ie8) options.ie = options.ie || options.ie8;
if (options.ie) set_shorthand("ie", options, [ "compress", "mangle", "output" ]);
if (options.keep_fargs) set_shorthand("keep_fargs", options, [ "compress", "mangle" ]);
if (options.keep_fnames) set_shorthand("keep_fnames", options, [ "compress", "mangle" ]);
if (options.toplevel) set_shorthand("toplevel", options, [ "compress", "mangle" ]);
if (options.v8) set_shorthand("v8", options, [ "mangle", "output" ]);
if (options.webkit) set_shorthand("webkit", options, [ "compress", "mangle", "output" ]);
if (options.ie) set_shorthand("ie", options, [ "compress", "mangle", "output", "rename" ]);
if (options.keep_fargs) set_shorthand("keep_fargs", options, [ "compress", "mangle", "rename" ]);
if (options.keep_fnames) set_shorthand("keep_fnames", options, [ "compress", "mangle", "rename" ]);
if (options.toplevel) set_shorthand("toplevel", options, [ "compress", "mangle", "rename" ]);
if (options.v8) set_shorthand("v8", options, [ "mangle", "output", "rename" ]);
if (options.webkit) set_shorthand("webkit", options, [ "compress", "mangle", "output", "rename" ]);
var quoted_props;
if (options.mangle) {
options.mangle = defaults(options.mangle, {
@ -135,6 +134,7 @@ function minify(files, options) {
init_cache(options.mangle.cache);
init_cache(options.mangle.properties.cache);
}
if (options.rename === undefined) options.rename = options.compress && options.mangle;
if (options.sourceMap) {
options.sourceMap = defaults(options.sourceMap, {
content: null,
@ -190,8 +190,8 @@ function minify(files, options) {
if (options.validate) toplevel.validate_ast();
if (timings) timings.rename = Date.now();
if (options.rename) {
toplevel.figure_out_scope(options.mangle);
toplevel.expand_names(options.mangle);
toplevel.figure_out_scope(options.rename);
toplevel.expand_names(options.rename);
}
if (timings) timings.compress = Date.now();
if (options.compress) {

View file

@ -1194,10 +1194,10 @@ function parse($TEXT, options) {
}
function for_() {
var await = is("name", "await") && next();
var await_token = is("name", "await") && next();
expect("(");
var init = null;
if (await || !is("punc", ";")) {
if (await_token || !is("punc", ";")) {
init = is("keyword", "const")
? (next(), const_(true))
: is("name", "let") && is_vardefs()
@ -1206,7 +1206,7 @@ function parse($TEXT, options) {
? (next(), var_(true))
: expression(true);
var ctor;
if (await) {
if (await_token) {
expect_token("name", "of");
ctor = AST_ForAwaitOf;
} else if (is("operator", "in")) {

View file

@ -3,7 +3,7 @@
"description": "JavaScript parser, mangler/compressor and beautifier toolkit",
"author": "Mihai Bazon <mihai.bazon@gmail.com> (http://lisperator.net/)",
"license": "BSD-2-Clause",
"version": "3.15.3",
"version": "3.15.4",
"engines": {
"node": ">=0.8.0"
},

View file

@ -417,7 +417,7 @@ a.ui.label {
}
.ui[class*="right ribbon"].label:after {
left: auto;
right: 0;
right: -1px;
border-style: solid;
border-width: 1.2em 1.2em 0 0;
border-color: transparent;

File diff suppressed because one or more lines are too long

View file

@ -26796,7 +26796,7 @@ a.ui.label {
.ui[class*="right ribbon"].label:after {
left: auto;
right: 0;
right: -1px;
border-style: solid;
border-width: 1.2em 1.2em 0 0;
border-color: transparent;

File diff suppressed because one or more lines are too long

View file

@ -455,7 +455,7 @@ a.ui.label {
}
.ui[class*="right ribbon"].label:after {
left: auto;
right: 0;
right: -1px;
border-style: solid;
border-width: @ribbonTriangleSize @ribbonTriangleSize 0 0;

View file

@ -90,9 +90,15 @@ switch ($_SERVER['REQUEST_METHOD']) {
/**
* Update Wish Status
*/
$status = $_PUT['wish_status'];
if (Wish::STATUS_TEMPORARY === $status) {
$status = time();
}
$database->query('UPDATE `wishes`
SET `status` = "' . $_PUT['wish_status'] . '"
WHERE `id` = ' . $_PUT['wish_id'] . '
SET `status` = "' . $status . '"
WHERE `id` = ' . $_PUT['wish_id'] . '
;');
$response['success'] = true;

View file

@ -60,7 +60,7 @@ switch ($_SERVER['REQUEST_METHOD']) {
}
$options = array(
'WHERE' => implode(' AND ', $where),
'WHERE' => '(' . implode(') AND (', $where) . ')',
);
$response['results'] = $wishlist->getCards($options);

View file

@ -40,103 +40,126 @@ img {
/**
* Card
*/
.ui.fluid.card.stretch {
height: 100%;
.ui.card {
--padding: 0.91666667em;
--buttonsHeight: calc(0.75em * 2 + 1em + 2 * var(--padding) - 2px);
}
/** Overlay */
@media (hover: hover) {
.ui.card:hover {
z-index: 102;
}
.ui.card .overlay {
transition: 0.4s ease opacity;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
opacity: 0;
border-radius: 0.33333333rem;
background-color: rgba(255, 255, 255, 0.6);
background-image: linear-gradient(180deg, #fff, transparent 6em);
}
.ui.card:hover .overlay {
opacity: 1;
}
.ui.fluid.card.stretch {
height: 100%;
}
/** Image */
.ui.card > .image > img.preview {
height: var(--wishPreviewHeight);
object-fit: cover;
object-position: 50%;
background-color: #fff;
}
@media (hover: hover) {
@media (prefers-reduced-motion: no-preference) {
.ui.card > .image > img.preview {
transition: height 0.2s linear, opacity 0.2s linear;
}
}
.ui.card:hover > .image > img.preview {
height: calc(1em + 3 * var(--padding));
}
.ui.card:hover > .image > img.preview[src="/src/assets/img/no-image.svg"] {
object-fit: contain;
background-color: #f9f9f9;
}
}
/** Provider */
.ui.card > .image,
.ui.card > .image > span.provider {
border-radius: .33333333rem .33333333rem 0 0;
}
.ui.card > .image > img.favicon,
.ui.card > .image > span.provider {
position: absolute;
top: 0;
}
/** Favicon */
.ui.card > .image > img.favicon {
position: absolute;
top: calc(0.91666667em * 1.25);
left: 1em;
padding: calc(var(--padding) * 1.5) var(--padding);
height: 1.25em;
width: auto;
z-index: 2;
box-sizing: content-box;
z-index: 1;
}
.ui.card > .image > img.favicon + span.provider {
padding-left: 3em;
}
@media (hover: hover) {
.ui.card > .image > img.favicon + span.provider {
z-index: 2;
}
}
/** Provider name */
.ui.card > .image > span.provider {
transition: 0.4s ease opacity;
position: absolute;
top: 0;
right: 0;
left: 0;
padding: calc(0.91666667em * 1.5) 0.91666667em;
display: block;
width: 100%;
padding: calc(var(--padding) * 1.5) var(--padding);
line-height: 1;
user-select: none;
opacity: 0;
background-color: rgba(255, 255, 255, 0.6);
box-shadow: 0 0 4px rgba(200, 200, 200, 0.4);
backdrop-filter: blur(4px);
}
.ui.card:hover > .image > span.provider {
opacity: 1;
@supports (backdrop-filter: blur(4px)) {
.ui.card > .image > span.provider {
background-color: rgba(255, 255, 255, 0.2);
backdrop-filter: blur(4px);
}
}
@media (hover: hover) {
.ui.card > .image > span.provider {
transition: background-color 0.2s ease;
position: absolute;
}
.ui.card:hover > .image > span.provider {
animation: positionDelay 0.8s linear;
display: block;
}
}
/** Content */
.ui.card > .content:not(.extra) {
height: calc(0.75 * var(--wishPreviewHeight));
overflow: auto;
}
@media (hover: hover) {
@media (prefers-reduced-motion: no-preference) {
.ui.card > .content:not(.extra) {
transition: height 0.2s linear,
margin-bottom 0.2s linear;
}
}
.ui.card > .content:not(.extra) {
overflow: hidden;
}
.ui.card:hover > .content:not(.extra) {
height: calc(1.5 * var(--wishPreviewHeight) - var(--buttonsHeight) - 4px);
margin-bottom: var(--buttonsHeight);
overflow: auto;
}
}
.ui.card > .content > .header {
max-height: calc(2 * 1.28571429em);
overflow: hidden;
}
.ui.card > .content > .description {
max-height: calc(6em * var(--lineHeight));
overflow: hidden;
}
@media (hover: hover) {
.ui.card > .content:not(.extra) {
margin-bottom: calc(3em * var(--lineHeight));
}
.ui.card > .content > .description {
position: absolute;
left: 1em;
right: 1em;
}
}
.ui.card > .content > .description-fade {
position: absolute;
@ -151,8 +174,7 @@ img {
}
/** Buttons */
.ui.card > .extra.buttons,
.ui.cards > .card > .extra.buttons {
.ui.card > .extra.buttons {
transition: 0.4s ease opacity;
display: flex;
@ -161,22 +183,39 @@ img {
z-index: 2;
}
@media (hover: hover) {
.ui.card > .extra.buttons,
.ui.cards > .card > .extra.buttons {
.ui.card > .extra.buttons {
transition: opacity 0.2s ease;
position: absolute;
top: unset;
right: 0;
bottom: calc(var(--buttonsHeight) / 2);
left: 0;
height: auto;
opacity: 0;
margin-bottom: 0;
}
@media (prefers-reduced-motion: no-preference) {
.ui.card > .extra.buttons {
transition: opacity 0.2s ease,
bottom 0.2s ease;
}
}
.ui.card:hover > .extra.buttons,
.ui.cards > .card:hover > .extra.buttons {
.ui.card:hover > .extra.buttons {
opacity: 1;
bottom: 0;
}
}
.ui.card > .extra.buttons > .button,
.ui.cards > .card > .extra.buttons > .button {
.ui.card > .extra.buttons > .button {
flex: 1 1 auto;
}
.ui.card > .extra.buttons > :last-child {
margin-right: 0;
}
/**
* Label

View file

@ -49,19 +49,25 @@ $(function() {
}
}
$.fn.api.settings.onFailure = function(response, element, xhr) {
var content = '';
if ('string' === typeof response) {
response = response.replace('<br />', '');
content = response.replace('<br />', '');
}
if ('' === response.warning) {
content = text.modal_failure_content;
}
$('body')
.modal({
title : text.modal_failure_title,
content : response,
content : content,
class : '',
actions : [
{
text : text.modal_failure_approve,
class: 'primary'
text : text.modal_failure_approve,
class : 'primary'
}
],
autoShow: true
@ -185,6 +191,9 @@ $(function() {
weekNo : text.calendar_week_no,
};
/** Dimmer */
$.fn.dimmer.settings.closable = false;
/**
* Menu
*/

View file

@ -3,6 +3,6 @@ $(function () {
/**
* Priority
*/
$('.dropdown.priority').dropdown();
$('.modal .wishlist-wish-add .dropdown.priority').dropdown();
});

View file

@ -40,39 +40,39 @@ $(function() {
var card = button.closest('.ui.card');
var column = card.closest('.column');
$('body')
.modal({
title : text.modal_wish_fulfil_title,
content : text.modal_wish_fulfil,
class : 'tiny',
actions : [
{
text : text.modal_wish_fulfil_approve,
class: 'approve primary'
},
{
text : text.modal_wish_fulfil_deny,
class: ''
}
],
autoShow : true,
onApprove: function() {
/**
* Update wish status
*/
button.api({
action : 'update wish status',
method : 'PUT',
data : {
wish_id : card.attr('data-id'),
wish_status : 'unavailable'
},
on : 'now',
onSuccess : function(response, element, xhr) {
column.fadeOut();
},
});
}
/**
* Update wish status
*/
button.api({
action : 'update wish status',
method : 'PUT',
data : {
wish_id : card.attr('data-id'),
wish_status : wish_status_temporary,
},
on : 'now',
onSuccess : function(response, element, xhr) {
card.dimmer('show');
},
});
});
/** Confirm */
$(document).on('click', '.card .button.confirm', function() {
var button = $(this);
var card = button.closest('.card');
button.api({
action : 'update wish status',
method : 'PUT',
data : {
wish_id : card.attr('data-id'),
wish_status : wish_status_unavailable,
},
on : 'now',
onSuccess : function(response, element, xhr) {
card.closest('.column').fadeOut();
},
});
});
@ -88,4 +88,5 @@ $(function() {
$(this).removeClass('disabled loading');
}, 400);
});
});

View file

@ -374,8 +374,8 @@ $(function () {
var formData = new URLSearchParams(new FormData(form[0]));
fetch('/src/api/wishes.php', {
method: 'POST',
body: formData
method : 'POST',
body : formData
})
.then(handleFetchError)
.then(handleFetchResponse)
@ -384,8 +384,9 @@ $(function () {
wishlistsRefresh();
form.trigger('reset');
form.find('.dropdown').dropdown('restore defaults');
modalWishlistWishAdd.modal('hide');
buttonAdd.removeClass('loading');
})
.catch(handleFetchCatch);

View file

@ -6,7 +6,7 @@
namespace wishthis;
use wishthis\{User, URL};
use wishthis\{User, URL, Wish};
enum Navigation: int
{
@ -129,8 +129,8 @@ class Page
);
if (
!isset($_SESSION['user'])
&& isset($_GET['page'])
&& !in_array($_GET['page'], $ignorePower)
&& isset($_SESSION['_GET']['page'])
&& !in_array($_SESSION['_GET']['page'], $ignorePower)
) {
redirect('/?page=login');
}
@ -163,8 +163,8 @@ class Page
/**
* Redirect
*/
if ($options && $options->getOption('isInstalled') && isset($_SERVER['QUERY_STRING'])) {
$url = new URL($_SERVER['QUERY_STRING']);
if ($options && $options->getOption('isInstalled') && isset($_SESSION['_GET'])) {
$url = new URL(http_build_query($_SESSION['_GET']));
$redirect_to = $url->getPretty();
if ($redirect_to) {
@ -306,13 +306,16 @@ class Page
*/
?>
<script type="text/javascript">
var locale = '<?= str_replace('_', '-', $this->language) ?>';
var $_GET = JSON.parse('<?= isset($_GET) ? json_encode($_GET) : array() ?>');
var text = {
var locale = '<?= str_replace('_', '-', $this->language) ?>';
var $_GET = JSON.parse('<?= isset($_SESSION['_GET']) ? json_encode($_SESSION['_GET']) : json_encode(array()) ?>');
var wish_status_temporary = '<?= Wish::STATUS_TEMPORARY ?>';
var wish_status_unavailable = '<?= Wish::STATUS_UNAVAILABLE ?>';
var text = {
wishlist_no_selection : '<?= __('No wishlist selected.') ?>',
modal_error_title : '<?= __('Error') ?>',
modal_failure_title : '<?= __('Failure') ?>',
modal_failure_content : '<?= __('The server did not confirm that the action was successful.') ?>',
modal_failure_approve : '<?= __('Thanks for nothing') ?>',
modal_warning_approve : '<?= __('Understood') ?>',
modal_success_title : '<?= __('Success') ?>',
@ -324,10 +327,6 @@ class Page
modal_wishlist_delete_approve : '<?= __('Yes, delete') ?>',
modal_wishlist_delete_deny : '<?= __('No, keep') ?>',
modal_wish_fulfil_title : '<?= __('Fulfil wish') ?>',
modal_wish_fulfil : '<?= __('Would you really like to fulfil this wish? It will no longer appear in the wishlist for others anymore.') ?>',
modal_wish_fulfil_approve : '<?= __('Yes, fulfil wish') ?>',
modal_wish_fulfil_deny : '<?= __('Cancel') ?>',
modal_wish_delete_title : '<?= __('Really delete?') ?>',
modal_wish_delete : '<?= __('Would you really like to delete to this wish? It will be gone forever.') ?>',
modal_wish_delete_approve : '<?= __('Yes, delete') ?>',
@ -626,7 +625,7 @@ class Page
</div>
</div>
<div class="ui attached large stackable menu toggle">
<div class="ui attached stackable menu toggle">
<div class="ui container">
<a class="item">
<i class="hamburger icon"></i>

View file

@ -14,11 +14,53 @@ class URL
{
}
public function isPretty(): bool
{
return !preg_match('/^\/\?.+?=.+?$/', $this->url);
}
public function getPermalink(): string
{
$htaccess = preg_split('/\r\n|\r|\n/', file_get_contents(ROOT . '/.htaccess'));
$permalink = '';
foreach ($htaccess as $index => $line) {
$parts = explode(chr(32), trim($line));
if (count($parts) >= 2) {
switch ($parts[0]) {
case 'RewriteRule':
$rewriteRule = $parts[1];
$target = $parts[2];
$regex = str_replace('/', '\/', $rewriteRule);
if (preg_match('/' . $regex . '/', ltrim($this->url, '/'), $matches)) {
$permalink = $target;
preg_match_all('/\$\d+/', $target, $placeholders);
$placeholders = reset($placeholders);
foreach ($placeholders as $index => $placeholder) {
$permalink = str_replace($placeholder, $matches[$index + 1], $permalink);
}
}
break;
}
}
}
return $permalink;
}
public function getPretty(): string
{
$htaccess = preg_split('/\r\n|\r|\n/', file_get_contents(ROOT . '/.htaccess'));
$pretty_url = '';
if (!$this->url) {
return '';
}
foreach ($htaccess as $index => $line) {
$parts = explode(chr(32), trim($line));
@ -36,17 +78,7 @@ class URL
explode('&', parse_url($target, PHP_URL_QUERY))
);
$flags = explode(',', substr($parts[3], 1, -1)) ?? array();
$parameters_pairs = explode('&', parse_url($this->url, PHP_URL_PATH));
$parameters = array();
foreach ($parameters_pairs as $index => $pair) {
$parts = explode('=', $pair);
$key = reset($parts);
$value = end($parts);
$parameters[$key] = $value;
}
$parameters = query_to_key_value_pair($this->url);
preg_match_all('/\(.+?\)/', $rewriteRule, $regexes);

View file

@ -13,6 +13,10 @@ class Wish
/**
* Static
*/
public const STATUS_TEMPORARY = 'temporary';
public const STATUS_TEMPORARY_MINUTES = 30;
public const STATUS_UNAVAILABLE = 'unavailable';
public static array $priorities;
public static function initialize()
@ -111,7 +115,29 @@ class Wish
}
?>
<div class="ui fluid card stretch" data-id="<?= $this->id ?>" data-cache="<?= $generateCache ?>">
<div class="ui blurring dimmable fluid card stretch"
data-id="<?= $this->id ?>"
data-cache="<?= $generateCache ?>"
>
<div class="ui inverted dimmer">
<div class="content">
<div class="center">
<div class="ui icon header">
<i class="history icon"></i>
<div class="content">
<?= __('Wish temporarily fulfilled') ?>
<div class="sub header"><?= sprintf(__('If this wish is a product, confirm the order was successful and mark it as fulfilled here. If you do not confirm this wish as fulfilled, it will become available again to others after %d minutes.'), self::STATUS_TEMPORARY_MINUTES) ?></div>
</div>
</div>
<button class="ui positive labeled icon button confirm">
<i class="check double icon"></i>
<?= __('Confirm') ?>
</button>
</div>
</div>
</div>
<div class="image">
<?php if ($this->priority && isset(Wish::$priorities[$this->priority])) { ?>
<div class="ui small <?= Wish::$priorities[$this->priority]['color'] ?> right ribbon label">
@ -127,13 +153,11 @@ class Wish
<img class="favicon" src="<?= $this->info->favicon ?>" loading="lazy" />
<?php } ?>
<?php if (isset($this->info->providerName)) { ?>
<?php if (isset($this->info->providerName) && $this->info->providerName) { ?>
<span class="provider"><?= $this->info->providerName ?></span>
<?php } ?>
</div>
<div class="overlay"></div>
<div class="content">
<?php if ($this->title) { ?>
<div class="header">

View file

@ -0,0 +1,27 @@
<?php
/**
* @author Jay Trees <github.jay@grandel.anonaddy.me>
*/
/**
* Query string to key value pair
*
* @return array
*/
function query_to_key_value_pair(string $query): array
{
$query = str_contains($query, '?') ? parse_url($query, PHP_URL_QUERY) : $query;
$parameters_pairs = explode('&', $query);
$parameters = array();
foreach ($parameters_pairs as $index => $pair) {
$parts = explode('=', $pair);
$key = reset($parts);
$value = end($parts);
$parameters[$key] = $value;
}
return $parameters;
}

View file

@ -10,11 +10,27 @@ function redirect(string $target)
{
global $user;
$isDevEnvironment = defined('ENV_IS_DEV') && true === ENV_IS_DEV;
/**
* Redirect user based on channel setting
*/
$isHostInChannel = false;
/** Determine if host is a defined channel */
foreach (CHANNELS as $channel) {
if ($channel['host'] === $_SERVER['HTTP_HOST']) {
$isHostInChannel = true;
break;
}
}
/** Determine channel to redirect to */
if (
defined('CHANNELS')
&& is_array(CHANNELS)
&& isset($user->channel)
&& '127.0.0.1' !== $_SERVER['REMOTE_ADDR']
&& !$isDevEnvironment
) {
$host = null;
@ -22,6 +38,7 @@ function redirect(string $target)
if (
$channel['branch'] === $user->channel
&& $channel['host'] !== $_SERVER['HTTP_HOST']
&& $isHostInChannel
) {
$host = $channel['host'];
break;

View file

@ -111,6 +111,12 @@ $page->navigation();
</div>
</div>
</div>
<div class="ui segment">
<h2 class="ui header"><?= __("What's new") ?></h2>
<p><?= sprintf(__('Check out the %s for a list changes'), '<a href="/CHANGELOG.md">' . __('Changelog') . '</a>') ?></p>
</div>
</div>
</div>
</div>

View file

@ -14,7 +14,7 @@ $scriptPart = '/src/assets/js/parts/wishlist-filter.js';
<div class="ui stackable grid">
<div class="column">
<div class="ui small labeled icon basic white button floating dropdown filter priority">
<div class="ui labeled icon basic white button floating dropdown filter priority">
<input type="hidden" name="filters" />
<i class="filter icon"></i>

View file

@ -20,7 +20,7 @@ $page->navigation();
<div class="ui segment">
<h2 class="ui header"><?= __('Restricted access') ?></h2>
<p><?= sprintf(__('You do not have enough power to view this page. You need %s to see this page, but only have %s.'), '<strong>' . $_GET['required'] . '</strong>', '<strong>' . $user->power . '</strong>') ?></p>
<p><?= sprintf(__('You do not have enough power to view this page. You need %s to see this page, but only have %s.'), '<strong>' . $_SESSION['_GET']['required'] . '</strong>', '<strong>' . $user->power . '</strong>') ?></p>
</div>
</div>
</main>

View file

@ -38,11 +38,6 @@ if (isset($_POST['user-id'], $_POST['section'])) {
'key' => 'user-locale',
'label' => __('Language'),
),
array(
'column' => 'channel',
'key' => 'user-channel',
'label' => __('Channel'),
),
);
$loginRequired = false;
@ -66,6 +61,9 @@ if (isset($_POST['user-id'], $_POST['section'])) {
$loginRequired = true;
}
/**
* Personal
*/
if (isset($_POST['user-birthdate'])) {
if (empty($_POST['user-birthdate'])) {
$user->birthdate = null;
@ -78,6 +76,9 @@ if (isset($_POST['user-id'], $_POST['section'])) {
}
}
/**
* Password
*/
if (
!empty($_POST['user-password'])
&& !empty($_POST['user-password-repeat'])
@ -88,6 +89,21 @@ if (isset($_POST['user-id'], $_POST['section'])) {
$loginRequired = true;
}
/**
* Preferences
*/
if (isset($_POST['user-channel']) && $_POST['user-channel'] !== $user->channel) {
if (empty($_POST['user-channel'])) {
$user->channel = null;
$set[] = '`channel` = NULL';
} else {
$user->channel = $_POST['user-channel'];
$set[] = '`channel` = "' . $user->channel . '"';
}
}
if ($set) {
$database
->query('UPDATE `users`
@ -318,36 +334,49 @@ $page->navigation();
</div>
<?php
$count_users = $database
$user_is_active = '`last_login` >= CURDATE() - INTERVAL 30 DAY';
$count_users = $database
->query('SELECT COUNT(`id`)
FROM `users`;')
FROM `users`
WHERE ' . $user_is_active . ';')
->fetch();
$count_users = reset($count_users);
$count_users_5 = max(1, round($count_users * 0.05, 0));
$count_users = reset($count_users);
$count_users_needed_minimum = 1;
$count_users_needed_maximum = 100;
$count_users_needed = min(
$count_users_needed_maximum,
max(
$count_users_needed_minimum,
round($count_users * 0.05, 0)
)
);
$count_users_rc = $database
->query('SELECT COUNT(`id`)
FROM `users`
WHERE `channel` = "release-candidate";')
FROM `users`
WHERE ' . $user_is_active . '
AND `channel` = "release-candidate";')
->fetch();
$count_users_rc = reset($count_users_rc);
?>
<?php if ($count_users_rc < $count_users_5) { ?>
<?php if ($count_users_rc < $count_users_needed) { ?>
<h3 class="ui header"><?= __('Channel') ?></h3>
<div class="ui segment">
<p><?= __('In order to improve the user experience of wishthis, newer versions are published after an extensive testing period.') ?></p>
<p><?= __('Subscribing to the Stable channel ensures you have the highest possible stability while using wishthis, minimizing the amount of errors you may encounter (if any).') ?></p>
<p><?= __('If you want to speed up the release of newer versions, consider subscribing to the Release candidate of wishthis. A newer version is not published unless at least 5% of the wishthis user base have tested the next release candidate.') ?></p>
<p><?= __('If you want to speed up the release of newer versions, consider subscribing to the Release candidate of wishthis. A newer version is not published unless the next release candidate has been sufficiently tested.') ?></p>
<div class="ui primary progress" data-value="<?= $count_users_rc ?>" data-total="<?= $count_users_5 ?>">
<div class="ui primary progress" data-value="<?= $count_users_rc ?>" data-total="<?= $count_users_needed ?>">
<div class="bar">
<div class="progress"></div>
</div>
<div class="label">
<?php
$count_users_needed = $count_users_5 - $count_users_rc;
$count_users_needed = $count_users_needed - $count_users_rc;
printf(
_n(

View file

@ -8,7 +8,7 @@
use wishthis\{Page, User};
$passwordReset = isset($_GET['password-reset'], $_GET['token']);
$passwordReset = isset($_SESSION['_GET']['password-reset'], $_SESSION['_GET']['token']);
$pageTitle = $passwordReset ? __('Reset password') : __('Register');
$buttonSubmit = $passwordReset ? __('Reset') : __('Register');
@ -56,14 +56,14 @@ if (isset($_POST['email'], $_POST['password']) && !empty($_POST['planet'])) {
if ($isHuman) {
$userRegistered = false;
if (isset($_GET['password-reset'], $_GET['token'])) {
if (isset($_SESSION['_GET']['password-reset'], $_SESSION['_GET']['token'])) {
/**
* Password reset
*/
$user = $database
->query('SELECT * FROM `users`
WHERE `email` = "' . $_GET['password-reset'] . '"
AND `password_reset_token` = "' . $_GET['token'] . '";')
WHERE `email` = "' . $_SESSION['_GET']['password-reset'] . '"
AND `password_reset_token` = "' . $_SESSION['_GET']['token'] . '";')
->fetch();
if ($user) {
@ -76,7 +76,7 @@ if (isset($_POST['email'], $_POST['password']) && !empty($_POST['planet'])) {
WHERE `id` = ' . $user['id'] . ';');
$page->messages[] = Page::success(
'Password has been successfully reset for <strong>' . $_GET['password-reset'] . '</strong>.',
'Password has been successfully reset for <strong>' . $_SESSION['_GET']['password-reset'] . '</strong>.',
'Success'
);
} else {
@ -174,12 +174,12 @@ $page->navigation();
<div class="field">
<label><?= __('Email') ?></label>
<div class="ui left icon input<?= isset($_GET['password-reset']) ? ' disabled' : '' ?>">
<?php if (isset($_GET['password-reset'])) { ?>
<div class="ui left icon input<?= isset($_SESSION['_GET']['password-reset']) ? ' disabled' : '' ?>">
<?php if (isset($_SESSION['_GET']['password-reset'])) { ?>
<input type="email"
name="email"
placeholder="john.doe@domain.tld"
value="<?= $_GET['password-reset'] ?>"
value="<?= $_SESSION['_GET']['password-reset'] ?>"
readonly
/>
<?php } else { ?>

View file

@ -10,7 +10,7 @@ use wishthis\{Page, Wish};
$userIsAuthenticated = false;
$wish = new Wish($_GET['id'], false);
$wish = new Wish($_SESSION['_GET']['id'], false);
$page = new Page(__FILE__, $wish->getTitle());
if ('POST' === $_SERVER['REQUEST_METHOD'] && count($_POST) >= 0) {
@ -30,7 +30,7 @@ if ('POST' === $_SERVER['REQUEST_METHOD'] && count($_POST) >= 0) {
`priority` = ' . $wish_priority . '
WHERE `id` = ' . $wish_id . ';');
$wish = new Wish($_GET['id'], false);
$wish = new Wish($_SESSION['_GET']['id'], false);
$page = new Page(__FILE__, $wish->getTitle());
$page->messages[] = Page::success(__('Wish successfully updated.'), __('Success'));
}
@ -79,7 +79,7 @@ $referer = '/?page=wishlists&id=' . $wish->wishlist;
<div class="row">
<div class="sixteen wide column">
<a class="ui small labeled icon button"
<a class="ui labeled icon button"
href="<?= $wish->url ?>"
target="_blank"
title="<?= __('Visit') ?>"
@ -88,7 +88,7 @@ $referer = '/?page=wishlists&id=' . $wish->wishlist;
<?= __('Visit') ?>
</a>
<button class="ui small labeled icon button auto-fill disabled"
<button class="ui labeled icon button auto-fill disabled"
type="button"
title="<?= __('Auto-fill') ?>"
>
@ -102,7 +102,7 @@ $referer = '/?page=wishlists&id=' . $wish->wishlist;
<div class="ui segment">
<form class="ui form wish" method="POST">
<input type="hidden" name="wish_id" value="<?= $_GET['id'] ?>" />
<input type="hidden" name="wish_id" value="<?= $_SESSION['_GET']['id'] ?>" />
<input type="hidden" name="wish_image" value="<?= $wish->image ?>" />
<div class="ui two column grid">
@ -111,17 +111,17 @@ $referer = '/?page=wishlists&id=' . $wish->wishlist;
<div class="stackable row">
<div class="sixteen wide column">
<input class="ui small primary button"
<input class="ui primary button"
type="submit"
value="<?= __('Save') ?>"
title="<?= __('Save') ?>"
/>
<input class="ui small button"
<input class="ui button"
type="reset"
value="<?= __('Reset') ?>"
title="<?= __('Reset') ?>"
/>
<a class="ui small secondary button"
<a class="ui secondary button"
href="<?= $referer ?>"
title="<?= __('Back') ?>"
>

View file

@ -6,9 +6,9 @@
* @author Jay Trees <github.jay@grandel.anonaddy.me>
*/
use wishthis\{Page, User, Wishlist};
use wishthis\{Page, User, Wishlist, Wish};
$wishlist = new Wishlist($_GET['wishlist']);
$wishlist = new Wishlist($_SESSION['_GET']['wishlist']);
$page = new Page(__FILE__, $wishlist->getTitle());
if (!$wishlist->exists) {
@ -54,7 +54,7 @@ $page->navigation();
<div class="ui segment">
<h2 class="ui header"><?= __('What to do?') ?></h2>
<p><?= sprintf(
__('If you found a wish you would like to fulfil, click the %s button and it will become unavailable for others.'),
__('If you found a wish you would like to fulfil, click the %s button and it will temporarily become unavailable for others. Make sure to confirm the fulfilled wish here (i. e. after placing an order), to make the wish permanently unavailable for everybody else.'),
'<span class="ui primary tiny horizontal label"><i class="gift icon"></i> ' . __('Fulfil wish') . '</span>'
) ?></p>
</div>
@ -68,7 +68,13 @@ $page->navigation();
<?php
echo $wishlist->getCards(
array(
'WHERE' => '`wishlist` = ' . $wishlist->id . ' AND (`status` != "unavailable" OR `status` IS NULL)',
'WHERE' => '`wishlist` = ' . $wishlist->id . '
AND (
`status` = ""
OR `status` IS NULL
OR `status` < unix_timestamp(CURRENT_TIMESTAMP - INTERVAL ' . Wish::STATUS_TEMPORARY_MINUTES . ' MINUTE)
)
AND (`status` != "' . Wish::STATUS_UNAVAILABLE . '" OR `status` IS NULL)'
)
);
?>

View file

@ -16,76 +16,70 @@ $page->navigation();
<main>
<div class="ui container">
<h1 class="ui header"><?= $page->title ?></h1>
<p><?= __('Here you can view and edit all of your wishlists.') ?></p>
<h2 class="ui header"><?= __('View') ?></h2>
<div class="ui horizontal stackable segments">
<div class="ui segment">
<p><?= __('Please select a wishlist to view.') ?></p>
<div class="ui form">
<div class="ui segment">
<div class="ui form">
<div class="two fields">
<div class="field">
<label><?= __('Wishlist') ?></label>
<select class="ui fluid search selection dropdown loading wishlists" name="wishlist">
<option value=""><?= __('Loading your wishlists...') ?></option>
</select>
</div>
<div class="flex buttons">
<a class="ui small labeled icon primary button wishlist-wish-add disabled"
title="<?= __('Add a wish') ?>"
>
<i class="add icon"></i>
<?= __('Add a wish') ?>
</a>
<div class="field">
<label><?= __('Options') ?></label>
<a class="ui small labeled icon button wishlist-share disabled"
target="_blank"
title="<?= __('Share') ?>"
>
<i class="share icon"></i>
<?= __('Share') ?>
</a>
<div class="ui small labeled icon top left pointing dropdown button options"
title="<?= __('Options') ?>"
>
<i class="cog icon"></i>
<span class="text"><?= __('Options') ?></span>
<div class="menu">
<div class="item wishlist-rename disabled" title="<?= __('Rename') ?>">
<i class="pen icon"></i>
<?= __('Rename') ?>
</div>
<div class="item wishlist-delete disabled" title="<?= __('Delete') ?>">
<i class="trash icon"></i>
<?= __('Delete') ?>
</div>
</div>
<div class="flex buttons">
<a class="ui labeled icon button wishlist-create"
title="<?= __('Create a wishlist') ?>"
>
<i class="add icon"></i>
<?= __('Create a wishlist') ?>
</a>
</div>
</div>
</div>
</div>
<div class="ui segment">
<p><?= __('General options.') ?></p>
<div class="flex buttons">
<a class="ui small labeled icon button wishlist-create"
title="<?= __('Create a wishlist') ?>"
<a class="ui labeled icon primary button wishlist-wish-add disabled"
title="<?= __('Add a wish') ?>"
>
<i class="add icon"></i>
<?= __('Create a wishlist') ?>
<?= __('Add a wish') ?>
</a>
</div>
</div>
<a class="ui labeled icon button wishlist-share disabled"
target="_blank"
title="<?= __('Share') ?>"
>
<i class="share icon"></i>
<?= __('Share') ?>
</a>
<div class="ui labeled icon top left pointing dropdown button options"
title="<?= __('Options') ?>"
>
<i class="cog icon"></i>
<span class="text"><?= __('Options') ?></span>
<div class="menu">
<div class="item wishlist-rename disabled" title="<?= __('Rename') ?>">
<i class="pen icon"></i>
<?= __('Rename') ?>
</div>
<div class="item wishlist-delete disabled" title="<?= __('Delete') ?>">
<i class="trash icon"></i>
<?= __('Delete') ?>
</div>
</div>
</div>
</div>
</div>
</div>
<h2 class="ui header"><?= __('Wishes') ?></h2>
@ -176,7 +170,7 @@ $page->navigation();
<p><?= __('Fill out any or all of the below fields to add your new wish.') ?></p>
<form class="ui form wishlist-wish-add" method="POST">
<input type="hidden" name="wishlist_id" value="<?= $_GET['id'] ?>" />
<input type="hidden" name="wishlist_id" />
<div class="ui two column grid">
<?php include 'parts/wish-add.php' ?>

View file

@ -2,7 +2,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Jay Trees <github.jay@grandel.anonaddy.me>\n"
"POT-Creation-Date: 2022-04-08 09:11+0200\n"
"POT-Creation-Date: 2022-04-08 16:30+0200\n"
"PO-Revision-Date: 2022-03-22 08:45+0100\n"
"Last-Translator: Jay Trees <github.jay@grandel.anonaddy.me>\n"
"Language-Team: \n"
@ -16,329 +16,333 @@ msgstr ""
"X-Poedit-KeywordsList: __;_n:1,2;_x:1,2c\n"
"X-Poedit-SearchPath-0: .\n"
#: classes/page.php:189
#: classes/page.php:115 pages/home.php:26
msgid "wishthis is a simple, intuitive and modern wishlist platform to create, manage and view your wishes for any kind of occasion."
msgstr ""
#: classes/page.php:191
msgid "This is the development environment of wishthis. The database will reset every day at around 00:00."
msgstr ""
#: classes/page.php:190
#: classes/page.php:192
msgid "Development environment"
msgstr ""
#: classes/page.php:273
#: classes/page.php:312
msgid "No wishlist selected."
msgstr ""
#: classes/page.php:275 classes/page.php:308 pages/login-as.php:40
#: classes/page.php:314 classes/page.php:347 pages/login-as.php:40
msgid "Error"
msgstr ""
#: classes/page.php:276 pages/register.php:83 pages/register.php:86
#: classes/page.php:315 pages/register.php:83 pages/register.php:86
msgid "Failure"
msgstr ""
#: classes/page.php:277
#: classes/page.php:316
msgid "Thanks for nothing"
msgstr ""
#: classes/page.php:278
#: classes/page.php:317
msgid "Understood"
msgstr ""
#: classes/page.php:279 pages/install.php:214 pages/login-as.php:38
#: pages/profile.php:60 pages/profile.php:103 pages/register.php:123
#: classes/page.php:318 pages/install.php:214 pages/login-as.php:38
#: pages/profile.php:55 pages/profile.php:119 pages/register.php:123
#: pages/wish.php:35
msgid "Success"
msgstr ""
#: classes/page.php:281
#: classes/page.php:320
msgid "Close this tab"
msgstr ""
#: classes/page.php:282
#: classes/page.php:321
msgid "Show wishlist anyway"
msgstr ""
#: classes/page.php:283 classes/page.php:292
#: classes/page.php:322 classes/page.php:331
msgid "Really delete?"
msgstr ""
#: classes/page.php:284
#: classes/page.php:323
#, php-format
msgid "Do you really want to delete the wishlist %s?"
msgstr ""
#: classes/page.php:285 classes/page.php:294
#: classes/page.php:324 classes/page.php:333
msgid "Yes, delete"
msgstr ""
#: classes/page.php:286 classes/page.php:295
#: classes/page.php:325 classes/page.php:334
msgid "No, keep"
msgstr ""
#: classes/page.php:288 classes/wish.php:159 classes/wish.php:162
#: classes/page.php:327 classes/wish.php:159 classes/wish.php:162
#: pages/wishlist.php:51
msgid "Fulfil wish"
msgstr ""
#: classes/page.php:289
#: classes/page.php:328
msgid "Would you really like to fulfil this wish? It will no longer appear in the wishlist for others anymore."
msgstr ""
#: classes/page.php:290
#: classes/page.php:329
msgid "Yes, fulfil wish"
msgstr ""
#: classes/page.php:291 pages/wishlists.php:136 pages/wishlists.php:137
#: pages/wishlists.php:163 pages/wishlists.php:164 pages/wishlists.php:205
#: pages/wishlists.php:206
#: classes/page.php:330 pages/wishlists.php:130 pages/wishlists.php:131
#: pages/wishlists.php:157 pages/wishlists.php:158 pages/wishlists.php:185
#: pages/wishlists.php:186
msgid "Cancel"
msgstr ""
#: classes/page.php:293
#: classes/page.php:332
msgid "Would you really like to delete to this wish? It will be gone forever."
msgstr ""
#: classes/page.php:297
#: classes/page.php:336
msgid "Passwords must match."
msgstr ""
#: classes/page.php:299
#: classes/page.php:338
msgid "Wishlist successfully renamed."
msgstr ""
#: classes/page.php:300
#: classes/page.php:339
msgid "Wishlist successfully deleted."
msgstr ""
#: classes/page.php:302
#: classes/page.php:341
msgid "Wish successfully created."
msgstr ""
#: classes/page.php:303
#: classes/page.php:342
msgid "Wish successfully added."
msgstr ""
#: classes/page.php:304
#: classes/page.php:343
msgid "Wish information updated."
msgstr ""
#: classes/page.php:305
#: classes/page.php:344
msgid "Don't forget to save your changes."
msgstr ""
#: classes/page.php:306
#: classes/page.php:345
msgid "Wish successfully deleted."
msgstr ""
#: classes/page.php:309
#: classes/page.php:348
msgid "Unable to copy to clipboard. There is likely a permission issue."
msgstr ""
#: classes/page.php:310
#: classes/page.php:349
msgid "Link copied to clipboard."
msgstr ""
#: classes/page.php:312
#: classes/page.php:351
msgid "{name} must have a value"
msgstr ""
#: classes/page.php:313
#: classes/page.php:352
msgid "{name} must be checked"
msgstr ""
#: classes/page.php:314
#: classes/page.php:353
msgid "{name} must be a valid e-mail"
msgstr ""
#: classes/page.php:315
#: classes/page.php:354
msgid "{name} must be a valid URL"
msgstr ""
#: classes/page.php:316
#: classes/page.php:355
msgid "{name} is not formatted correctly"
msgstr ""
#: classes/page.php:317
#: classes/page.php:356
msgid "{name} must be an integer"
msgstr ""
#: classes/page.php:318
#: classes/page.php:357
msgid "{name} must be a decimal number"
msgstr ""
#: classes/page.php:319
#: classes/page.php:358
msgid "{name} must be set to a number"
msgstr ""
#: classes/page.php:320
#: classes/page.php:359
msgid "{name} must be \"{ruleValue}\""
msgstr ""
#: classes/page.php:321
#: classes/page.php:360
msgid "{name} must be exactly \"{ruleValue}\""
msgstr ""
#: classes/page.php:322
#: classes/page.php:361
msgid "{name} cannot be set to \"{ruleValue}\""
msgstr ""
#: classes/page.php:323
#: classes/page.php:362
msgid "{name} cannot be set to exactly \"{ruleValue}\""
msgstr ""
#: classes/page.php:324
#: classes/page.php:363
msgid "{name} cannot contain \"{ruleValue}\""
msgstr ""
#: classes/page.php:325
#: classes/page.php:364
msgid "{name} cannot contain exactly \"{ruleValue}\""
msgstr ""
#: classes/page.php:326
#: classes/page.php:365
msgid "{name} must contain \"{ruleValue}\""
msgstr ""
#: classes/page.php:327
#: classes/page.php:366
msgid "{name} must contain exactly \"{ruleValue}\""
msgstr ""
#: classes/page.php:328 classes/page.php:329
#: classes/page.php:367 classes/page.php:368
msgid "{name} must be at least {ruleValue} characters"
msgstr ""
#: classes/page.php:330
#: classes/page.php:369
msgid "{name} must be exactly {ruleValue} characters"
msgstr ""
#: classes/page.php:331
#: classes/page.php:370
msgid "{name} cannot be longer than {ruleValue} characters"
msgstr ""
#: classes/page.php:332
#: classes/page.php:371
msgid "{name} must match {ruleValue} field"
msgstr ""
#: classes/page.php:333
#: classes/page.php:372
msgid "{name} must have a different value than {ruleValue} field"
msgstr ""
#: classes/page.php:334
#: classes/page.php:373
msgid "{name} must be a valid credit card number"
msgstr ""
#: classes/page.php:335
#: classes/page.php:374
msgid "{name} must have at least {ruleValue} choices"
msgstr ""
#: classes/page.php:336
#: classes/page.php:375
msgid "{name} must have exactly {ruleValue} choices"
msgstr ""
#: classes/page.php:337
#: classes/page.php:376
msgid "{name} must have {ruleValue} or less choices"
msgstr ""
#: classes/page.php:339
#: classes/page.php:378
msgctxt "Calendar"
msgid "Today"
msgstr ""
#: classes/page.php:340
#: classes/page.php:379
msgctxt "Calendar"
msgid "Now"
msgstr ""
#: classes/page.php:341
#: classes/page.php:380
msgctxt "Calendar"
msgid "AM"
msgstr ""
#: classes/page.php:342
#: classes/page.php:381
msgctxt "Calendar"
msgid "PM"
msgstr ""
#: classes/page.php:343
#: classes/page.php:382
msgctxt "Calendar"
msgid "Week"
msgstr ""
#: classes/page.php:411
#: classes/page.php:450
msgid "System"
msgstr ""
#: classes/page.php:417
#: classes/page.php:456
msgid "Account"
msgstr ""
#: classes/page.php:426 pages/home.php:105
#: classes/page.php:465 pages/home.php:105
msgid "Wishlists"
msgstr ""
#: classes/page.php:430 pages/home.php:33 pages/home.php:35
#: classes/page.php:469 pages/home.php:33 pages/home.php:35
#: pages/wishlists.php:11
msgid "My lists"
msgstr ""
#: classes/page.php:440 pages/profile.php:11
#: classes/page.php:479 pages/profile.php:11
msgid "Profile"
msgstr ""
#: classes/page.php:446 pages/login-as.php:11
#: classes/page.php:485 pages/login-as.php:11
msgid "Login as"
msgstr ""
#: classes/page.php:452 pages/logout.php:11
#: classes/page.php:491 pages/logout.php:11
msgid "Logout"
msgstr ""
#: classes/page.php:458 classes/page.php:462 pages/home.php:50
#: classes/page.php:497 classes/page.php:501 pages/home.php:50
#: pages/home.php:52 pages/login-as.php:54 pages/login-as.php:55
#: pages/login.php:11 pages/login.php:130 pages/login.php:131
#: pages/register.php:229 pages/register.php:231
msgid "Login"
msgstr ""
#: classes/page.php:469 classes/page.php:473 pages/install.php:218
#: classes/page.php:508 classes/page.php:512 pages/install.php:218
#: pages/install.php:220 pages/login.php:135 pages/login.php:137
#: pages/register.php:13 pages/register.php:14
msgid "Register"
msgstr ""
#: classes/page.php:483 pages/settings.php:11
#: classes/page.php:522 pages/settings.php:11
msgid "Settings"
msgstr ""
#: classes/page.php:496
#: classes/page.php:535
msgid "wishthis logo"
msgstr ""
#: classes/page.php:627
#: classes/page.php:666
msgid "Contribute"
msgstr ""
#: classes/page.php:633 classes/page.php:636
#: classes/page.php:672 classes/page.php:675
msgid "GitHub repository"
msgstr ""
#: classes/page.php:642 classes/page.php:645
#: classes/page.php:681 classes/page.php:684
msgid "Translate"
msgstr ""
#: classes/page.php:681
#: classes/page.php:720
#, php-format
msgid "%s not found"
msgstr ""
#: classes/page.php:691
#: classes/page.php:730
msgid "The requested Wishlist was not found and likely deleted by its creator."
msgstr ""
#: classes/page.php:695
#: classes/page.php:734
msgid "The requested Wish was not found."
msgstr ""
#: classes/page.php:699
#: classes/page.php:738
#, php-format
msgid "The requested %s was not found."
msgstr ""
@ -360,8 +364,8 @@ msgstr ""
msgid "Visit"
msgstr ""
#: classes/wish.php:178 classes/wish.php:181 pages/wishlists.php:53
#: pages/wishlists.php:56
#: classes/wish.php:178 classes/wish.php:181 pages/wishlists.php:32
#: pages/wishlists.php:62 pages/wishlists.php:65
msgid "Options"
msgstr ""
@ -369,7 +373,7 @@ msgstr ""
msgid "Edit"
msgstr ""
#: classes/wish.php:191 pages/wishlists.php:64 pages/wishlists.php:66
#: classes/wish.php:191 pages/wishlists.php:73 pages/wishlists.php:75
msgid "Delete"
msgstr ""
@ -377,7 +381,7 @@ msgstr ""
msgid "Wish not found"
msgstr ""
#: classes/wishlist.php:114
#: classes/wishlist.php:113
msgid "Wishlist not found"
msgstr ""
@ -409,10 +413,6 @@ msgstr ""
msgid "Welcome to wishthis"
msgstr ""
#: pages/home.php:26
msgid "wishthis is a simple, intuitive and modern wishlist platform to create, manage and view your wishes for any kind of occasion."
msgstr ""
#: pages/home.php:42 pages/home.php:44
msgid "Register now"
msgstr ""
@ -462,7 +462,7 @@ msgstr ""
msgid "N. A."
msgstr ""
#: pages/home.php:100 pages/wishlist.php:56 pages/wishlists.php:91
#: pages/home.php:100 pages/wishlist.php:56 pages/wishlists.php:85
msgid "Wishes"
msgstr ""
@ -491,7 +491,7 @@ msgstr ""
msgid "Host"
msgstr ""
#: pages/install.php:44 pages/wishlists.php:123
#: pages/install.php:44 pages/wishlists.php:117
msgid "Name"
msgstr ""
@ -499,8 +499,8 @@ msgstr ""
msgid "Username"
msgstr ""
#: pages/install.php:54 pages/login.php:119 pages/profile.php:127
#: pages/profile.php:202 pages/profile.php:211 pages/register.php:193
#: pages/install.php:54 pages/login.php:119 pages/profile.php:143
#: pages/profile.php:218 pages/profile.php:227 pages/register.php:193
msgid "Password"
msgstr ""
@ -523,7 +523,7 @@ msgid "User not found!"
msgstr ""
#: pages/login-as.php:48 pages/login.php:110 pages/profile.php:34
#: pages/profile.php:168 pages/register.php:175
#: pages/profile.php:184 pages/register.php:175
msgid "Email"
msgstr ""
@ -587,23 +587,43 @@ msgstr ""
msgid "Due to maintenance, wishthis is temporarily not available. Please check back again in a minute."
msgstr ""
#: pages/parts/wishlist-filter.php:18
#: pages/parts/wish-add.php:17 pages/wishlists.php:148
msgid "Title"
msgstr ""
#: pages/parts/wish-add.php:30
msgid "Description"
msgstr ""
#: pages/parts/wish-add.php:42 pages/wish.php:151
msgid "URL"
msgstr ""
#: pages/parts/wish-add.php:53
msgid "Priority"
msgstr ""
#: pages/parts/wish-add.php:58
msgid "Select priority"
msgstr ""
#: pages/parts/wishlist-filter.php:21
msgid "Filter priorities"
msgstr ""
#: pages/parts/wishlist-filter.php:23
#: pages/parts/wishlist-filter.php:26
msgid "Search priorities"
msgstr ""
#: pages/parts/wishlist-filter.php:30
#: pages/parts/wishlist-filter.php:33
msgid "Priorities"
msgstr ""
#: pages/parts/wishlist-filter.php:36
#: pages/parts/wishlist-filter.php:39
msgid "All priorities"
msgstr ""
#: pages/parts/wishlist-filter.php:41
#: pages/parts/wishlist-filter.php:44
msgid "No priority"
msgstr ""
@ -620,92 +640,111 @@ msgstr ""
msgid "You do not have enough power to view this page. You need %s to see this page, but only have %s."
msgstr ""
#: pages/profile.php:19 pages/profile.php:148
#: pages/profile.php:19 pages/profile.php:164
msgid "First name"
msgstr ""
#: pages/profile.php:24 pages/profile.php:154
#: pages/profile.php:24 pages/profile.php:170
msgid "Last name"
msgstr ""
#: pages/profile.php:29 pages/profile.php:160
#: pages/profile.php:29 pages/profile.php:176
msgid "Nickname"
msgstr ""
#: pages/profile.php:39 pages/profile.php:245
#: pages/profile.php:39 pages/profile.php:285
msgid "Language"
msgstr ""
#: pages/profile.php:44 pages/profile.php:268 pages/profile.php:313
msgid "Channel"
msgstr ""
#: pages/profile.php:57
#: pages/profile.php:52
#, php-format
msgid "%s successfully updated!"
msgstr ""
#: pages/profile.php:102
#: pages/profile.php:118
msgid "It is required for you to login again."
msgstr ""
#: pages/profile.php:123 pages/profile.php:139
#: pages/profile.php:139 pages/profile.php:155
msgid "Personal"
msgstr ""
#: pages/profile.php:124
#: pages/profile.php:140
msgid "Information regarding yourself"
msgstr ""
#: pages/profile.php:128
#: pages/profile.php:144
msgid "Change your password"
msgstr ""
#: pages/profile.php:131 pages/profile.php:236
#: pages/profile.php:147 pages/profile.php:276
msgid "Preferences"
msgstr ""
#: pages/profile.php:132
#: pages/profile.php:148
msgid "Improve your wishthis experience"
msgstr ""
#: pages/profile.php:174
#: pages/profile.php:190
msgid "Birthdate"
msgstr ""
#: pages/profile.php:181
#: pages/profile.php:197
msgid "Pick a date"
msgstr ""
#: pages/profile.php:193 pages/profile.php:194 pages/profile.php:227
#: pages/profile.php:228 pages/profile.php:289 pages/profile.php:290
#: pages/settings.php:53 pages/settings.php:54 pages/wish.php:175
#: pages/wish.php:176 pages/wish.php:216 pages/wish.php:217
#: pages/profile.php:209 pages/profile.php:210 pages/profile.php:243
#: pages/profile.php:244 pages/profile.php:329 pages/profile.php:330
#: pages/settings.php:53 pages/settings.php:54 pages/wish.php:116
#: pages/wish.php:117 pages/wish.php:157 pages/wish.php:158
msgid "Save"
msgstr ""
#: pages/profile.php:217
#: pages/profile.php:233
msgid "Password (repeat)"
msgstr ""
#: pages/profile.php:271
#: pages/profile.php:249
msgid "Safe password checklist"
msgstr ""
#: pages/profile.php:256
msgid "Long"
msgstr ""
#: pages/profile.php:257
msgid "Over eight characters in length."
msgstr ""
#: pages/profile.php:265
msgid "Special"
msgstr ""
#: pages/profile.php:266
msgid "Contains special characters."
msgstr ""
#: pages/profile.php:308 pages/profile.php:357
msgid "Channel"
msgstr ""
#: pages/profile.php:311
msgid "Select channel"
msgstr ""
#: pages/profile.php:316
#: pages/profile.php:360
msgid "In order to improve the user experience of wishthis, newer versions are published after an extensive testing period."
msgstr ""
#: pages/profile.php:317
#: pages/profile.php:361
msgid "Subscribing to the Stable channel ensures you have the highest possible stability while using wishthis, minimizing the amount of errors you may encounter (if any)."
msgstr ""
#: pages/profile.php:318
#, php-format
msgid "If you want to speed up the release of newer versions, consider subscribing to the Release candidate of wishthis. A newer version is not published unless at least 5% of the wishthis user base have tested the next release candidate."
#: pages/profile.php:362
msgid "If you want to speed up the release of newer versions, consider subscribing to the Release candidate of wishthis. A newer version is not published unless the next release candidate has been sufficiently tested."
msgstr ""
#: pages/profile.php:330
#: pages/profile.php:374
#, php-format
msgid "%d more subscriber needed"
msgid_plural "%d more subscribers needed"
@ -716,7 +755,7 @@ msgstr[1] ""
msgid "Reset password"
msgstr ""
#: pages/register.php:14 pages/wish.php:180 pages/wish.php:181
#: pages/register.php:14 pages/wish.php:121 pages/wish.php:122
msgid "Reset"
msgstr ""
@ -869,88 +908,68 @@ msgstr ""
msgid "Auto-fill"
msgstr ""
#: pages/wish.php:114 pages/wishlists.php:154 pages/wishlists.php:182
msgid "Title"
msgstr ""
#: pages/wish.php:127 pages/wishlists.php:187
msgid "Description"
msgstr ""
#: pages/wish.php:139 pages/wish.php:210 pages/wishlists.php:192
msgid "URL"
msgstr ""
#: pages/wish.php:150
msgid "Priority"
msgstr ""
#: pages/wish.php:155
msgid "Select priority"
msgstr ""
#: pages/wish.php:185 pages/wish.php:187
#: pages/wish.php:126 pages/wish.php:128
msgid "Back"
msgstr ""
#: pages/wish.php:203
#: pages/wish.php:144
msgid "Image"
msgstr ""
#: pages/wish.php:206
#: pages/wish.php:147
msgid "Define a new URL to be used as a preview."
msgstr ""
#: pages/wish.php:219 pages/wish.php:220
#: pages/wish.php:160 pages/wish.php:161
msgid "Discard"
msgstr ""
#: pages/wish.php:228
#: pages/wish.php:169
msgid "Warning"
msgstr ""
#: pages/wish.php:231
#: pages/wish.php:172
msgid "This action will potentially overwrite all fields in this wish."
msgstr ""
#: pages/wish.php:232
#: pages/wish.php:173
msgid "Would you like to continue?"
msgstr ""
#: pages/wish.php:235 pages/wish.php:236
#: pages/wish.php:176 pages/wish.php:177
msgid "Yes, overwrite"
msgstr ""
#: pages/wish.php:238 pages/wish.php:239
#: pages/wish.php:179 pages/wish.php:180
msgid "No"
msgstr ""
#: pages/wish.php:247
#: pages/wish.php:188
msgid "URL mismatch"
msgstr ""
#: pages/wish.php:251
#: pages/wish.php:192
msgid "The URL you have entered does not seem quite right. Would you like to update it with the one I found?"
msgstr ""
#: pages/wish.php:252
#: pages/wish.php:193
#, php-format
msgid "According to %s, this is the canonical (correct) URL."
msgstr ""
#: pages/wish.php:256
#: pages/wish.php:197
msgid "Current"
msgstr ""
#: pages/wish.php:261
#: pages/wish.php:202
msgid "Proposed"
msgstr ""
#: pages/wish.php:268 pages/wish.php:269
#: pages/wish.php:209 pages/wish.php:210
msgid "Yes, update"
msgstr ""
#: pages/wish.php:271 pages/wish.php:272
#: pages/wish.php:212 pages/wish.php:213
msgid "No, leave it"
msgstr ""
@ -975,67 +994,51 @@ msgstr ""
msgid "If you found a wish you would like to fulfil, click the %s button and it will become unavailable for others."
msgstr ""
#: pages/wishlists.php:19
msgid "Here you can view and edit all of your wishlists."
msgstr ""
#: pages/wishlists.php:21
msgid "View"
msgstr ""
#: pages/wishlists.php:26
msgid "Please select a wishlist to view."
msgstr ""
#: pages/wishlists.php:30
#: pages/wishlists.php:24
msgid "Wishlist"
msgstr ""
#: pages/wishlists.php:32
#: pages/wishlists.php:27
msgid "Loading your wishlists..."
msgstr ""
#: pages/wishlists.php:38 pages/wishlists.php:41 pages/wishlists.php:172
msgid "Add a wish"
msgstr ""
#: pages/wishlists.php:46 pages/wishlists.php:49
msgid "Share"
msgstr ""
#: pages/wishlists.php:59 pages/wishlists.php:61 pages/wishlists.php:160
#: pages/wishlists.php:161
msgid "Rename"
msgstr ""
#: pages/wishlists.php:77
msgid "General options."
msgstr ""
#: pages/wishlists.php:81 pages/wishlists.php:84 pages/wishlists.php:115
#: pages/wishlists.php:36 pages/wishlists.php:39 pages/wishlists.php:109
msgid "Create a wishlist"
msgstr ""
#: pages/wishlists.php:119
#: pages/wishlists.php:47 pages/wishlists.php:50 pages/wishlists.php:166
msgid "Add a wish"
msgstr ""
#: pages/wishlists.php:55 pages/wishlists.php:58
msgid "Share"
msgstr ""
#: pages/wishlists.php:68 pages/wishlists.php:70 pages/wishlists.php:154
#: pages/wishlists.php:155
msgid "Rename"
msgstr ""
#: pages/wishlists.php:113
msgid "Choose a new name for your wishlist. Here's a suggestion to get you started."
msgstr ""
#: pages/wishlists.php:133 pages/wishlists.php:134
#: pages/wishlists.php:127 pages/wishlists.php:128
msgid "Create"
msgstr ""
#: pages/wishlists.php:145
#: pages/wishlists.php:139
msgid "Rename wishlist"
msgstr ""
#: pages/wishlists.php:148
#: pages/wishlists.php:142
msgid "How would you like to name this wishlist?"
msgstr ""
#: pages/wishlists.php:176
#: pages/wishlists.php:170
msgid "Fill out any or all of the below fields to add your new wish."
msgstr ""
#: pages/wishlists.php:202 pages/wishlists.php:203
#: pages/wishlists.php:182 pages/wishlists.php:183
msgid "Add"
msgstr ""

View file

@ -5,7 +5,7 @@
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '3ef2272400709ef0c5dc143d1fabaf31d5f681c1',
'reference' => '8dacc7e961dbc4e4233f2a94721f7d2db2f2f8b7',
'name' => '__root__',
'dev' => true,
),
@ -16,7 +16,7 @@
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '3ef2272400709ef0c5dc143d1fabaf31d5f681c1',
'reference' => '8dacc7e961dbc4e4233f2a94721f7d2db2f2f8b7',
'dev_requirement' => false,
),
'composer/ca-bundle' => array(
@ -172,8 +172,8 @@
'psr/http-factory-implementation' => array(
'dev_requirement' => false,
'provided' => array(
0 => '^1.0',
1 => '1.0',
0 => '1.0',
1 => '^1.0',
),
),
'psr/http-message' => array(

View file

@ -812,7 +812,7 @@ concat-with-sourcemaps@^1.0.0, concat-with-sourcemaps@^1.1.0:
dependencies:
source-map "^0.6.1"
config-chain@^1.1.12:
config-chain@^1.1.13:
version "1.1.13"
resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4"
integrity sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==
@ -2326,11 +2326,11 @@ jquery@^3.4.0:
integrity sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==
js-beautify@^1.13.13:
version "1.14.2"
resolved "https://registry.yarnpkg.com/js-beautify/-/js-beautify-1.14.2.tgz#8180514fd4c7789c4ac4bcc327b6dda634c55666"
integrity sha512-H85kX95a53os+q1OCqtYe8AXAmgy3BvtysA/V83S3fdhznm6WlUpGi14DqSPbKFsL3dXZFXYl7YQwW9U1+76ng==
version "1.14.3"
resolved "https://registry.yarnpkg.com/js-beautify/-/js-beautify-1.14.3.tgz#3dd11c949178de7f3bdf3f6f752778d3bed95150"
integrity sha512-f1ra8PHtOEu/70EBnmiUlV8nJePS58y9qKjl4JHfYWlFH6bo7ogZBz//FAZp7jDuXtYnGYKymZPlrg2I/9Zo4g==
dependencies:
config-chain "^1.1.12"
config-chain "^1.1.13"
editorconfig "^0.15.3"
glob "^7.1.3"
nopt "^5.0.0"
@ -4140,9 +4140,9 @@ typedarray@^0.0.6:
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
uglify-js@^3.0.5:
version "3.15.3"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.15.3.tgz#9aa82ca22419ba4c0137642ba0df800cb06e0471"
integrity sha512-6iCVm2omGJbsu3JWac+p6kUiOpg3wFO2f8lIXjfEb8RrmLjzog1wTPMmwKB7swfzzqxj9YM+sGUM++u1qN4qJg==
version "3.15.4"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.15.4.tgz#fa95c257e88f85614915b906204b9623d4fa340d"
integrity sha512-vMOPGDuvXecPs34V74qDKk4iJ/SN4vL3Ow/23ixafENYvtrNvtbcgUeugTcUGRGsOF/5fU8/NYSL5Hyb3l1OJA==
unc-path-regex@^0.1.2:
version "0.1.2"