|
46 | 46 | <div class="ui dropdown icon button" title="{{.locale.Tr "home.filter"}}">
|
47 | 47 | <i class="icon gt-df gt-ac gt-jc gt-m-0">{{svg "octicon-filter" 16}}</i>
|
48 | 48 | <div class="menu">
|
49 |
| - <div class="item"> |
50 |
| - <a @click="toggleArchivedFilter()"> |
51 |
| - <div class="ui checkbox indeterminate" id="archivedFilterCheckbox" title="{{.locale.Tr "home.show_both_archived_unarchived"}}" v-if="archivedFilter === 'both'"> |
52 |
| - <input type="checkbox" v-bind.prop="getArchivedFilterCheckboxState()"> |
53 |
| - <label> |
54 |
| - {{svg "octicon-archive" 16 "gt-mr-2"}} |
55 |
| - {{.locale.Tr "home.show_archived"}} |
56 |
| - </label> |
57 |
| - </div> |
58 |
| - <div class="ui checkbox" id="archivedFilterCheckbox" title="{{.locale.Tr "home.show_only_unarchived"}}" v-if="archivedFilter === 'unarchived'"> |
59 |
| - <input type="checkbox" v-bind.prop="getArchivedFilterCheckboxState()"> |
60 |
| - <label> |
61 |
| - {{svg "octicon-archive" 16 "gt-mr-2"}} |
62 |
| - {{.locale.Tr "home.show_archived"}} |
63 |
| - </label> |
64 |
| - </div> |
65 |
| - <div class="ui checkbox checked" id="archivedFilterCheckbox" title="{{.locale.Tr "home.show_only_archived"}}" v-if="archivedFilter === 'archived'"> |
66 |
| - <input type="checkbox" v-bind.prop="getArchivedFilterCheckboxState()"> |
67 |
| - <label> |
68 |
| - {{svg "octicon-archive" 16 "gt-mr-2"}} |
69 |
| - {{.locale.Tr "home.show_archived"}} |
70 |
| - </label> |
71 |
| - </div> |
72 |
| - </a> |
73 |
| - </div> |
74 |
| - <div class="item"> |
75 |
| - <a @click="togglePrivateFilter()"> |
76 |
| - <div class="ui checkbox indeterminate" id="privateFilterCheckbox" title="{{.locale.Tr "home.show_both_private_public"}}" v-if="privateFilter === 'both'"> |
77 |
| - <input type="checkbox" v-bind.prop="getPrivateFilterCheckboxState()"> |
78 |
| - <label> |
79 |
| - {{svg "octicon-lock" 16 "gt-mr-2"}} |
80 |
| - {{.locale.Tr "home.show_private"}} |
81 |
| - </label> |
82 |
| - </div> |
83 |
| - <div class="ui checkbox" id="privateFilterCheckbox" title="{{.locale.Tr "home.show_only_public"}}" v-if="privateFilter === 'public'"> |
84 |
| - <input type="checkbox" v-bind.prop="getPrivateFilterCheckboxState()"> |
85 |
| - <label> |
86 |
| - {{svg "octicon-lock" 16 "gt-mr-2"}} |
87 |
| - {{.locale.Tr "home.show_private"}} |
88 |
| - </label> |
89 |
| - </div> |
90 |
| - <div class="ui checkbox checked" id="privateFilterCheckbox" title="{{.locale.Tr "home.show_only_private"}}" v-if="privateFilter === 'private'"> |
91 |
| - <input type="checkbox" v-bind.prop="getPrivateFilterCheckboxState()"> |
92 |
| - <label> |
93 |
| - {{svg "octicon-lock" 16 "gt-mr-2"}} |
94 |
| - {{.locale.Tr "home.show_private"}} |
95 |
| - </label> |
96 |
| - </div> |
97 |
| - </a> |
98 |
| - </div> |
| 49 | + <a class="item" @click="toggleArchivedFilter()"> |
| 50 | + <div class="ui checkbox" |
| 51 | + ref="checkboxArchivedFilter" |
| 52 | + data-title-both="{{.locale.Tr "home.show_both_archived_unarchived"}}" |
| 53 | + data-title-unarchived="{{.locale.Tr "home.show_only_unarchived"}}" |
| 54 | + data-title-archived="{{.locale.Tr "home.show_only_archived"}}" |
| 55 | + :title="checkboxArchivedFilterTitle" |
| 56 | + > |
| 57 | + <!--the "hidden" is necessary to make the checkbox work without Fomantic UI js, |
| 58 | + otherwise if the "input" handles click event for intermediate status, it breaks the internal state--> |
| 59 | + <input type="checkbox" class="hidden" v-bind.prop="checkboxArchivedFilterProps"> |
| 60 | + <label> |
| 61 | + {{svg "octicon-archive" 16 "gt-mr-2"}} |
| 62 | + {{.locale.Tr "home.show_archived"}} |
| 63 | + </label> |
| 64 | + </div> |
| 65 | + </a> |
| 66 | + <a class="item" @click="togglePrivateFilter()"> |
| 67 | + <div class="ui checkbox" |
| 68 | + ref="checkboxPrivateFilter" |
| 69 | + data-title-both="{{.locale.Tr "home.show_both_private_public"}}" |
| 70 | + data-title-public="{{.locale.Tr "home.show_only_public"}}" |
| 71 | + data-title-private="{{.locale.Tr "home.show_only_private"}}" |
| 72 | + :title="checkboxPrivateFilterTitle" |
| 73 | + > |
| 74 | + <input type="checkbox" class="hidden" v-bind.prop="checkboxPrivateFilterProps"> |
| 75 | + <label> |
| 76 | + {{svg "octicon-lock" 16 "gt-mr-2"}} |
| 77 | + {{.locale.Tr "home.show_private"}} |
| 78 | + </label> |
| 79 | + </div> |
| 80 | + </a> |
99 | 81 | </div>
|
100 | 82 | </div>
|
101 | 83 | </div>
|
|
0 commit comments