Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
342
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
25
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TransFem.org
Sharkey
Commits
aa433c2a
Commit
aa433c2a
authored
7 years ago
by
こぴなたみぽ
Browse files
Options
Downloads
Patches
Plain Diff
wip
parent
a16c23b6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/web/app/mobile/tags/page/selectdrive.tag
+0
-87
0 additions, 87 deletions
src/web/app/mobile/tags/page/selectdrive.tag
src/web/app/mobile/views/pages/selectdrive.vue
+96
-0
96 additions, 0 deletions
src/web/app/mobile/views/pages/selectdrive.vue
with
96 additions
and
87 deletions
src/web/app/mobile/tags/page/selectdrive.tag
deleted
100644 → 0
+
0
−
87
View file @
a16c23b6
<mk-selectdrive-page>
<header>
<h1>%i18n:mobile.tags.mk-selectdrive-page.select-file%<span class="count" v-if="files.length > 0">({ files.length })</span></h1>
<button class="upload" @click="upload">%fa:upload%</button>
<button v-if="multiple" class="ok" @click="ok">%fa:check%</button>
</header>
<mk-drive ref="browser" select-file={ true } multiple={ multiple } is-naked={ true } top={ 42 }/>
<style lang="stylus" scoped>
:scope
display block
width 100%
height 100%
background #fff
> header
position fixed
top 0
left 0
width 100%
z-index 1000
background #fff
box-shadow 0 1px rgba(0, 0, 0, 0.1)
> h1
margin 0
padding 0
text-align center
line-height 42px
font-size 1em
font-weight normal
> .count
margin-left 4px
opacity 0.5
> .upload
position absolute
top 0
left 0
line-height 42px
width 42px
> .ok
position absolute
top 0
right 0
line-height 42px
width 42px
> mk-drive
top 42px
</style>
<script lang="typescript">
const q = (new URL(location)).searchParams;
this.multiple = q.get('multiple') == 'true' ? true : false;
this.on('mount', () => {
document.documentElement.style.background = '#fff';
this.$refs.browser.on('selected', file => {
this.files = [file];
this.ok();
});
this.$refs.browser.on('change-selection', files => {
this.update({
files: files
});
});
});
this.upload = () => {
this.$refs.browser.selectLocalFile();
};
this.close = () => {
window.close();
};
this.ok = () => {
window.opener.cb(this.multiple ? this.files : this.files[0]);
window.close();
};
</script>
</mk-selectdrive-page>
This diff is collapsed.
Click to expand it.
src/web/app/mobile/views/pages/selectdrive.vue
0 → 100644
+
96
−
0
View file @
aa433c2a
<
template
>
<div
class=
"mk-selectdrive"
>
<header>
<h1>
%i18n:mobile.tags.mk-selectdrive-page.select-file%
<span
class=
"count"
v-if=
"files.length > 0"
>
(
{{
files
.
length
}}
)
</span></h1>
<button
class=
"upload"
@
click=
"upload"
>
%fa:upload%
</button>
<button
v-if=
"multiple"
class=
"ok"
@
click=
"ok"
>
%fa:check%
</button>
</header>
<mk-drive
ref=
"browser"
select-file
:multiple=
"multiple"
is-naked
:top=
"42"
/>
</div>
</
template
>
<
script
lang=
"ts"
>
import
Vue
from
'
vue
'
;
export
default
Vue
.
extend
({
data
()
{
return
{
files
:
[]
};
},
computed
:
{
multiple
():
boolean
{
const
q
=
(
new
URL
(
location
.
toString
())).
searchParams
;
return
q
.
get
(
'
multiple
'
)
==
'
true
'
;
}
},
mounted
()
{
document
.
title
=
'
%i18n:desktop.tags.mk-selectdrive-page.title%
'
;
},
methods
:
{
onSelected
(
file
)
{
this
.
files
=
[
file
];
this
.
ok
();
},
onChangeSelection
(
files
)
{
this
.
files
=
files
;
},
upload
()
{
(
this
.
$refs
.
browser
as
any
).
selectLocalFile
();
},
close
()
{
window
.
close
();
},
ok
()
{
window
.
opener
.
cb
(
this
.
multiple
?
this
.
files
:
this
.
files
[
0
]);
this
.
close
();
}
}
});
</
script
>
<
style
lang=
"stylus"
scoped
>
.mk-selectdrive
width 100%
height 100%
background #fff
> header
position fixed
top 0
left 0
width 100%
z-index 1000
background #fff
box-shadow 0 1px rgba(0, 0, 0, 0.1)
> h1
margin 0
padding 0
text-align center
line-height 42px
font-size 1em
font-weight normal
> .count
margin-left 4px
opacity 0.5
> .upload
position absolute
top 0
left 0
line-height 42px
width 42px
> .ok
position absolute
top 0
right 0
line-height 42px
width 42px
> .mk-drive
top 42px
</
style
>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment