Skip to content

Commit 76019b2

Browse files
mbrandenburgerbvavala
authored andcommitted
Make avatars offline available
Signed-off-by: bur <[email protected]>
1 parent 7235499 commit 76019b2

File tree

4 files changed

+32
-7
lines changed

4 files changed

+32
-7
lines changed

demo/client/frontend/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ Thumbs.db
44
db.json
55
*.log
66
node_modules/
7-
public/
7+
public/img/users
88
.deploy*/
99
src/_drafts

demo/client/frontend/Makefile

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ifdef FORCE_REBUILD
1919
DOCKER_BUILD_OPTS += --no-cache
2020
endif
2121

22-
build: docker
22+
build: docker avatars
2323

2424
docker:
2525
# this image is usually built by docker-compose but we still add a
@@ -41,7 +41,32 @@ cli:
4141
$(DOCKER_IMAGE) \
4242
/bin/sh
4343

44+
45+
AVATARS = auctioneer a-telecom b-net c-mobile
46+
AVATAR_DIR = public/img/users
47+
AVATAR_FILES = $(AVATARS:%=$(AVATAR_DIR)/%.svg)
48+
49+
avatars: $(AVATAR_DIR) $(AVATAR_FILES)
50+
51+
$(AVATAR_DIR):
52+
mkdir $@
53+
54+
public/img/users/auctioneer.svg:
55+
wget -O $@ "https://avataaars.io/?avatarStyle=Circle&topType=LongHairStraight&accessoriesType=Blank&hairColor=BrownDark&facialHairType=Blank&clotheType=BlazerShirt&eyeType=Default&eyebrowType=Default&mouthType=Default&skinColor=Light"
56+
57+
public/img/users/a-telecom.svg:
58+
wget -O $@ "https://avataaars.io/?avatarStyle=Circle&topType=LongHairFrida&accessoriesType=Kurt&hairColor=Red&facialHairType=BeardLight&facialHairColor=BrownDark&clotheType=GraphicShirt&clotheColor=Gray01&graphicType=Skull&eyeType=Wink&eyebrowType=RaisedExcitedNatural&mouthType=Disbelief&skinColor=Brown"
59+
60+
public/img/users/b-net.svg:
61+
wget -O $@ "https://avataaars.io/?avatarStyle=Circle&topType=ShortHairFrizzle&accessoriesType=Prescription02&hairColor=Black&facialHairType=MoustacheMagnum&facialHairColor=BrownDark&clotheType=BlazerSweater&clotheColor=Black&eyeType=Default&eyebrowType=FlatNatural&mouthType=Default&skinColor=Tanned"
62+
63+
public/img/users/c-mobile.svg:
64+
wget -O $@ "https://avataaars.io/?avatarStyle=Circle&topType=LongHairMiaWallace&accessoriesType=Sunglasses&hairColor=BlondeGolden&facialHairType=Blank&clotheType=BlazerSweater&eyeType=Surprised&eyebrowType=RaisedExcited&mouthType=Smile&skinColor=Pale"
65+
66+
67+
4468
clobber:
4569
IMAGE=$$(${DOCKER} images ${DOCKER_IMAGE} -q); \
4670
if [ ! -z "$${IMAGE}" ]; then ${DOCKER} rmi ${IMAGE}; fi
4771
# make clobber in demo/ also would take care but better safe than sorry
72+
-$(RM) $(AVATAR_FILES)

demo/client/frontend/src/store/modules/users.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ const emptyUser = {
2020
const userColors = ["light-blue", "deep-orange", "lime", "orange"];
2121

2222
const userAvatars = [
23-
"https://avataaars.io/?avatarStyle=Circle&topType=LongHairFrida&accessoriesType=Kurt&hairColor=Red&facialHairType=BeardLight&facialHairColor=BrownDark&clotheType=GraphicShirt&clotheColor=Gray01&graphicType=Skull&eyeType=Wink&eyebrowType=RaisedExcitedNatural&mouthType=Disbelief&skinColor=Brown",
24-
"https://avataaars.io/?avatarStyle=Circle&topType=ShortHairFrizzle&accessoriesType=Prescription02&hairColor=Black&facialHairType=MoustacheMagnum&facialHairColor=BrownDark&clotheType=BlazerSweater&clotheColor=Black&eyeType=Default&eyebrowType=FlatNatural&mouthType=Default&skinColor=Tanned",
25-
"https://avataaars.io/?avatarStyle=Circle&topType=LongHairMiaWallace&accessoriesType=Sunglasses&hairColor=BlondeGolden&facialHairType=Blank&clotheType=BlazerSweater&eyeType=Surprised&eyebrowType=RaisedExcited&mouthType=Smile&skinColor=Pale",
26-
"https://avataaars.io/?avatarStyle=Circle&topType=LongHairStraight&accessoriesType=Blank&hairColor=BrownDark&facialHairType=Blank&clotheType=BlazerShirt&eyeType=Default&eyebrowType=Default&mouthType=Default&skinColor=Light"
23+
"/img/users/a-telecom.svg",
24+
"/img/users/b-net.svg",
25+
"/img/users/c-mobile.svg",
26+
"/img/users/auctioneer.svg"
2727
];
2828

2929
const getters = {

demo/client/frontend/src/views/PlaceBid.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ SPDX-License-Identifier: Apache-2.0
99
<AuctionHeader />
1010
<BidderMenu />
1111
<ClockBidding v-if="isClockPhase" />
12-
<AssignmentBidding v-if="isAssignPhase" />
12+
<AssignmentBidding v-else-if="isAssignPhase" />
1313
<div v-else>
1414
<v-alert prominent type="warning" class="mt-4">
1515
No auction running

0 commit comments

Comments
 (0)