From d4f547fa78f7fe7b16507f4a401f31980ffe210b Mon Sep 17 00:00:00 2001 From: Natsumi Date: Mon, 9 Aug 2021 03:06:17 +1200 Subject: [PATCH] Show previous status when changed without status description changing --- html/src/index.pug | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/html/src/index.pug b/html/src/index.pug index 30b9ad36..02d13626 100644 --- a/html/src/index.pug +++ b/html/src/index.pug @@ -147,15 +147,35 @@ html template(v-else-if="scope.row.type === 'Offline' || scope.row.type === 'Online'") location(v-if="scope.row.location" :location="scope.row.location" :hint="scope.row.worldName") template(v-else-if="scope.row.type === 'Status'") - el-tooltip(placement="top") - template(#content) - span(v-if="scope.row.status === 'active'") Online - span(v-else-if="scope.row.status === 'join me'") Join Me - span(v-else-if="scope.row.status === 'ask me'") Ask Me - span(v-else-if="scope.row.status === 'busy'") Do Not Disturb - span(v-else) Offline - i.x-user-status(:class="statusClass(scope.row.status)") - span(v-text="scope.row.statusDescription") + template(v-if="scope.row.statusDescription === scope.row.previousStatusDescription") + el-tooltip(placement="top") + template(#content) + span(v-if="scope.row.previousStatus === 'active'") Active + span(v-else-if="scope.row.previousStatus === 'join me'") Join Me + span(v-else-if="scope.row.previousStatus === 'ask me'") Ask Me + span(v-else-if="scope.row.previousStatus === 'busy'") Do Not Disturb + span(v-else) Offline + i.x-user-status(:class="statusClass(scope.row.previousStatus)") + span + i.el-icon-right + el-tooltip(placement="top") + template(#content) + span(v-if="scope.row.status === 'active'") Active + span(v-else-if="scope.row.status === 'join me'") Join Me + span(v-else-if="scope.row.status === 'ask me'") Ask Me + span(v-else-if="scope.row.status === 'busy'") Do Not Disturb + span(v-else) Offline + i.x-user-status(:class="statusClass(scope.row.status)") + template(v-else) + el-tooltip(placement="top") + template(#content) + span(v-if="scope.row.status === 'active'") Online + span(v-else-if="scope.row.status === 'join me'") Join Me + span(v-else-if="scope.row.status === 'ask me'") Ask Me + span(v-else-if="scope.row.status === 'busy'") Do Not Disturb + span(v-else) Offline + i.x-user-status(:class="statusClass(scope.row.status)") + span(v-text="scope.row.statusDescription") template(v-else-if="scope.row.type === 'Avatar'") avatar-info(:imageurl="scope.row.currentAvatarImageUrl" :userid="scope.row.userId" :hintownerid="scope.row.ownerId" :hintavatarname="scope.row.avatarName")