File tree Expand file tree Collapse file tree 4 files changed +27
-1
lines changed
app/pages/achievements/[id] Expand file tree Collapse file tree 4 files changed +27
-1
lines changed Original file line number Diff line number Diff line change 3535 </li >
3636 </ul >
3737 <h1 class =" title is-3" >実績の達成状況</h1 >
38+ <div class =" field" >
39+ <input id =" scaleSwitch" v-model =" scaleToMaxUser" type =" checkbox" name =" scaleSwitch" class =" switch" >
40+ <label for =" scaleSwitch" >最大ユーザを基準にする</label >
41+ </div >
3842 <div class =" table-container" >
3943 <table class =" table" >
4044 <thead >
5761 class =" progress is-success"
5862 :class =" (user.count || 0) >= value ? 'is-success' : 'is-warning'"
5963 :value =" user.count || 0"
60- :max =" value"
64+ :max =" scaleToMaxUser ? maxCount : value"
6165 />
6266 </td >
6367 <td :style =" {whiteSpace: 'nowrap'}" >
@@ -80,6 +84,7 @@ export default {
8084 data () {
8185 return {
8286 isLoading: true ,
87+ scaleToMaxUser: false ,
8388 };
8489 },
8590 async fetch ({store}) {
@@ -137,6 +142,9 @@ export default {
137142 id: user .id ,
138143 }));
139144 },
145+ maxCount () {
146+ return Math .max (... this .sortedUserList .map ((user ) => user .count ));
147+ },
140148 sameCounterAchievements () {
141149 if (this .counter === null ) {
142150 return [];
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ export default defineNuxtConfig({
2424 'bulma-o-steps/bulma-steps.css' ,
2525 'bulma-timeline/dist/css/bulma-timeline.min.css' ,
2626 'remixicon/fonts/remixicon.css' ,
27+ 'bulma-switch-control/css/main.css' ,
2728 ] ,
2829
2930 postcss : {
Original file line number Diff line number Diff line change 1717 "dependencies" : {
1818 "bulma" : " ^1.0.2" ,
1919 "bulma-o-steps" : " ^1.1.0" ,
20+ "bulma-switch-control" : " ^1.2.2" ,
2021 "bulma-timeline" : " ^3.0.5" ,
2122 "chart.js" : " ^4.5.1" ,
2223 "core-js" : " ^3.47.0" ,
You can’t perform that action at this time.
0 commit comments