Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Add shortcut to run tests | set shiftwidth=8
set softtabstop=8
set noexpandtab
set nolist
" Code navigation
nmap <C-UP> gd
nmap <C-DOWN> :GoReferrers<CR>
" Not working very well :-(
nmap <Leader>d <Plug>(go-doc)
nmap <Leader>l :GoMetaLinter<CR>
nmap <Leader>i :GoImplements<CR>
nmap <Leader>r <Plug>(go-rename)
nmap <F5> <Plug>(go-coverage)
"vimgrep word under cursor
nnoremap <Leader>g yiw:vimgrep /<C-r>"/g **/*.go
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_structs = 1
let g:go_highlight_interfaces = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1
let g:go_fmt_command = "goimports"
let g:syntastic_go_checkers = ['golint', 'govet', 'errcheck']
let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['go'] }
let g:go_list_type = "quickfix"
| set shiftwidth=8
set softtabstop=8
set noexpandtab
set nolist
" Code navigation
nmap <C-UP> gd
nmap <C-DOWN> :GoReferrers<CR>
" Not working very well :-(
nmap <Leader>d <Plug>(go-doc)
nmap <Leader>l :GoMetaLinter<CR>
nmap <Leader>i :GoImplements<CR>
nmap <Leader>r <Plug>(go-rename)
nmap <Leader>b <Plug>(go-test)
nmap <F5> <Plug>(go-coverage)
"vimgrep word under cursor
nnoremap <Leader>g yiw:vimgrep /<C-r>"/g **/*.go
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_structs = 1
let g:go_highlight_interfaces = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1
let g:go_fmt_command = "goimports"
let g:syntastic_go_checkers = ['golint', 'govet', 'errcheck']
let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['go'] }
let g:go_list_type = "quickfix"
|
Switch colorscheme from Wombat to Hybrid | set background=dark
if has("gui_running")
colorscheme wombat
else
colorscheme wombat256mod
endif
" Use the same background color for signs as we do for line numbers. This
" makes signs and line numbers look like one nice big column.
hi! link SignColumn LineNr
" Use a more subtle color to highlight whitespace when using 'listchars'.
hi! SpecialKey gui=NONE guifg=#113245 guibg=#002b36
hi! ColorColumn guibg=black ctermbg=black
" Use the same background colour behind text, and non-text. This removes the
" two different background colours you get out-of-the-box.
hi! Normal ctermbg=NONE
hi! NonText ctermbg=NONE
hi! link NonText Normal
| set background=dark
colorscheme hybrid
" Use the same background color for signs as we do for line numbers. This
" makes signs and line numbers look like one nice big column.
hi! link SignColumn LineNr
" Use a more subtle color to highlight whitespace when using 'listchars'.
hi! SpecialKey gui=NONE guifg=#113245 guibg=#002b36
hi! ColorColumn guibg=black ctermbg=black
" Use the same background colour behind text, and non-text. This removes the
" two different background colours you get out-of-the-box.
hi! Normal ctermbg=NONE
hi! NonText ctermbg=NONE
hi! link NonText Normal
|
Add dadbod and fireplace (<3 tpope) | Plug 'Shougo/deoplete.nvim'
Plug 'airblade/vim-gitgutter'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'easymotion/vim-easymotion'
Plug 'jiangmiao/auto-pairs'
Plug 'liuchengxu/vim-better-default'
Plug 'rafi/awesome-vim-colorschemes'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-dispatch'
Plug 'tpope/vim-eunuch'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-sleuth'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-unimpaired'
Plug 'tpope/vim-vinegar'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'w0rp/ale'
| Plug 'Shougo/deoplete.nvim'
Plug 'airblade/vim-gitgutter'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'easymotion/vim-easymotion'
Plug 'jiangmiao/auto-pairs'
Plug 'liuchengxu/vim-better-default'
Plug 'rafi/awesome-vim-colorschemes'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-dadbod'
Plug 'tpope/vim-dispatch'
Plug 'tpope/vim-eunuch'
Plug 'tpope/vim-fireplace'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-sleuth'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-unimpaired'
Plug 'tpope/vim-vinegar'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'w0rp/ale'
|
Use bingo for go language server | if has('nvim')
"FUNCTIONS {{{
" }}}
" SETTINGS {{{
let g:LanguageClient_autoStart = 1
let g:LanguageClient_serverCommands = {
\ 'rust': ['rustup', 'run', 'nightly', 'rls'],
\ 'javascript': ['javascript-typescript-stdio'],
\ 'typescript': ['javascript-typescript-stdio'],
\ 'typescript.tsx': ['javascript-typescript-stdio'],
\ 'reason': ['reason-language-server.exe'],
\ 'ocaml': ['ocaml-language-server', '--stdio'],
\ 'go': ['go-langserver'],
\ 'ruby': ['solargraph', 'stdio'],
\ }
" }}}
" MAPPINGS {{{
nnoremap <silent> K :call LanguageClient_textDocument_hover()<CR>
nnoremap <silent> gd :call LanguageClient_textDocument_definition()<cr>
nnoremap <silent> lf :call LanguageClient_textDocument_formatting()<cr>
nnoremap <silent> lr :call LanguageClient_textDocument_rename()<CR>
" }}}
end
| if has('nvim')
"FUNCTIONS {{{
" }}}
" SETTINGS {{{
let g:LanguageClient_autoStart = 1
let g:LanguageClient_rootMarkers = {
\ 'go': ['.git', 'go.mod'],
\ }
let g:LanguageClient_serverCommands = {
\ 'rust': ['rustup', 'run', 'nightly', 'rls'],
\ 'javascript': ['javascript-typescript-stdio'],
\ 'typescript': ['javascript-typescript-stdio'],
\ 'typescript.tsx': ['javascript-typescript-stdio'],
\ 'reason': ['reason-language-server.exe'],
\ 'ocaml': ['ocaml-language-server', '--stdio'],
\ 'go': ['bingo', '--format-style', 'goimports'],
\ 'ruby': ['solargraph', 'stdio'],
\ }
" }}}
" MAPPINGS {{{
nnoremap <silent> K :call LanguageClient_textDocument_hover()<CR>
nnoremap <silent> gd :call LanguageClient_textDocument_definition()<cr>
nnoremap <silent> lf :call LanguageClient_textDocument_formatting()<cr>
nnoremap <silent> lr :call LanguageClient_textDocument_rename()<CR>
" }}}
end
|
Add VBScript example for anagram detector | Function anagram(a, b)
anagram = true 'Be optimistic
'We could do a length comparison, but then we wouldn't be able to show a disparity.
'Also, this gives the flexibility to compare sentences (which might not have the same word count).
Const ignore = " ,.'?!"
'We could sort the characters but then it'd be a bit more code to show any disparities.
'We could use a sparse array (or two) but a collection is more elegant.
Dim d : Set d = CreateObject("Scripting.Dictionary")
Dim i : For i = 1 to len(a)
c = LCase(Mid(a, i, 1))
If d.Exists(c) then
d.Item(c) = d.Item(c) + 1
Else
d.Add c, 1
End If
Next
For i = 1 to len(b)
c = LCase(Mid(b, i, 1))
If d.Exists(c) then
d.Item(c) = d.Item(c) - 1
Else
d.Add c, -1
End If
Next
Dim k : k = d.Keys
For i = 0 to d.Count - 1
If Instr(ignore, k(i)) = 0 then
If d.Item(k(i)) > 0 then
WScript.Echo a & " has " & d.Item(k(i)) & " more of """ & k(i) & """ than " & b
anagram = false
End If
If d.Item(k(i)) < 0 then
WScript.Echo a & " has " & 0 - d.Item(k(i)) & " fewer of """ & k(i) & """ than " & b
anagram = false
End If
End If
Next
k = "is" : If not anagram then k = "is not"
WScript.Echo """" & a & """ " & k & " an anagram of """ & b & """"
End Function
WScript.echo anagram("new door", "one word")
WScript.echo anagram("maggi", "imagg")
WScript.echo anagram("fuzzy", "wuzzy")
WScript.echo anagram("conversation", "voices rant on")
WScript.echo anagram("New York Times", "monkeys write")
WScript.echo anagram("Tom Marvolo Riddle", "I am Lord Voldemort")
| |
Add code showing how to use various security options. | Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim svc As PTWcfService.PTServiceClient = New PTWcfClient.PTWcfService.PTServiceClient()
Dim list As PTWcfService.ProjectData() = svc.GetProjectList()
Me.ProjectDataBindingSource.DataSource = list
svc.Close()
End Sub
End Class
| Imports System.ServiceModel
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim svc As PTWcfService.PTServiceClient = New PTWcfClient.PTWcfService.PTServiceClient()
Dim list As PTWcfService.ProjectData()
Try
list = svc.GetProjectList()
Finally
svc.Close()
End Try
Me.ProjectDataBindingSource.DataSource = list
'Dim list As PTWcfService.ProjectData()
'Dim svc As PTWcfService.PTServiceClient = New PTWcfClient.PTWcfService.PTServiceClient()
'Try
' svc.ClientCredentials.UserName.UserName = "pm"
' svc.ClientCredentials.UserName.Password = "pm"
' list = svc.GetProjectList()
'Finally
' svc.Close()
'End Try
'Me.ProjectDataBindingSource.DataSource = list
'Dim list As PTWcfService.ProjectData()
'Dim factory As New ChannelFactory(Of PTWcfService.IPTService)("WSHttpBinding_IPTService")
'Try
' factory.Credentials.UserName.UserName = "pm"
' factory.Credentials.UserName.Password = "pm"
' Dim proxy As PTWcfService.IPTService = factory.CreateChannel
' list = proxy.GetProjectList()
'Finally
' factory.Close()
'End Try
'Me.ProjectDataBindingSource.DataSource = list
End Sub
End Class
|
Update TODO with bug number | ' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
Imports Microsoft.CodeAnalysis.Scripting.Hosting
Namespace Microsoft.CodeAnalysis.VisualBasic.Scripting.Hosting
Friend Class VisualBasicMemberFilter
Inherits CommonMemberFilter
Protected Overrides Function IsGeneratedMemberName(name As String) As Boolean
' TODO (tomat)
Return MyBase.IsGeneratedMemberName(name)
End Function
End Class
End Namespace
| ' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
Imports Microsoft.CodeAnalysis.Scripting.Hosting
Namespace Microsoft.CodeAnalysis.VisualBasic.Scripting.Hosting
Friend Class VisualBasicMemberFilter
Inherits CommonMemberFilter
Protected Overrides Function IsGeneratedMemberName(name As String) As Boolean
' TODO (https://github.com/dotnet/roslyn/issues/8241)
Return MyBase.IsGeneratedMemberName(name)
End Function
End Class
End Namespace
|
Add copyright banner on file that's missing one | Imports Microsoft.CodeAnalysis
Imports Microsoft.CodeAnalysis.Test.Utilities
Imports Microsoft.VisualStudio.LanguageServices.UnitTests.ProjectSystemShim.Framework
Imports Roslyn.Test.Utilities
Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.ProjectSystemShim
<[UseExportProvider]>
Public Class MetadataToProjectReferenceConversionTests
<WpfFact>
<WorkItem(32554, "https://github.com/dotnet/roslyn/issues/32554")>
Public Sub ProjectReferenceConvertedToMetadataReferenceCanBeRemoved()
Using environment = New TestEnvironment()
Dim project1 = environment.ProjectFactory.CreateAndAddToWorkspace(
"project1",
LanguageNames.CSharp)
Dim project2 = environment.ProjectFactory.CreateAndAddToWorkspace(
"project2",
LanguageNames.CSharp)
Const ReferencePath = "C:\project1.dll"
project1.OutputFilePath = ReferencePath
project2.AddMetadataReference(ReferencePath, MetadataReferenceProperties.Assembly)
Dim getProject2 = Function() environment.Workspace.CurrentSolution.GetProject(project2.Id)
Assert.Single(getProject2().ProjectReferences)
Assert.Empty(getProject2().MetadataReferences)
project1.OutputFilePath = Nothing
Assert.Single(getProject2().MetadataReferences)
Assert.Empty(getProject2().ProjectReferences)
project2.RemoveMetadataReference(ReferencePath, MetadataReferenceProperties.Assembly)
End Using
End Sub
End Class
End Namespace
| ' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
Imports Microsoft.CodeAnalysis
Imports Microsoft.CodeAnalysis.Test.Utilities
Imports Microsoft.VisualStudio.LanguageServices.UnitTests.ProjectSystemShim.Framework
Imports Roslyn.Test.Utilities
Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.ProjectSystemShim
<[UseExportProvider]>
Public Class MetadataToProjectReferenceConversionTests
<WpfFact>
<WorkItem(32554, "https://github.com/dotnet/roslyn/issues/32554")>
Public Sub ProjectReferenceConvertedToMetadataReferenceCanBeRemoved()
Using environment = New TestEnvironment()
Dim project1 = environment.ProjectFactory.CreateAndAddToWorkspace(
"project1",
LanguageNames.CSharp)
Dim project2 = environment.ProjectFactory.CreateAndAddToWorkspace(
"project2",
LanguageNames.CSharp)
Const ReferencePath = "C:\project1.dll"
project1.OutputFilePath = ReferencePath
project2.AddMetadataReference(ReferencePath, MetadataReferenceProperties.Assembly)
Dim getProject2 = Function() environment.Workspace.CurrentSolution.GetProject(project2.Id)
Assert.Single(getProject2().ProjectReferences)
Assert.Empty(getProject2().MetadataReferences)
project1.OutputFilePath = Nothing
Assert.Single(getProject2().MetadataReferences)
Assert.Empty(getProject2().ProjectReferences)
project2.RemoveMetadataReference(ReferencePath, MetadataReferenceProperties.Assembly)
End Using
End Sub
End Class
End Namespace
|
Fix broken inline block in mobile | <template lang="html">
<pre v-if="!inline"><code ref="code" :class="lang"><slot></slot></code></pre>
<span v-else><code ref="inline-code" :class="lang" :style="inlineCodeStyles"><slot></slot></code></span>
</template>
<script>
import hljs from 'highlight.js';
hljs.configure({
languages: []
});
export default {
name: 'highlight-code',
props: {
lang: String,
inline: {
type: Boolean,
default: false
}
},
data() {
return {
inlineCodeStyles: {
'display': `inline-block !important`,
'vertical-align': `middle`
}
};
},
methods: {
init() {
let code = !this.inline ? this.$refs['code'] : this.$refs['inline-code'];
hljs.highlightBlock(code);
}
},
mounted() {
this.init();
},
updated() {
this.init();
}
};
</script>
| <template lang="html">
<pre v-if="!inline"><code ref="code" :class="lang"><slot></slot></code></pre>
<span v-else><code ref="inline-code" :class="lang" :style="inlineCodeStyles"><slot></slot></code></span>
</template>
<script>
import hljs from 'highlight.js';
hljs.configure({
languages: []
});
export default {
name: 'highlight-code',
props: {
lang: String,
inline: {
type: Boolean,
default: false
}
},
data() {
return {
inlineCodeStyles: {
'display': `inline !important`,
'vertical-align': `middle`
}
};
},
methods: {
init() {
let code = !this.inline ? this.$refs['code'] : this.$refs['inline-code'];
hljs.highlightBlock(code);
}
},
mounted() {
this.init();
},
updated() {
this.init();
}
};
</script>
|
Throw 'change' instead of 'changed' event | <template>
<div class="mdc-switch" :class="classes">
<input v-model="model" type="checkbox" class="mdc-switch__native-control" :disabled="disabled" />
<div class="mdc-switch__background">
<div class="mdc-switch__knob"></div>
</div>
</div>
</template>
<script>
export default {
props: {
checked: {
type: Boolean,
required: false
},
disabled: {
type: Boolean,
required: false
}
},
model: {
prop: 'checked',
event: 'change'
},
computed: {
classes () {
return {
'mdc-switch--disabled': this.disabled
}
},
model: {
get () {
return this.checked
},
set (state) {
this.$emit('changed', state)
}
}
}
}
</script>
<style lang="scss">
@import "@material/switch/mdc-switch";
</style>
| <template>
<div class="mdc-switch" :class="classes">
<input v-model="model" type="checkbox" class="mdc-switch__native-control" :disabled="disabled" />
<div class="mdc-switch__background">
<div class="mdc-switch__knob"></div>
</div>
</div>
</template>
<script>
export default {
props: {
checked: {
type: Boolean,
required: false
},
disabled: {
type: Boolean,
required: false
}
},
model: {
prop: 'checked',
event: 'change'
},
computed: {
classes () {
return {
'mdc-switch--disabled': this.disabled
}
},
model: {
get () {
return this.checked
},
set (state) {
this.$emit('change', state)
}
}
}
}
</script>
<style lang="scss">
@import "@material/switch/mdc-switch";
</style>
|
Add alt text to badges | <template lang='pug'>
span.badge-bar
a(href='https://www.npmjs.com/package/vue-typer', target='_blank')
img(src='https://img.shields.io/npm/dt/vue-typer.svg')
a(href='https://www.npmjs.com/package/vue-typer', target='_blank')
img(src='https://img.shields.io/npm/v/vue-typer.svg')
a(href='https://www.npmjs.com/package/vue-typer', target='_blank')
img(src='https://img.shields.io/npm/l/vue-typer.svg')
</template>
<style scoped lang='scss'>
.badge-bar {
a {
margin: 0 3px;
}
}
</style>
| <template lang='pug'>
span.badge-bar
a(href='https://www.npmjs.com/package/vue-typer', target='_blank')
img(src='https://img.shields.io/npm/dt/vue-typer.svg', alt='Downloads')
a(href='https://www.npmjs.com/package/vue-typer', target='_blank')
img(src='https://img.shields.io/npm/v/vue-typer.svg', alt='Version')
a(href='https://www.npmjs.com/package/vue-typer', target='_blank')
img(src='https://img.shields.io/npm/l/vue-typer.svg', alt='License')
</template>
<style scoped lang='scss'>
.badge-bar {
a {
margin: 0 3px;
}
}
</style>
|
Add drought chart to main page | <template>
<div>
<main-map
mapFile="western_us.json"
dataFile="all_load.csv"
res="Shasta Dam"
resFile="all_resv.json"
:hasKey="hasKey"
whichState="none"></main-map>
<!-- <snow-chart whichState="AZ"></snow-chart>
<strip-chart stateFile="AZ_drought_all.csv"></strip-chart> -->
<drought-map mapFile="western_us.json"
centersFile="all_centers.json"
dataFile="all.csv"></drought-map>
</div>
</template>
<script>
import Map from './Map.vue';
import SnowChart from './SnowChart.vue';
import StripChart from './StripChart.vue';
import DroughtMap from './DroughtMap.vue';
export default {
name: 'Main',
components: {
mainMap: Map,
snowChart: SnowChart,
stripChart: StripChart,
droughtMap: DroughtMap
},
data() {
return {
hasKey: true
}
}
}
</script>
| <template>
<div>
<main-map
mapFile="western_us.json"
dataFile="all_load.csv"
res="Shasta Dam"
resFile="all_resv.json"
:hasKey="hasKey"
whichState="none"></main-map>
<!-- <snow-chart whichState="AZ"></snow-chart>-->
<strip-chart stateFile="munged_drought_all.csv"></strip-chart>
<drought-map mapFile="western_us.json"
centersFile="all_centers.json"
dataFile="all.csv"></drought-map>
</div>
</template>
<script>
import Map from './Map.vue';
import SnowChart from './SnowChart.vue';
import StripChart from './StripChart.vue';
import DroughtMap from './DroughtMap.vue';
export default {
name: 'Main',
components: {
mainMap: Map,
snowChart: SnowChart,
stripChart: StripChart,
droughtMap: DroughtMap
},
data() {
return {
hasKey: true
}
}
}
</script>
|
Delete not needed JS component import | <script>
import { MDCNotchedOutline } from '@material/notched-outline'
import themeClassMixin from '../base/themeClassMixin.js'
export default {
functional: true,
mixins: [themeClassMixin],
data () {
return {
mdcNotchedOutline: null
}
},
mounted () {
this.mdcNotchedOutline = MDCNotchedOutline.attachTo(this.$el)
},
render (h) {
return [
h('div', {'class': 'mdc-notched-outline'},
[
h('svg', [
h('path', {'class': 'mdc-notched-outline__path'})
])
]
),
h('div', {'class': 'mdc-notched-outline__idle'})]
}
}
</script>
| <script>
import themeClassMixin from '../base/themeClassMixin.js'
export default {
functional: true,
mixins: [themeClassMixin],
render (h) {
return [
h('div', {'class': 'mdc-notched-outline'},
[
h('svg', [
h('path', {'class': 'mdc-notched-outline__path'})
])
]
),
h('div', {'class': 'mdc-notched-outline__idle'})]
}
}
</script>
|
Connect to discord now opens in another tab | <template>
<a v-if="!hasDiscord" class="btn btn-primary" :href="discordUrl">Connect your Discord</a>
<a v-else class="btn btn-secondary" v-async-click="[removeProvider, 'DISCORD']">Disconnect your discord</a>
</template>
<script>
import Component, {State, Action} from 'nuxt-class-component';
import Vue from 'vue';
@Component({})
export default class extends Vue {
@State(state => state.user.user) user;
@Action('user/disconnectLinkedAccount') removeProvider;
discordUrl = `https://discordapp.com/api/oauth2/authorize?client_id=465280450420670484&redirect_uri=http%3A%2F%2Fapi.devwars.test/oauth/discord&response_type=code&scope=identify`;
get hasDiscord() {
return this.user && this.user.linked_accounts && this.user.linked_accounts.some(it => it.provider === 'DISCORD');
}
}
</script>
| <template>
<a v-if="!hasDiscord" class="btn btn-primary" target="_blank" :href="discordUrl">Connect your Discord</a>
<a v-else class="btn btn-secondary" v-async-click="[removeProvider, 'DISCORD']">Disconnect your discord</a>
</template>
<script>
import Component, {State, Action} from 'nuxt-class-component';
import Vue from 'vue';
@Component({})
export default class extends Vue {
@State(state => state.user.user) user;
@Action('user/disconnectLinkedAccount') removeProvider;
discordUrl = `https://discordapp.com/api/oauth2/authorize?client_id=465280450420670484&redirect_uri=http%3A%2F%2Fapi.devwars.test/oauth/discord&response_type=code&scope=identify`;
get hasDiscord() {
return this.user && this.user.linked_accounts && this.user.linked_accounts.some(it => it.provider === 'DISCORD');
}
}
</script>
|
Correct for toolbar file refactoring | <template>
<div>
<v-toolbar
fixed
dark
dense
app
class="primary pointers-please"
>
<router-link to='/'>
<v-toolbar-title class="white--text">
AIDA
</v-toolbar-title>
</router-link>
<v-spacer/>
<!-- Link to Dashboard -->
<v-btn
icon
to="/dashboard">
<v-icon>
apps
</v-icon>
</v-btn>
<!-- Link to Docs -->
<v-btn
icon
href="https://github.com/alanaberdeen/AIDA/wiki" >
<v-icon small> fa-book </v-icon>
</v-btn>
</v-toolbar>
<v-container fluid>
<v-layout row wrap>
<v-flex xs10 offset-xs1>
<Treeview />
</v-flex>
</v-layout>
</v-container>
</div>
</template>
<script>
import { mapState, mapActions } from 'vuex'
import Toolbar from '../header/Toolbar.vue'
import Treeview from './Treeview.vue'
export default {
components: {
Toolbar,
Treeview
},
mounted() {
this.getArrayOfImages()
},
methods: {
...mapActions({
getArrayOfImages: 'backend/getArrayOfImages'
})
}
}
</script>
| <template>
<div>
<v-toolbar
fixed
dark
dense
app
class="primary pointers-please"
>
<router-link to='/'>
<v-toolbar-title class="white--text">
AIDA
</v-toolbar-title>
</router-link>
<v-spacer/>
<!-- Link to Dashboard -->
<v-btn
icon
to="/dashboard">
<v-icon>
apps
</v-icon>
</v-btn>
<!-- Link to Docs -->
<v-btn
icon
href="https://github.com/alanaberdeen/AIDA/wiki" >
<v-icon small> fa-book </v-icon>
</v-btn>
</v-toolbar>
<v-container fluid>
<v-layout row wrap>
<v-flex xs10 offset-xs1>
<Treeview />
</v-flex>
</v-layout>
</v-container>
</div>
</template>
<script>
import { mapState, mapActions } from 'vuex'
import Toolbar from '../toolbar/Toolbar.vue'
import Treeview from './Treeview.vue'
export default {
components: {
Toolbar,
Treeview
},
mounted() {
this.getArrayOfImages()
},
methods: {
...mapActions({
getArrayOfImages: 'backend/getArrayOfImages'
})
}
}
</script>
|
Fix master eligible icon to star outline | <template>
<span>
<v-icon v-if="elasticsearchNode.master" title="master node">mdi-star</v-icon>
<v-icon v-else-if="elasticsearchNode.masterEligible" style="width: 24px"
title="master eligible">mdi-star-bordered</v-icon>
<v-icon v-if="elasticsearchNode.dataNode" title="data node">mdi-content-save</v-icon>
<v-icon v-if="elasticsearchNode.ingestNode" title="ingest node">mdi-arrow-right-bold-box</v-icon>
<v-icon v-if="elasticsearchNode.coordinatingNode"
title="coordinating only node">mdi-transit-connection-variant</v-icon>
</span>
</template>
<script>
import ElasticsearchNode from '../../models/ElasticsearchNode'
export default {
name: 'node-icons',
props: {
elasticsearchNode: {
type: ElasticsearchNode,
default: () => {
return new ElasticsearchNode()
}
}
}
}
</script>
| <template>
<span>
<v-icon v-if="elasticsearchNode.master" title="master node">mdi-star</v-icon>
<v-icon v-else-if="elasticsearchNode.masterEligible" style="width: 24px"
title="master eligible">mdi-star-outline</v-icon>
<v-icon v-if="elasticsearchNode.dataNode" title="data node">mdi-content-save</v-icon>
<v-icon v-if="elasticsearchNode.ingestNode" title="ingest node">mdi-arrow-right-bold-box</v-icon>
<v-icon v-if="elasticsearchNode.coordinatingNode"
title="coordinating only node">mdi-transit-connection-variant</v-icon>
</span>
</template>
<script>
import ElasticsearchNode from '../../models/ElasticsearchNode'
export default {
name: 'node-icons',
props: {
elasticsearchNode: {
type: ElasticsearchNode,
default: () => {
return new ElasticsearchNode()
}
}
}
}
</script>
|
Use .toLocaleDateString() to format date in notification page | <template>
<div class="notification">
<div class="notification-info">
<div class="notification-received text is-small">{{ receivedAtFormatted }}</div>
<span v-if="!readAt" class="notification-read"></span>
</div>
<div v-html="htmlBody" class="notification-html text is-caption" :class="{'is-unread': !readAt}"></div>
</div>
</template>
<script>
import format from 'date-fns/format';
export default {
name: 'NotificationCard',
props: {
id: String,
receivedAt: String,
readAt: String,
htmlBody: String
},
computed: {
receivedAtFormatted () {
return format(new Date(this.receivedAt), 'DD/MM/YYYY');
}
}
};
</script>
<style scoped lang="scss">
@import 'new-dashboard/styles/variables';
.notification-info {
display: flex;
align-items: center;
margin-bottom: 16px;
}
.notification-received {
color: $text-secondary-color;
}
.notification-read {
display: block;
width: 12px;
height: 12px;
margin-left: 24px;
border-radius: 50%;
background: $notification;
}
.notification-html {
margin-top: 16px;
color: $text-color;
&.is-unread {
font-weight: 600;
}
}
</style>
| <template>
<div class="notification">
<div class="notification-info">
<div class="notification-received text is-small">{{ receivedAtFormatted }}</div>
<span v-if="!readAt" class="notification-read"></span>
</div>
<div v-html="htmlBody" class="notification-html text is-caption" :class="{'is-unread': !readAt}"></div>
</div>
</template>
<script>
export default {
name: 'NotificationCard',
props: {
id: String,
receivedAt: String,
readAt: String,
htmlBody: String
},
computed: {
receivedAtFormatted () {
return new Date(this.receivedAt).toLocaleDateString();
}
}
};
</script>
<style scoped lang="scss">
@import 'new-dashboard/styles/variables';
.notification-info {
display: flex;
align-items: center;
margin-bottom: 16px;
}
.notification-received {
color: $text-secondary-color;
}
.notification-read {
display: block;
width: 12px;
height: 12px;
margin-left: 24px;
border-radius: 50%;
background: $notification;
}
.notification-html {
margin-top: 16px;
color: $text-color;
&.is-unread {
font-weight: 600;
}
}
</style>
|
Add comment to futurelink component | <template>
<div class="dn" aria-hidden="true">
<component :is="load"/>
</div>
</template>
<script>
import futurelink from 'futurelink';
export default {
data: () => ({
load: undefined,
options: {
links: [],
},
}),
mounted() {
// Don't run on the server
if (typeof window === 'undefined') {
return;
}
// Don't run on mobile
if ('ontouchstart' in window) {
return;
}
const loaded = [this.$route.path];
this.options.future = (link) => {
const href = link.getAttribute('href');
if (loaded.includes(href)) {
return;
}
loaded.push(href);
// this.$emit('preload', href);
const resolved = this.$router.resolve(href);
const { matched } = resolved.resolved;
this.load = matched[matched.length - 1].components.default;
};
futurelink(this.options);
this.init();
this.$router.afterEach(() => this.init());
},
methods: {
init() {
this.$nextTick(() => {
const links = document.querySelectorAll('a[href^="/"');
// Populate this.options.links {Array} from links {nodeList}
for (let i = -1, l = links.length; ++i !== l; this.options.links[i] = links[i]); // eslint-disable-line no-plusplus
});
},
},
};
</script>
| <!--
Based on vue-futurelink with customisations for simplicity and performance
REF: https://github.com/SamKnows/vue-futurelink
-->
<template>
<div class="dn" aria-hidden="true">
<component :is="load"/>
</div>
</template>
<script>
import futurelink from 'futurelink';
export default {
data: () => ({
load: undefined,
options: {
links: [],
},
}),
mounted() {
// Don't run on the server
if (typeof window === 'undefined') {
return;
}
// Don't run on mobile
if ('ontouchstart' in window) {
return;
}
const loaded = [this.$route.path];
this.options.future = (link) => {
const href = link.getAttribute('href');
if (loaded.includes(href)) {
return;
}
loaded.push(href);
// this.$emit('preload', href);
const resolved = this.$router.resolve(href);
const { matched } = resolved.resolved;
this.load = matched[matched.length - 1].components.default;
};
futurelink(this.options);
this.init();
this.$router.afterEach(() => this.init());
},
methods: {
init() {
this.$nextTick(() => {
const links = document.querySelectorAll('a[href^="/"');
// Populate this.options.links {Array} from links {nodeList}
for (let i = -1, l = links.length; ++i !== l; this.options.links[i] = links[i]); // eslint-disable-line no-plusplus
});
},
},
};
</script>
|
Use v-cloak to hide content untill load | <template>
<div id="app">
<hero></hero>
<about></about>
<do></do>
<projects></projects>
<skills></skills>
<fork></fork>
<contact></contact>
<copyright></copyright>
</div>
</template>
<script>
import Hero from './components/Hero';
import About from './components/About';
import Do from './components/Do';
import Projects from './components/Projects';
import Skills from './components/Skills';
import Contact from './components/Contact';
import Fork from './components/Fork';
import Copyright from './components/Copyright';
export default {
name: 'app',
components: {
Hero,
About,
Do,
Projects,
Skills,
Fork,
Contact,
Copyright,
},
};
</script>
| <template>
<div id="app" v-cloak>
<hero></hero>
<about></about>
<do></do>
<projects></projects>
<skills></skills>
<fork></fork>
<contact></contact>
<copyright></copyright>
</div>
</template>
<script>
import Hero from './components/Hero';
import About from './components/About';
import Do from './components/Do';
import Projects from './components/Projects';
import Skills from './components/Skills';
import Contact from './components/Contact';
import Fork from './components/Fork';
import Copyright from './components/Copyright';
export default {
name: 'app',
components: {
Hero,
About,
Do,
Projects,
Skills,
Fork,
Contact,
Copyright,
},
};
</script>
|
Refactor display of current game. | <template lang="html">
<div>
<div class="current-game">
<img v-bind:src="currentGameImage">
{{ currentGameImage }}
</div>
<div v-for="recommendation in recommendations">
<div class="game">
{{ recommendation }}
</div>
</div>
</template>
<script>
import axios from 'axios'
export default {
data() {
return {
recommendations: ['game1', 'game2'],
user: {username: 'test', favorite: 'Gex'},
currentGame: {title: '', image: 'wat', detail: ''}
}
},
computed: {
currentGameImage() {
return this.currentGame.image
}
},
created() {
this.searchGame('Gex')
this.getFavoriteGame()
},
attached() {},
methods: {
searchGame(name) {
return axios.get('/api/giantbomb/search/' + name).then((response) => {
console.log(response)
return response.data.results[0]
})
},
getFavoriteGame() {
if (this.user.favorite) {
return Promise.resolve(this.searchGame(this.user.favorite))
.then((results) => {
console.log(results)
this.currentGame = {title: results.name, image: results.image.medium_url, detail: results.site_detail_url}
return this.currentGame
})
} else {
return {title: '', image: 'wat', detail: ''}
}
}
},
components: {}
}
</script>
<style lang="css">
</style>
| <template lang="html">
<div>
<div class="current-game">
<img v-bind:src="currentGame.image">
</div>
<div v-for="recommendation in recommendations">
<div class="game">
{{ recommendation }}
</div>
</div>
</template>
<script>
import axios from 'axios'
export default {
data() {
return {
recommendations: ['game1', 'game2'],
user: {username: 'test', favorite: 'Gex'},
currentGame: {title: '', image: 'wat', detail: ''}
}
},
computed: {
},
created() {
this.getFavoriteGame()
},
attached() {},
methods: {
searchGame(name) {
return axios.get('/api/giantbomb/search/' + name).then((response) => {
console.log(response)
return response.data.results[0]
})
},
getFavoriteGame() {
if (this.user.favorite) {
return Promise.resolve(this.searchGame(this.user.favorite))
.then((results) => {
console.log(results)
this.currentGame = {title: results.name, image: results.image.medium_url, detail: results.site_detail_url}
return this.currentGame
})
} else {
return {title: '', image: 'wat', detail: ''}
}
}
},
components: {}
}
</script>
<style lang="css">
</style>
|
Fix copy hex to clipboard | <template>
<li class="hex mono" @click="copy">
<span
class="hex__block"
:id="colorID"
:style="{ background: color }"
>
</span>
<span class="hex__name">{{color | lowercase}}</span>
<transition name="fadeup">
<span v-if="copied" class="hex__copied">copied</span>
</transition>
</li>
</template>
<script>
import Clipboard from 'clipboard';
export default {
name: 'swatch',
props: ['color', 'gradient'],
data() {
let c = this.color;
c = c.substring(1);
return {
copied: false,
colorID: `c-${c}`,
};
},
filters: {
lowercase(value) {
return (!value) ? '' : value.toString().toLowerCase();
},
},
computed: {
copycolor() {
return this.color;
},
},
methods: {
uncopy() {
this.copied = false;
},
copy() {
this.$ga.trackEvent('copy hex', 'click', this.gradient.name);
this.copied = true;
setTimeout(this.uncopy, 10);
},
},
/**
* Changes instance of clipboard to force
* re-evaluation of text to copy
*/
updated() {
let c = this.color;
c = c.substring(1);
/* eslint-disable no-new */
new Clipboard(`#c-${c}`, {
text() {
return `#${c}`;
},
});
},
};
</script>
| <template>
<li class="hex mono" @click="copy" :id="colorID">
<span
class="hex__block"
:style="{ background: color }"
>
</span>
<span class="hex__name">{{color | lowercase}}</span>
<transition name="fadeup">
<span v-if="copied" class="hex__copied">copied</span>
</transition>
</li>
</template>
<script>
import Clipboard from 'clipboard';
export default {
name: 'swatch',
props: ['color', 'gradient'],
data() {
let c = this.color;
c = c.substring(1);
return {
copied: false,
colorID: `c-${c}`,
};
},
filters: {
lowercase(value) {
return (!value) ? '' : value.toString().toLowerCase();
},
},
computed: {
copycolor() {
return this.color;
},
},
methods: {
uncopy() {
this.copied = false;
},
copy() {
this.$ga.trackEvent('copy hex', 'click', this.gradient.name);
this.copied = true;
setTimeout(this.uncopy, 10);
},
},
/**
* Changes instance of clipboard to force
* re-evaluation of text to copy
*/
updated() {
let c = this.color;
c = c.substring(1);
/* eslint-disable no-new */
new Clipboard(`#c-${c}`, {
text() {
return `#${c}`;
},
});
},
};
</script>
|
Update progress-bar demo and add docs | <template>
<div>
<button @click="value = 0">0%</button>
<button @click="value += 10">+10%</button>
<button @click="value -= 10">-10%</button>
<button @click="value = 100">100%</button>
<label>
<input type="checkbox" v-model="indeterminate">Indeterminate
</label>
Current value: {{ value }}
Indeterminate: {{ indeterminate }}
<progress-bar :value="value" :indeterminate="indeterminate"></progress-bar>
<progress-bar :value="value" :indeterminate="indeterminate" :no-animation="true"></progress-bar>
<progress-bar :value="value" :indeterminate="indeterminate" :no-stripes="true"></progress-bar>
</div>
</template>
<script type="text/babel">
import ProgressBar from './../components/progress-bar.vue'
export default {
data () {
return {
value: 10,
indeterminate: false
}
},
components: {
ProgressBar
}
}
</script>
| <template>
<div>
<component-docs :docs="docs">
<div>
<button @click="value = 0">0%</button>
<button @click="value += 10">+10%</button>
<button @click="value -= 10">-10%</button>
<button @click="value = 100">100%</button>
</div>
<div>
<label>
<input type="checkbox" v-model="indeterminate">Indeterminate
</label>
</div>
<div>
<label>
<input type="checkbox" v-model="noAnimation">No animation
</label>
</div>
<div>
<label>
<input type="checkbox" v-model="noStripes">No stripes
</label>
</div>
<progress-bar
:value="value"
:indeterminate="indeterminate"
:no-stripes="noStripes"
:no-animation="noAnimation"
></progress-bar>
</component-docs>
</div>
</template>
<script type="text/babel">
import ProgressBar from './../components/progress-bar.vue'
import ComponentDocs from '../components/component-docs.vue'
export default {
data () {
return {
value: 10,
indeterminate: false,
noStripes: false,
noAnimation: false,
docs: {
title: 'Progress bar',
props: {
value: {
type: Number
},
indeterminate: {
type: Boolean,
default: false
},
noStripes: {
type: Boolean,
default: false
},
noAnimation: {
type: Boolean,
default: false
}
}
}
}
},
components: {
ProgressBar,
ComponentDocs
}
}
</script>
|
Put comma for large numbers | <template lang="pug">
#learn.has-text-centered
.heading
h1.title {{ book.name }}
h2.subtitle {{ book.count }} days / {{ book.totalWords }} words
a.day.button.is-large.is-primary(v-for='n in book.count', @click='toggle(n)',
:class='list.includes(n) || `is-outlined`') {{ '00'.concat(n).slice(-2) }}
span.day.placeholder(v-for='n in 20')
</template>
<script>
import axios from 'axios'
export default {
name: 'learn',
data: () => ({ book: {}, list: [] }),
async created () {
const book = this.$route.params.book
this.book = (await axios.get(`/learn/${book}`)).data
},
methods: {
toggle (n) {
const i = this.list.indexOf(n);
(i < 0) ? this.list.push(n) : this.list.splice(i, 1)
}
}
}
</script>
<style lang="sass" scoped>
.heading
margin-bottom: 1.5rem
.day
width: 4rem
margin: 0.5rem
display: inline-flex
transition: all 0.25s ease
&.button
height: 3.7rem
</style>
| <template lang="pug">
#learn.has-text-centered
.heading
h1.title {{ book.name }}
h2.subtitle {{ num(book.count) }} days / {{ num(book.totalWords) }} words
a.day.button.is-large.is-primary(v-for='n in book.count', @click='toggle(n)',
:class='list.includes(n) || `is-outlined`') {{ '00'.concat(n).slice(-2) }}
span.day.placeholder(v-for='n in 20')
</template>
<script>
import axios from 'axios'
export default {
name: 'learn',
data: () => ({ book: {}, list: [] }),
async created () {
const book = this.$route.params.book
this.book = (await axios.get(`/learn/${book}`)).data
},
methods: {
num: (n) => Number(n).toLocaleString({ useGrouping: true }),
toggle (n) {
const i = this.list.indexOf(n);
(i < 0) ? this.list.push(n) : this.list.splice(i, 1)
}
}
}
</script>
<style lang="sass" scoped>
.heading
margin-bottom: 1.5rem
.day
width: 4rem
margin: 0.5rem
display: inline-flex
transition: all 0.25s ease
&.button
height: 3.7rem
</style>
|
Make template hack a little less brittle | <template>
<wall json-file="circle-members" :ordered-group-names="orderedGroupNames">
<template #heading>
<h2 class="is-sr-only">Our Circle Members</h2>
<figure class="wall__logo grid_separator--l" aria-hidden="true">
<img src="./img/circle-logo.png" alt="Circle Membership logo" /></figure
></template>
<template #subheading="{ group }">
<template v-if="group.name === 'Founders\' Circle'"
><p class="grid_separator--s">
<em
>In honor of our three founders: Ross Ramsey, Evan Smith and John
Thornton</em
>
</p></template
>
</template>
<template #member="{ member }">
<span class="wall__name">{{ member }}</span>
</template>
</wall>
</template>
<script>
import Wall from '../../Wall.vue';
export default {
name: 'CircleWall',
components: { Wall },
data() {
return {
orderedGroupNames: [
"Founders' Circle",
"Chairman's Circle",
'Leadership Circle',
"Editor's Circle",
],
};
},
};
</script>
| <template>
<wall json-file="circle-members" :ordered-group-names="orderedGroupNames">
<template #heading>
<h2 class="is-sr-only">Our Circle Members</h2>
<figure class="wall__logo grid_separator--l" aria-hidden="true">
<img src="./img/circle-logo.png" alt="Circle Membership logo" /></figure
></template>
<template #subheading="{ group }">
<template v-if="group.name === foundersLabel"
><p class="grid_separator--s">
<em
>In honor of our three founders: Ross Ramsey, Evan Smith and John
Thornton</em
>
</p></template
>
</template>
<template #member="{ member }">
<span class="wall__name">{{ member }}</span>
</template>
</wall>
</template>
<script>
import Wall from '../../Wall.vue';
export default {
name: 'CircleWall',
components: { Wall },
data() {
return {
orderedGroupNames: [
"Founders' Circle",
"Chairman's Circle",
'Leadership Circle',
"Editor's Circle",
],
foundersLabel: "Founders' Circle",
};
},
};
</script>
|
Use jquery to select only the compoent's input element, instead of using generic class selector | <template>
<div class='col-sm-6'>
<div class="form-group">
<div class='input-group date'>
<input type='text' class="form-control" />
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"/>
</span>
</div>
</div>
</div>
</template>
<script>
import $ from 'jquery';
import 'eonasdan-bootstrap-datetimepicker';
export default {
name : 'date-time',
props : { title : {}, options : {}, value : { default : '' } },
mounted() {
$('.date').datetimepicker(this.options)
.on('dp-change', (val) => {
this.$emit('input', val);
});
$('.date').value(this.value);
}
}
</script>
<style scope>
@import '../node_modules/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.css';
</style>
| <template>
<div class='col-sm-6'>
<div class="form-group">
<div class='input-group date'>
<input type='text' class="form-control" />
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"/>
</span>
</div>
</div>
</div>
</template>
<script>
import $ from 'jquery';
import 'eonasdan-bootstrap-datetimepicker';
export default {
name : 'date-time',
props : { title : {}, options : {}, value : { default : '' } },
mounted() {
/**
The jquery selector gets the root element the vue component is attached to,
then filters down to the first text input, which in this template, will always
be the datetime input.
It then initialises it with any options passed through the options prop,
emits an input event when the date input changes, allowing the component to
be bound to vue reactivity system via v-model. Lastly, any initial value passed
through the props will initialise the start value for the input.
*/
$(this.$el).children(':text').first()
.datetimepicker(this.options)
.on('dp-change', (val) => {
this.$emit('input', val);
})
.value(this.value);
}
}
</script>
<style scope>
@import '../node_modules/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.css';
</style>
|
Add missing variables docs to skeleton | <template>
<div>
<Example :component="ExSimple" :code="ExSimpleCode" vertical/>
<Example :component="ExMediaTemplate" :code="ExMediaTemplateCode" title="Media" vertical/>
<Example :component="ExCardTemplate" :code="ExCardTemplateCode" title="Card" vertical/>
<ApiView :data="api"/>
</div>
</template>
<script>
import api from './api/skeleton'
import ExSimple from './examples/ExSimple'
import ExSimpleCode from '!!raw-loader!./examples/ExSimple'
import ExMediaTemplate from './examples/ExMediaTemplate'
import ExMediaTemplateCode from '!!raw-loader!./examples/ExMediaTemplate'
import ExCardTemplate from './examples/ExCardTemplate'
import ExCardTemplateCode from '!!raw-loader!./examples/ExCardTemplate'
export default {
data() {
return {
api,
ExSimple,
ExSimpleCode,
ExMediaTemplate,
ExMediaTemplateCode,
ExCardTemplate,
ExCardTemplateCode
}
}
}
</script>
| <template>
<div>
<Example :component="ExSimple" :code="ExSimpleCode" vertical/>
<Example :component="ExMediaTemplate" :code="ExMediaTemplateCode" title="Media" vertical/>
<Example :component="ExCardTemplate" :code="ExCardTemplateCode" title="Card" vertical/>
<ApiView :data="api"/>
<VariablesView :data="variables"/>
</div>
</template>
<script>
import api from './api/skeleton'
import variables from './variables/skeleton'
import ExSimple from './examples/ExSimple'
import ExSimpleCode from '!!raw-loader!./examples/ExSimple'
import ExMediaTemplate from './examples/ExMediaTemplate'
import ExMediaTemplateCode from '!!raw-loader!./examples/ExMediaTemplate'
import ExCardTemplate from './examples/ExCardTemplate'
import ExCardTemplateCode from '!!raw-loader!./examples/ExCardTemplate'
export default {
data() {
return {
api,
ExSimple,
ExSimpleCode,
ExMediaTemplate,
ExMediaTemplateCode,
ExCardTemplate,
ExCardTemplateCode
}
}
}
</script>
|
Add spacing between connection buttons | <template>
<div class="group">
<Row>
<Column :md="8">
<h3>Connections</h3>
</Column>
</Row>
<Row>
<Column :md="8">
<ConnectToDiscord />
</Column>
<Column :md="8">
<ConnectToTwitch />
</Column>
</Row>
</div>
</template>
<script>
import ConnectToDiscord from '../../components/user/ConnectToDiscord';
import ConnectToTwitch from '../../components/user/ConnectToTwitch';
export default {
name: 'Connections',
components: { ConnectToDiscord, ConnectToTwitch },
};
</script>
| <template>
<div class="ConnectionsPage">
<h3>Connections</h3>
<div class="connect">
<ConnectToDiscord/>
</div>
<div class="connect">
<ConnectToTwitch/>
</div>
</div>
</template>
<script>
import ConnectToDiscord from '../../components/user/ConnectToDiscord';
import ConnectToTwitch from '../../components/user/ConnectToTwitch';
export default {
name: 'ConnectionsPage',
components: { ConnectToDiscord, ConnectToTwitch },
};
</script>
<style lang="scss" scoped>
@import 'utils.scss';
.ConnectionsPage {
.connect + .connect {
margin-top: $grid-gutter-width;
}
}
</style>
|
Update for native/hardware back button | <template>
<!-- App -->
<f7-app :params="f7params">
<f7-statusbar></f7-statusbar>
<f7-panel left cover>
<f7-view url="/panel-left/" links-view=".view-main" />
</f7-panel>
<f7-view url="/" :main="true" class="ios-edges"></f7-view>
</f7-app>
</template>
<script>
// Import Routes...
import routes from './routes.js'
let theme = 'auto';
if (document.location.search.indexOf('theme=') >= 0) {
theme = document.location.search.split('theme=')[1].split('&')[0];
}
export default {
data() {
return {
f7params: {
theme,
routes,
id: 'io.framework7.testapp',
}
}
}
}
</script> | <template>
<!-- App -->
<f7-app :params="f7params">
<f7-statusbar></f7-statusbar>
<f7-panel left cover>
<f7-view url="/panel-left/" links-view=".view-main" />
</f7-panel>
<f7-view url="/" :main="true" class="ios-edges"></f7-view>
</f7-app>
</template>
<script>
// Import Routes...
import routes from './routes.js'
let theme = 'auto';
if (document.location.search.indexOf('theme=') >= 0) {
theme = document.location.search.split('theme=')[1].split('&')[0];
}
export default {
data() {
return {
f7params: {
theme,
routes,
id: 'io.framework7.testapp',
}
}
},
mounted() {
let vm = this;
document.addEventListener('backbutton', () => {
vm.$f7.views.current.router.back()
}, false)
}
}
</script>
|
Use canvas for overview display | <template>
<div id="overview">Overview</div>
</template>
<script>
export default {
data() {
return {};
}
};
</script>
<style>
#overview {
padding: 2px 10px 10px 10px;
margin-bottom: 2px;
color: var(--text-blur);
background-color: var(--ui-darker);
border-color: var(--ui-border);
font-family: "Ubuntu Mono", monospace;
font-size: 0.9em;
white-space: pre-wrap;
text-align: center;
overflow-y: auto;
}
#overview::-webkit-scrollbar {
width: 8px;
}
#overview::-webkit-scrollbar-track {
background-color: var(--ui-darker);
}
#overview::-webkit-scrollbar-thumb {
background-color: var(--ui-border);
}
</style>
| <template>
<div id="overview">
<canvas width="400" height="400" id="overview-canvas">
Canvas unsupported, use a newer browser.
</canvas>
</div>
</template>
<script>
export default {};
</script>
<style>
#overview-canvas {
background-color: var(--ui-darker);
}
#overview {
padding: 5px;
margin-bottom: 2px;
color: var(--text-blur);
background-color: var(--ui-darker);
border-color: var(--ui-border);
font-family: "Ubuntu Mono", monospace;
font-size: 0.9em;
white-space: pre-wrap;
text-align: center;
overflow-y: auto;
}
#overview::-webkit-scrollbar {
width: 8px;
}
#overview::-webkit-scrollbar-track {
background-color: var(--ui-darker);
}
#overview::-webkit-scrollbar-thumb {
background-color: var(--ui-border);
}
</style>
|
Update icon to match EE | <script>
import loadingIcon from '~/vue_shared/components/loading_icon.vue';
import eventHub from '../../event_hub';
import statusIcon from '../mr_widget_status_icon';
export default {
name: 'MRWidgetAutoMergeFailed',
components: {
statusIcon,
loadingIcon,
},
props: {
mr: {
type: Object,
required: true,
},
},
data() {
return {
isRefreshing: false,
};
},
methods: {
refreshWidget() {
this.isRefreshing = true;
eventHub.$emit('MRWidgetUpdateRequested', () => {
this.isRefreshing = false;
});
},
},
};
</script>
<template>
<div class="mr-widget-body media">
<status-icon status="failed" />
<div class="media-body space-children">
<span class="bold">
<template v-if="mr.mergeError">{{ mr.mergeError }}.</template>
{{ s__("mrWidget|This merge request failed to be merged automatically") }}
</span>
<button
@click="refreshWidget"
:disabled="isRefreshing"
type="button"
class="btn btn-xs btn-default"
>
<loading-icon v-if="isRefreshing" />
{{ s__("mrWidget|Refresh") }}
</button>
</div>
</div>
</template>
| <script>
import loadingIcon from '~/vue_shared/components/loading_icon.vue';
import eventHub from '../../event_hub';
import statusIcon from '../mr_widget_status_icon';
export default {
name: 'MRWidgetAutoMergeFailed',
components: {
statusIcon,
loadingIcon,
},
props: {
mr: {
type: Object,
required: true,
},
},
data() {
return {
isRefreshing: false,
};
},
methods: {
refreshWidget() {
this.isRefreshing = true;
eventHub.$emit('MRWidgetUpdateRequested', () => {
this.isRefreshing = false;
});
},
},
};
</script>
<template>
<div class="mr-widget-body media">
<status-icon status="warning" />
<div class="media-body space-children">
<span class="bold">
<template v-if="mr.mergeError">{{ mr.mergeError }}.</template>
{{ s__("mrWidget|This merge request failed to be merged automatically") }}
</span>
<button
@click="refreshWidget"
:disabled="isRefreshing"
type="button"
class="btn btn-xs btn-default"
>
<loading-icon v-if="isRefreshing" />
{{ s__("mrWidget|Refresh") }}
</button>
</div>
</div>
</template>
|
Fix error notification ui for save settings | <template>
<div>
<UiAlert
v-if="notification === notificationTypes.PAGELOAD_FAILURE"
type="error"
@dismiss="dismiss()"
>
{{ $tr('pageloadFailure') }}
</UiAlert>
<UiAlert
v-if="notification === notificationTypes.SAVE_SUCCESS"
type="success"
@dismiss="dismiss()"
>
{{ $tr('saveSuccess') }}
</UiAlert>
<UiAlert
v-if="notification === notificationTypes.SAVE_FAILURE"
type="success"
@dismiss="dismiss()"
>
{{ $tr('saveFailure') }}
</UiAlert>
</div>
</template>
<script>
import UiAlert from 'kolibri.coreVue.components.UiAlert';
import { notificationTypes } from '../../constants';
export default {
name: 'ConfigPageNotifications',
components: { UiAlert },
props: {
notification: {
type: String,
required: false,
},
},
computed: { notificationTypes: () => notificationTypes },
methods: {
dismiss() {
this.$emit('dismiss');
},
},
$trs: {
saveFailure: 'There was a problem saving your settings',
saveSuccess: 'Facility settings updated',
pageloadFailure: 'There was a problem loading your settings',
},
};
</script>
| <template>
<div>
<UiAlert
v-if="notification === notificationTypes.PAGELOAD_FAILURE"
type="error"
@dismiss="dismiss()"
>
{{ $tr('pageloadFailure') }}
</UiAlert>
<UiAlert
v-if="notification === notificationTypes.SAVE_SUCCESS"
type="success"
@dismiss="dismiss()"
>
{{ $tr('saveSuccess') }}
</UiAlert>
<UiAlert
v-if="notification === notificationTypes.SAVE_FAILURE"
type="error"
@dismiss="dismiss()"
>
{{ $tr('saveFailure') }}
</UiAlert>
</div>
</template>
<script>
import UiAlert from 'kolibri.coreVue.components.UiAlert';
import { notificationTypes } from '../../constants';
export default {
name: 'ConfigPageNotifications',
components: { UiAlert },
props: {
notification: {
type: String,
required: false,
},
},
computed: { notificationTypes: () => notificationTypes },
methods: {
dismiss() {
this.$emit('dismiss');
},
},
$trs: {
saveFailure: 'There was a problem saving your settings',
saveSuccess: 'Facility settings updated',
pageloadFailure: 'There was a problem loading your settings',
},
};
</script>
|
Use event.prevent instead of event.preventDefault() | <style>
.help-button {
color: #aaa;
padding: 0 1px;
}
.help-button:hover {
color: #000;
}
</style>
<template>
<a href="#" v-on:click="onClick" class="help-button">
<span class="icon icon-help-circled"></span>
</a>
</template>
<script>
import { shell } from 'electron'
export default {
props: ['href'],
methods: {
onClick (e) {
shell.openExternal(this.href)
e.preventDefault()
}
}
}
</script>
| <style>
.help-button {
color: #aaa;
padding: 0 1px;
}
.help-button:hover {
color: #000;
}
</style>
<template>
<a href="#" v-on:click.prevent="onClick" class="help-button">
<span class="icon icon-help-circled"></span>
</a>
</template>
<script>
import { shell } from 'electron'
export default {
props: ['href'],
methods: {
onClick () {
shell.openExternal(this.href)
}
}
}
</script>
|
Make next content cards less wide | <template>
<div>
<content-page>
<div slot="below_content">
<template v-if="nextLessonResource">
<h1>{{ $tr('nextInLesson') }}</h1>
<content-card
:isMobile="true"
:kind="nextLessonResource.kind"
:link="nextResourceLink"
:progress="nextLessonResource.progress_fraction"
:thumbnail="getContentNodeThumbnail(nextLessonResource)"
:title="nextLessonResource.title"
/>
</template>
</div>
</content-page>
</div>
</template>
<script>
import ContentCard from '../content-card';
import ContentPage from '../content-page';
import { lessonResourceViewerLink } from './classPageLinks';
import { getContentNodeThumbnail } from 'kolibri.utils.contentNode';
export default {
name: 'lessonResourceViewer',
components: {
ContentCard,
ContentPage,
},
computed: {
nextResourceLink() {
return lessonResourceViewerLink(Number(this.$route.params.resourceNumber) + 1);
},
},
methods: {
getContentNodeThumbnail,
},
vuex: {
getters: {
currentLesson: state => state.pageState.currentLesson,
currentLessonResource: state => state.pageState.content,
nextLessonResource: state => state.pageState.content.next_content,
},
},
$trs: {
nextInLesson: 'Next in Lesson:',
},
};
</script>
<style lang="stylus" scoped></style>
| <template>
<div>
<content-page>
<div slot="below_content" class="below-content-area">
<template v-if="nextLessonResource">
<h1>{{ $tr('nextInLesson') }}</h1>
<content-card
:isMobile="true"
:kind="nextLessonResource.kind"
:link="nextResourceLink"
:progress="nextLessonResource.progress_fraction"
:thumbnail="getContentNodeThumbnail(nextLessonResource)"
:title="nextLessonResource.title"
/>
</template>
</div>
</content-page>
</div>
</template>
<script>
import ContentCard from '../content-card';
import ContentPage from '../content-page';
import { lessonResourceViewerLink } from './classPageLinks';
import { getContentNodeThumbnail } from 'kolibri.utils.contentNode';
export default {
name: 'lessonResourceViewer',
components: {
ContentCard,
ContentPage,
},
computed: {
nextResourceLink() {
return lessonResourceViewerLink(Number(this.$route.params.resourceNumber) + 1);
},
},
methods: {
getContentNodeThumbnail,
},
vuex: {
getters: {
currentLesson: state => state.pageState.currentLesson,
currentLessonResource: state => state.pageState.content,
nextLessonResource: state => state.pageState.content.next_content,
},
},
$trs: {
nextInLesson: 'Next in Lesson:',
},
};
</script>
<style lang="stylus" scoped>
.below-content-area
max-width: 800px
</style>
|
Update messaging in the delete channel modal. | <template>
<core-modal
:title="$tr('title')"
@cancel="handleClickCancel()"
>
<div>
<p class="action-description">
{{ $tr('deleteActionDescription') }}: {{ channelTitle }}
</p>
<p>{{ $tr('restorationInstructions') }}</p>
<p>{{ $tr('confirmationQuestion') }}</p>
</div>
<div class="core-modal-buttons">
<k-button
:primary="false"
@click="handleClickCancel()"
:text="$tr('cancelButtonLabel')"
/>
<k-button
name="confirm"
:primary="true"
@click="handleClickConfirm()"
:text="$tr('confirmButtonLabel')"
/>
</div>
</core-modal>
</template>
<script>
import coreModal from 'kolibri.coreVue.components.coreModal';
import kButton from 'kolibri.coreVue.components.kButton';
export default {
name: 'deleteChannelModal',
components: {
coreModal,
kButton,
},
props: {
channelTitle: {
type: String,
required: true,
},
},
methods: {
handleClickCancel() {
this.$emit('cancel');
},
handleClickConfirm() {
this.$emit('confirm');
},
},
$trs: {
deleteActionDescription: 'This channel will be deleted',
confirmationQuestion: 'Are you sure you want to do this?',
restorationInstructions:
'To restore this channel, you will need to re-import it from the internet or a storage device',
title: 'Delete channel',
cancelButtonLabel: 'Cancel',
confirmButtonLabel: 'Confirm',
},
};
</script>
<style lang="stylus" scoped>
.action-description
font-weight: bold
</style>
| <template>
<core-modal
:title="$tr('title')"
@cancel="handleClickCancel()"
>
<p>{{ $tr('confirmationQuestion', { channelTitle }) }}</p>
<div class="core-modal-buttons">
<k-button
:primary="false"
@click="handleClickCancel()"
:text="$tr('cancelButtonLabel')"
/>
<k-button
name="confirm"
:primary="true"
@click="handleClickConfirm()"
:text="$tr('confirmButtonLabel')"
/>
</div>
</core-modal>
</template>
<script>
import coreModal from 'kolibri.coreVue.components.coreModal';
import kButton from 'kolibri.coreVue.components.kButton';
export default {
name: 'deleteChannelModal',
components: {
coreModal,
kButton,
},
props: {
channelTitle: {
type: String,
required: true,
},
},
methods: {
handleClickCancel() {
this.$emit('cancel');
},
handleClickConfirm() {
this.$emit('confirm');
},
},
$trs: {
confirmationQuestion: `Are you sure you want to delete '{ channelTitle }' from your device?`,
title: 'Delete channel',
cancelButtonLabel: 'Cancel',
confirmButtonLabel: 'Delete',
},
};
</script>
<style lang="stylus" scoped></style>
|
Add some padding to footer for better clarity | <!--
- Copyright (C) 2016-2020 the original author or authors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<template>
<footer>
<p>
Coded with lots of
<img src="https://discord.com/assets/25c09e6fde32411da2b0da00f5cb9c84.svg" alt="coffee_logo" /> by
<a href="https://npstr.space/">Napster</a>
</p>
</footer>
</template>
<style lang="scss">
footer {
display: flex;
justify-content: center;
align-items: center;
font-size: 0.75em;
img {
height: 1em;
}
}
</style>
| <!--
- Copyright (C) 2016-2020 the original author or authors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<template>
<footer>
<p>
Coded with lots of
<img src="https://discord.com/assets/25c09e6fde32411da2b0da00f5cb9c84.svg" alt="coffee_logo" /> by
<a href="https://npstr.space/">Napster</a>
</p>
</footer>
</template>
<style lang="scss">
footer {
display: flex;
justify-content: center;
align-items: center;
font-size: 0.75em;
padding: 0.25em;
img {
height: 1em;
}
}
</style>
|
Add item card to welcome for testing. | <template>
<section class="hero is-success is-medium is-bold">
<div class="hero-body">
<h1 class="title">
Stardew Community Checklist
</h1>
<h2 class="subtitle">
Track Your Progress on the Community Center!
</h2>
</div>
</section>
</template>
<script>
export default {
name: 'welcome'
}
</script>
<style scoped>
</style>
| <template>
<section class="hero is-success is-medium is-bold">
<div class="hero-body">
<h1 class="title">
Stardew Community Checklist
</h1>
<h2 class="subtitle">
Track Your Progress on the Community Center!
</h2>
<item-card/>
</div>
</section>
</template>
<script>
import ItemCard from '@/components/item_card/ItemCard'
export default {
components: {ItemCard},
name: 'welcome'
}
</script>
<style scoped>
</style>
|
Make dapp badge download more enticing | <template>
<div class="component-DappDetailBodyContentRank">
<div class="wrapper">
<p class="description"><nuxt-link @click.native="trackDappMetaClick(slug)" :to="{name: 'dapp-detail-meta', params: {slug: slug}}">Add this ÐApp's badges to your website</nuxt-link></p>
</div>
</div>
</template>
<script>
import { trackDappMetaClick } from '~/helpers/mixpanel'
export default {
props: ['name', 'slug'],
methods: {
trackDappMetaClick () {
const action = trackDappMetaClick(this.slug)
this.$mixpanel.track(action.name, action.data)
}
}
}
</script>
<style lang="scss" scoped>
@import '~assets/css/settings';
.description {
margin-bottom: 0;
text-align: center;
@include tweakpoint('min-width', 1000px) {
text-align: left;
}
}
.wrapper {
margin: 0 10px 24px 10px;
padding-bottom: 24px;
}
</style>
| <template>
<div class="component-DappDetailBodyContentRank">
<div class="wrapper">
<p class="description"><nuxt-link @click.native="trackDappMetaClick(slug)" :to="{name: 'dapp-detail-meta', params: {slug: slug}}">Add this ÐApp's badges to your website</nuxt-link></p>
<ul class="badges">
<li v-for="(badge, index) in badges" :key="index"><nuxt-link @click.native="trackDappMetaClick(slug)" :to="{name: 'dapp-detail-meta', params: {slug: slug}}"><img :src="`https://badges.stateofthedapps.com/${slug}/${badge}`"></nuxt-link></li>
</ul>
<p style="margin-top: 5px;">And many more...</p>
</div>
</div>
</template>
<script>
import { trackDappMetaClick } from '~/helpers/mixpanel'
export default {
props: ['name', 'slug'],
data () {
return {
badges: [
'rank',
'users_30d',
'value_7d'
]
}
},
methods: {
trackDappMetaClick () {
const action = trackDappMetaClick(this.slug)
this.$mixpanel.track(action.name, action.data)
}
}
}
</script>
<style lang="scss" scoped>
@import '~assets/css/settings';
.badges {
padding-top: 10px;
}
.description {
margin-bottom: 0;
text-align: center;
@include tweakpoint('min-width', 1000px) {
text-align: left;
}
}
.wrapper {
margin: 0 10px 24px 10px;
padding-bottom: 24px;
}
</style>
|
Remove background from welcome for better look. | <template>
<section class="hero is-success is-medium is-bold">
<div class="hero-body">
<h1 class="title">
Stardew Community Checklist
</h1>
<h2 class="subtitle">
Track Your Progress on the Community Center!
</h2>
<item-card/>
</div>
</section>
</template>
<script>
import ItemCard from '@/components/item_card/ItemCard'
export default {
components: {ItemCard},
name: 'welcome'
}
</script>
<style scoped>
</style>
| <template>
<section class="hero is-medium is-bold">
<div class="hero-body">
<h1 class="title">
Stardew Community Checklist
</h1>
<h2 class="subtitle">
Track Your Progress on the Community Center!
</h2>
<item-card/>
</div>
</section>
</template>
<script>
import ItemCard from '@/components/item_card/ItemCard'
export default {
components: {ItemCard},
name: 'welcome'
}
</script>
<style scoped>
</style>
|
Change app name text color on footer | <template>
<div>
<fa icon="volume-up" fixed-width />
<n-link :to="linkTo" :title="player.title" class="text-white px-2">
{{ title() }}
</n-link>
<a href="#" class="text-white" @click.prevent="clear()">
<fa icon="times" />
</a>
<div class="d-md-none pt-1 text-secondary">
{{ $app.name }}
</div>
</div>
</template>
<script>
export default {
computed: {
player () {
return this.$store.state.player
},
linkTo () {
return {
name: this.player.type,
params: { id: this.player.id }
}
}
},
methods: {
title () {
const maxLength = 40
return this.player.title.length <= maxLength
? this.player.title
: `${this.player.title.substring(0, maxLength)}...`
},
clear () {
this.$store.dispatch('player/clear')
}
}
}
</script>
| <template>
<div>
<fa icon="volume-up" fixed-width />
<n-link :to="linkTo" :title="player.title" class="text-white px-2">
{{ title() }}
</n-link>
<a href="#" class="text-white" @click.prevent="clear()">
<fa icon="times" />
</a>
<div class="d-md-none pt-1 text-muted">
{{ $app.name }}
</div>
</div>
</template>
<script>
export default {
computed: {
player () {
return this.$store.state.player
},
linkTo () {
return {
name: this.player.type,
params: { id: this.player.id }
}
}
},
methods: {
title () {
const maxLength = 40
return this.player.title.length <= maxLength
? this.player.title
: `${this.player.title.substring(0, maxLength)}...`
},
clear () {
this.$store.dispatch('player/clear')
}
}
}
</script>
|
Fix alignment of list-group-header on mobile | <template>
<div class="ly-list-group">
<div class="ly-list-group-header">{{ name }}</div>
<div class="ly-list-group-body">
<slot></slot>
</div>
</div>
</template>
<script>
export default {
props: {
name: { type: String, required: true },
},
}
</script>
<style lang="scss">
.ly-list-group {
display: flex;
+ .ly-list-group {
margin-top: calc(1rem - 1px);
padding-top: 1rem;
border-top: 1px solid $ly-color-grey-30;
}
> .ly-list-group-body {
flex-grow: 1;
}
}
.ly-list-group-header {
padding: .5rem;
color: $ly-color-grey-50;
}
</style>
| <template>
<div class="ly-list-group">
<div class="ly-list-group-header">{{ name }}</div>
<div class="ly-list-group-body">
<slot></slot>
</div>
</div>
</template>
<script>
export default {
props: {
name: { type: String, required: true },
},
}
</script>
<style lang="scss">
.ly-list-group {
display: flex;
+ .ly-list-group {
margin-top: calc(1rem - 1px);
padding-top: 1rem;
border-top: 1px solid $ly-color-grey-30;
}
> .ly-list-group-body {
flex-grow: 1;
}
}
.ly-list-group-header {
padding: .5rem;
color: $ly-color-grey-50;
}
@media(max-width: $small-screen-width) {
.ly-list-group-header {
padding: 1rem .5rem;
}
}
</style>
|
Switch edit slug button icon to fa-pencil-alt | <template>
<p class="copyable" :class="{'copied': copySuccess, 'copy-failed': copyFailure}">
<slot></slot>
<button v-clipboard:copy="copyText"
v-clipboard:success="onCopySuccess"
v-clipboard:error="onCopyError" aria-label="copy button" title="copy this">
<i class="fas" :class="{'fa-check': copySuccess && copyAttempt, 'fa-times': copyFailure, 'fa-clipboard': !copyAttempt}"></i></button>
<button aria-label="edit button" v-if="editButton" @click="$emit('edit')" title="edit this">
<i class="fas fa-pencil"></i>
</button>
</p>
</template>
<script>
export default {
name: 'Copyable',
data: function () {
return {
copySuccess: false,
copyAttempt: false
}
},
props: {
copyText: {},
editButton: {
default: false
}},
computed: {
copyFailure() {
return (!this.copySuccess) && this.copyAttempt;
}
},
methods: {
onCopySuccess() {
this.copySuccess = true;
this.copyAttempt = true;
setTimeout(() => {
this.copyAttempt = false;
}, 2000)
},
onCopyError() {
this.copySuccess = false;
this.copyAttempt = true;
setTimeout(() => {
this.copyAttempt = false;
}, 2000)
}
}
}
</script> | <template>
<p class="copyable" :class="{'copied': copySuccess, 'copy-failed': copyFailure}">
<slot></slot>
<button v-clipboard:copy="copyText"
v-clipboard:success="onCopySuccess"
v-clipboard:error="onCopyError" aria-label="copy button" title="copy this">
<i class="fas" :class="{'fa-check': copySuccess && copyAttempt, 'fa-times': copyFailure, 'fa-clipboard': !copyAttempt}"></i></button>
<button aria-label="edit button" v-if="editButton" @click="$emit('edit')" title="edit this">
<i class="fas fa-pencil-alt"></i>
</button>
</p>
</template>
<script>
export default {
name: 'Copyable',
data: function () {
return {
copySuccess: false,
copyAttempt: false
}
},
props: {
copyText: {},
editButton: {
default: false
}},
computed: {
copyFailure() {
return (!this.copySuccess) && this.copyAttempt;
}
},
methods: {
onCopySuccess() {
this.copySuccess = true;
this.copyAttempt = true;
setTimeout(() => {
this.copyAttempt = false;
}, 2000)
},
onCopyError() {
this.copySuccess = false;
this.copyAttempt = true;
setTimeout(() => {
this.copyAttempt = false;
}, 2000)
}
}
}
</script>
|
Fix dropdown open to show in confidential edit form | <script>
import editFormButtons from './edit_form_buttons.vue';
import { s__ } from '../../../locale';
export default {
components: {
editFormButtons,
},
props: {
isConfidential: {
required: true,
type: Boolean,
},
updateConfidentialAttribute: {
required: true,
type: Function,
},
},
computed: {
confidentialityOnWarning() {
return s__(
'confidentiality|You are going to turn on the confidentiality. This means that only team members with <strong>at least Reporter access</strong> are able to see and leave comments on the issue.',
);
},
confidentialityOffWarning() {
return s__(
'confidentiality|You are going to turn off the confidentiality. This means <strong>everyone</strong> will be able to see and leave a comment on this issue.',
);
},
},
};
</script>
<template>
<div class="dropdown open">
<div class="dropdown-menu sidebar-item-warning-message">
<div>
<p
v-if="!isConfidential"
v-html="confidentialityOnWarning">
</p>
<p
v-else
v-html="confidentialityOffWarning">
</p>
<edit-form-buttons
:is-confidential="isConfidential"
:update-confidential-attribute="updateConfidentialAttribute"
/>
</div>
</div>
</div>
</template>
| <script>
import editFormButtons from './edit_form_buttons.vue';
import { s__ } from '../../../locale';
export default {
components: {
editFormButtons,
},
props: {
isConfidential: {
required: true,
type: Boolean,
},
updateConfidentialAttribute: {
required: true,
type: Function,
},
},
computed: {
confidentialityOnWarning() {
return s__(
'confidentiality|You are going to turn on the confidentiality. This means that only team members with <strong>at least Reporter access</strong> are able to see and leave comments on the issue.',
);
},
confidentialityOffWarning() {
return s__(
'confidentiality|You are going to turn off the confidentiality. This means <strong>everyone</strong> will be able to see and leave a comment on this issue.',
);
},
},
};
</script>
<template>
<div class="dropdown show">
<div class="dropdown-menu sidebar-item-warning-message">
<div>
<p
v-if="!isConfidential"
v-html="confidentialityOnWarning">
</p>
<p
v-else
v-html="confidentialityOffWarning">
</p>
<edit-form-buttons
:is-confidential="isConfidential"
:update-confidential-attribute="updateConfidentialAttribute"
/>
</div>
</div>
</div>
</template>
|
Add / to restaurant request | <template>
<div class="restaurant">
<div class="title is-5"><a :href="restaurant_info.url">{{ restaurant_info.name }}</a>
(<a :href="restaurant_info.osm">map</a>)
</div>
<div v-for="entry in dishes" :key="entry">
{{ entry.dish }}
</div>
</div>
</template>
<script>
import axios from 'axios';
export default {
name: 'RestaurantEntry',
props: ["restaurant_info"],
data () {
return {
dishes: null
}
},
mounted () {
axios
.get(process.env.VUE_APP_API_URL + '/restaurant/' +
this.restaurant_info['identifier'])
.then(response => (this.dishes = response.data.restaurant.menu))
}
}
</script>
<style scoped>
.restaurant {
Margin: 10px 0px 10px 0px;
}
</style>
| <template>
<div class="restaurant">
<div class="title is-5"><a :href="restaurant_info.url">{{ restaurant_info.name }}</a>
(<a :href="restaurant_info.osm">map</a>)
</div>
<div v-for="entry in dishes" :key="entry">
{{ entry.dish }}
</div>
</div>
</template>
<script>
import axios from 'axios';
export default {
name: 'RestaurantEntry',
props: ["restaurant_info"],
data () {
return {
dishes: null
}
},
mounted () {
axios
.get(process.env.VUE_APP_API_URL + '/restaurant/' +
this.restaurant_info['identifier'] + '/')
.then(response => (this.dishes = response.data.restaurant.menu))
}
}
</script>
<style scoped>
.restaurant {
Margin: 10px 0px 10px 0px;
}
</style>
|
Use the more elegant way of querying the period's content nodes, now that it's available | <template>
<div class="tw-break-after-page">
<div>
<h1 class="tw-text-2xl tw-font-bold tw-mb-6">
{{ $tc('print.program.title') }}: {{ $tc('entity.period.name') }}
{{ period.description }}
</h1>
</div>
<program-day
v-for="day in days"
:key="'day' + day.id"
:day="day"
:show-daily-summary="showDailySummary"
:show-activities="showActivities"
:index="index"
/>
</div>
</template>
<script>
export default {
props: {
period: { type: Object, required: true },
showDailySummary: { type: Boolean, required: true },
showActivities: { type: Boolean, required: true },
index: { type: Number, required: true },
},
data() {
return {
days: null,
}
},
async fetch() {
await Promise.all([
this.period.days().$loadItems(),
this.period.scheduleEntries().$loadItems(),
this.$api.get().contentNodes({ period: this.period._meta.self }).$loadItems(),
])
this.days = this.period.days().items
},
}
</script>
| <template>
<div class="tw-break-after-page">
<div>
<h1 class="tw-text-2xl tw-font-bold tw-mb-6">
{{ $tc('print.program.title') }}: {{ $tc('entity.period.name') }}
{{ period.description }}
</h1>
</div>
<program-day
v-for="day in days"
:key="'day' + day.id"
:day="day"
:show-daily-summary="showDailySummary"
:show-activities="showActivities"
:index="index"
/>
</div>
</template>
<script>
export default {
props: {
period: { type: Object, required: true },
showDailySummary: { type: Boolean, required: true },
showActivities: { type: Boolean, required: true },
index: { type: Number, required: true },
},
data() {
return {
days: null,
}
},
async fetch() {
await Promise.all([
this.period.days().$loadItems(),
this.period.scheduleEntries().$loadItems(),
this.period.contentNodes().$loadItems(),
])
this.days = this.period.days().items
},
}
</script>
|
Send visited dashboard page only when is first time visiting dashboard | <template>
<section class="page page--welcome">
<Welcome />
<MapsSection class="section" />
<DatasetsSection class="section section--noBorder" />
<QuotaSection></QuotaSection>
</section>
</template>
<script>
import Welcome from './WelcomeSection/Welcome.vue';
import MapsSection from './MapsSection/MapsSection.vue';
import DatasetsSection from './DatasetsSection/DatasetsSection.vue';
import QuotaSection from './QuotaSection/QuotaSection.vue';
import { sendMetric, MetricsTypes } from 'new-dashboard/core/metrics';
export default {
name: 'Home',
components: {
Welcome,
MapsSection,
DatasetsSection,
QuotaSection
},
beforeRouteEnter (to, from, next) {
sendMetric(MetricsTypes.VISITED_PRIVATE_PAGE, { page: 'dashboard' });
next();
},
beforeRouteLeave (to, from, next) {
this.$store.dispatch('datasets/resetFilters');
this.$store.dispatch('maps/resetFilters');
next();
}
};
</script>
<style scoped lang="scss">
@import 'stylesheets/new-dashboard/variables';
.page--welcome {
padding: 64px 0 0;
}
</style>
| <template>
<section class="page page--welcome">
<Welcome />
<MapsSection class="section" />
<DatasetsSection class="section section--noBorder" />
<QuotaSection></QuotaSection>
</section>
</template>
<script>
import Welcome from './WelcomeSection/Welcome.vue';
import MapsSection from './MapsSection/MapsSection.vue';
import DatasetsSection from './DatasetsSection/DatasetsSection.vue';
import QuotaSection from './QuotaSection/QuotaSection.vue';
import { sendMetric, MetricsTypes } from 'new-dashboard/core/metrics';
export default {
name: 'Home',
components: {
Welcome,
MapsSection,
DatasetsSection,
QuotaSection
},
created () {
if (this.isFirstTimeViewingDashboard) {
sendMetric(MetricsTypes.VISITED_PRIVATE_PAGE, { page: 'dashboard' });
}
},
beforeRouteLeave (to, from, next) {
this.$store.dispatch('datasets/resetFilters');
this.$store.dispatch('maps/resetFilters');
next();
},
computed: {
isFirstTimeViewingDashboard () {
return this.$store.state.config.isFirstTimeViewingDashboard;
}
}
};
</script>
<style scoped lang="scss">
@import 'stylesheets/new-dashboard/variables';
.page--welcome {
padding: 64px 0 0;
}
</style>
|
Refresh state before exporting data | <template lang="html">
<a
:href="dataToExport"
download="AIDA_annotation.json">
<v-btn icon>
<v-icon small>
fa-download
</v-icon>
</v-btn>
</a>
</template>
<script>
import { mapState } from 'vuex'
export default {
computed: {
...mapState({
dataToExport: state =>
'data:text/json;charset=utf-8,' +
encodeURIComponent(JSON.stringify(state.annotation.project))
})
}
}
</script>
<style lang='css'>
</style>
| <template lang="html">
<v-btn
icon
@click.native="exportData" >
<v-icon small>
fa-download
</v-icon>
</v-btn>
</template>
<script>
import { mapState, mapActions } from 'vuex'
export default {
computed: {
...mapState({
dataToExport: state => state.annotation.project
})
},
methods: {
...mapActions([
'refreshAnnotationState'
]),
exportData: function () {
this.refreshAnnotationState()
let dataStr = 'data:text/json;charset=utf-8,' +
encodeURIComponent(JSON.stringify(this.dataToExport, null, 2))
let downloadAnchorNode = document.createElement('a')
downloadAnchorNode.setAttribute('href', dataStr)
downloadAnchorNode.setAttribute('download', 'AIDA_annotation.json')
document.body.appendChild(downloadAnchorNode) // required for firefox
downloadAnchorNode.click()
downloadAnchorNode.remove()
}
}
}
</script>
<style lang='css'>
</style>
|
Replace markdown-it instance with wrapper function to call markdown-it | <template>
<div>
<navbar></navbar>
<div class="section group">
<div class="col span_6_of_12">
<div>
<codemirror v-model="content" ref="myEditor" @changed="codeChange">
</codemirror>
</div>
</div>
<div class="col span_6_of_12">
<div class="viewer">
<div v-html="getMarkdown"></div>
</div>
</div>
</div>
</div>
</template>
<script>
import { codemirror } from 'vue-codemirror';
import MarkdownIt from 'markdown-it';
import navbar from './Navbar';
const md = new MarkdownIt();
let content = '';
let codeMirrorInstance = null;
/* eslint prefer-const: 0 */
export default {
components: {
codemirror,
navbar
},
data() {
return {
content,
};
},
methods: {
codeChange(newCode) {
console.log(newCode);
}
},
computed: {
editor() {
return this.$refs.myEditor.editor;
},
getMarkdown() {
let tempContent = this.content || '';
return md.render(tempContent);
}
},
mounted() {
codeMirrorInstance = this.editor;
}
};
</script>
<style scoped lang="scss">
.viewer {
height: calc(100vh - 100px);
overflow-wrap: break-word;
overflow-y: scroll;
p {
margin: 5px;
}
}
</style>
| <template>
<div>
<navbar></navbar>
<div class="section group">
<div class="col span_6_of_12">
<div>
<codemirror v-model="content" ref="myEditor" @changed="codeChange">
</codemirror>
</div>
</div>
<div class="col span_6_of_12">
<div class="viewer">
<div v-html="getMarkdown"></div>
</div>
</div>
</div>
</div>
</template>
<script>
import { codemirror } from 'vue-codemirror';
import wrapper from '../logic/wrapper';
import navbar from './Navbar';
let content = '';
let codeMirrorInstance = null;
/* eslint prefer-const: 0 */
export default {
components: {
codemirror,
navbar
},
data() {
return {
content,
};
},
methods: {
codeChange(newCode) {
console.log(newCode);
}
},
computed: {
editor() {
return this.$refs.myEditor.editor;
},
getMarkdown() {
return wrapper.render(this.content);
}
},
mounted() {
codeMirrorInstance = this.editor;
}
};
</script>
<style scoped lang="scss">
.viewer {
height: calc(100vh - 100px);
overflow-wrap: break-word;
overflow-y: scroll;
p {
margin: 5px;
}
}
</style>
|
Switch back to using community cards on homepage. | <script lang="ts" src="./communities"></script>
<template>
<div class="container-xl">
<div class="text-center">
<h2 class="section-header">
<translate>Browse Communities</translate>
</h2>
<p>
<translate>
Find a community to create and explore fanart, videos, walkthroughs and more!
</translate>
</p>
<hr class="underbar underbar-center" />
<br />
</div>
<div class="row">
<div
v-for="community of slicedCommunities"
:key="community.id"
class="col-xs-6 col-sm-3 col-md-2"
>
<app-discover-home-communities-item
v-app-track-event="`home:communities:click`"
:community="community"
/>
</div>
</div>
<br />
<div class="page-cut">
<app-button
v-app-track-event="`home:more-btn:communities`"
:to="{ name: 'discover.communities' }"
>
<translate>Browse More Communities</translate>
</app-button>
</div>
</div>
</template>
| <script lang="ts" src="./communities"></script>
<template>
<div class="container">
<div class="text-center">
<h2 class="section-header">
<translate>Browse Communities</translate>
</h2>
<p>
<translate>
Find a community to create and explore fanart, videos, walkthroughs and more!
</translate>
</p>
<hr class="underbar underbar-center" />
<br />
</div>
<div class="row">
<div
v-for="community of slicedCommunities"
:key="community.id"
class="col-sm-6 col-md-4 col-lg-3 anim-fade-in"
>
<app-community-card
v-app-track-event="`home:communities:click`"
:community="community"
elevate
/>
</div>
</div>
<br />
<div class="page-cut">
<app-button
v-app-track-event="`home:more-btn:communities`"
:to="{ name: 'discover.communities' }"
>
<translate>Browse More Communities</translate>
</app-button>
</div>
</div>
</template>
|
Fix hanging dapp cards css | <template>
<ul class="component-DappCardList">
<DappCardListItem v-for="(dapp, index) in dapps"
:key="index"
:dapp="dapp"
:sourceCollection="sourceCollection"/>
</ul>
</template>
<script>
import DappCardListItem from './DappCardListItem'
export default {
components: {
DappCardListItem
},
props: {
dapps: {
default () {
return []
},
type: Array
},
sourceCollection: {
type: String
}
}
}
</script>
<style lang="scss" scoped>
@import '~assets/css/settings';
.component-DappCardList {
display: flex;
align-items: center;
flex-wrap: wrap;
margin: 0 -10px;
}
.component-DappCardListItem {
width: calc(100% - 20px);
@include tweakpoint('min-width', 480px) {
width: calc(50% - 20px);
}
@include tweakpoint('min-width', 775px) {
width: calc(33.33% - 20px);
}
@include tweakpoint('min-width', 1200px) {
width: calc(25% - 20px);
}
@include tweakpoint('min-width', 1500px) {
width: calc(16.66% - 20px);
}
}
</style>
| <template>
<ul class="component-DappCardList">
<DappCardListItem v-for="(dapp, index) in dapps"
:key="index"
:dapp="dapp"
:sourceCollection="sourceCollection"/>
</ul>
</template>
<script>
import DappCardListItem from './DappCardListItem'
export default {
components: {
DappCardListItem
},
props: {
dapps: {
default () {
return []
},
type: Array
},
sourceCollection: {
type: String
}
}
}
</script>
<style lang="scss" scoped>
@import '~assets/css/settings';
.component-DappCardList {
display: flex;
align-items: center;
flex-wrap: wrap;
margin: 0 -10px;
}
.component-DappCardListItem {
width: calc(100% - 20px);
@include tweakpoint('min-width', 480px) {
width: calc(50% - 20px);
}
@include tweakpoint('min-width', 775px) {
width: calc(33.33% - 20px);
}
@include tweakpoint('min-width', 1250px) {
width: calc(16.66% - 20px);
}
}
</style>
|
Store the pending and the completed tasks on the parent instance | <template>
<div class="row">
<div class="row" v-show="!tasksEmpty">
<div class="col-sm-6">
<task-list type="pending" heading="Pending Tasks"></task-list>
</div>
<div class="col-sm-6">
<task-list type="completed" heading="Completed Tasks"></task-list>
</div>
</div>
<alert :dismissable="false" type="danger" v-else>There are no tasks to show.</alert>
</div>
</template>
<script>
var taskListComponent = require('./list.vue');
module.exports = {
data: function() {
return {
tasks: [],
pendingTasksCount: 100, //Just to fake initially to prevent error message from showing
completedTasksCount: 100
}
},
computed: {
totalTasksCount: function() {
return this.pendingTasksCount + this.completedTasksCount;
},
tasksEmpty: function() {
return this.totalTasksCount == 0;
}
},
components: {
'task-list': taskListComponent
},
events: {
taskCompletionStatusWasToggled: function(task) {
this.$broadcast('taskCompletionStatusWasToggled', task);
},
tasksCountChanged: function(task) {
if(task.type === 'pending')
this.pendingTasksCount = task.count;
else if(task.type === 'completed')
this.completedTasksCount = task.count;
},
}
}
</script> | <template>
<div class="row">
<div class="row">
<div class="col-sm-6">
<task-list type="pending" heading="Pending Tasks" :tasks.sync="pendingTasks"></task-list>
</div>
<div class="col-sm-6">
<task-list type="completed" heading="Completed Tasks" :tasks.sync="completedTasks"></task-list>
</div>
</div>
<alert :dismissable="false" type="danger" v-if="showTasksEmpty">There are no tasks to show.</alert>
</div>
</template>
<script>
var taskListComponent = require('./list.vue');
module.exports = {
data: function() {
return {
pendingTasks: [],
completedTasks: [],
dataLoaded: { pending: false, completed: false },
showTasksEmpty: false
}
},
computed: {
totalTasksCount: function() {
return this.pendingTasks.length + this.completedTasks.length;
}
},
components: {
'task-list': taskListComponent
},
events: {
taskCompletionStatusWasToggled: function(task) {
this.$broadcast('taskCompletionStatusWasToggled', task);
},
taskWasDeleted: function(task) {
this.$broadcast('taskWasDeleted', task);
},
dataLoaded: function(type){
this.dataLoaded[type] = true;
if(this.dataLoaded['completed'] === true && this.dataLoaded['pending'] === true)
this.showTasksEmpty = this.totalTasksCount === 0
}
}
}
</script> |
Fix - open menu by default | <template>
<div class="menu">
<v-list dense>
<v-list-group link v-for="category in categories" :key="category">
<template v-slot:activator>
<v-list-item-content>
<v-list-item-title class="text-capitalize">{{category.category}}</v-list-item-title>
</v-list-item-content>
</template>
<v-list-item v-for="(doc, i) in category.docs" :key="i" link :to="doc.filename">
<router-link :to="doc.filename">
<v-list-item-title>{{doc.attributes.title}}</v-list-item-title>
</router-link>
</v-list-item>
</v-list-group>
</v-list>
</div>
</template>
<script>
export default {
name: 'DocsMenu',
props: ['categories']
}
</script>
| <template>
<div class="menu">
<v-list dense>
<v-list-group link v-for="category in categories" :key="category" value="true">
<template v-slot:activator>
<v-list-item-content>
<v-list-item-title class="text-capitalize">{{category.category}}</v-list-item-title>
</v-list-item-content>
</template>
<v-list-item v-for="(doc, i) in category.docs" :key="i" link :to="doc.filename">
<router-link :to="doc.filename">
<v-list-item-title>{{doc.attributes.title}}</v-list-item-title>
</router-link>
</v-list-item>
</v-list-group>
</v-list>
</div>
</template>
<script>
export default {
name: 'DocsMenu',
props: ['categories']
}
</script>
|
Add missing g closing tag | <template>
<g :transform="phrase.transform">
<g v-for="childPhrase in phrase.phrases"
:key="childPhrase.id">
<circle cx="0"
cy="40"
r="100"/>
<RenderedPhrase v-if="'phrases' in childPhrase"
:phrase="childPhrase"/>
<RenderedLetter v-else
:letter="childPhrase"/>
</g>
</template>
<script lang="ts">
import Vue from "vue"
import RenderedLetter from '@/components/RenderedLetter.vue'
export default Vue.extend({
name: "RenderedPhrase",
props: ['phrase'],
components: {
RenderedLetter,
},
})
| <template>
<g :transform="phrase.transform">
<g v-for="childPhrase in phrase.phrases"
:key="childPhrase.id">
<circle cx="0"
cy="40"
r="100"/>
<RenderedPhrase v-if="'phrases' in childPhrase"
:phrase="childPhrase"/>
<RenderedLetter v-else
:letter="childPhrase"/>
</g>
</g>
</template>
<script lang="ts">
import Vue from "vue"
import RenderedLetter from '@/components/RenderedLetter.vue'
export default Vue.extend({
name: "RenderedPhrase",
props: ['phrase'],
components: {
RenderedLetter,
},
})
|
Fix tree view inline checkboxes. | <template>
<va-tree-root>
<va-tree-category label="Products">
<va-tree-node v-for="product in products" :key="product.id">
<va-checkbox
slot="checkbox"
v-model="product.selected"
/>
{{ product.name }}
</va-tree-node>
</va-tree-category>
<va-tree-category isOpen label="Electronics">
<va-tree-node v-for="electronic in electronics" :key="electronic.id">
<va-checkbox
slot="checkbox"
v-model="electronic.selected"
/>
{{ electronic.name }}
</va-tree-node>
</va-tree-category>
</va-tree-root>
</template>
<script>
export default {
name: 'tree-view-selectable-preview',
data () {
return {
electronics: [
{ id: 1, name: 'Cellphones', selected: false },
{ id: 2, name: 'Camera Body Kits', selected: false },
{ id: 3, name: 'External HDDs', selected: false },
],
products: [
{ id: 4, name: 'Cables', selected: false },
{ id: 5, name: 'Monitors', selected: false },
{ id: 6, name: 'Keyboards', selected: false },
],
}
},
}
</script>
| <template>
<va-tree-root>
<va-tree-category label="Products">
<va-tree-node v-for="product in products" :key="product.id">
<template #checkbox>
<va-checkbox
v-model="electronic.selected"
:label="product.name"
/>
</template>
</va-tree-node>
</va-tree-category>
<va-tree-category isOpen label="Electronics">
<va-tree-node v-for="electronic in electronics" :key="electronic.id">
<template #checkbox>
<va-checkbox
v-model="electronic.selected"
:label="electronic.name"
/>
</template>
</va-tree-node>
</va-tree-category>
</va-tree-root>
</template>
<script>
export default {
name: 'tree-view-selectable-preview',
data () {
return {
electronics: [
{ id: 1, name: 'Cellphones', selected: false },
{ id: 2, name: 'Camera Body Kits', selected: false },
{ id: 3, name: 'External HDDs', selected: false },
],
products: [
{ id: 4, name: 'Cables', selected: false },
{ id: 5, name: 'Monitors', selected: false },
{ id: 6, name: 'Keyboards', selected: false },
],
}
},
}
</script>
|
Add counts for bundles with count greater than one | <template>
<a class="button is-rounded is-fullwidth" :class="ItemInBundle ? 'is-success' : 'is-danger'"
@click="ToggleItemInBundle">
<span class="icon">
<font-awesome-icon :icon="ItemInBundle ? InBundleIcon : NotInBundleIcon"/>
</span>
<span>{{bundleItem.bundle.name}}</span>
</a>
</template>
<script>
import FontAwesomeIcon from '@fortawesome/vue-fontawesome'
import faCheckSquare from '@fortawesome/fontawesome-free-regular/faCheckSquare'
import faSquare from '@fortawesome/fontawesome-free-regular/faSquare'
export default {
name: 'bundle-button',
components: {
'font-awesome-icon': FontAwesomeIcon
},
props: {
bundleItem: {
type: Object,
required: true
}
},
computed: {
ItemInBundle: function () {
return this.$store.getters.IsBundleItemRedeemed(this.bundleItem)
},
InBundleIcon () {
return faCheckSquare
},
NotInBundleIcon () {
return faSquare
}
},
methods: {
ToggleItemInBundle () {
if (!this.ItemInBundle) {
this.$store.commit('RedeemItem', this.bundleItem)
} else {
this.$store.commit('UndoRedeemItem', this.bundleItem)
}
}
}
}
</script>
<style scoped>
</style>
| <template>
<a class="button is-rounded is-fullwidth" :class="ItemInBundle ? 'is-success' : 'is-danger'"
@click="ToggleItemInBundle">
<span class="icon">
<font-awesome-icon :icon="ItemInBundle ? InBundleIcon : NotInBundleIcon"/>
</span>
<span>{{bundleItem.bundle.name}}{{numberInBundle}}</span>
</a>
</template>
<script>
import FontAwesomeIcon from '@fortawesome/vue-fontawesome'
import faCheckSquare from '@fortawesome/fontawesome-free-regular/faCheckSquare'
import faSquare from '@fortawesome/fontawesome-free-regular/faSquare'
export default {
name: 'bundle-button',
components: {
'font-awesome-icon': FontAwesomeIcon
},
props: {
bundleItem: {
type: Object,
required: true
}
},
computed: {
ItemInBundle: function () {
return this.$store.getters.IsBundleItemRedeemed(this.bundleItem)
},
InBundleIcon () {
return faCheckSquare
},
NotInBundleIcon () {
return faSquare
},
numberInBundle () {
return this.bundleItem.count > 1 ? ` (${this.bundleItem.count})` : ''
}
},
methods: {
ToggleItemInBundle () {
if (!this.ItemInBundle) {
this.$store.commit('RedeemItem', this.bundleItem)
} else {
this.$store.commit('UndoRedeemItem', this.bundleItem)
}
}
}
}
</script>
<style scoped>
</style>
|
Fix js error with prop type | <template>
<div class="chart--row-pa">
<div class="chart__row">
<div class="chart__bar" :style="{ width: percent + '%' }">
<div class="chart__coverage" :style="{ width: coverage + '%' }">
<span class="chart__coverage-label">{{ coverage }}%</span>
</div>
<span class="chart__bar-label">{{ percent }}%</span>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'chart-row-pa',
props: {
coverage: {
type: Number,
required: true
},
percent: {
type: Number,
required: true
}
}
}
</script> | <template>
<div class="chart--row-pa">
<div class="chart__row">
<div class="chart__bar" :style="{ width: percent + '%' }">
<div class="chart__coverage" :style="{ width: coverage + '%' }">
<span class="chart__coverage-label">{{ coverage }}%</span>
</div>
<span class="chart__bar-label">{{ percent }}%</span>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'chart-row-pa',
props: {
coverage: {
type: String,
required: true
},
percent: {
type: String,
required: true
}
}
}
</script> |
Use router `replace` in 404-not-found | <template>
<div class="not-found">
Can't found the path: <b>{{ $route.fullPath }}</b>
<div>
Please check the url or Redirect to home page:
<router-link to="/">Home</router-link>
</div>
</div>
</template>
| <template>
<div class="not-found">
Can't found the path: <b>{{ $route.fullPath }}</b>
<div>
Please check the url or Redirect to home page:
<router-link to="/" replace>Home</router-link>
</div>
</div>
</template>
|
Fix calculation of height with variable | <template>
<div>
<userInputs v-model="action"></userInputs>
<div class="documents">
<documents :action="action"></documents>
</div>
</div>
</template>
<script>
import documents from './Documents';
import userInputs from './UserInputs';
export default {
components: {
documents,
userInputs,
},
data() {
return {
action: '',
};
},
watch: {
}
};
</script>
<style scoped lang="scss">
@import 'src/assets/styles/variables.scss';
.documents {
height: calc(100% - $navbar-height);
}
</style>
| <template>
<div>
<userInputs v-model="action"></userInputs>
<div class="documents">
<documents :action="action"></documents>
</div>
</div>
</template>
<script>
import documents from './Documents';
import userInputs from './UserInputs';
export default {
components: {
documents,
userInputs,
},
data() {
return {
action: '',
};
},
watch: {
}
};
</script>
<style scoped lang="scss">
@import 'src/assets/styles/variables.scss';
.documents {
height: calc(100% - #{$navbar-height});
}
</style>
|
Create game : fix input[type=range] | <template>
<div :class="{ 'has-error': error }">
<label for="max-player" class="required">{{ label }} :</label>
<input v-model="nb_player" id="max-player" type="range" required="required" class="small-12 max-player" min="2" max="12">
<div class="clear"></div>
</div>
</template>
<script>
let regNum = new RegExp('^([0-9]*)$', 'g')
export default {
props: ['trans'],
data() {
return {
label: '',
error: false,
nb_player: 4
}
},
computed: {
label() {
return this.trans.replace('%d', this.error ? '' : this.nb_player)
}
},
watch: {
nb_player(value) {
this.error = !this.nb_player.match(regNum) || !value.length
if (!this.error) {
$('.hidden-maxplayer').val(this.nb_player)
}
}
}
}
</script> | <template>
<div :class="{ 'has-error': error }">
<label for="max-player" class="required">{{ label }} :</label>
<input v-model="nb_player" id="max-player" type="range" required="required" class="small-12 max-player" min="2" max="12">
<div class="clear"></div>
</div>
</template>
<script>
let regNum = new RegExp('^([0-9]*)$', 'g')
export default {
props: ['trans'],
data() {
return {
error: false,
nb_player: 4
}
},
computed: {
label() {
return this.trans.replace('%d', this.error ? '' : this.nb_player)
}
},
watch: {
nb_player(value) {
this.error = !this.nb_player.match(regNum) || !value.length
if (!this.error) {
$('.hidden-maxplayer').val(this.nb_player)
}
}
}
}
</script>
<style lang="less">
input[type=range] {
border: 1px solid white;
}
</style>
|
Fix markdown invisible on tab changed | <template>
<b-tab :title-link-class="classes">
<template v-slot:title>
{{ title }}
</template>
<slot />
</b-tab>
</template>
<script>
import { BTab } from 'bootstrap-vue';
export default {
name: 'SharpTab',
components: {
BTab
},
provide() {
return {
$tab: this
}
},
props: {
title: String,
},
data() {
return {
errors: {}
}
},
watch: {
localActive: {
immediate: true,
async handler(val) {
if(val) {
await this.$nextTick();
this.$emit('active');
}
}
}
},
computed: {
hasError() {
return Object.keys(this.errors).length > 0;
},
classes() {
return {
'is-invalid': this.hasError,
}
}
},
methods: {
setError(fieldKey) {
this.$set(this.errors,fieldKey,true);
},
clearError(fieldKey) {
this.$delete(this.errors,fieldKey);
}
},
created() {
this.$on('error', key=>this.setError(key));
this.$on('clear', key=>this.clearError(key));
},
}
</script>
| <template>
<b-tab :title-link-class="classes" @update:active="handleActiveChanged">
<template v-slot:title>
{{ title }}
</template>
<slot />
</b-tab>
</template>
<script>
import { BTab } from 'bootstrap-vue';
export default {
name: 'SharpTab',
components: {
BTab
},
provide() {
return {
$tab: this
}
},
props: {
title: String,
},
data() {
return {
errors: {},
}
},
computed: {
hasError() {
return Object.keys(this.errors).length > 0;
},
classes() {
return {
'is-invalid': this.hasError,
}
}
},
methods: {
setError(fieldKey) {
this.$set(this.errors,fieldKey,true);
},
clearError(fieldKey) {
this.$delete(this.errors,fieldKey);
},
async handleActiveChanged(active) {
if(active) {
await this.$nextTick();
this.$emit('active');
}
},
},
created() {
this.$on('error', key=>this.setError(key));
this.$on('clear', key=>this.clearError(key));
},
}
</script>
|
Load foldername from props passed down from Documents | <template>
<div class="col vertical-align-child"
v-on:dblclick="openFolder"
id="123">
<button class="folder">
<img src="../../assets/images/icons/icon-folder.svg" alt="folder">
<p class="inline-block">CS3244 Project</p>
</button>
</div>
</template>
<script>
export default {
data() {
},
methods: {
openFolder() {
const folderId = this.$el.id;
this.$router.push({ path: 'content', query: { id: folderId } });
},
}
};
</script>
<style scoped lang="scss">
@import 'src/assets/styles/variables.scss';
</style>
| <template>
<div class="col vertical-align-child"
v-on:dblclick="openFolder"
id="123">
<button class="folder">
<img src="../../assets/images/icons/icon-folder.svg" alt="folder">
<p class="inline-block">{{folderName}}</p>
</button>
</div>
</template>
<script>
export default {
props: ['folderName'],
data() {
},
methods: {
openFolder() {
const folderId = this.$el.id;
this.$router.push({ path: 'content', query: { id: folderId } });
},
}
};
</script>
<style scoped lang="scss">
@import 'src/assets/styles/variables.scss';
</style>
|
Remove flexbox centered loading status | <template>
<div class="loading-screen" :style="backgroundStyle">
<div>
<KCircularLoader
type="indeterminate"
:delay="false"
/>
<p>{{ $tr('loadingBook') }}</p>
</div>
</div>
</template>
<script>
import KCircularLoader from 'kolibri.coreVue.components.KCircularLoader';
import themeMixin from 'kolibri.coreVue.mixins.themeMixin';
export default {
name: 'LoadingScreen',
components: {
KCircularLoader,
},
mixins: [themeMixin],
computed: {
backgroundStyle() {
return {
backgroundColor: this.$coreBgLight,
};
},
},
$trs: {
loadingBook: 'Loading book',
},
};
</script>
<style lang="scss" scoped>
.loading-screen {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 24;
display: flex;
align-items: center;
justify-content: center;
}
</style>
| <template>
<div class="loading-screen" :style="backgroundStyle">
<div class="loading-status">
<KCircularLoader
type="indeterminate"
:delay="false"
/>
<p>{{ $tr('loadingBook') }}</p>
</div>
</div>
</template>
<script>
import KCircularLoader from 'kolibri.coreVue.components.KCircularLoader';
import themeMixin from 'kolibri.coreVue.mixins.themeMixin';
export default {
name: 'LoadingScreen',
components: {
KCircularLoader,
},
mixins: [themeMixin],
computed: {
backgroundStyle() {
return {
backgroundColor: this.$coreBgLight,
};
},
},
$trs: {
loadingBook: 'Loading book',
},
};
</script>
<style lang="scss" scoped>
.loading-screen {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 24;
}
.loading-status {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
</style>
|
Remove props from veui-link slot | <template>
<component v-if="!to"
class="veui-link"
:class="klass"
:is="fallback"
@click="handleRedirect"><slot :disabled="disabled"></slot></component>
<router-link v-else-if="$router && !native"
class="veui-link"
:class="klass"
:to="to"
:replace="replace">
<slot></slot>
</router-link>
<a v-else
class="veui-link"
:class="klass"
:href="to"
@click="handleRedirect">
<slot></slot>
</a>
</template>
<script>
export default {
name: 'veui-link',
components: {
'veui-element': Element
},
props: {
to: {
type: String,
default: ''
},
replace: Boolean,
native: Boolean,
fallback: {
type: String,
default: 'span'
},
disabled: Boolean
},
computed: {
klass () {
return {
'veui-disabled': this.disabled
}
}
},
methods: {
handleRedirect (event) {
if (this.disabled) {
event.preventDefault()
return
}
if (this.to) {
this.$emit('click', event)
if (this.replace && !event.defaultPrevented) {
event.preventDefault()
location.replace(this.to)
}
} else {
event.preventDefault()
this.$emit('click', event)
}
}
}
}
</script>
| <template>
<component v-if="!to"
class="veui-link"
:class="klass"
:is="fallback"
@click="handleRedirect"><slot></slot></component>
<router-link v-else-if="$router && !native"
class="veui-link"
:class="klass"
:to="to"
:replace="replace">
<slot></slot>
</router-link>
<a v-else
class="veui-link"
:class="klass"
:href="to"
@click="handleRedirect">
<slot></slot>
</a>
</template>
<script>
export default {
name: 'veui-link',
components: {
'veui-element': Element
},
props: {
to: {
type: String,
default: ''
},
replace: Boolean,
native: Boolean,
fallback: {
type: String,
default: 'span'
},
disabled: Boolean
},
computed: {
klass () {
return {
'veui-disabled': this.disabled
}
}
},
methods: {
handleRedirect (event) {
if (this.disabled) {
event.preventDefault()
return
}
if (this.to) {
this.$emit('click', event)
if (this.replace && !event.defaultPrevented) {
event.preventDefault()
location.replace(this.to)
}
} else {
event.preventDefault()
this.$emit('click', event)
}
}
}
}
</script>
|
Add main content section container | <template>
<div class="mb-5">
<div class="title mb-3">
{{ title }}
</div>
<slot />
</div>
</template>
<script>
export default {
name : 'MainContentSection',
components: { },
props : { title: { type: String, default: 'Section' } },
}
</script>
<style scoped>
.title {
border-bottom: 2px #bfbfbf solid;
line-height: 1.5 !important;
}
</style>
| |
Add an autoscrolling log panel Vue component | <!--
Licensed to Cloudera, Inc. under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. Cloudera, Inc. licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<template>
<div ref="logsContainer" class="logs-panel" @scroll="onScroll">
<span v-if="logs">{{ logs }}</span>
<span v-else>{{ I18n('There are currently no logs available.') }}</span>
</div>
</template>
<script lang="ts">
import Vue from 'vue';
import Component from 'vue-class-component';
import { Prop, Watch } from 'vue-property-decorator';
import I18n from 'utils/i18n';
@Component({
methods: { I18n }
})
export default class LogsPanel extends Vue {
@Prop()
logs = '';
@Prop({ required: false })
autoScroll = true;
ignoreNextScrollEvent = false;
userScrolled = false;
onScroll(): void {
if (!this.autoScroll) {
return;
}
const containerEl = <HTMLDivElement>this.$refs.logsContainer;
if (!this.ignoreNextScrollEvent && containerEl) {
this.userScrolled =
containerEl &&
containerEl.scrollHeight - containerEl.clientHeight - containerEl.scrollTop > 10;
}
this.ignoreNextScrollEvent = false;
}
@Watch('logs', { immediate: true })
scrollToLatest(): void {
if (!this.autoScroll) {
return;
}
const containerEl = <HTMLDivElement>this.$refs.logsContainer;
if (
!this.userScrolled &&
containerEl &&
containerEl.scrollHeight > containerEl.clientHeight
) {
this.ignoreNextScrollEvent = true;
containerEl.scrollTop = containerEl.scrollHeight - containerEl.clientHeight;
}
}
}
</script>
<style lang="scss" scoped>
.logs-panel {
height: 100%;
width: 100%;
white-space: pre;
overflow: auto;
font-family: monospace;
padding: 5px;
}
</style>
| |
Add component for editing/displaying menu items in our menu editor. | <template>
<span
class="menu-item__cell"
:class="{ 'is-error--custom' : errors[index] && errors[index][nestedKey] }"
>
<scroll-input
:placeholder="placeholder"
v-model="item[nestedKey]"
@blur="validate(index)"
@change="validate(index)"
>
<template slot="prepend">{{ name }}</template>
</scroll-input>
<div v-if="errors[index] && errors[index][nestedKey]" class="el-form-item__error">
{{ errors[index][nestedKey].map((error) => error.message).join(' ') }}
</div>
</span>
</template>
<script>
import ScrollInput from 'components/ScrollInput';
export default {
name: 'site-page-links',
components: {
ScrollInput
},
props: [
'placeholder',
'nestedKey',
'name',
'item',
'errors',
'validate',
'index'
]
};
</script>
| |
Include examples using inner templates | <template>
<div class="card">
<header class="card-header">
<p class="card-header-title">
This component was loaded async trigged by vue-router
</p>
<a class="card-header-icon">
<span class="icon">
<i class="fa fa-angle-down"></i>
</span>
</a>
</header>
<div class="card-content">
<div class="content">
<template v-if="isVisible">
This component was loaded at:
<br/>
Seccond item:
<small v-text="'Inside inner template'"></small>
<template v-for="item in list">
<br/>
<span> Using many itens inside a template with loop </span>
</template>
</template>
</div>
</div>
<footer class="card-footer">
<a class="card-footer-item" @click="isVisible = !isVisible">
Toggle
</a>
<a class="card-footer-item">Edit</a>
<a class="card-footer-item">Delete</a>
</footer>
</div>
</template>
<script>
define([], function() {
return {
template: template,
data: function() {
return {
list: [1, 2, 3],
isVisible: true,
};
}
};
});
</script>
| |
Write a generalized list component | <!-- Copyright 2017 Mathew Robinson <mrobinson@praelatus.io>. All rights
reserved. Use of this source code is governed by the AGPLv3 license that
can be found in the LICENSE file. -->
<template>
<div id="item-list-root">
<div id="list-wrapper" v-if="items.length !== 0">
<table class="table">
<thead>
<tr>
<template v-for="column in columns">
<th>{{ humanizeColumnName(column) }}</th>
</template>
</tr>
</thead>
<tbody>
<tr v-for="item in items">
<template v-for="column in columns">
<td v-if="column === uid">
<router-link v-bind:to="prefix + uid">
{{ item[column] }}
</router-link>
</td>
<td v-else-if="item[column]">
{{ item[column] }}
</td>
<td v-else>
None
</td>
</template>
</tr>
</tbody>
</table>
</div>
<div v-else>
<loading-spinner></loading-spinner>
</div>
</div>
</template>
<script>
import LoadingSpinner from '@/components/General/LoadingSpinner'
export default {
name: 'item-list',
components: {
LoadingSpinner
},
methods: {
humanizeColumnName: function (columnName) {
return columnName
// insert a space before all caps
.replace(/([A-Z])/g, ' $1')
// uppercase the first character
.replace(/^./, function (str) { return str.toUpperCase() })
.replace(/^ /, '')
.replace('\n', '')
}
},
watch: {
items: function () {
if (this.items[0] && this.columns.length === 0) {
this.columns = Object.keys(this.items[0])
this.columns = this.columns.filter(this.ignoredColumns)
}
}
},
props: {
'columns': [],
'items': [],
'uid': '',
'ignoredColumns': function (col) { return true },
'prefix': ''
}
}
</script>
<style>
th {
text-align: center;
}
</style>
| |
Create single page of polls | <template>
<list
:data="data"
:auto-refresh="false"
:options="options"
type="Poll" />
</template>
<script>
import List from '~/components/List'
export default {
components: {
List
},
async asyncData({ app: { $resource } }) {
const options = {}
const data = await $resource()
return {
data: {
...data,
data: [data.data]
},
options
}
}
}
</script>
| |
Make breadcrumbs' list prop required. | <template>
<div>
<span v-for="ancestor in list">
<span v-if="ancestor.id"><a :href="ancestor.id">{{ ancestor.name }}</a> > </span>
<span v-else> {{ ancestor.name }}</span>
</span>
</div>
</template>
<script>
module.exports = {
props: {
list: {
type: Array,
// required: true,
},
},
};
</script>
<style lang="stylus" scoped>
@require '~kolibri.styles.coreTheme'
</style>
| <template>
<div>
<span v-for="ancestor in list">
<span v-if="ancestor.id"><a :href="ancestor.id">{{ ancestor.name }}</a> > </span>
<span v-else> {{ ancestor.name }}</span>
</span>
</div>
</template>
<script>
module.exports = {
props: {
list: {
type: Array,
required: true,
},
},
};
</script>
<style lang="stylus" scoped>
@require '~kolibri.styles.coreTheme'
</style>
|
Change the component type to 'button' if 'href' or 'to' props are not defined | <template>
<li class="nav-item" @click="onclick">
<b-link :class="classObject" :to="to" :href="href" :exact="exact">
<slot></slot>
</b-link>
</li>
</template>
<script>
import bLink from './link.vue';
export default {
components: {bLink},
computed: {
classObject() {
return [
'nav-link',
this.active ? 'active' : '',
this.disabled ? 'disabled' : ''
];
}
},
props: {
active: {
type: Boolean,
default: false
},
disabled: {
type: Boolean,
default: false
},
to: {
type: [String, Object]
},
href: {
type: String
},
exact: {
type: Boolean
}
},
methods: {
onclick(e) {
// Hide all drop-downs including navbar-toggle
this.$root.$emit('shown::dropdown', this);
this.$emit('click', e);
}
}
};
</script>
| <template>
<li class="nav-item" @click="onclick">
<b-link :is="itemType" :class="classObject" :to="to" :href="href" :exact="exact">
<slot></slot>
</b-link>
</li>
</template>
<script>
import bLink from './link.vue';
export default {
components: {bLink},
computed: {
itemType() {
return (this.href || this.to) ? 'b-link' : 'button';
},
classObject() {
return [
'nav-link',
this.active ? 'active' : '',
this.disabled ? 'disabled' : ''
];
}
},
props: {
active: {
type: Boolean,
default: false
},
disabled: {
type: Boolean,
default: false
},
to: {
type: [String, Object]
},
href: {
type: String
},
exact: {
type: Boolean
}
},
methods: {
onclick(e) {
// Hide all drop-downs including navbar-toggle
this.$root.$emit('shown::dropdown', this);
this.$emit('click', e);
}
}
};
</script>
|
Add a space so the empty tag conforms to "<{tag} />". | <main>
<data>
<value>
<data>
<value>data</value>
</data>
</value>
<value>
<extra/>
</value>
</data>
</main> | <main>
<data>
<value>
<data>
<value>data</value>
</data>
</value>
<value>
<extra />
</value>
</data>
</main> |
Change warning reason from string(255) to text | <?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="Eye4web\ZfcUser\Warnings\Entity\Warning" table="user_warnings">
<id name="id" type="integer" column="id">
<generator strategy="AUTO" />
</id>
<field name="user" type="string" length="36" />
<field name="userBy" type="string" length="36" />
<field name="date" type="datetime" />
<field name="reason" type="string" length="255" />
<field name="weight" type="integer" length="5" />
</entity>
</doctrine-mapping>
| <?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="Eye4web\ZfcUser\Warnings\Entity\Warning" table="user_warnings">
<id name="id" type="integer" column="id">
<generator strategy="AUTO" />
</id>
<field name="user" type="string" length="36" />
<field name="userBy" type="string" length="36" />
<field name="date" type="datetime" />
<field name="reason" type="text" />
<field name="weight" type="integer" length="5" />
</entity>
</doctrine-mapping>
|
Fix generation of html documentation | <?xml version="1.0"?>
<project basedir="." name="GeodesyML HTML Documentation">
<target name="html">
<property name="DFH" value="./docflex-xml-1.9.5"/>
<property name="CP"
value="${DFH}/lib/xml-apis.jar;${DFH}/lib/xercesImpl.jar;${DFH}/lib/resolver.jar;${DFH}/lib/docflex-xml.jar"/>
<java classname="com.docflex.xml.Generator" classpath="${CP}" fork="true" failonerror="true" maxmemory="512m"
jvmargs="-Dhttp.proxyHost=sun-web-intdev.ga.gov.au -Dhttp.proxyPort=2710">
<arg value="-template"/>
<arg value="${DFH}/templates/XSDDoc/FramedDoc.tpl"/>
<arg value="-p:docTitle"/>
<arg value="GeodesyML XML Schema"/>
<arg value="-format"/>
<arg value="HTML"/>
<arg value="-d"/>
<arg value="html"/>
<arg value="-nodialog"/>
<arg value="-launchviewer=false"/>
<arg value="../../schema/geodesyML.xsd"/>
</java>
</target>
</project>
| <?xml version="1.0"?>
<project basedir="." name="GeodesyML HTML Documentation">
<target name="html">
<property name="DFH" value="./docflex-xml-1.9.5"/>
<property name="CP"
value="${DFH}/lib/xml-apis.jar;${DFH}/lib/xercesImpl.jar;${DFH}/lib/resolver.jar;${DFH}/lib/docflex-xml.jar"/>
<java classname="com.docflex.xml.Generator" classpath="${CP}" fork="true" failonerror="true" maxmemory="512m"
jvmargs="-Dhttp.proxyHost=sun-web-intdev.ga.gov.au -Dhttp.proxyPort=2710">
<arg value="-template"/>
<arg value="${DFH}/templates/XSDDoc/FramedDoc.tpl"/>
<arg value="-p:docTitle"/>
<arg value="GeodesyML XML Schema"/>
<arg value="-format"/>
<arg value="HTML"/>
<arg value="-d"/>
<arg value="html"/>
<arg value="-nodialog"/>
<arg value="-launchviewer=false"/>
<arg value="../../schemas/geodesyML.xsd"/>
</java>
</target>
</project>
|
Remove WebView facet from Workspace document type | <?xml version="1.0" encoding="UTF-8"?>
<component name="org.nuxeo.ecm.platform.webengine.sites.actions">
<require>org.nuxeo.ecm.platform.actions</require>
<extension target="org.nuxeo.ecm.platform.actions.ActionService"
point="actions">
<action id="TAB_WEBVIEW" link="/incl/tabs/workspace_view.xhtml" enabled="true"
order="30" label="action.webcontainer.preview" icon="/icons/file.gif">
<category>VIEW_ACTION_LIST</category>
<filter-id>isWebContainer</filter-id>
</action>
</extension>
<extension target="org.nuxeo.ecm.platform.actions.ActionService"
point="filters">
<filter id="create" append="true">
<rule grant="true">
<permission>AddChildren</permission>
<type>WebSite</type>
<type>WebPage</type>
</rule>
</filter>
<filter id="importFile" append="true">
<rule grant="true">
<permission>AddChildren</permission>
<type>WebSite</type>
</rule>
</filter>
<filter id="isWebContainer">
<rule grant="true">
<facet>WebView</facet>
</rule>
<rule grant="false">
<type>Workspace</type>
</rule>
</filter>
</extension>
</component>
| <?xml version="1.0" encoding="UTF-8"?>
<component name="org.nuxeo.ecm.platform.webengine.sites.actions">
<require>org.nuxeo.ecm.platform.actions</require>
<extension target="org.nuxeo.ecm.platform.actions.ActionService"
point="actions">
<action id="TAB_WEBVIEW" link="/incl/tabs/workspace_view.xhtml" enabled="true"
order="30" label="action.webcontainer.preview" icon="/icons/file.gif">
<category>VIEW_ACTION_LIST</category>
<filter-id>isWebContainer</filter-id>
</action>
</extension>
<extension target="org.nuxeo.ecm.platform.actions.ActionService"
point="filters">
<filter id="create" append="true">
<rule grant="true">
<permission>AddChildren</permission>
<type>WebSite</type>
<type>WebPage</type>
</rule>
</filter>
<filter id="importFile" append="true">
<rule grant="true">
<permission>AddChildren</permission>
<type>WebSite</type>
</rule>
</filter>
<filter id="isWebContainer">
<rule grant="true">
<facet>WebView</facet>
</rule>
</filter>
</extension>
</component>
|
Add installers to VCS roots | <?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/client" vcs="Git" />
<mapping directory="$PROJECT_DIR$/parser" vcs="Git" />
<mapping directory="$PROJECT_DIR$/plugins" vcs="Git" />
<mapping directory="$PROJECT_DIR$/util" vcs="Git" />
</component>
</project>
| <?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/client" vcs="Git" />
<mapping directory="$PROJECT_DIR$/installers" vcs="Git" />
<mapping directory="$PROJECT_DIR$/parser" vcs="Git" />
<mapping directory="$PROJECT_DIR$/plugins" vcs="Git" />
<mapping directory="$PROJECT_DIR$/util" vcs="Git" />
</component>
</project> |
Update versioning to lock ODK Tables, ODK Survey and androidcommon to same version. | <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.opendatakit.common.android"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
<!-- Required permissions -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="com.android.vending.CHECK_LICENSE"/>
<uses-library
android:name="com.google.android.maps"
android:required="false" />
</manifest>
| <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.opendatakit.common.android"
android:versionCode="118"
android:versionName="2.0">
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
<!-- Required permissions -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="com.android.vending.CHECK_LICENSE"/>
<uses-library
android:name="com.google.android.maps"
android:required="false" />
</manifest>
|
Change FindBugs settings to ignore generated files | <!-- See http://findbugs.sourceforge.net/manual/filter.html for syntax -->
<FindBugsFilter>
<!-- @NonnullByDefault doesn't play nicely with overriding @Nullable parameters/outputs -->
<Match>
<Bug pattern="NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE" />
</Match>
<!-- Ignore the following bug patterns in test code -->
<!-- (i.e., classes ending in 'Test' or 'Tests', and inner classes of same) -->
<Match>
<Class name="~.*\.*Tests?(\$.*)?" />
<Or>
<Bug pattern="NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/> <!-- common in tests to have non-final variables instantiated in @Before methods, which FindBugs can't detect -->
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/> <!-- if a null is dereferenced, test will fail anyway. Plus assertNotNull() is often a bad pattern. -->
<Bug pattern="RV_RETURN_VALUE_IGNORED_INFERRED"/> <!-- common in tests to call a method [that has a return value] to deliberately cause an exception, then test that exception -->
<Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT"/> <!-- ditto above -->
<Bug pattern="URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD"/> <!-- @Rule ivars can be public and unused -->
</Or>
</Match>
</FindBugsFilter>
| <!-- See http://findbugs.sourceforge.net/manual/filter.html for syntax -->
<FindBugsFilter>
<!-- ignore generated code -->
<Match>
<Class name="~.*\.*Immutable.*" />
</Match>
<!-- @NonnullByDefault doesn't play nicely with overriding @Nullable parameters/outputs -->
<Match>
<Bug pattern="NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE" />
</Match>
<!-- Ignore the following bug patterns in test code -->
<!-- (i.e., classes ending in 'Test' or 'Tests', and inner classes of same) -->
<Match>
<Class name="~.*\.*Tests?(\$.*)?" />
<Or>
<Bug pattern="NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/> <!-- common in tests to have non-final variables instantiated in @Before methods, which FindBugs can't detect -->
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/> <!-- if a null is dereferenced, test will fail anyway. Plus assertNotNull() is often a bad pattern. -->
<Bug pattern="RV_RETURN_VALUE_IGNORED_INFERRED"/> <!-- common in tests to call a method [that has a return value] to deliberately cause an exception, then test that exception -->
<Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT"/> <!-- ditto above -->
<Bug pattern="URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD"/> <!-- @Rule ivars can be public and unused -->
</Or>
</Match>
</FindBugsFilter>
|
Disable failing OpenTracing TCK module | <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>quarkus-tck-parent</artifactId>
<groupId>io.quarkus</groupId>
<version>999-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>quarkus-tck-microprofile-opentracing</artifactId>
<packaging>pom</packaging>
<name>Quarkus - TCK - MicroProfile OpenTracing Parent</name>
<modules>
<module>base</module>
<module>rest-client</module>
</modules>
</project>
| <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>quarkus-tck-parent</artifactId>
<groupId>io.quarkus</groupId>
<version>999-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>quarkus-tck-microprofile-opentracing</artifactId>
<packaging>pom</packaging>
<name>Quarkus - TCK - MicroProfile OpenTracing Parent</name>
<modules>
<!--
Disable the base for now because of https://github.com/eclipse/microprofile-opentracing/issues/165
In that module all tests extend the base test which doesn't work so we might as well just disable
the whole module
-->
<!-- <module>base</module>-->
<!-- <module>rest-client</module>-->
</modules>
</project>
|
Rename gdata and sample extensions to drop the -extension suffix | <?xml version="1.0" encoding="UTF-8"?>
<!--+
|
| Google Refine Extensions Build File
|
+-->
<project name="google-refine-extensions" default="build" basedir=".">
<target name="build">
<echo message="Building extensions" />
<ant dir="sample-extension/" target="build" />
<ant dir="jython/" target="build" />
<ant dir="freebase/" target="build" />
<ant dir="gdata-extension/" target="build" />
</target>
<target name="clean">
<echo message="cleaning extensions" />
<ant dir="sample-extension/" target="clean" />
<ant dir="jython/" target="clean" />
<ant dir="freebase/" target="clean" />
<ant dir="gdata-extension/" target="clean" />
</target>
</project>
| <?xml version="1.0" encoding="UTF-8"?>
<!--+
|
| Google Refine Extensions Build File
|
+-->
<project name="google-refine-extensions" default="build" basedir=".">
<target name="build">
<echo message="Building extensions" />
<ant dir="sample/" target="build" />
<ant dir="jython/" target="build" />
<ant dir="freebase/" target="build" />
<ant dir="gdata/" target="build" />
</target>
<target name="clean">
<echo message="cleaning extensions" />
<ant dir="sample/" target="clean" />
<ant dir="jython/" target="clean" />
<ant dir="freebase/" target="clean" />
<ant dir="gdata/" target="clean" />
</target>
</project>
|
Exclude long classnames from the phpmd tests | <?xml version="1.0"?>
<ruleset name="PHP Spider Ruleset for test code"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0
http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="
http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>
PHP Spider Ruleset for test code
</description>
<rule ref="rulesets/cleancode.xml">
<exclude name="BooleanArgumentFlag" />
<exclude name="ElseExpression" />
<exclude name="StaticAccess" />
</rule>
<rule ref="rulesets/unusedcode.xml">
<!-- we turn this back on as soon as an exception for inherited/implemented methods is available-->
<exclude name="UnusedFormalParameter"/>
</rule>
<rule ref="rulesets/codesize.xml" >
<exclude name="TooManyFields" />
<exclude name="TooManyMethods" />
</rule>
<rule ref="rulesets/controversial.xml" />
<rule ref="rulesets/design.xml">
<exclude name="CouplingBetweenObjects" />
<exclude name="NumberOfChildren" />
</rule>
<rule ref="rulesets/naming.xml">
<exclude name="ShortVariable" />
<exclude name="LongVariable" />
</rule>
</ruleset>
| <?xml version="1.0"?>
<ruleset name="PHP Spider Ruleset for test code"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0
http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="
http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>
PHP Spider Ruleset for test code
</description>
<rule ref="rulesets/cleancode.xml">
<exclude name="BooleanArgumentFlag" />
<exclude name="ElseExpression" />
<exclude name="StaticAccess" />
</rule>
<rule ref="rulesets/unusedcode.xml">
<!-- we turn this back on as soon as an exception for inherited/implemented methods is available-->
<exclude name="UnusedFormalParameter"/>
</rule>
<rule ref="rulesets/codesize.xml" >
<exclude name="TooManyFields" />
<exclude name="TooManyMethods" />
</rule>
<rule ref="rulesets/controversial.xml" />
<rule ref="rulesets/design.xml">
<exclude name="CouplingBetweenObjects" />
<exclude name="NumberOfChildren" />
</rule>
<rule ref="rulesets/naming.xml">
<exclude name="ShortVariable" />
<exclude name="LongVariable" />
<exclude name="LongClassName" />
</rule>
</ruleset>
|
Include debug repo in CE build | <?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jkiss.dbeaver</groupId>
<artifactId>dbeaver</artifactId>
<version>1.0.0</version>
<relativePath>../../</relativePath>
</parent>
<version>1.0.0</version>
<artifactId>dbeaver-p2-repos</artifactId>
<packaging>pom</packaging>
<name>DBeaver P2 Repositories</name>
<modules>
<module>org.jkiss.dbeaver.ce.repository</module>
<module>org.jkiss.dbeaver.nls.repository</module>
<module>org.jkiss.dbeaver.office.repository</module>
<module>org.jkiss.dbeaver.svg.repository</module>
</modules>
</project>
| <?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jkiss.dbeaver</groupId>
<artifactId>dbeaver</artifactId>
<version>1.0.0</version>
<relativePath>../../</relativePath>
</parent>
<version>1.0.0</version>
<artifactId>dbeaver-p2-repos</artifactId>
<packaging>pom</packaging>
<name>DBeaver P2 Repositories</name>
<modules>
<module>org.jkiss.dbeaver.ce.repository</module>
<module>org.jkiss.dbeaver.debug.repository</module>
<module>org.jkiss.dbeaver.nls.repository</module>
<module>org.jkiss.dbeaver.office.repository</module>
<module>org.jkiss.dbeaver.svg.repository</module>
</modules>
</project>
|
Remove <application/> from library manifest | <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.duenndns.ssl"
android:versionCode="1"
android:versionName="1.0">
<application android:label="MemorizingTrustManager">
<activity android:name="de.duenndns.ssl.MemorizingActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
</application>
</manifest>
| <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.duenndns.ssl"
android:versionCode="1"
android:versionName="1.0">
</manifest>
|
Enforce the use of commons-logging throughout the project | <?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<module name="TreeWalker">
<!-- this. in front of fields -->
<module name="RequireThis">
<property name="checkMethods" value="false"/>
</module>
<!-- tabs instead of spaces -->
<module name="RegexpSinglelineJava">
<property name="format" value="^\t* "/>
<property name="message" value="Indent must use tab characters"/>
<property name="ignoreComments" value="true"/>
</module>
<module name="UnusedImports"/>
<module name="RedundantImport"/>
<module name="NeedBraces"/>
</module>
</module>
| <?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<module name="TreeWalker">
<!-- this. in front of fields -->
<module name="RequireThis">
<property name="checkMethods" value="false"/>
</module>
<!-- tabs instead of spaces -->
<module name="RegexpSinglelineJava">
<property name="format" value="^\t* "/>
<property name="message" value="Indent must use tab characters"/>
<property name="ignoreComments" value="true"/>
</module>
<module name="UnusedImports"/>
<module name="RedundantImport"/>
<module name="IllegalImport">
<property name="illegalPkgs" value="org.slf4j"/>
</module>
<module name="NeedBraces"/>
</module>
</module>
|
Fix field name, changed in V8 | <?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="product_normal_form_formula_view" model="ir.ui.view">
<field name="name">product.normal.formula.form</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view"></field>
<field name="arch" type="xml">
<field name="list_price" position="after">
<field name="quantity_formula_id"></field>
</field>
</field>
</record>
</data>
</openerp>
| <?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="product_normal_form_formula_view" model="ir.ui.view">
<field name="name">product.normal.formula.form</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view"></field>
<field name="arch" type="xml">
<field name="lst_price" position="after">
<field name="quantity_formula_id"></field>
</field>
</field>
</record>
</data>
</openerp>
|
Fix test failing in Chrome: invalid XML | <?xml version="1.0" encoding="UTF-8" ?>
<h:html xmlns:h="http://www.w3.org/1999/xhtml" xmlns:orx="http://openrosa.org/jr/xforms" xmlns="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="http://openrosa.org/javarosa" xmlns:vellum="http://commcarehq.org/xforms/vellum">
<h:head>
<h:title>Untitled Form</h:title>
<model>
<instance>
<data xmlns:jrm="http://dev.commcarehq.org/jr/xforms" xmlns="http://openrosa.org/formdesigner/4552C9DD-F297-49CD-8606-AB59AD2C4EA7" uiVersion="1" version="1" name="Untitled Form">
<question />
<question2 vellum:ignore="retain"/>
</data>
</instance>
<bind nodeset="/data/question" type="xsd:string" />
<itext>
<translation lang="en" default="" />
</itext>
</model>
</h:head>
<h:body>
<unknown ref="/data/question">
</h:body>
</h:html>
| <?xml version="1.0" encoding="UTF-8" ?>
<h:html xmlns:h="http://www.w3.org/1999/xhtml" xmlns:orx="http://openrosa.org/jr/xforms" xmlns="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="http://openrosa.org/javarosa" xmlns:vellum="http://commcarehq.org/xforms/vellum">
<h:head>
<h:title>Untitled Form</h:title>
<model>
<instance>
<data xmlns:jrm="http://dev.commcarehq.org/jr/xforms" xmlns="http://openrosa.org/formdesigner/4552C9DD-F297-49CD-8606-AB59AD2C4EA7" uiVersion="1" version="1" name="Untitled Form">
<question />
<question2 vellum:ignore="retain"/>
</data>
</instance>
<bind nodeset="/data/question" type="xsd:string" />
<itext>
<translation lang="en" default="" />
</itext>
</model>
</h:head>
<h:body>
<unknown ref="/data/question" />
</h:body>
</h:html>
|
Update PDF project file with DITAVAL profile | <?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://www.dita-ot.org/rng/project.rnc" type="application/relax-ng-compact-syntax"?>
<project xmlns="https://www.dita-ot.org/project">
<deliverable id="pdf">
<context name="User Guide">
<input href="../../userguide-book.ditamap"/>
</context>
<output href="."/>
<publication transtype="pdf2">
<param name="args.chapter.layout" value="BASIC"/>
<param name="args.gen.task.lbl" value="YES"/>
<param name="include.rellinks" value="friend"/>
<param name="outputFile.base" value="userguide"/>
<param name="processing-mode" value="strict"/>
</publication>
</deliverable>
</project>
| <?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://www.dita-ot.org/rng/project.rnc" type="application/relax-ng-compact-syntax"?>
<project xmlns="https://www.dita-ot.org/project">
<deliverable id="pdf">
<context name="User Guide">
<input href="../../userguide-book.ditamap"/>
<profile>
<ditaval href="../../resources/pdf.ditaval"/>
</profile>
</context>
<output href="."/>
<publication transtype="pdf2">
<param name="args.chapter.layout" value="BASIC"/>
<param name="args.gen.task.lbl" value="YES"/>
<param name="outputFile.base" value="userguide"/>
<param name="processing-mode" value="strict"/>
</publication>
</deliverable>
</project>
|
Clean up commented out code which should not have been committed | <!--
~ Copyright 2014 Red Hat, Inc. and/or its affiliates.
~
~ Licensed under the Eclipse Public License version 1.0, available at http://www.eclipse.org/legal/epl-v10.html
-->
<assembly>
<id>openshift-liveoak-cartridge</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>${project.build.directory}/test-classes/zips/zip1</directory>
<outputDirectory>/</outputDirectory>
<!-- <excludes>
<exclude>modules/system/layers/base/io/undertow/core/main/undertow-core-1.0.15.Final.jar</exclude>
<exclude>**/standalone.xml</exclude>
<exclude>conf/extensions/keycloak.json</exclude>
<exclude>apps/admin/application.json</exclude>
<exclude>conf/extensions/mongo-launcher.json</exclude>
<exclude>conf/extensions/https-redirect.json</exclude>
</excludes> -->
</fileSet>
<!-- <fileSet>
<directory>./src/main/resources/openshift</directory>
<outputDirectory></outputDirectory>
<excludes>
<exclude>versions/**</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>./src/main/resources/openshift/versions</directory>
<outputDirectory>versions/1.0.0</outputDirectory>
</fileSet> -->
</fileSets>
<!-- <dependencySets>
<dependencySet>
<includes>
<include>io.liveoak:liveoak-openshift-undertow:jar:${project.version}</include>
</includes>
<outputDirectory>versions/1.0.0/modules/system/layers/base/io/undertow/core/main</outputDirectory>
<outputFileNameMapping>undertow-core-1.0.15.Final.jar</outputFileNameMapping>
</dependencySet>
</dependencySets> -->
</assembly>
| <!--
~ Copyright 2014 Red Hat, Inc. and/or its affiliates.
~
~ Licensed under the Eclipse Public License version 1.0, available at http://www.eclipse.org/legal/epl-v10.html
-->
<assembly>
<id>openshift-liveoak-cartridge</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>${project.build.directory}/test-classes/zips/zip1</directory>
<outputDirectory>/</outputDirectory>
</fileSet>
</fileSets>
</assembly>
|
Update maven version to 0.4.1 | <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.omribromberg</groupId>
<artifactId>elasticsearch-datemath</artifactId>
<version>0.4.0</version>
<name>Elasticsearch Datemath</name>
<description>Utilities for Elasticsearch datemath, written in Java</description>
<url>https://github.com/omribromberg/elasticsearch-datemath/</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project> | <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.omribromberg</groupId>
<artifactId>elasticsearch-datemath</artifactId>
<version>0.4.1</version>
<name>Elasticsearch Datemath</name>
<description>Utilities for Elasticsearch datemath, written in Java</description>
<url>https://github.com/omribromberg/elasticsearch-datemath/</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project> |
Change simple_trajectory_planner's format to 2 | <?xml version="1.0"?>
<package>
<name>simple_trajectory_planner</name>
<version>0.0.1</version>
<description>The simple_trajectory_planner package</description>
<maintainer email="o111027y@mail.kyutech.jp">Yusuke Doi</maintainer>
<maintainer email="httperror@404-notfound.jp">YamaCIR-KIT</maintainer>
<license>MIT</license>
<author email="httperror@404-notfound.jp">YamaCIR-KIT</author>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<build_depend>tf2</build_depend>
<build_depend>tf2_ros</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>servo_msgs</build_depend>
<run_depend>roscpp</run_depend>
<run_depend>tf2</run_depend>
<run_depend>tf2_ros</run_depend>
<run_depend>geometry_msgs</run_depend>
<run_depend>servo_msgs</run_depend>
</package>
| <?xml version="1.0"?>
<package format="2">
<name>simple_trajectory_planner</name>
<version>0.0.1</version>
<description>The simple_trajectory_planner package</description>
<maintainer email="o111027y@mail.kyutech.jp">Yusuke Doi</maintainer>
<maintainer email="httperror@404-notfound.jp">YamaCIR-KIT</maintainer>
<license>MIT</license>
<author email="httperror@404-notfound.jp">YamaCIR-KIT</author>
<buildtool_depend>catkin</buildtool_depend>
<depend>roscpp</depend>
<depend>tf2</depend>
<depend>tf2_ros</depend>
<depend>geometry_msgs</depend>
<depend>servo_msgs</depend>
</package>
|
Fix multiple tabs "contact information" | <?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="view_personal_information_page_nationality" model="ir.ui.view">
<field name="name">Partner nationality: personal info</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="partner_contact_personal_information_page.personal_information"/>
<field name="arch" type="xml">
<data>
<xpath expr="//page[@name='personal_information_page']/group[@name='personal_information_group']">
<field name='nationality_id'/>
</xpath>
</data>
</field>
</record>
</data>
</odoo> | <?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="view_personal_information_page_nationality" model="ir.ui.view">
<field name="name">Partner nationality: personal info</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="partner_contact_personal_information_page.personal_information"/>
<field name="arch" type="xml">
<data>
<xpath expr="//group[@name='personal_information_group']">
<field name="gender"/>
</xpath>
</data>
</field>
</record>
</data>
</odoo>
|
Add lumivote word to dictionary | <component name="ProjectDictionaryState">
<dictionary name="alex" />
</component> | <component name="ProjectDictionaryState">
<dictionary name="alex">
<words>
<w>lumivote</w>
</words>
</dictionary>
</component> |
Allow deploying Docker images automatically | <settings>
<servers>
<server>
<id>sonatype-nexus-snapshots</id>
<username>${env.OSSRH_USER}</username>
<password>${env.OSSRH_PASS}</password>
</server>
</servers>
</settings>
| <settings>
<servers>
<server>
<id>sonatype-nexus-snapshots</id>
<username>${env.OSSRH_USER}</username>
<password>${env.OSSRH_PASS}</password>
</server>
<server>
<id>docker.io</id>
<username>${env.DOCKER_USERNAME}</username>
<password>${env.DOCKER_PASSWORD}</password>
</server>
</servers>
</settings>
|
Stop using color in vector xml | <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="@color/primary"
android:pathData="M9,16.2L4.8,12l-1.4,1.4L9,19 21,7l-1.4,-1.4L9,16.2z"/>
</vector>
| <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#ffe0e0e0"
android:pathData="M9,16.2L4.8,12l-1.4,1.4L9,19 21,7l-1.4,-1.4L9,16.2z"/>
</vector>
|
Exclude temporary Maven files from source distribution. | <!--
Copyright (C) 2006 Joe Walnes.
Copyright (C) 2006, 2007, 2011 XStream committers.
All rights reserved.
The software in this package is published under the terms of the BSD
style license a copy of which has been included with this distribution in
the LICENSE.txt file.
Created on 15. October 2006 by Mauro Talevi
-->
<assembly>
<id>src</id>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>..</directory>
<outputDirectory>/</outputDirectory>
<excludes>
<exclude>xstream-builder/**</exclude>
<exclude>**/build/**</exclude>
<exclude>**/target/**</exclude>
<exclude>**/.*/**</exclude>
<exclude>**/.*</exclude>
<exclude>**/cobertura.ser</exclude>
<exclude>**/release.properties</exclude>
<exclude>**/surefire*.properties</exclude>
<exclude>**/*~</exclude>
<exclude>**/*.bak</exclude>
<exclude>**/*.classpath</exclude>
<exclude>**/*.jps</exclude>
</excludes>
</fileSet>
</fileSets>
</assembly>
| <!--
Copyright (C) 2006 Joe Walnes.
Copyright (C) 2006, 2007, 2011, 2012 XStream committers.
All rights reserved.
The software in this package is published under the terms of the BSD
style license a copy of which has been included with this distribution in
the LICENSE.txt file.
Created on 15. October 2006 by Mauro Talevi
-->
<assembly>
<id>src</id>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>..</directory>
<outputDirectory>/</outputDirectory>
<excludes>
<exclude>xstream-builder/**</exclude>
<exclude>**/build/**</exclude>
<exclude>**/target/**</exclude>
<exclude>**/.*/**</exclude>
<exclude>**/.*</exclude>
<exclude>**/cobertura.ser</exclude>
<exclude>**/release.properties</exclude>
<exclude>**/surefire*.properties</exclude>
<exclude>**/*~</exclude>
<exclude>**/*.bak</exclude>
<exclude>**/*.classpath</exclude>
<exclude>**/*.jps</exclude>
<exclude>**/*.releaseBackup</exclude>
</excludes>
</fileSet>
</fileSets>
</assembly>
|
Reduce the "noise" a little more to bring attention to the stuff that is really bad. T] | <?xml version="1.0"?>
<!DOCTYPE module
PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<module name="TreeWalker">
<!-- check for deeper coding conventions -->
<module name="StringLiteralEquality"/>
<module name="CovariantEquals"/>
<module name="EqualsHashCode"/>
<module name="ModifiedControlVariable"/>
<module name="PackageDeclaration"/>
<!-- not a big fan of setters that hide either, but will create too many warnigns to be useful -->
<!-- this doesnt cover inheritance
<module name="HiddenField">
<property name="ignoreSetter" value="true"/>
</module>
-->
<!-- Checks for imports -->
<module name="AvoidStarImport"/>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<!-- complexity thresholds on code -->
<module name="BooleanExpressionComplexity">
<property name="max" value="7"/>
</module>
<module name="ClassDataAbstractionCoupling">
<property name="max" value="10"/>
</module>
<module name="ClassFanOutComplexity">
<property name="max" value="30"/>
</module>
<module name="NPathComplexity"/>
<module name="CyclomaticComplexity"/>
</module>
</module>
| <?xml version="1.0"?>
<!DOCTYPE module
PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<module name="TreeWalker">
<!-- check for deeper coding conventions -->
<module name="StringLiteralEquality"/>
<module name="CovariantEquals"/>
<module name="EqualsHashCode"/>
<module name="ModifiedControlVariable"/>
<module name="PackageDeclaration"/>
<!-- not a big fan of setters that hide either, but will create too many warnigns to be useful -->
<!-- this doesnt cover inheritance
<module name="HiddenField">
<property name="ignoreSetter" value="true"/>
</module>
-->
<!-- Checks for imports -->
<!--
<module name="AvoidStarImport"/>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
-->
<!-- complexity thresholds on code -->
<module name="BooleanExpressionComplexity">
<property name="max" value="7"/>
</module>
<module name="ClassDataAbstractionCoupling">
<property name="max" value="10"/>
</module>
<module name="ClassFanOutComplexity">
<property name="max" value="30"/>
</module>
<module name="NPathComplexity"/>
<module name="CyclomaticComplexity"/>
</module>
</module>
|
Upgrade to new analysis core. | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jvnet.hudson.plugins</groupId>
<artifactId>analysis-pom</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../analysis-pom/pom.xml</relativePath>
</parent>
<artifactId>analysis-test</artifactId>
<packaging>jar</packaging>
<name>Hudson Analysis Test Utilities</name>
<version>1.1-SNAPSHOT</version>
<description>This plug-in provides test utilities for the static code analysis plug-ins.</description>
<dependencies>
<dependency>
<groupId>org.jvnet.hudson.plugins</groupId>
<artifactId>analysis-core</artifactId>
<version>1.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.8.2</version>
</dependency>
</dependencies>
</project>
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jvnet.hudson.plugins</groupId>
<artifactId>analysis-pom</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../analysis-pom/pom.xml</relativePath>
</parent>
<artifactId>analysis-test</artifactId>
<packaging>jar</packaging>
<name>Hudson Analysis Test Utilities</name>
<version>1.1-SNAPSHOT</version>
<description>This plug-in provides test utilities for the static code analysis plug-ins.</description>
<dependencies>
<dependency>
<groupId>org.jvnet.hudson.plugins</groupId>
<artifactId>analysis-core</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.8.2</version>
</dependency>
</dependencies>
</project>
|
Update ColVis example to use Buttons | <?xml version="1.0" encoding="UTF-8" ?>
<dt-example table-type="html" order="1">
<css lib="datatables colreorder buttons colvis" />
<js lib="jquery datatables colreorder buttons colvis">
<![CDATA[
$(document).ready(function() {
var table = $('#example').DataTable( {
dom: 'Bfrtip',
colReorder: true,
buttons: [
'colvis'
]
} );
} );
]]>
</js>
<title lib="ColReorder">ColVis integration</title>
<info>< for DataTables by updating the order of the list of columns whenever a reorder is done. This is shown in the example below, where one column has been initially hidden to add extra emphasis to ColVis.
]]></info>
</dt-example>
| <?xml version="1.0" encoding="UTF-8" ?>
<dt-example table-type="html" order="1">
<css lib="datatables colreorder buttons buttons-colvis" />
<js lib="jquery datatables colreorder buttons buttons-colvis">
<![CDATA[
$(document).ready(function() {
var table = $('#example').DataTable( {
dom: 'Bfrtip',
colReorder: true,
buttons: [
'colvis'
]
} );
} );
]]>
</js>
<title lib="ColReorder">Column visibility integration</title>
<info>< for DataTables by updating the order of the list of columns whenever a reorder is done. This is shown in the example below.
]]></info>
</dt-example>
|
Fix main CI by aligning jboss-parent in enforcer-rules tests | <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jboss</groupId>
<artifactId>jboss-parent</artifactId>
<version>37</version>
</parent>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-enforcer-rules-smoketest</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>extensions</module>
<module>integration-tests</module>
</modules>
<!-- note: rule is configured in integration-tests/pom.xml -->
</project> | <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jboss</groupId>
<artifactId>jboss-parent</artifactId>
<version>38</version>
</parent>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-enforcer-rules-smoketest</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>extensions</module>
<module>integration-tests</module>
</modules>
<!-- note: rule is configured in integration-tests/pom.xml -->
</project> |
Fix valid ORM mapping as datetime | <?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<mapped-superclass name="Gesdinet\JWTRefreshTokenBundle\Entity\AbstractRefreshToken">
<field name="refreshToken" type="string" column="refresh_token" length="128" unique="true"/>
<field name="username" type="string" length="255" column="username"/>
<field name="valid" type="date"/>
</mapped-superclass>
</doctrine-mapping>
| <?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<mapped-superclass name="Gesdinet\JWTRefreshTokenBundle\Entity\AbstractRefreshToken">
<field name="refreshToken" type="string" column="refresh_token" length="128" unique="true"/>
<field name="username" type="string" length="255" column="username"/>
<field name="valid" type="datetime"/>
</mapped-superclass>
</doctrine-mapping>
|
Fix bug caused by ical4j upgrade | <?xml version="1.0" encoding="UTF-8" ?>
<client-config xmlns="http://bedework.org/ns/" type="org.bedework.webcommon.config.ConfigCommonImpl">
<appRoot>http://localhost:8080/calfeedrsrc</appRoot>
<appType>feeder</appType>
<autoCreateContacts>false</autoCreateContacts>
<autoCreateLocations>false</autoCreateLocations>
<autoDeleteContacts>false</autoDeleteContacts>
<autoDeleteLocations>false</autoDeleteLocations>
<browserResourceRoot>/calfeedrsrc</browserResourceRoot>
<calSuite>MainCampus</calSuite>
<guestMode>true</guestMode>
<hour24>true</hour24>
<logPrefix>Feeder</logPrefix>
<mbeanClassName>org.bedework.webcommon.config.ClientConf</mbeanClassName>
<minIncrement>5</minIncrement>
<name>Feeder</name>
<personalCalendarUri>/ucal</personalCalendarUri>
<publicAdmin>false</publicAdmin>
<publicAdminUri>/caladmin</publicAdminUri>
<publicCalendarUri>/cal</publicCalendarUri>
<refreshAction>setup.do</refreshAction>
<refreshInterval>300</refreshInterval>
<showYearData>false</showYearData>
</client-config>
| <?xml version="1.0" encoding="UTF-8" ?>
<client-config xmlns="http://bedework.org/ns/" type="org.bedework.webcommon.config.ConfigCommonImpl">
<appRoot>http://localhost:8080/calfeedrsrc</appRoot>
<appType>feeder</appType>
<autoCreateContacts>false</autoCreateContacts>
<autoCreateLocations>false</autoCreateLocations>
<autoDeleteContacts>false</autoDeleteContacts>
<autoDeleteLocations>false</autoDeleteLocations>
<browserResourceRoot>/calfeedrsrc</browserResourceRoot>
<calSuite>MainCampus</calSuite>
<guestMode>true</guestMode>
<hour24>true</hour24>
<logPrefix>Feeder</logPrefix>
<mbeanClassName>org.bedework.webcommon.config.ClientConf</mbeanClassName>
<minIncrement>5</minIncrement>
<name>Feeder</name>
<personalCalendarUri>/ucal</personalCalendarUri>
<publicAdmin>false</publicAdmin>
<publicAdminUri>/caladmin</publicAdminUri>
<publicCalendarUri>/cal</publicCalendarUri>
<refreshAction>setup.do</refreshAction>
<refreshInterval>0</refreshInterval>
<showYearData>false</showYearData>
</client-config>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.