File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 8888 bind:isPublished ={$form .isPublished }
8989 bind:isOfficial ={$form .isOfficial }
9090 bind:isReplenished ={$form .isReplenished }
91+ bind:urlSlug ={$form .urlSlug }
9192 bind:workBookType ={$form .workBookType }
9293 {isAdmin }
9394 message ={$message }
Original file line number Diff line number Diff line change 44 import SelectWrapper from ' $lib/components/SelectWrapper.svelte' ;
55 import { WorkBookType } from ' $lib/types/workbook' ;
66
7+ // TODO: WorkBookディレクトリに移動させる
78 interface Props {
89 // FIXME: 引数がとても多いので、コンポーネントに渡す引数を減らす方法を調べて実装。
910 authorId: string ;
1314 isPublished: boolean ;
1415 isOfficial: boolean ;
1516 isReplenished: boolean ;
17+ urlSlug? : string | null ;
1618 workBookType: WorkBookType ;
1719 isAdmin: boolean ;
1820 isEditable? : boolean ;
2830 isPublished = $bindable (),
2931 isOfficial = $bindable (),
3032 isReplenished = $bindable (),
33+ urlSlug = $bindable (undefined ),
3134 workBookType = $bindable (),
3235 isAdmin,
3336 isEditable = true ,
144147 />
145148 </div >
146149</div >
150+
151+ <!-- 管理者のみ: 問題集のカスタムURL -->
152+ <InputFieldWrapper
153+ labelName =" 問題集のカスタムURL(30文字以下、半角英小文字・半角数字・ハイフンのみ)"
154+ inputFieldName =" urlSlug"
155+ bind:inputValue ={urlSlug }
156+ isEditable ={isAdmin && isEditable }
157+ message ={errors .urlSlug }
158+ />
You can’t perform that action at this time.
0 commit comments