Skip to content

Commit

Permalink
Merge branch 'master' into github-users
Browse files Browse the repository at this point in the history
  • Loading branch information
nanaya authored Sep 27, 2023
2 parents c245bfe + 17c7318 commit a95405b
Show file tree
Hide file tree
Showing 156 changed files with 1,251 additions and 1,055 deletions.
6 changes: 3 additions & 3 deletions app/Http/Middleware/UpdateUserLastvisit.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ public function handle($request, Closure $next)
}

if (!$isInactive || $isVerified) {
$recordedLastVisit = $user->user_lastvisit;
$currentLastVisit = now();
$recordedLastVisit = $user->getRawAttribute('user_lastvisit');
$currentLastVisit = time();

if ($currentLastVisit->diffInRealSeconds($recordedLastVisit) > 60) {
if ($currentLastVisit - $recordedLastVisit > 300) {
$user->update([
'user_lastvisit' => $currentLastVisit,
], ['skipValidations' => true]);
Expand Down
27 changes: 4 additions & 23 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,15 @@ class ExitOnErrorWebpackPlugin {
* Blocks until the webpack config is read.
*/
function readWebpackConfig() {
const argv = require('yargs').argv;
const { argv } = require('yargs');

if (!argv.singleRun) {
argv.watch = true;
}

const sleep = require('deasync').runLoopOnce;
const maybeConfig = require('./webpack.config.js');
const config = maybeConfig instanceof Function ? maybeConfig(null, argv) : maybeConfig;
if (!(config instanceof Promise)) {
return config;
}

let value;
config.then((result) => {
value = result;
}).catch((error) => {
value = error;
});

while (!value) {
sleep();
}

if (value instanceof Error) {
throw value;
}
const configFn = require('./webpack.config.js');

return value;
return configFn(null, argv);
}

process.env.SKIP_MANIFEST = true;
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"private": true,
"scripts": {
"dev": "yarn run development",
"development": "cross-env NODE_ENV=development webpack --progress --config=webpack.config.js",
"development": "cross-env NODE_ENV=development webpack --progress",
"lint": "eslint --cache 'resources/js/**/*.{js,ts,tsx}' 'tests/karma/**/*.{ts,tsx}' '*.js'",
"localize": "yarn run generate-localizations",
"prod": "yarn run production",
"production": "cross-env NODE_ENV=production webpack --config=webpack.config.js",
"production": "cross-env NODE_ENV=production webpack",
"watch": "yarn run development --watch",
"watch-poll": "yarn run watch --watch-poll"
"watch-poll": "yarn run watch --watch-options-poll"
},
"dependencies": {
"@discordapp/twemoji": "^14.0.2",
Expand All @@ -30,7 +30,7 @@
"@types/react-transition-group": "^4.4.4",
"@types/timeago": "^1.6.0",
"@types/unist": "^2.0.6",
"autoprefixer": "^9.8.6",
"autoprefixer": "^10.4.15",
"autosize": "^6.0.1",
"blueimp-file-upload": "^9.11.2",
"bootstrap": "^3.3.6",
Expand All @@ -46,7 +46,7 @@
"d3": "^7.1.1",
"dotenv": "^8.2.0",
"fork-ts-checker-webpack-plugin": "^8.0",
"glob": "^7.1.3",
"glob": "^10.3.4",
"highlight.js": "^11.7.0",
"imagemin": "^6.0.0",
"imports-loader": "^4.0.1",
Expand All @@ -70,7 +70,8 @@
"moment": "^2.29.4",
"normalize.css": "^8.0.1",
"photoswipe": "^4.1.1",
"postcss-loader": "^3.0.0",
"postcss": "^8.4.30",
"postcss-loader": "^7.3.3",
"qtip2": "https://github.com/notbakaneko/qTip2.git#cd5f038667d2b23a44f4274c46de01834d704ce6",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand All @@ -93,7 +94,7 @@
"turbolinks": "^5.1.1",
"typescript": "^5.2.2",
"unified": "^10.1.2",
"watchpack": "^1.6.0",
"watchpack": "^2.4.0",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4",
"webpack-manifest-plugin": "^5.0.0",
Expand All @@ -103,7 +104,6 @@
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.6.0",
"@typescript-eslint/parser": "^6.6.0",
"deasync": "^0.1.26",
"eslint": "^7.15.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsdoc": "^30.7.8",
Expand Down
1 change: 1 addition & 0 deletions resources/css/bem/beatmapset-panel.less
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
position: relative;
bottom: 0.2em;
margin-left: auto;
flex-shrink: 0;
}

&__beatmap-count {
Expand Down
39 changes: 21 additions & 18 deletions resources/js/components/mod.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,26 @@ function format(value: unknown) {
return String(value);
}

function settingsLabel(modJson: NonNullable<typeof modNames[string]>, scoreModJson: ScoreModJson) {
const settings = [];
for (const [setting, value] of Object.entries(scoreModJson.settings ?? {})) {
// Can use a better way to custom format mod settings but this is the
// most common one for now.
if (setting === 'speed_change') {
settings.push(`${format(value)}×`);
} else {
const label = modJson.setting_labels[setting];
if (label != null) {
settings.push(`${label}: ${format(value)}`);
}
}
}

return settings.length === 0
? ''
: ` (${settings.join(', ')})`;
}

interface Props {
mod: ScoreModJson;
}
Expand All @@ -31,28 +51,11 @@ export default function Mod({ mod }: Props) {
type: 'Fun',
};

let title = modJson.name;

const settings = [];
for (const [setting, value] of Object.entries(mod.settings ?? {})) {
// Can use a better way to custom format mod settings but this is the
// most common one for now.
if (setting === 'speed_change') {
settings.push(`${format(value)}×`);
} else {
const label = modJson.setting_labels[setting] ?? setting;
settings.push(`${label}: ${format(value)}`);
}
}
if (settings.length > 0) {
title += ` (${settings.join(', ')})`;
}

return (
<div
className={classWithModifiers('mod', modJson.acronym, `type-${modJson.type}`)}
data-acronym={modJson.acronym}
title={title}
title={`${modJson.name}${settingsLabel(modJson, mod)}`}
/>
);
}
8 changes: 8 additions & 0 deletions resources/lang/ar/users.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@
],
],

'ogp' => [
'description' => [
'_' => '',
'country' => '',
'global' => '',
],
],

'posts' => [
'title' => ':username منشورات',
],
Expand Down
8 changes: 8 additions & 0 deletions resources/lang/be/users.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@
],
],

