Skip to content
New issue

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

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

Already on GitHub? # to your account

Server settings created - server owners can now edit the names and icons for their servers after creation #26

Merged
merged 27 commits into from
Jan 19, 2022
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
590315a
Added serverSettingsOpen to state
DevlinRocha Jan 18, 2022
8969905
Added server settings option to dropdown menu
DevlinRocha Jan 18, 2022
d71eccd
Merge branch 'main' of github.com:DevlinRocha/banter into server-sett…
DevlinRocha Jan 18, 2022
006f333
Created ServerSettings
DevlinRocha Jan 18, 2022
c8cd4ff
Created ServerSettingsSidebar
DevlinRocha Jan 18, 2022
b7a3e33
Created ServerSettingsView
DevlinRocha Jan 18, 2022
e1e1370
Specified values of state dispatch
DevlinRocha Jan 18, 2022
87c3cdf
Added serverSettings to redux
DevlinRocha Jan 18, 2022
f703dec
Render server settings when state is true
DevlinRocha Jan 18, 2022
b0f786b
Capitalized server name
DevlinRocha Jan 18, 2022
87043a4
Updated DefaultServerIcon size
DevlinRocha Jan 18, 2022
617812d
Initial creation of ServerOverview
DevlinRocha Jan 18, 2022
5c3dc97
Styled custom images
DevlinRocha Jan 18, 2022
1a1e330
Renamed files
DevlinRocha Jan 18, 2022
c5bf22f
Create saveServerChanges; Export uploadServerImage
DevlinRocha Jan 18, 2022
480fafc
UnsavedChanges handles server changes
DevlinRocha Jan 18, 2022
535f116
Remove initials if server name is empty
DevlinRocha Jan 18, 2022
62cde6d
Remove default text size from DefaultServerIcon
DevlinRocha Jan 18, 2022
a4b4a10
Created setServerName function for state
DevlinRocha Jan 18, 2022
0d9a163
Added serverCopy and serverIconPreview to state
DevlinRocha Jan 18, 2022
9e7e53d
Added UnsavedChanges component to ServerSettings
DevlinRocha Jan 18, 2022
30bdff3
Prevents closing settings with unsaved changes
DevlinRocha Jan 18, 2022
c324d9c
Prevents unnecessary re-renders
DevlinRocha Jan 18, 2022
95dc00b
Fixes reset button behavior for server name
DevlinRocha Jan 18, 2022
5687247
Server owners can edit server names and icons
DevlinRocha Jan 19, 2022
4a30dc2
Click icon to change; Remove text on icon hover;
DevlinRocha Jan 19, 2022
ae91296
Added remove icon button and functionality
DevlinRocha Jan 19, 2022
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
Prev Previous commit
Next Next commit
Remove initials if server name is empty
  • Loading branch information
DevlinRocha committed Jan 18, 2022
commit 535f116f46dd29424d350bb3b44d11bb808d26e5
2 changes: 1 addition & 1 deletion src/components/servers/DefaultServerIcon.tsx
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ export default function DefaultServerIcon(props: DefaultServerIconProps) {
const string = props.server.name;
const matches = string.replace("'", "").match(/\b(\w)/g);

if (!matches) return;
if (!matches) return setInitials("");

const initials = matches.join("");
setInitials(initials);