Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alp Deniz Ogut
Photos Web App
Commits
a7207597
Commit
a7207597
authored
3 years ago
by
Alp Deniz Ogut
Browse files
Options
Download
Email Patches
Plain Diff
Added a keys_to_names dictionary for pretty column name display
parent
9e5b3d1f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
public/index.html
+3
-3
public/index.html
public/js/app.js
+8
-5
public/js/app.js
with
11 additions
and
8 deletions
+11
-8
public/index.html
+
3
-
3
View file @
a7207597
...
...
@@ -56,11 +56,11 @@
</div>
<div
id=
"query_bar"
class=
"row"
>
<div
class=
"row"
>
<input
id=
"query_text"
class=
"left"
type=
"text"
v-model=
"item_filters[query_key]"
v-bind:placeholder=
"query_key"
/>
<input
id=
"query_text"
class=
"left"
type=
"text"
v-model=
"item_filters[query_key]"
v-bind:placeholder=
"
data_keys_to_names[
query_key
]
"
/>
<div
id=
"query_button"
class=
"left button"
v-on:click=
"query_click"
>
Search
</div>
</div>
<div
class=
"row"
>
<div
class=
"button left"
v-on:click=
"item_filters[query_key]=null; query_key=key
.key
"
v-bind:class=
"{ selected:
key.
key==query_key }"
v-for=
"key in query_keys"
>
{{
key.name
}}
</div>
<div
class=
"button left"
v-on:click=
"item_filters[query_key]=null; query_key=key"
v-bind:class=
"{ selected: key==query_key }"
v-for=
"key in query_keys"
>
{{
data_keys_to_names[key]
}}
</div>
</div>
</div>
<div
id=
"stage"
class=
"row"
>
...
...
@@ -76,7 +76,7 @@
<thead
id=
"list_header"
>
<tr>
<td>
Type(#ID)
</td>
<td
v-for=
"key in display_columns"
>
{{ key }}
</td>
<td
v-for=
"key in display_columns"
>
{{
data_keys_to_names[key] ||
key }}
</td>
</tr>
</thead>
<tbody
id=
"list_body"
>
...
...
This diff is collapsed.
Click to expand it.
public/js/app.js
+
8
-
5
View file @
a7207597
...
...
@@ -54,11 +54,14 @@ var app = new Vue({
display_columns
:
[
'
externalId
'
],
query_key
:
'
id
'
,
query_text
:
''
,
query_keys
:
[
{
key
:
'
id
'
,
name
:
'
ID
'
},
{
key
:
'
type
'
,
name
:
'
Type
'
},
{
key
:
'
externalId
'
,
name
:
'
External ID
'
}
]
query_keys
:
[
'
id
'
,
'
type
'
,
'
externalId
'
],
data_keys_to_names
:
{
id
:
'
ID
'
,
type
:
'
Type
'
,
externalId
:
'
External ID
'
,
dateCreated
:
'
Created
'
,
dateModified
:
'
Modified
'
}
},
created
:
function
()
{
fetch
(
'
/local_keys.json
'
).
then
(
d
=>
d
.
json
()).
then
(
d
=>
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment