#妮露天赋 样式微调

This commit is contained in:
yoimiya-kokomi 2022-09-19 13:45:42 +08:00
parent 008a34d711
commit 9eff48f9b1
9 changed files with 131 additions and 58 deletions

View File

@ -1,6 +1,7 @@
# 2.0 Alpha.3
* 调整`#角色卡片`的样式,尚未完全稳定
* 调整`#心海`的角色卡片样式,尚未完全稳定
* `#妮露天赋` 样式微调
# 2.0 Alpha.2

View File

@ -40,7 +40,7 @@ class Mys {
e.targetUser = this.targetUser
e.selfUser = this.selfUser
e.isSelfCookie = uid === ckUid
e.isSelfCookie = uid * 1 === ckUid * 1
}
async getData (api, data) {

View File

@ -1,12 +1,8 @@
import { Artifact, Character, AvatarList, Avatar } from '../../models/index.js'
import { Cfg, Data, Common, Profile } from '../../components/index.js'
import { Character, Avatar } from '../../models/index.js'
import { Cfg, Common, Profile } from '../../components/index.js'
import lodash from 'lodash'
import { segment } from 'oicq'
// 角色昵称
let abbr = Character.getAbbr()
export async function renderAvatar (e, avatar, renderType = 'card') {
// 如果传递的是名字,则获取
if (typeof (avatar) === 'string') {
@ -73,7 +69,7 @@ async function renderCard (e, ds, renderType = 'card') {
actionName: '查询信息'
})
data = avatar.getData('id,name,sName,level,fetter,cons,weapon,elem,artis,imgs,dataSourceName,updateTime')
if (MysApi && MysApi.isSelfCookie) {
if (avatar.isProfile || (MysApi && MysApi.isSelfCookie)) {
data.talent = await avatar.getTalent(MysApi)
data.talentMap = ['a', 'e', 'q']
// 计算皇冠个数

View File

@ -17,7 +17,18 @@
{{/each}}
</div>
</div>
{{if ds.tables && ds.tables.length > 0}}
<div class="talent-common-info">
{{each ds.tables tr}}
{{if tr.isSame}}
<div>
<strong>{{tr.name}}{{if tr.unit}}({{tr.unit}}){{/if}}</strong>
<span>{{tr.values[0]}}</span>
</div>
{{/if}}
{{/each}}
</div>
<table class="talent-table cont-table">
<tr class="tr">
<td class="th"></td>
@ -28,6 +39,7 @@
{{/each}}
</tr>
{{each ds.tables tr}}
{{if !tr.isSame}}
<tr class="tr">
<td class="th talent-name">
{{tr.name}}
@ -35,9 +47,7 @@
<span class="unit">({{tr.unit}})</span>
{{/if}}
</td>
{{if tr.isSame}}
<td class="td colspan" colspan="{{type == a ? 6 : 8}}" class="td">{{tr.values[0]}}</td>
{{else}}
{{each tr.values v idx}}
{{if (type=="a" && idx>4 && idx<11) || (type!="a" && idx>4 && idx < 13)}}
<td class="td">{{v}}</td>

View File

@ -332,4 +332,30 @@ body {
color: #7994a7;
margin: 20px 0 10px 0;
}
.talent-common-info {
display: flex;
flex-wrap: wrap;
padding-left: 135px;
margin-bottom: -5px;
}
.talent-common-info > div {
display: flex;
margin: 4px;
border-radius: 5px;
white-space: nowrap;
box-shadow: 1px 1px 2px 0 rgba(0, 0, 0, 0.8);
}
.talent-common-info > div strong,
.talent-common-info > div span {
padding: 5px 8px;
}
.talent-common-info > div strong {
background: rgba(0, 0, 0, 0.4);
color: #d3bc8e;
border-radius: 5px 0 0 5px;
}
.talent-common-info > div span {
background: rgba(50, 50, 50, 0.4);
border-radius: 0 5px 5px 0;
}
/*# sourceMappingURL=character-talent.css.map */

View File

@ -388,3 +388,33 @@ body {
color: #7994a7;
margin: 20px 0 10px 0;
}
.talent-common-info {
display: flex;
flex-wrap: wrap;
padding-left: 135px;
margin-bottom: -5px;
& > div {
display: flex;
margin: 4px;
border-radius: 5px;
white-space: nowrap;
box-shadow: 1px 1px 2px 0 rgba(0, 0, 0, .8);
strong, span {
padding: 5px 8px;
}
strong {
background: rgba(0, 0, 0, 0.4);
color: #d3bc8e;
border-radius: 5px 0 0 5px;
}
span {
background: rgba(50, 50, 50, 0.4);
border-radius: 0 5px 5px 0;
}
}
}

View File

@ -251,4 +251,4 @@ const charData = {
71: { key: 'cyno', name: '赛诺' },
72: { key: 'candace', name: '坎蒂丝' }
}
await down('4', true)
await down('70,71,72', true)

View File

@ -1,4 +1,4 @@
import { abbr } from '../../../../config/genshin/roleId.js'
import abbr from './abbr.js'
import lodash from 'lodash'
let costumes = {
@ -8,9 +8,6 @@ let costumes = {
凝光: [202701], // 凝光
迪卢克: [201601], // 迪卢克
菲谢尔: [203101], // 菲谢尔
达达利亚: [900001],
雷电将军: [900002],
钟离: [900003]
}
const fixData = {
4: {

13
tools/sprider/abbr.js Normal file
View File

@ -0,0 +1,13 @@
export default {
达达利亚: '公子',
神里绫华: '绫华',
神里绫人: '绫人',
枫原万叶: '万叶',
雷电将军: '雷神',
珊瑚宫心海: '心海',
荒泷一斗: '一斗',
八重神子: '八重',
九条裟罗: '九条',
罗莎莉亚: '罗莎',
鹿野院平藏: '平藏'
}