Skip to content

Commit

Permalink
fix: Don't use mobile excerpt on desktop/tablet (#21)
Browse files Browse the repository at this point in the history
* chore: bump deps

* fix: dont use mobile excerpt on desktop
  • Loading branch information
imorland authored Nov 27, 2024
1 parent ef75ce6 commit cb1030e
Show file tree
Hide file tree
Showing 4 changed files with 316 additions and 350 deletions.
52 changes: 26 additions & 26 deletions js/package.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"name": "@ianm/synopsis",
"private": true,
"version": "0.0.0",
"devDependencies": {
"flarum-webpack-config": "^2.0.2",
"webpack": "^5.95.0",
"webpack-cli": "^5.1.4",
"prettier": "^3.3.3",
"@flarum/prettier-config": "^1.0.0",
"flarum-tsconfig": "^1.0.3",
"typescript": "^4.5.4",
"typescript-coverage-report": "^0.6.1"
},
"scripts": {
"dev": "webpack --mode development --watch",
"build": "webpack --mode production",
"analyze": "cross-env ANALYZER=true npm run build",
"format": "prettier --write src",
"format-check": "prettier --check src",
"clean-typings": "npx rimraf dist-typings && mkdir dist-typings",
"build-typings": "npm run clean-typings && ([ -e src/@types ] && cp -r src/@types dist-typings/@types || true) && tsc && npm run post-build-typings",
"post-build-typings": "find dist-typings -type f -name '*.d.ts' -print0 | xargs -0 sed -i 's,../src/@types,@types,g'",
"check-typings": "tsc --noEmit --emitDeclarationOnly false",
"check-typings-coverage": "typescript-coverage-report"
},
"prettier": "@flarum/prettier-config"
"name": "@ianm/synopsis",
"private": true,
"version": "0.0.0",
"devDependencies": {
"@flarum/prettier-config": "^1.0.0",
"flarum-tsconfig": "^1.0.3",
"flarum-webpack-config": "^2.0.2",
"prettier": "^3.3.3",
"typescript": "^4.5.4",
"typescript-coverage-report": "^0.6.1",
"webpack": "^5.95.0",
"webpack-cli": "^5.1.4"
},
"scripts": {
"dev": "webpack --mode development --watch",
"build": "webpack --mode production",
"analyze": "cross-env ANALYZER=true npm run build",
"format": "prettier --write src",
"format-check": "prettier --check src",
"clean-typings": "npx rimraf dist-typings && mkdir dist-typings",
"build-typings": "npm run clean-typings && ([ -e src/@types ] && cp -r src/@types dist-typings/@types || true) && tsc && npm run post-build-typings",
"post-build-typings": "find dist-typings -type f -name '*.d.ts' -print0 | xargs -0 sed -i 's,../src/@types,@types,g'",
"check-typings": "tsc --noEmit --emitDeclarationOnly false",
"check-typings-coverage": "typescript-coverage-report"
},
"prettier": "@flarum/prettier-config"
}
3 changes: 2 additions & 1 deletion js/src/forum/addSummaryExcerpt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ export default function addSummaryExcerpt() {
if (excerptPost) {
const excerpt = <Excerpt post={excerptPost} length={excerptLength} richExcerpt={richExcerpt} />;

items.add(onMobile ? 'excerptM' : 'excerpt', excerpt, -100);
items.add('excerpt', excerpt, -100);
onMobile && items.add('excerptM', excerpt, -100);
}
});
}
Loading

0 comments on commit cb1030e

Please sign in to comment.