Skip to content

Commit

Permalink
Merge pull request #8 from wmde/import-ui
Browse files Browse the repository at this point in the history
Add data set selector
  • Loading branch information
addshore authored Dec 11, 2020
2 parents c5e850b + 7a5fbe9 commit d66a948
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<v-main>
<v-container>
<h1 class="text-h1">Wikibase Sandbox</h1>
<div class="text-subtitle-1">Create a Wikibase which you can view, edit, extend yourself. Feel free to experiment. Attention: The instance will be reset after 2 hours, so it is really only for experimenting!</div>
<div class="text-subtitle-1">Here are prepopulated databases which you can view, edit, extend yourself. Feel free to experiment. Attention: The instance will be reset after 7 days, so it is really only for experimenting!</div>
</v-container>
<v-container>
<create-sandbox-form />
Expand Down
45 changes: 44 additions & 1 deletion src/components/CreateSandboxForm.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,44 @@
<template>
<v-form>
<v-radio-group v-model="dataSet">
<v-container>
<v-row>
<v-col>
<v-radio value="empty">
<template v-slot:label>
<v-card width="100%" height="100%">
<v-card-title>Empty</v-card-title>
<v-card-text>An empty Wikibase that you can fill with data yourself!</v-card-text>
</v-card>
</template>
</v-radio>
</v-col>

<v-col>
<v-radio value="library">
<template v-slot:label>
<v-card width="100%" height="100%">
<v-card-title>Library data</v-card-title>
<v-card-text>A collection of books and authors</v-card-text>
</v-card>
</template>
</v-radio>
</v-col>

<v-col>
<v-radio value="pokemon" disabled>
<template v-slot:label>
<v-card width="100%" height="100%" color="grey lighten-4">
<v-card-title>Pokemon (coming soon)</v-card-title>
<v-card-text>The first 151. Gotta catch 'em all!</v-card-text>
</v-card>
</template>
</v-radio>
</v-col>
</v-row>
</v-container>
</v-radio-group>

<v-btn color="primary" elevation="2" x-large @click="recaptchaAndCreateSandbox">
Create a new Wikibase sandbox!
</v-btn>
Expand Down Expand Up @@ -34,6 +73,7 @@ export default {
data() {
return {
dataSet: 'empty',
signInLink: null,
showSuccessDialog: false,
showFailureDialog: false,
Expand All @@ -54,7 +94,10 @@ export default {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify( { recaptcha } ),
body: JSON.stringify( {
recaptcha,
dataSet: this.dataSet,
} ),
} ).then( ( response ) => {
return response.json();
} ).then( ( responseJson ) => {
Expand Down

0 comments on commit d66a948

Please sign in to comment.