mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 07:03:25 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dda6fc299a | ||
|
|
b0e3bfa0f6 | ||
|
|
9d4eb08bc9 | ||
|
|
f8e7e7cd64 | ||
|
|
cda3a89f32 | ||
|
|
ed4dbca329 | ||
|
|
f8a92b7219 |
@@ -1,4 +1 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
npx lint-staged
|
||||
|
||||
3
ace.js
3
ace.js
@@ -19,8 +19,7 @@
|
||||
/**
|
||||
* Register hook to process TypeScript files using ts-node
|
||||
*/
|
||||
import { register } from 'node:module';
|
||||
register('ts-node/esm', import.meta.url);
|
||||
import 'ts-node-maintained/register/esm';
|
||||
|
||||
/**
|
||||
* Import ace console entrypoint
|
||||
|
||||
@@ -25,9 +25,11 @@ export default class CollectionsController {
|
||||
return response.redirectToNamedRoute('dashboard');
|
||||
}
|
||||
|
||||
// TODO: Create DTOs
|
||||
return inertia.render('dashboard', {
|
||||
collections,
|
||||
activeCollection: activeCollection || collections[0],
|
||||
collections: collections.map((collection) => collection.serialize()),
|
||||
activeCollection:
|
||||
activeCollection?.serialize() || collections[0].serialize(),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
4
eslint.config.js
Normal file
4
eslint.config.js
Normal file
@@ -0,0 +1,4 @@
|
||||
import { configApp } from '@adonisjs/eslint-config';
|
||||
export default configApp({
|
||||
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
||||
});
|
||||
@@ -80,6 +80,7 @@ export default function DashboardProviders(
|
||||
enabled: globalHotkeysEnabled,
|
||||
}
|
||||
);
|
||||
|
||||
return (
|
||||
<CollectionsContext.Provider value={collectionsContextValue}>
|
||||
<ActiveCollectionContext.Provider value={activeCollectionContextValue}>
|
||||
|
||||
@@ -15,7 +15,7 @@ const SearchItemStyle = styled('li', {
|
||||
shouldForwardProp: (propName) => propName !== 'isActive',
|
||||
})<{ isActive: boolean }>(({ theme, isActive }) => ({
|
||||
fontSize: '16px',
|
||||
backgroundColor: isActive ? theme.colors.background : 'transparent',
|
||||
backgroundColor: isActive ? theme.colors.secondary : 'transparent',
|
||||
display: 'flex',
|
||||
gap: '0.35em',
|
||||
alignItems: 'center',
|
||||
|
||||
@@ -16,6 +16,7 @@ import { appendCollectionId, appendLinkId } from '~/lib/navigation';
|
||||
import { LinkWithCollection } from '~/types/app';
|
||||
|
||||
const FavoriteItemStyle = styled(ItemExternalLink)(({ theme }) => ({
|
||||
height: 'auto',
|
||||
backgroundColor: theme.colors.secondary,
|
||||
}));
|
||||
|
||||
@@ -23,13 +24,20 @@ const FavoriteDropdown = styled(Dropdown)(({ theme }) => ({
|
||||
backgroundColor: theme.colors.secondary,
|
||||
}));
|
||||
|
||||
const FavoriteContainer = styled.div({
|
||||
flex: 1,
|
||||
lineHeight: '1.1rem',
|
||||
});
|
||||
|
||||
export default function FavoriteItem({ link }: { link: LinkWithCollection }) {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<FavoriteItemStyle href={link.url}>
|
||||
<LinkFavicon url={link.url} size={24} />
|
||||
<TextEllipsis>{link.name}</TextEllipsis>
|
||||
<Legend>({link.collection.name})</Legend>
|
||||
<FavoriteContainer>
|
||||
<TextEllipsis>{link.name}</TextEllipsis>
|
||||
<Legend>{link.collection.name}</Legend>
|
||||
</FavoriteContainer>
|
||||
<FavoriteDropdown
|
||||
onClick={(event) => {
|
||||
event.preventDefault();
|
||||
|
||||
@@ -14,7 +14,7 @@ const ProfileStyle = styled(UnstyledList)({
|
||||
gap: '1.25em',
|
||||
});
|
||||
|
||||
const Column = styled.li({
|
||||
const Column = styled.div({
|
||||
display: 'flex',
|
||||
gap: '1rem',
|
||||
flexDirection: 'column',
|
||||
|
||||
44
package.json
44
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "my-links",
|
||||
"version": "2.1.0",
|
||||
"version": "2.1.3",
|
||||
"type": "module",
|
||||
"license": "UNLICENSED",
|
||||
"scripts": {
|
||||
@@ -8,7 +8,7 @@
|
||||
"build": "node ace build",
|
||||
"dev": "node ace serve --watch",
|
||||
"test": "node ace test",
|
||||
"lint": "eslint . --ext .ts,.tsx --report-unused-disable-directives --max-warnings 0",
|
||||
"lint": "eslint . --report-unused-disable-directives --max-warnings 0",
|
||||
"format": "prettier --write --parser typescript '**/*.{ts,tsx}'",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"prepare": "husky",
|
||||
@@ -36,37 +36,38 @@
|
||||
"#lib/*": "./app/lib/*.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@adonisjs/assembler": "^7.7.0",
|
||||
"@adonisjs/eslint-config": "^1.3.0",
|
||||
"@adonisjs/tsconfig": "^1.3.0",
|
||||
"@adonisjs/assembler": "^7.8.2",
|
||||
"@adonisjs/eslint-config": "2.0.0-beta.6",
|
||||
"@adonisjs/prettier-config": "^1.4.0",
|
||||
"@adonisjs/tsconfig": "^1.4.0",
|
||||
"@emotion/babel-plugin": "^11.12.0",
|
||||
"@faker-js/faker": "^8.4.1",
|
||||
"@faker-js/faker": "^9.0.1",
|
||||
"@japa/assert": "^3.0.0",
|
||||
"@japa/plugin-adonisjs": "^3.0.1",
|
||||
"@japa/runner": "^3.1.4",
|
||||
"@swc/core": "^1.7.22",
|
||||
"@swc/core": "^1.7.26",
|
||||
"@types/luxon": "^3.4.2",
|
||||
"@types/node": "^20.14.10",
|
||||
"@types/react": "^18.3.5",
|
||||
"@types/react": "^18.3.7",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"@types/react-toggle": "^4.0.5",
|
||||
"@typescript-eslint/eslint-plugin": "^7.15.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.6.0",
|
||||
"@vitejs/plugin-react": "^4.3.1",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint": "^9.10.0",
|
||||
"hot-hook": "^0.2.6",
|
||||
"husky": "^9.1.5",
|
||||
"lint-staged": "^15.2.9",
|
||||
"husky": "^9.1.6",
|
||||
"lint-staged": "^15.2.10",
|
||||
"pino-pretty": "^11.2.2",
|
||||
"prettier": "^3.3.3",
|
||||
"release-it": "^17.6.0",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "~5.5.4",
|
||||
"vite": "^5.4.2"
|
||||
"ts-node-maintained": "^10.9.4",
|
||||
"typescript": "~5.6.2",
|
||||
"vite": "^5.4.6"
|
||||
},
|
||||
"dependencies": {
|
||||
"@adonisjs/ally": "^5.0.2",
|
||||
"@adonisjs/auth": "^9.2.3",
|
||||
"@adonisjs/core": "^6.12.1",
|
||||
"@adonisjs/core": "^6.13.1",
|
||||
"@adonisjs/cors": "^2.2.1",
|
||||
"@adonisjs/inertia": "^1.1.0",
|
||||
"@adonisjs/lucid": "^21.2.0",
|
||||
@@ -74,7 +75,7 @@
|
||||
"@adonisjs/shield": "^8.1.1",
|
||||
"@adonisjs/static": "^1.1.1",
|
||||
"@adonisjs/vite": "^3.0.0",
|
||||
"@emotion/react": "^11.13.3",
|
||||
"@emotion/react": "11.12.0",
|
||||
"@emotion/styled": "^11.13.0",
|
||||
"@inertiajs/react": "^1.2.0",
|
||||
"@izzyjs/route": "^1.1.0-0",
|
||||
@@ -84,7 +85,7 @@
|
||||
"dayjs": "^1.11.13",
|
||||
"edge.js": "^6.0.2",
|
||||
"hex-rgb": "^5.0.0",
|
||||
"i18next": "^23.14.0",
|
||||
"i18next": "^23.15.1",
|
||||
"knex": "^3.1.0",
|
||||
"luxon": "^3.5.0",
|
||||
"node-html-parser": "^6.1.13",
|
||||
@@ -93,8 +94,8 @@
|
||||
"react-dnd": "^16.0.1",
|
||||
"react-dnd-html5-backend": "^16.0.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-hotkeys-hook": "^4.5.0",
|
||||
"react-i18next": "^14.1.2",
|
||||
"react-hotkeys-hook": "^4.5.1",
|
||||
"react-i18next": "^15.0.2",
|
||||
"react-icons": "^5.3.0",
|
||||
"react-select": "^5.8.0",
|
||||
"react-swipeable": "^7.0.1",
|
||||
@@ -107,9 +108,6 @@
|
||||
"./app/middleware/*.ts"
|
||||
]
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@adonisjs/eslint-config/app"
|
||||
},
|
||||
"prettier": {
|
||||
"trailingComma": "es5",
|
||||
"semi": true,
|
||||
|
||||
1632
pnpm-lock.yaml
generated
1632
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user