diff --git a/firebase.json b/firebase.json
index a212bcd..0a31194 100644
--- a/firebase.json
+++ b/firebase.json
@@ -14,7 +14,7 @@
"headers": [
{
"key": "Cache-Control",
- "value": "public, max-age=31536000"
+ "value": "no-cache, no-store, must-revalidate"
}
]
}
diff --git a/package-lock.json b/package-lock.json
index 5460b6d..a29d966 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -4381,6 +4381,14 @@
"resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
"integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40="
},
+ "copy-to-clipboard": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.1.tgz",
+ "integrity": "sha512-i13qo6kIHTTpCm8/Wup+0b1mVWETvu2kIMzKoK8FpkLkFxlt0znUAHcMzox+T8sPlqtZXq3CulEjQHsYiGFJUw==",
+ "requires": {
+ "toggle-selection": "^1.0.6"
+ }
+ },
"core-js": {
"version": "3.6.5",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz",
@@ -14032,6 +14040,11 @@
"repeat-string": "^1.6.1"
}
},
+ "toggle-selection": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz",
+ "integrity": "sha1-bkWxJj8gF/oKzH2J14sVuL932jI="
+ },
"toidentifier": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
diff --git a/package.json b/package.json
index ce6574d..d5f4d1e 100644
--- a/package.json
+++ b/package.json
@@ -17,6 +17,7 @@
"@types/react-dom": "^16.9.4",
"@types/react-router": "^5.1.4",
"@types/react-router-dom": "^5.1.3",
+ "copy-to-clipboard": "^3.3.1",
"firebase": "^7.17.1",
"firebase-functions": "^3.11.0",
"ionicons": "^5.0.0",
diff --git a/public/assets/icon/apple-icon.png b/public/assets/icon/apple-icon.png
new file mode 100644
index 0000000..76cbd40
Binary files /dev/null and b/public/assets/icon/apple-icon.png differ
diff --git a/public/index.html b/public/index.html
index 9ecf673..f5afa98 100644
--- a/public/index.html
+++ b/public/index.html
@@ -22,7 +22,7 @@
-
+
diff --git a/src/components/OnlineList.css b/src/components/OnlineList.css
index 16a514d..75f3531 100644
--- a/src/components/OnlineList.css
+++ b/src/components/OnlineList.css
@@ -3,26 +3,47 @@
}
.online-header {
+ border-bottom: 1px solid var(--ion-color-primary);
color: var(--ion-color-primary);
font-size: 20px;
+ align-items: center;
}
.online-list {
padding-top: 0;
- padding-bottom: 4px;
+ padding-bottom: 0;
}
.online-item {
--padding-start: 12px;
- --min-height: 0;
+ --min-height: 30px;
color: var(--ion-color-secondary);
}
.online-label {
- margin-top: 8px;
+ margin-top: 0;
margin-bottom: 0;
}
-ion-backdrop {
- cursor: default;
+.clipboard-col {
+ position: absolute;
+ bottom: 0;
+ padding: 0;
+}
+
+.clipboard-toolbar {
+ max-width: 428px;
+ margin-left: 12px;
+ padding-right: 16px;
+ height: 56px;
+ display: flex;
+ align-items: center;
+ --padding-start: 0;
+}
+
+.clipboard-input {
+ border-radius: 5px;
+ border: 1px solid var(--ion-color-secondary);
+ max-width: 360px;
+ text-align: left;
}
diff --git a/src/components/OnlineList.tsx b/src/components/OnlineList.tsx
index a14a39c..3946fd7 100644
--- a/src/components/OnlineList.tsx
+++ b/src/components/OnlineList.tsx
@@ -1,6 +1,21 @@
-import { IonContent, IonItem, IonLabel, IonList, IonListHeader } from '@ionic/react';
-import React from 'react';
+import {
+ IonContent,
+ IonFabButton,
+ IonInput,
+ IonItem,
+ IonLabel,
+ IonList,
+ IonListHeader,
+ IonToolbar,
+ IonIcon,
+ IonRow,
+ IonCol,
+ IonToast,
+} from '@ionic/react';
+import React, { useState, useRef } from 'react';
import './OnlineList.css';
+import { clipboardOutline } from 'ionicons/icons';
+import copy from 'copy-to-clipboard';
type OnlineListProps = {
pane: string;
@@ -8,6 +23,14 @@ type OnlineListProps = {
};
const OnlineList: React.FC = ({ pane, userList }) => {
+ const inputRef = useRef(null);
+ const [showToast, setShowToast] = useState(false);
+
+ const copyLink = () => {
+ copy(window.location.href);
+ setShowToast(true);
+ };
+
return (
@@ -20,6 +43,24 @@ const OnlineList: React.FC = ({ pane, userList }) => {
);
})}
+
+
+
+
+
+
+
+
+
+
+
+ setShowToast(false)}
+ message="Room link copied"
+ color="primary"
+ duration={2000}
+ >
);
};