You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

300 lines
20 KiB

  1. extends ../master.pug
  2. block body
  3. body
  4. #app.config-manager
  5. config-manager(inline-template)
  6. .container
  7. transition(name='tst-welcome')
  8. .welcome(v-if='state === "welcome" || state === "restart"')
  9. img(src='/images/logo.png', alt='Wiki.js')
  10. h2 A modern, lightweight and powerful wiki app built on NodeJS, Git and Markdown
  11. .content(v-cloak)
  12. //- ==============================================
  13. //- WELCOME
  14. //- ==============================================
  15. template(v-if='state === "welcome"')
  16. .panel
  17. h2.panel-title.is-featured
  18. span Welcome!
  19. i(v-if='loading')
  20. .panel-content.is-text
  21. p This installation wizard will guide you through the steps needed to get your wiki up and running in no time!
  22. p Detailed information about installation and usage can be found on the #[a(href='https://docs.wiki.requarks.io/') official documentation site]. #[br] Should you have any question or would like to report something that doesn't look right, feel free to create a new issue on the #[a(href='https://github.com/Requarks/wiki/issues') GitHub project].
  23. .panel-content.form-sections
  24. section
  25. p #[i.nc-icon-outline.tech_cd-reader] You are about to install Wiki.js #[strong= packageObj.version].
  26. section
  27. p.control.is-fullwidth
  28. input#ipt-upgrade(type='checkbox', v-model='conf.upgrade', name='ipt-upgrade')
  29. label.label(for='ipt-upgrade') Upgrade from Wiki.js 1.x
  30. span.desc Check this box if you are upgrading from Wiki.js 1.x and wish to migrate your existing data.
  31. .panel-footer
  32. .progress-bar: div(v-bind:style='{width: currentProgress}')
  33. button.button.is-small.is-light-blue(v-on:click='proceedToSyscheck', v-bind:disabled='loading') Start
  34. //- ==============================================
  35. //- SYSTEM CHECK
  36. //- ==============================================
  37. template(v-else-if='state === "syscheck"')
  38. .panel
  39. h2.panel-title.is-featured
  40. span System Check
  41. i(v-if='loading')
  42. .panel-content.is-text
  43. p(v-if='loading') #[i.icon-loader.animated.rotateIn.infinite] Checking your system for compatibility...
  44. p(v-if='!loading && syscheck.ok')
  45. ul
  46. li(v-for='rs in syscheck.results') #[i.icon-check] {{rs}}
  47. p(v-if='!loading && syscheck.ok')
  48. i.icon-check
  49. strong Looks good! No issues so far.
  50. p(v-if='!loading && !syscheck.ok') #[i.icon-square-cross] Error: {{ syscheck.error }}
  51. .panel-footer
  52. .progress-bar: div(v-bind:style='{width: currentProgress}')
  53. button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToWelcome', v-bind:disabled='loading') Back
  54. button.button.is-small.is-teal(v-on:click='proceedToSyscheck', v-if='!loading && !syscheck.ok') Check Again
  55. button.button.is-small.is-red.is-outlined(v-on:click='proceedToGeneral', v-if='!loading && !syscheck.ok') Continue Anyway
  56. button.button.is-small.is-light-blue(v-on:click='proceedToGeneral', v-if='loading || syscheck.ok', v-bind:disabled='loading') Continue
  57. //- ==============================================
  58. //- GENERAL
  59. //- ==============================================
  60. template(v-else-if='state === "general"')
  61. .panel
  62. h2.panel-title.is-featured
  63. span General
  64. i(v-if='loading')
  65. .panel-content.form-sections
  66. section
  67. p.control.is-fullwidth
  68. label.label Site Title
  69. input(type='text', placeholder='e.g. Wiki', v-model='conf.title', data-vv-scope='general', name='ipt-title', v-validate='{ required: true, min: 2 }')
  70. span.desc The site title will appear in the top left corner on every page and within the window title bar.
  71. section
  72. p.control.is-fullwidth
  73. label.label Host
  74. input(type='text', placeholder='http://', v-model='conf.host', data-vv-scope='general', name='ipt-host', v-validate='{ required: true, min: 4 }')
  75. span.desc The full URL to your wiki, without the trailing slash, e.g.: http://wiki.domain.com. Make sure to include the port if different than 80/443.
  76. section
  77. p.control
  78. label.label Port
  79. input(type='text', placeholder='e.g. 80', v-model.number='conf.port', data-vv-scope='general', name='ipt-port', v-validate='{ required: true }')
  80. span.desc The port on which Wiki.js will listen to. Usually port 80 if connecting directly, or a random port (e.g. 3000) if using a web server in front of it.<br>Set <strong>$(PORT)</strong> to use PORT environment variable.
  81. section
  82. p.control
  83. label.label Site UI Language
  84. select(v-model='conf.lang')
  85. each lg in data.langs
  86. option(value=lg.id)= lg.name
  87. span.desc The language in which navigation, help and other UI elements will be displayed.
  88. section
  89. p.control.is-fullwidth
  90. label.label Local Repository Path
  91. input(type='text', placeholder='e.g. ./repo', v-model='conf.pathRepo', data-vv-scope='general', name='ipt-repopath', v-validate='{ required: true, min: 2 }')
  92. span.desc The path where the local git repository will be created, used to store content in markdown files and uploads.#[br] #[strong It is recommended to leave the default value].
  93. section
  94. p.control.is-fullwidth
  95. input#ipt-public(type='checkbox', v-model='conf.public', data-vv-scope='general', name='ipt-public')
  96. label.label(for='ipt-public') Public Access
  97. span.desc Should the site be accessible (read only) without login.
  98. .panel-footer
  99. .progress-bar: div(v-bind:style='{width: currentProgress}')
  100. button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToSyscheck', v-bind:disabled='loading') Back
  101. button.button.is-small.is-light-blue(v-on:click='proceedToConsiderations', v-bind:disabled='loading || errors.any("general")') Continue
  102. //- ==============================================
  103. //- CONSIDERATIONS
  104. //- ==============================================
  105. template(v-else-if='state === "considerations"')
  106. .panel
  107. h2.panel-title.is-featured
  108. span Important Considerations
  109. i(v-if='loading')
  110. .panel-content.is-text
  111. h3 Is Wiki.js going to be behind a web server (e.g. nginx / apache / IIS) or proxy?
  112. p
  113. ul
  114. li - Make sure the upload limit is sufficient. Most web servers have a low limit (e.g. 2 MB) by default.
  115. li - Make sure your web server is configured to allow web sockets. Wiki.js will fallback to standard XHR queries if not available.
  116. li - Do not rewrite URLs after the domain. This can cause unexpected issues in Wiki.js navigation.
  117. li - Do not remove or alter the client IP when proxying the requests. This can cause the authentication brute force protection to engage unexpectedly.
  118. template(v-if='considerations.https')
  119. h3 The site will not be using HTTPS? #[i.nc-icon-outline.ui-3_alert.animated.fadeOut.infinite]
  120. p The host URL you specified is not HTTPS. It is highly recommended to use HTTPS. You must use a web server / proxy (e.g. nginx / apache / IIS) in front of Wiki.js to use HTTPS. Wiki.js does not provide HTTPS handling by itself.
  121. template(v-if='considerations.port')
  122. h3 You are using a non-standard port.
  123. p If you are not planning on using a web server / proxy in front of Wiki.js, be aware that users will need to specify the port when accessing the wiki. Make sure this is the intended behavior. Otherwise set a standard HTTP port such as 80.
  124. template(v-if='considerations.localhost')
  125. h3 Are you sure you want to use localhost as the host base URL? #[i.nc-icon-outline.ui-3_alert.animated.fadeOut.infinite]
  126. p The host URL you specified is localhost. Unless you are a developer running Wiki.js locally on your machine, this is not recommended!
  127. .panel-footer
  128. .progress-bar: div(v-bind:style='{width: currentProgress}')
  129. button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToGeneral', v-bind:disabled='loading') Back
  130. button.button.is-small.is-light-blue(v-on:click='proceedToGit', v-bind:disabled='loading') Continue
  131. //- ==============================================
  132. //- GIT
  133. //- ==============================================
  134. template(v-else-if='state === "git"')
  135. .panel
  136. h2.panel-title.is-featured
  137. span Git Repository
  138. i(v-if='loading')
  139. .panel-content.is-text
  140. p Wiki.js stores article content and uploads locally on disk. All content is then regularly kept in sync with a remote git repository. This acts a backup protection and provides history / revert features. While optional, it is <strong>HIGHLY</strong> recommended to setup the remote git repository connection.
  141. .panel-content.form-sections
  142. section.columns
  143. .column.is-two-thirds
  144. p.control.is-fullwidth
  145. label.label Repository URL
  146. input(type='text', placeholder='e.g. git@github.com/org/repo.git or https://github.com/org/repo', v-model='conf.gitUrl', data-vv-scope='git', name='ipt-giturl', v-validate='{ required: true, min: 5 }')
  147. span.desc The full git repository URL to connect to.
  148. .column
  149. p.control.is-fullwidth
  150. label.label Branch
  151. input(type='text', placeholder='e.g. master', v-model='conf.gitBranch', data-vv-scope='git', name='ipt-gitbranch', v-validate='{ required: true, min: 2 }')
  152. span.desc The git branch to use when synchronizing changes.
  153. section.columns
  154. .column.is-one-third
  155. p.control.is-fullwidth
  156. label.label Authentication
  157. select(v-model='conf.gitAuthType')
  158. option(value='ssh') SSH (recommended)
  159. option(value='basic') Basic
  160. span.desc The authentication method used to connect to your remote Git repository.
  161. p.control.is-fullwidth
  162. input#ipt-git-verify-ssl(type='checkbox', v-model='conf.gitAuthSSL')
  163. label.label(for='ipt-git-verify-ssl') Verify SSL
  164. .column(v-show='conf.gitAuthType === "basic"')
  165. p.control.is-fullwidth
  166. label.label Username
  167. input(type='text', v-model='conf.gitAuthUser')
  168. span.desc The username for the remote git connection.
  169. .column(v-show='conf.gitAuthType === "basic"')
  170. p.control.is-fullwidth
  171. label.label Password
  172. input(type='password', v-model='conf.gitAuthPass')
  173. span.desc The password for the remote git connection.
  174. .column(v-show='conf.gitAuthType === "ssh"')
  175. p.control.is-fullwidth
  176. label.label Private Key location
  177. input(type='text', placeholder='e.g. /etc/wiki/keys/git.pem', v-model='conf.gitAuthSSHKey')
  178. span.desc The full path to the private key on disk.
  179. section.columns
  180. .column.is-one-third
  181. p.control.is-fullwidth
  182. input#ipt-git-show-user-email(type='checkbox', v-model='conf.gitShowUserEmail')
  183. label.label(for='ipt-git-show-user-email') Commit using User Email
  184. span.desc When enabled, commits are made as the current user name and email. If unchecked, the current user name will still be used but the default commit author email will be used instead.
  185. .column
  186. p.control.is-fullwidth
  187. label.label Default Commit Author Email
  188. input(type='text', placeholder='e.g. user@example.com', v-model.number='conf.gitServerEmail', data-vv-scope='git', name='ipt-gitsrvemail', v-validate='{ required: true, email: true }')
  189. span.desc The default/fallback email to use when creating commits to the git repository.
  190. .panel-footer
  191. .progress-bar: div(v-bind:style='{width: currentProgress}')
  192. button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToGeneral', v-bind:disabled='loading') Back
  193. button.button.is-small.is-light-blue.is-outlined(v-on:click='conf.gitUseRemote = false; proceedToGitCheck()', v-bind:disabled='loading') Skip this step
  194. button.button.is-small.is-light-blue(v-on:click='conf.gitUseRemote = true; proceedToGitCheck()', v-bind:disabled='loading || errors.any("git")') Continue
  195. //- ==============================================
  196. //- GIT CHECK
  197. //- ==============================================
  198. template(v-else-if='state === "gitcheck"')
  199. .panel
  200. h2.panel-title.is-featured
  201. span Git Repository Check
  202. i(v-if='loading')
  203. .panel-content.is-text
  204. p(v-if='loading') #[i.icon-loader.animated.rotateIn.infinite] Verifying Git repository settings...
  205. p(v-if='!loading && gitcheck.ok')
  206. ul
  207. li(v-for='rs in gitcheck.results') #[i.icon-check] {{rs}}
  208. p(v-if='!loading && gitcheck.ok')
  209. i.icon-check
  210. strong Git settings are correct!
  211. p(v-if='!loading && !gitcheck.ok') #[i.icon-square-cross] Error: {{ gitcheck.error }}
  212. .panel-footer
  213. .progress-bar: div(v-bind:style='{width: currentProgress}')
  214. button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToGit', v-bind:disabled='loading') Back
  215. button.button.is-small.is-teal(v-on:click='proceedToGitCheck', v-if='!loading && !gitcheck.ok') Try Again
  216. button.button.is-small.is-light-blue(v-on:click='proceedToAdmin', v-if='loading || gitcheck.ok', v-bind:disabled='loading') Continue
  217. //- ==============================================
  218. //- ADMINISTRATOR ACCOUNT
  219. //- ==============================================
  220. template(v-else-if='state === "admin"')
  221. .panel
  222. h2.panel-title.is-featured
  223. span Administrator Account
  224. i(v-if='loading')
  225. .panel-content.is-text
  226. p An administrator account will be created for local authentication. From this account, you can create or authorize more users.
  227. .panel-content.form-sections
  228. section
  229. p.control.is-fullwidth
  230. label.label Administrator Email
  231. input(type='text', placeholder='e.g. admin@example.com', v-model='conf.adminEmail', data-vv-scope='admin', name='ipt-adminemail', v-validate='{ required: true, email: true }')
  232. span.desc The email address of the administrator account
  233. section.columns
  234. .column
  235. p.control.is-fullwidth
  236. label.label Password
  237. input(type='password', v-model='conf.adminPassword', data-vv-scope='admin', name='ipt-adminpwd', v-validate='{ required: true, min: 8 }')
  238. span.desc At least 8 characters long.
  239. .column
  240. p.control.is-fullwidth
  241. label.label Confirm Password
  242. input(type='password', v-model='conf.adminPasswordConfirm', data-vv-scope='admin', name='ipt-adminpwd2', v-validate='{ required: true, confirmed: "ipt-adminpwd" }')
  243. span.desc Verify your password again.
  244. .panel-footer
  245. .progress-bar: div(v-bind:style='{width: currentProgress}')
  246. button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToGit', v-bind:disabled='loading') Back
  247. button.button.is-small.is-light-blue(v-on:click='proceedToFinal', v-bind:disabled='loading || errors.any("admin")') Continue
  248. //- ==============================================
  249. //- FINAL
  250. //- ==============================================
  251. template(v-else-if='state === "final"')
  252. .panel
  253. h2.panel-title.is-featured
  254. span Finalizing
  255. i(v-if='loading')
  256. .panel-content.is-text
  257. p(v-if='loading') #[i.icon-loader.animated.rotateIn.infinite] Finalizing your installation...
  258. p(v-if='!loading && final.ok')
  259. i.icon-check
  260. strong Wiki.js was configured successfully and is now ready for use.
  261. p(v-if='!loading && final.ok')
  262. | Click the <strong>Start</strong> button below to start the Wiki.js server.
  263. p(v-if='!loading && !final.ok') #[i.icon-square-cross] Error: {{ final.error }}
  264. .panel-footer
  265. .progress-bar: div(v-bind:style='{width: currentProgress}')
  266. button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToAdmin', v-bind:disabled='loading') Back
  267. button.button.is-small.is-teal(v-on:click='proceedToFinal', v-if='!loading && !final.ok') Try Again
  268. button.button.is-small.is-green(v-on:click='finish', v-if='loading || final.ok', v-bind:disabled='loading') Start
  269. //- ==============================================
  270. //- RESTART
  271. //- ==============================================
  272. template(v-else-if='state === "restart"')
  273. .panel
  274. h2.panel-title.is-featured
  275. span Restarting...
  276. i
  277. .panel-content.is-text
  278. p #[i.icon-loader.animated.rotateIn.infinite] Restarting Wiki.js in normal mode...
  279. p You'll automatically be redirected to the homepage when ready. This usually takes about 30 seconds.
  280. .panel-footer
  281. button.button.is-small.is-green(disabled='disabled') Start