Skip to content

Commit bee863d

Browse files
committed
updated readme
1 parent 86764bf commit bee863d

File tree

8 files changed

+18
-235
lines changed

8 files changed

+18
-235
lines changed

Fiddle Chat App/src-tauri/tauriconfijson.txt

Lines changed: 0 additions & 204 deletions
This file was deleted.

Fiddle Chat App/src/AppFrame.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,11 @@ const theme: Theme = createTheme({
1818
function AppFrame() {
1919
const defaultDark: boolean = true;
2020
const [colourtheme, setTheme] = useLocalStorage<string>('colourtheme', defaultDark ? 'dark' : 'light');
21-
const [DARKLIGHT, setDARKLIGHT] = useLocalStorage<string>("DARKLIGHT",
22-
colourtheme === "light" || colourtheme === "lpink" || colourtheme === "lred" || colourtheme === "lgreen"
23-
? "light" : "dark");
21+
const [DARKLIGHT, setDARKLIGHT] = useLocalStorage<string>("DARKLIGHT", colourtheme.startsWith("l") ? "light" : "dark");
2422

2523
function switchThemes(colour: string){
2624
setTheme(colour);
27-
setDARKLIGHT(colour === "light" || colour === "lpink" || colour === "lred" || colour === "lgreen" ? "light" : "dark");
25+
setDARKLIGHT(colour.startsWith("l") ? "light" : "dark");
2826
}
2927

3028
return (

Fiddle Chat App/src/AppFrameless.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,11 @@ const theme: Theme = createTheme({
2424
function AppFrameless() {
2525
const defaultDark: boolean = true;
2626
const [colourtheme, setTheme] = useLocalStorage<string>('colourtheme', defaultDark ? 'dark' : 'light');
27-
const [DARKLIGHT, setDARKLIGHT] = useLocalStorage<string>("DARKLIGHT",
28-
colourtheme === "light" || colourtheme === "lpink" || colourtheme === "lred" || colourtheme === "lgreen"
29-
? "light" : "dark");
27+
const [DARKLIGHT, setDARKLIGHT] = useLocalStorage<string>("DARKLIGHT", colourtheme.startsWith("l") ? "light" : "dark");
3028

3129
function switchThemes(colour: string){
3230
setTheme(colour);
33-
setDARKLIGHT(colour === "light" || colour === "lpink" || colour === "lred" || colour === "lgreen" ? "light" : "dark");
31+
setDARKLIGHT(colour.startsWith("l") ? "light" : "dark");
3432
}
3533

3634
useEffect(() => {

README.md

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
1+
![logo](img/logo.png "logo")
2+
![application"](img/application.png "application")
3+
14
# Chat-App
25
A real time chat application done with tauri and react with a firebase backend
36

4-
# Note
5-
This branch is done with tauri. The old version which is done with electron is accessible here: https://github.com/waveyboym/Chat-App/tree/read-only-old-version.
6-
The old version will no longer receive updates and/or fixes. I'm just putting it up in case anyone might want to have access to it.
7-
8-
# Presentation
9-
![private messaging](img/privchat.png "private messaging")
10-
\
11-
\
12-
\
13-
\
14-
![room messaging"](img/roomchat.png "room messaging")
15-
167
# I am a user/tester
178
Executables for windows and linux is available <a href="https://github.com/waveyboym/Chat-App/releases">here</a> \
189
Executable for MacOS will be coming soon...
@@ -80,7 +71,7 @@ service cloud.firestore {
8071
3. For a non-frameless window, open <a href="https://github.com/waveyboym/Chat-App/blob/main/Fiddle%20Chat%20App/src-tauri/tauri-noframe.txt">tauri-noframe.txt</a> and select, copy and paste everything into <a href="https://github.com/waveyboym/Chat-App/blob/main/Fiddle%20Chat%20App/src-tauri/tauri.conf.json">tauri.conf.json</a>
8172

8273
# Adding more colour themes
83-
1. To add another colour theme, first go to <a href="https://github.com/waveyboym/Chat-App/blob/main/Fiddle%20Chat%20App/src/components/sub_components/Themes.tsx">Themes.tsx</a> and go to line 155 and copy and paste the code above it; it looks like this :
74+
1. To add another colour theme, first go to <a href="https://github.com/waveyboym/Chat-App/blob/main/Fiddle%20Chat%20App/src/components/sub_components/Themes.tsx">Themes.tsx</a> and go to a line after the last "theme-selector" div and paste the following replacing "light-yellow-col | dark-yellow-col" and "lyellow | dyellow" with the name of your colour and the text in between h3 tags with the name of your colour to display:
8475
```
8576
<div className="theme-selector">
8677
<motion.div
@@ -93,24 +84,24 @@ service cloud.firestore {
9384
<h3>Light yellow theme</h3>
9485
</div>
9586
```
96-
1. Change the parameters to suite your needs for the colour you want to create.
97-
2. Go to <a href="https://github.com/waveyboym/Chat-App/blob/main/Fiddle%20Chat%20App/src/App.tsx">App.tsx</a> and at line 28 add the colour name of your colour, eg "lgreen" was chosen above, so lyellow would be added as another colourtheme to compare:
98-
```colourtheme === "light" || colourtheme === "lpink" || colourtheme === "lred" || colourtheme === "lgreen" || colourtheme === "lyellow"```
99-
1. Do the same thing as above at line 33 in the same file
10087
2. Go to <a href="https://github.com/waveyboym/Chat-App/blob/main/Fiddle%20Chat%20App/src/styles/Settings.scss">Settings.scss</a> and at line 448 add the class name of the theme-selector you created and it's corresponding colour, eg ```#light-yellow-col{background: #f8e962;}```
101-
3. Go to <a href="https://github.com/waveyboym/Chat-App/blob/main/Fiddle%20Chat%20App/src/styles/_constantMixins.scss">_constantMixins.scss</a> and depending on whether or not the colour you created is a darker or lighter colour, copy all the code in root, that is line 1 to 14 or line 16 to 29 and paste it at line 131.
102-
4. Name ```[data-theme='dgreen']``` with the name of your colour, eg ```[data-theme='lyellow']```. Make sure this matches otherwise the colours won't reflect when you change the theme.
103-
5. Change the three variables, \
88+
3. Go to <a href="https://github.com/waveyboym/Chat-App/blob/main/Fiddle%20Chat%20App/src/styles/_constantMixins.scss">_constantMixins.scss</a>
89+
4. If you colour is a dark colour, copy a block that has a colour starting with such as ```[data-theme='dgreen']```. If is light, copy ```[data-theme='lgreen']```.
90+
5. Name ```[data-theme='dgreen']``` with the name of your colour, eg ```[data-theme='lyellow']```. Make sure this matches otherwise the colours won't reflect when you change the theme.
91+
6. Change the three variables, \
10492
--root-dark-side-bar-col, \
10593
--root-top-most-app-draggable-sec and \
10694
--root-lighter-side-bar-col by adjusting their colours in the section of code you just copied over to suit your needs.
107-
6. You are done and may now launch the app with ```npm run tauri dev```
95+
96+
# Note
97+
This branch is done with tauri. The old version which is done with electron is accessible here: https://github.com/waveyboym/Chat-App/tree/read-only-old-version.
98+
The old version will no longer receive updates and/or fixes. I'm just putting it up in case anyone might want to have access to it.
10899

109100
# TODO
110101
- [ ] Improve load times between opening messages
111-
- [x] Improve user interface for navigating between private messages and room messages(DONE)
102+
- [x] Improve user interface for navigating between private messages and room message
112103
- [x] Add support for presence detection(whether or not a user is online)
113-
- [x] Add ability to view all friends in a separate component(DONE)
104+
- [x] Add ability to view all friends in a separate component
114105
- [ ] Add stories/most recent updates
115106
- [x] Maybe add more themes
116107

img/application.png

1.21 MB
Loading

img/logo.png

218 KB
Loading

img/privchat.png

-425 KB
Binary file not shown.

img/roomchat.png

-394 KB
Binary file not shown.

0 commit comments

Comments
 (0)