'ogp' => [
'description' => [
'_' => '',
'country' => '',
'global' => '',
],
],

'posts' => [
'title' => 'допісаў :username',
],
Expand Down
4 changes: 2 additions & 2 deletions resources/lang/bg/accounts.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
'new_confirmation' => 'потвърди нов имейл',
'title' => 'Имейл',
'locked' => [
'_' => '',
'accounts' => '',
'_' => 'Моля, свържете се с :accounts за обновяване не имейл.',
'accounts' => 'екипа за поддръжка на профили',
],
],

Expand Down
2 changes: 1 addition & 1 deletion resources/lang/bg/authorization.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
],
],
'update_email' => [
'locked' => '',
'locked' => 'имейл адресът е заключен',
],
],
];
2 changes: 1 addition & 1 deletion resources/lang/bg/changelog.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
'heading' => 'Харесвате тази актуализация?',
'text_1' => 'Подкрепете бъдещото развитие на osu! и :link !',
'text_1_link' => 'станете osu!supporter',
'text_2' => 'Не само ще помогнете за разработката на играта, но също ще получите допълнителни функции и персонализации!',
'text_2' => 'Не само ще помогнете за разработване на играта, но също ще получите допълнителни функции и персонализации!',
],
];
2 changes: 1 addition & 1 deletion resources/lang/bg/events.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
],

'value' => [
'rank' => '',
'rank' => 'ранг #:rank',
],
];
8 changes: 8 additions & 0 deletions resources/lang/bg/users.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@
],
],

'ogp' => [
'description' => [
'_' => '',
'country' => '',
'global' => '',
],
],

'posts' => [
'title' => 'публикациите на :username',
],
Expand Down
2 changes: 1 addition & 1 deletion resources/lang/ca/beatmappacks.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

'mode' => [
'artist' => 'Artista/Àlbum',
'chart' => 'Destacats',
'chart' => 'Spotlights',
'featured' => 'Artista Destacat',
'loved' => 'Project Loved',
'standard' => 'Standard',
Expand Down
2 changes: 1 addition & 1 deletion resources/lang/ca/community.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
],

'country_ranking' => [
'title' => 'Classificació per Països',
'title' => 'Classificació per països',
'description' => 'Conquereix el teu país abans de conquerir el món.',
],

Expand Down
2 changes: 1 addition & 1 deletion resources/lang/ca/model_validation/fulfillments.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
'reverting_username_mismatch' => '',
],
'supporter_tag' => [
'insufficient_paid' => ' La donació és menor del necessari per a l\'etiqueta osu!supporter (:actual > :expected)',
'insufficient_paid' => 'La donació és menor a la requerida per el regal de l\'etiqueta osu!supporter (:actual > :expected)',
],
];
8 changes: 4 additions & 4 deletions resources/lang/ca/model_validation/store/product.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// See the LICENCE file in the repository root for full licence text.

return [
'insufficient_stock' => 'No queda prou d\'aquest element!',
'must_separate' => 'Aquest element s\'ha de comprovar separadament d\'altres elements',
'not_available' => 'Aquest element no està disponible.',
'too_many' => 'Només podeu ordenar :count d\'aquest element per ordre.',
'insufficient_stock' => 'No en queda prou d\'aquest producte!',
'must_separate' => 'Aquest producte s\'ha de pagar per separat',
'not_available' => 'Aquest producte no està disponible.',
'too_many' => 'Només pots ordenar :count d\'aquest producte per ordre.',
];
4 changes: 2 additions & 2 deletions resources/lang/ca/paypal/errors.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
'instrument_declined' => 'Paypal ha rebutjat el mètode de pagament seleccionat.',
'invalid_resource_id' => 'No s\'ha trobat informació de pagament.',
'invalid_token' => 'S\'ha produït un error en completar el pagament.',
'old_format' => 'L\'enllaç de pagament ha vençut, torneu-ho a provar.',
'old_format' => 'L\'enllaç de pagament ha expirat, torna a provar.',
'resource_not_found' => 'No s\'ha trobat informació de pagament.',
'unknown' => "El pagament va ser rebutjat, però no sabem per què.",
'unknown' => "El pagament s'ha rebutjat, però no sabem per què.",
];
2 changes: 1 addition & 1 deletion resources/lang/ca/rankings.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
],

'type' => [
'charts' => 'focus',
'charts' => 'spotlights',
'country' => 'país',
'kudosu' => 'kudosu',
'multiplayer' => 'multijugador',
Expand Down
Loading

0 comments on commit a95405b

Please sign in to comment.