Skip to content

Commit a1830ff

Browse files
committed
chore: bump version to 1.22
1 parent 6f0d80b commit a1830ff

17 files changed

+45
-109
lines changed

README.zh.md

Whitespace-only changes.

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"author": "Web Dev",
2828
"dependencies": {
2929
"@fingerprintjs/fingerprintjs": "v3.3.4",
30-
"@headlessui/react": "^1.7.17",
3130
"@radix-ui/colors": "^2.1.0",
3231
"@radix-ui/react-icons": "^1.3.0",
3332
"@radix-ui/react-radio-group": "^1.1.3",
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/options/Check.tsx renamed to src/components/Check/Check.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useEffect } from 'react';
22
import * as Switch from '@radix-ui/react-switch';
3-
import storage from '../utils/storage';
3+
import storage from '../../utils/storage';
44

55
interface CheckProps {
66
title: string;

src/options/RadioGroupDemo.tsx renamed to src/components/Radio/Radio.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useEffect, useState } from 'react';
22
import * as RadioGroup from '@radix-ui/react-radio-group';
3-
import storage from '../utils/storage';
3+
import storage from '../../utils/storage';
44

55
interface ToggleGroupProps {
66
title: string;
@@ -13,7 +13,7 @@ interface ToggleGroupProps {
1313
imgLink: string[];
1414
}
1515

16-
const RadioGroupDemo = ({ storageKey, title, defaultValue, options, labels, imgLink }: ToggleGroupProps) => {
16+
const Radio = ({ storageKey, title, defaultValue, options, labels, imgLink }: ToggleGroupProps) => {
1717
const [value, setValue] = useState('default');
1818

1919
useEffect(() => {
@@ -62,4 +62,4 @@ const RadioGroupDemo = ({ storageKey, title, defaultValue, options, labels, imgL
6262
);
6363
};
6464

65-
export default RadioGroupDemo;
65+
export default Radio;

src/content/TechStacks.tsx

+6-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { useTranslation } from 'react-i18next';
1010
import AnimateHeight, { Height } from 'react-animate-height';
1111
import storage from '../utils/storage';
1212

13-
const VERSION = '1.21';
13+
const VERSION = '1.22';
1414

1515
async function fetcher<JSON = any>(input: RequestInfo, init?: RequestInit): Promise<JSON> {
1616
const res = await fetch(input, { credentials: 'include', ...init });
@@ -49,7 +49,7 @@ const TechStacks = ({ url }: TechStacksProps) => {
4949
const [height, setHeight] = useState(0);
5050

5151
// the status is to renew get the height of the techstack container
52-
const [loadStatus, setLoadStatus] = useState(1);
52+
const [loadStatus, setLoadStatus] = useState(false);
5353

5454
const open = () => {
5555
setExpand(true);
@@ -103,9 +103,11 @@ const TechStacks = ({ url }: TechStacksProps) => {
103103
results.push(<Category name={key} key={key} deps={value} />);
104104
});
105105

106-
if (loadStatus === 1) {
107-
setLoadStatus(2);
106+
// the status is for to trigger the useEffect to get the height of the techstack container
107+
if (!loadStatus) {
108+
setLoadStatus(true);
108109
}
110+
109111
return (
110112
<div
111113
className="techStackRoot"

src/content/index.tsx

+10-7
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,11 @@ import isGithubRepoPage from './isGithubRepoPage';
99
import PrivateRepo from 'components/PrivateRepo/PrivateRepo';
1010
import storage from '../utils/storage';
1111

12-
// import "./content.css";
13-
import './i18n';
12+
import '../i18n';
1413

1514
runtime.onMessage.addListener(MessageListener);
1615

17-
async function injectComponent() {
18-
console.log('Tech-Stack: https://github.com/Get-Tech-Stack/TechStack');
19-
20-
const url = window.location.href;
21-
16+
const get_insert_dom = async () => {
2217
const result = await storage.get(['techstack_position']);
2318
let position = 0;
2419

@@ -35,13 +30,21 @@ async function injectComponent() {
3530
}
3631

3732
const dom = document.getElementsByClassName('BorderGrid-cell')[position];
33+
return dom;
34+
};
35+
36+
async function injectComponent() {
37+
console.log('Tech-Stack: https://github.com/Get-Tech-Stack/TechStack');
38+
39+
const url = window.location.href;
3840

3941
const techStack = `<h2 class="mb-3 h4">Tech Stack</h2>
4042
<div class="my-3">
4143
<div id="techStackRoot">
4244
</div>
4345
</div>`;
4446

47+
const dom = await get_insert_dom();
4548
if (dom !== undefined) {
4649
let ReactDom = <PrivateRepo url={url} />;
4750

File renamed without changes.

src/options/Grounp.tsx

-24
This file was deleted.

src/options/i18n.js

-29
This file was deleted.

src/options/options.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import React from 'react';
44
import ReactDOM from 'react-dom/client';
55

66
import Container from './Container';
7-
import Check from './Check';
8-
import RadioGroupDemo from './RadioGroupDemo';
9-
import './i18n';
7+
import Check from '../components/Check/Check';
8+
import Radio from '../components/Radio/Radio';
9+
import '../i18n';
1010
import { useTranslation } from 'react-i18next';
1111

1212
const Index = () => {
@@ -35,7 +35,7 @@ const Index = () => {
3535
storageKey="enable_feedback"
3636
defaultValue={true}
3737
/>
38-
<RadioGroupDemo
38+
<Radio
3939
title={t('position')}
4040
labels={[t('top'), t('middle'), t('bottom')]}
4141
options={['top', 'middle', 'bottom']}

src/utils/get_option.ts

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import storage from './storage';
2+
3+
// WIP
4+
const get_options = (key: string): boolean => {
5+
storage.get([key]);
6+
return true;
7+
};
8+
9+
export default get_options;

webpack.config.utils.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,15 @@ export const getCopyPlugins = (
142142
to: path.resolve(__dirname, `${outputDir}/${browserDir}/options`),
143143
},
144144
{
145-
from: path.resolve(__dirname, `${sourceDir}/options/1.png`),
145+
from: path.resolve(__dirname, `${sourceDir}/assets/options/1.png`),
146146
to: path.resolve(__dirname, `${outputDir}/${browserDir}/options`),
147147
},
148148
{
149-
from: path.resolve(__dirname, `${sourceDir}/options/2.png`),
149+
from: path.resolve(__dirname, `${sourceDir}/assets/options/2.png`),
150150
to: path.resolve(__dirname, `${outputDir}/${browserDir}/options`),
151151
},
152152
{
153-
from: path.resolve(__dirname, `${sourceDir}/options/3.png`),
153+
from: path.resolve(__dirname, `${sourceDir}/assets/options/3.png`),
154154
to: path.resolve(__dirname, `${outputDir}/${browserDir}/options`),
155155
},
156156

yarn-error.log

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Arguments:
2-
/Users/ctrdh/Library/Application Support/fnm/node-versions/v18.16.1/installation/bin/node /Users/ctrdh/Library/Caches/fnm_multishells/13752_1694419640017/bin/yarn
2+
/Users/ctrdh/Library/Application Support/fnm/node-versions/v18.16.1/installation/bin/node /Users/ctrdh/Library/Caches/fnm_multishells/38869_1694828137314/bin/yarn
33

44
PATH:
5-
/Users/ctrdh/.jbang/bin:/opt/homebrew/opt/openjdk@11/bin:/opt/homebrew/opt/ssh-copy-id/bin:/opt/homebrew/opt/libpq/bin:/Users/ctrdh/Library/Caches/fnm_multishells/13752_1694419640017/bin:/Users/ctrdh/.pyenv/shims:/Users/ctrdh/.orbstack/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/ctrdh/.jbang/bin:/opt/homebrew/opt/openjdk@11/bin:/opt/homebrew/opt/ssh-copy-id/bin:/opt/homebrew/opt/libpq/bin:/Users/ctrdh/Library/Caches/fnm_multishells/95296_1694407022011/bin:/Users/ctrdh/.orbstack/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/ctrdh/.cargo/bin:/Users/ctrdh/.fig/bin:/Users/ctrdh/.local/bin:/Users/ctrdh/go/bin:~/.local/bin:/Users/ctrdh/go/bin:~/.local/bin
5+
/Users/ctrdh/.jbang/bin:/opt/homebrew/opt/openjdk@11/bin:/opt/homebrew/opt/ssh-copy-id/bin:/opt/homebrew/opt/libpq/bin:/Users/ctrdh/Library/Caches/fnm_multishells/38869_1694828137314/bin:/Users/ctrdh/.pyenv/shims:/Users/ctrdh/.orbstack/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/ctrdh/.jbang/bin:/opt/homebrew/opt/openjdk@11/bin:/opt/homebrew/opt/ssh-copy-id/bin:/opt/homebrew/opt/libpq/bin:/Users/ctrdh/Library/Caches/fnm_multishells/37689_1694827747015/bin:/Users/ctrdh/.orbstack/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/ctrdh/.cargo/bin:/Users/ctrdh/.fig/bin:/Users/ctrdh/.local/bin:/Users/ctrdh/.dotnet/tools:/Users/ctrdh/go/bin:~/.local/bin:/Users/ctrdh/.dotnet/tools:/Users/ctrdh/go/bin:~/.local/bin
66

77
Yarn version:
88
1.22.19
@@ -14,8 +14,7 @@ Platform:
1414
darwin arm64
1515

1616
Trace:
17-
Error: getaddrinfo ENOTFOUND registry.yarnpkg.com
18-
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
17+
Error: EINVAL: invalid argument, mkdir '/Users/ctrdh/TechStack/Homepage/node_modules/webpack-ext-reloader-mv3/node_modules/@types/webpack/node_modules'
1918

2019
npm manifest:
2120
{

yarn.lock

+6-29
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,6 @@
4747
resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70"
4848
integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==
4949

50-
"@emotion/is-prop-valid@^0.8.2":
51-
version "0.8.8"
52-
resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz#db28b1c4368a259b60a97311d6a952d4fd01ac1a"
53-
integrity sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==
54-
dependencies:
55-
"@emotion/memoize" "0.7.4"
56-
57-
"@emotion/memoize@0.7.4":
58-
version "0.7.4"
59-
resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.4.tgz#19bf0f5af19149111c40d98bb0cf82119f5d9eeb"
60-
integrity sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==
61-
6250
"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0":
6351
version "4.4.0"
6452
resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59"
@@ -98,13 +86,6 @@
9886
dependencies:
9987
tslib "^2.0.1"
10088

101-
"@headlessui/react@^1.7.17":
102-
version "1.7.17"
103-
resolved "https://registry.yarnpkg.com/@headlessui/react/-/react-1.7.17.tgz#a0ec23af21b527c030967245fd99776aa7352bc6"
104-
integrity sha512-4am+tzvkqDSSgiwrsEpGWqgGo9dz8qU5M3znCkC4PgkpY4HcCZzEDEvozltGGGHIKl9jbXbZPSH5TWn4sWJdow==
105-
dependencies:
106-
client-only "^0.0.1"
107-
10889
"@humanwhocodes/config-array@^0.11.10":
10990
version "0.11.10"
11091
resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.10.tgz#5a3ffe32cc9306365fb3fd572596cd602d5e12d2"
@@ -2417,15 +2398,6 @@ for-each@^0.3.3:
24172398
dependencies:
24182399
is-callable "^1.1.3"
24192400

2420-
framer-motion@^10.16.4:
2421-
version "10.16.4"
2422-
resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-10.16.4.tgz#30279ef5499b8d85db3a298ee25c83429933e9f8"
2423-
integrity sha512-p9V9nGomS3m6/CALXqv6nFGMuFOxbWsmaOrdmhyQimMIlLl3LC7h7l86wge/Js/8cRu5ktutS/zlzgR7eBOtFA==
2424-
dependencies:
2425-
tslib "^2.4.0"
2426-
optionalDependencies:
2427-
"@emotion/is-prop-valid" "^0.8.2"
2428-
24292401
fs.realpath@^1.0.0:
24302402
version "1.0.0"
24312403
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
@@ -3733,6 +3705,11 @@ randombytes@^2.1.0:
37333705
dependencies:
37343706
safe-buffer "^5.1.0"
37353707

3708+
react-animate-height@^3.2.2:
3709+
version "3.2.2"
3710+
resolved "https://registry.yarnpkg.com/react-animate-height/-/react-animate-height-3.2.2.tgz#ae15d3ef6396f45140c60af4081d43d7dd093cda"
3711+
integrity sha512-uUOS+RhYVgyJEWcuAJgelVwhcJ2chsMk7HZCpu+wtjSlFAGSFsHU0r4lMTt47HQ1RdQfI5MmFRt43yHTP9lfmQ==
3712+
37363713
react-dom@^18.2.0:
37373714
version "18.2.0"
37383715
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d"
@@ -4329,7 +4306,7 @@ tsconfig-paths@^3.14.2:
43294306
minimist "^1.2.6"
43304307
strip-bom "^3.0.0"
43314308

4332-
tslib@^2.0.1, tslib@^2.4.0:
4309+
tslib@^2.0.1:
43334310
version "2.6.2"
43344311
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae"
43354312
integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==

0 commit comments

Comments
 (0)