Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

채팅 저장소 깨짐 및 스타일링 수정 #63

Merged
merged 3 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 47 additions & 30 deletions src/components/Global.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
padding: 2rem;
border-radius: 0.5rem;
transform: translate(-50%, -50%);
box-shadow: 0px 0px 10px #2e3033;
background: #141517;
box-shadow: 0 0 30px 0 var(--color-shadow-layer03-02),
0 0 6px 0 var(--color-shadow-layer03-01);
background: var(--color-bg-layer-02);
z-index: 1000;
overflow-y: auto;
overflow-y: none;
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
Expand All @@ -28,7 +29,7 @@
position: absolute;
right: 0.5rem;
top: 0.5rem;
color: white;
color: var(--color-content-02);
font-size: 1.5rem;
font-family: "Sandoll Nemony2";
}
Expand All @@ -55,60 +56,76 @@
background-clip: padding-box;
}
.czp-storage-heading {
color: white;
color: var(--color-content-02);
font-family: "Sandoll Nemony2";
margin-bottom: 0.5rem;
}
.czp-storage-form {
display: flex;
width: 100%;
margin-bottom: 0.5rem;
margin-block: 1rem;
}
.czp-storage-form-input {
flex: 1 0 auto;
padding: 1rem;
color: white;
background: #262729;
border-radius: 0.5rem 0rem 0rem 0.5rem;
padding: 0.5rem;
}

.czp-storage-form-btn {
background-color: white;
background-color: var(--color-bg-02);
padding: 0.5rem;
background: #434445;
color: #828385;
border-radius: 0rem 0.5rem 0.5rem 0rem;
color: var(--color-content-02);
border-radius: 8px;
font-family: "Sandoll Nemony2";
}

.czp-storage-form-btn:hover {
background: #535353;
background: var(--color-bg-02);
}

.czp-chat-st-btn {
width: 100%;
color: #e9e9e9;
text-align: left;
background-color: #2e3033;
border-radius: 0.25rem;
display: flex;
flex-direction: row !important;
justify-content: space-between !important;
height: fit-content !important;
min-height: 3rem;
word-break: break-all;
white-space: pre-wrap;
padding: 1rem;
cursor: pointer;
flex-shrink: 0;

span {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
}

.czp-chat-st-btn:hover {
background-color: #3e4145;
background-color: var(--color-bg-03) !important;
}
.czp-chat-st-remove-btn {
float: right;
color: #e9e9e9;
background-color: #222222;
display: flex;
color: var(--color-content-02);
background-color: var(--color-bg-02);
border-radius: 0.25rem;
padding: 0.5rem;
width: 2rem;
height: 2rem;
flex-shrink: 0;
align-items: center;
justify-content: center;
}
.czp-chat-st-remove-btn:hover {
background-color: #353535;
background-color: var(--color-bg-05);
}

.czp-storage-message {
position: absolute;
background-color: white;
background-color: var(--color-bg-03);
color: var(--color-content-02);
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
Expand Down
15 changes: 9 additions & 6 deletions src/components/Global.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const MessageStorage = () => {
return (
<>
<h2 className="czp-storage-heading">채팅 저장소</h2>
<div className="czp-storage-form">
<div className="live_chatting_input_container__qA0ad czp-storage-form">
<input
type="text"
className="czp-storage-form-input"
Expand All @@ -73,28 +73,31 @@ const MessageStorage = () => {
></input>
<button
type="button"
className="czp-storage-form-btn"
className={`live_chatting_input_send_button__8KBrn ${
text && "live_chatting_input_is_active__WeOjk"
}`}
onClick={addMessage}
>
저장
</button>
</div>

<div className="czp-storage">
{storage.map((data, idx) => (
<div
className="czp-chat-st-btn"
className="component_box__ah2Dn component_default__AJk9D component_is_medium__-6eb7 czp-select-none czp-chat-st-btn"
key={`${data}-${idx}`}
onClick={() => {
copyMessage(data);
}}
>
{data}
<span>{data}</span>
<button
type="button"
className="czp-chat-st-remove-btn"
key={`${data}-${idx}`}
onClick={(e) => {
e.preventDefault;
e.stopPropagation();
removeMessage(idx);
}}
>
Expand Down Expand Up @@ -133,7 +136,7 @@ export default function Global() {
{open && (
<div className="czp-global">
<button
className="czp-global-close-btn"
className="czp-global-close-btn button_container__ppWwB button_only_icon__kahz5 button_large__oOJou popup_close_button__Gwi1s"
onClick={() => {
chrome.storage.local.set({
[GLOBAL_SETTING]: false,
Expand Down
44 changes: 44 additions & 0 deletions vite.config.ts.timestamp-1731467213769-6f96c81ea7ed1.mjs
youngcheon marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// vite.config.ts
import { defineConfig } from "file:///Users/youngcheon/Desktop/dev/chzzk-plus/node_modules/vite/dist/node/index.js";
import svgr from "file:///Users/youngcheon/Desktop/dev/chzzk-plus/node_modules/vite-plugin-svgr/dist/index.js";
import react from "file:///Users/youngcheon/Desktop/dev/chzzk-plus/node_modules/@vitejs/plugin-react-swc/index.mjs";
import { crx } from "file:///Users/youngcheon/Desktop/dev/chzzk-plus/node_modules/@crxjs/vite-plugin/dist/index.mjs";

// manifest.json
var manifest_default = {
name: "Chzzk Plus",
description: "\uB124\uC774\uBC84 \uC2A4\uD2B8\uB9AC\uBC0D \uC11C\uBE44\uC2A4 Chzzk Plus",
version: "1.3.5",
manifest_version: 3,
icons: {
"16": "icon16.png",
"32": "icon32.png",
"64": "icon64.png",
"128": "icon128.png"
},
permissions: ["storage"],
content_scripts: [
{
matches: ["*://chzzk.naver.com/*"],
js: ["src/content.tsx"]
}
],
host_permissions: ["http://www.google.com/", "https://www.google.com/"],
background: {
service_worker: "src/background.ts"
},
action: {
default_icon: "icon128.png",
default_popup: "index.html",
default_title: "Open Extension App"
}
};

// vite.config.ts
var vite_config_default = defineConfig({
plugins: [svgr(), react(), crx({ manifest: manifest_default })]
});
export {
vite_config_default as default
};
//# sourceMappingURL=data:application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