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