Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
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
Dima Krasner
Sharkey
Commits
5c5d3c1a
Commit
5c5d3c1a
authored
3 years ago
by
syuilo
Browse files
Options
Downloads
Patches
Plain Diff
fix(client): コントロールパネルのユーザー、ファイルにて、インスタンスの表示範囲切り替えが機能しない問題を修正
Fix #8252
parent
ff59984f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
packages/client/src/pages/admin/files.vue
+56
-73
56 additions, 73 deletions
packages/client/src/pages/admin/files.vue
packages/client/src/pages/admin/users.vue
+75
-91
75 additions, 91 deletions
packages/client/src/pages/admin/users.vue
with
132 additions
and
164 deletions
CHANGELOG.md
+
1
−
0
View file @
5c5d3c1a
...
...
@@ -35,6 +35,7 @@ You should also include the user name that made the change.
-
Client: UIのサイズがおかしくなる問題の修正 @tamaina
-
Client: Setting instance information of notes to always show breaks the timeline @Johann150
-
Client: 環境に依っては返信する際のカーソル位置が正しくない問題を修正 @syuilo
-
Client: コントロールパネルのユーザー、ファイルにて、インスタンスの表示範囲切り替えが機能しない問題を修正 @syuilo
-
Client: Follows/Followers Visibility changes won't be saved unless clicking on an other checkbox @Johann150
-
API: Fix API cast @mei23
-
チャートの定期resyncが動作していない問題を修正 @syuilo
...
...
This diff is collapsed.
Click to expand it.
packages/client/src/pages/admin/files.vue
+
56
−
73
View file @
5c5d3c1a
...
...
@@ -28,7 +28,7 @@
<
template
#label
>
MIME type
</
template
>
</MkInput>
</div>
<MkPagination
v-slot=
"{items}"
ref=
"files"
:pagination=
"pagination"
class=
"urempief"
>
<MkPagination
v-slot=
"{items}"
:pagination=
"pagination"
class=
"urempief"
>
<button
v-for=
"file in items"
:key=
"file.id"
class=
"file _panel _button _gap"
@
click=
"show(file, $event)"
>
<MkDriveFileThumbnail
class=
"thumbnail"
:file=
"file"
fit=
"contain"
/>
<div
class=
"body"
>
...
...
@@ -54,8 +54,8 @@
</div>
</template>
<
script
lang=
"ts"
>
import
{
computed
,
defineComponent
}
from
'
vue
'
;
<
script
lang=
"ts"
setup
>
import
{
computed
}
from
'
vue
'
;
import
MkButton
from
'
@/components/ui/button.vue
'
;
import
MkInput
from
'
@/components/form/input.vue
'
;
import
MkSelect
from
'
@/components/form/select.vue
'
;
...
...
@@ -65,80 +65,63 @@ import MkDriveFileThumbnail from '@/components/drive-file-thumbnail.vue';
import
bytes
from
'
@/filters/bytes
'
;
import
*
as
os
from
'
@/os
'
;
import
*
as
symbols
from
'
@/symbols
'
;
import
{
i18n
}
from
'
@/i18n
'
;
let
q
=
$ref
(
null
);
let
origin
=
$ref
(
'
local
'
);
let
type
=
$ref
(
null
);
let
searchHost
=
$ref
(
''
);
const
pagination
=
{
endpoint
:
'
admin/drive/files
'
as
const
,
limit
:
10
,
params
:
computed
(()
=>
({
type
:
(
type
&&
type
!==
''
)
?
type
:
null
,
origin
:
origin
,
hostname
:
(
searchHost
&&
searchHost
!==
''
)
?
searchHost
:
null
,
})),
};
function
clear
()
{
os
.
confirm
({
type
:
'
warning
'
,
text
:
i18n
.
ts
.
clearCachedFilesConfirm
,
}).
then
(({
canceled
})
=>
{
if
(
canceled
)
return
;
os
.
apiWithDialog
(
'
admin/drive/clean-remote-files
'
,
{});
});
}
export
default
defineComponent
({
components
:
{
MkButton
,
MkInput
,
MkSelect
,
MkPagination
,
MkContainer
,
MkDriveFileThumbnail
,
},
emits
:
[
'
info
'
],
data
()
{
return
{
[
symbols
.
PAGE_INFO
]:
{
title
:
this
.
$ts
.
files
,
icon
:
'
fas fa-cloud
'
,
bg
:
'
var(--bg)
'
,
actions
:
[{
text
:
this
.
$ts
.
clearCachedFiles
,
icon
:
'
fas fa-trash-alt
'
,
handler
:
this
.
clear
}]
},
q
:
null
,
origin
:
'
local
'
,
type
:
null
,
searchHost
:
''
,
pagination
:
{
endpoint
:
'
admin/drive/files
'
as
const
,
limit
:
10
,
params
:
computed
(()
=>
({
type
:
(
this
.
type
&&
this
.
type
!==
''
)
?
this
.
type
:
null
,
origin
:
this
.
origin
,
hostname
:
(
this
.
searchHost
&&
this
.
searchHost
!==
''
)
?
this
.
searchHost
:
null
,
})),
},
}
},
methods
:
{
clear
()
{
os
.
confirm
({
type
:
'
warning
'
,
text
:
this
.
$ts
.
clearCachedFilesConfirm
,
}).
then
(({
canceled
})
=>
{
if
(
canceled
)
return
;
function
show
(
file
)
{
os
.
popup
(
import
(
'
./file-dialog.vue
'
),
{
fileId
:
file
.
id
},
{},
'
closed
'
);
}
os
.
apiWithDialog
(
'
admin/drive/clean-remote-files
'
,
{});
function
find
()
{
os
.
api
(
'
admin/drive/show-file
'
,
q
.
startsWith
(
'
http://
'
)
||
q
.
startsWith
(
'
https://
'
)
?
{
url
:
q
.
trim
()
}
:
{
fileId
:
q
.
trim
()
}).
then
(
file
=>
{
show
(
file
);
}).
catch
(
err
=>
{
if
(
err
.
code
===
'
NO_SUCH_FILE
'
)
{
os
.
alert
({
type
:
'
error
'
,
text
:
i18n
.
ts
.
notFound
});
},
show
(
file
,
ev
)
{
os
.
popup
(
import
(
'
./file-dialog.vue
'
),
{
fileId
:
file
.
id
},
{},
'
closed
'
);
},
find
()
{
os
.
api
(
'
admin/drive/show-file
'
,
this
.
q
.
startsWith
(
'
http://
'
)
||
this
.
q
.
startsWith
(
'
https://
'
)
?
{
url
:
this
.
q
.
trim
()
}
:
{
fileId
:
this
.
q
.
trim
()
}).
then
(
file
=>
{
this
.
show
(
file
);
}).
catch
(
e
=>
{
if
(
e
.
code
===
'
NO_SUCH_FILE
'
)
{
os
.
alert
({
type
:
'
error
'
,
text
:
this
.
$ts
.
notFound
});
}
});
},
}
});
}
bytes
}
defineExpose
({
[
symbols
.
PAGE_INFO
]:
computed
(()
=>
({
title
:
i18n
.
ts
.
files
,
icon
:
'
fas fa-cloud
'
,
bg
:
'
var(--bg)
'
,
actions
:
[{
text
:
i18n
.
ts
.
clearCachedFiles
,
icon
:
'
fas fa-trash-alt
'
,
handler
:
clear
,
}],
})),
});
</
script
>
...
...
This diff is collapsed.
Click to expand it.
packages/client/src/pages/admin/users.vue
+
75
−
91
View file @
5c5d3c1a
...
...
@@ -36,7 +36,7 @@
</MkInput>
</div>
<MkPagination
v-slot=
"{items}"
ref=
"
users
"
:pagination=
"pagination"
class=
"users"
>
<MkPagination
v-slot=
"{items}"
ref=
"
paginationComponent
"
:pagination=
"pagination"
class=
"users"
>
<button
v-for=
"user in items"
:key=
"user.id"
class=
"user _panel _button _gap"
@
click=
"show(user)"
>
<MkAvatar
class=
"avatar"
:user=
"user"
:disable-link=
"true"
:show-indicator=
"true"
/>
<div
class=
"body"
>
...
...
@@ -61,9 +61,8 @@
</div>
</template>
<
script
lang=
"ts"
>
import
{
computed
,
defineComponent
}
from
'
vue
'
;
import
MkButton
from
'
@/components/ui/button.vue
'
;
<
script
lang=
"ts"
setup
>
import
{
computed
}
from
'
vue
'
;
import
MkInput
from
'
@/components/form/input.vue
'
;
import
MkSelect
from
'
@/components/form/select.vue
'
;
import
MkPagination
from
'
@/components/ui/pagination.vue
'
;
...
...
@@ -71,94 +70,79 @@ import { acct } from '@/filters/user';
import
*
as
os
from
'
@/os
'
;
import
*
as
symbols
from
'
@/symbols
'
;
import
{
lookupUser
}
from
'
@/scripts/lookup-user
'
;
import
{
i18n
}
from
'
@/i18n
'
;
let
paginationComponent
=
$ref
<
InstanceType
<
typeof
MkPagination
>>
();
let
sort
=
$ref
(
'
+createdAt
'
);
let
state
=
$ref
(
'
all
'
);
let
origin
=
$ref
(
'
local
'
);
let
searchUsername
=
$ref
(
''
);
let
searchHost
=
$ref
(
''
);
const
pagination
=
{
endpoint
:
'
admin/show-users
'
as
const
,
limit
:
10
,
params
:
computed
(()
=>
({
sort
:
sort
,
state
:
state
,
origin
:
origin
,
username
:
searchUsername
,
hostname
:
searchHost
,
})),
offsetMode
:
true
};
function
searchUser
()
{
os
.
selectUser
().
then
(
user
=>
{
show
(
user
);
});
}
export
default
defineComponent
({
components
:
{
MkButton
,
MkInput
,
MkSelect
,
MkPagination
,
},
emits
:
[
'
info
'
],
data
()
{
return
{
[
symbols
.
PAGE_INFO
]:
{
title
:
this
.
$ts
.
users
,
icon
:
'
fas fa-users
'
,
bg
:
'
var(--bg)
'
,
actions
:
[{
icon
:
'
fas fa-search
'
,
text
:
this
.
$ts
.
search
,
handler
:
this
.
searchUser
},
{
asFullButton
:
true
,
icon
:
'
fas fa-plus
'
,
text
:
this
.
$ts
.
addUser
,
handler
:
this
.
addUser
},
{
asFullButton
:
true
,
icon
:
'
fas fa-search
'
,
text
:
this
.
$ts
.
lookup
,
handler
:
this
.
lookupUser
}],
},
sort
:
'
+createdAt
'
,
state
:
'
all
'
,
origin
:
'
local
'
,
searchUsername
:
''
,
searchHost
:
''
,
pagination
:
{
endpoint
:
'
admin/show-users
'
as
const
,
limit
:
10
,
params
:
computed
(()
=>
({
sort
:
this
.
sort
,
state
:
this
.
state
,
origin
:
this
.
origin
,
username
:
this
.
searchUsername
,
hostname
:
this
.
searchHost
,
})),
offsetMode
:
true
},
}
},
methods
:
{
lookupUser
,
searchUser
()
{
os
.
selectUser
().
then
(
user
=>
{
this
.
show
(
user
);
});
},
async
addUser
()
{
const
{
canceled
:
canceled1
,
result
:
username
}
=
await
os
.
inputText
({
title
:
this
.
$ts
.
username
,
});
if
(
canceled1
)
return
;
const
{
canceled
:
canceled2
,
result
:
password
}
=
await
os
.
inputText
({
title
:
this
.
$ts
.
password
,
type
:
'
password
'
});
if
(
canceled2
)
return
;
os
.
apiWithDialog
(
'
admin/accounts/create
'
,
{
username
:
username
,
password
:
password
,
}).
then
(
res
=>
{
this
.
$refs
.
users
.
reload
();
});
},
show
(
user
)
{
os
.
pageWindow
(
`/user-info/
${
user
.
id
}
`
);
},
acct
}
async
function
addUser
()
{
const
{
canceled
:
canceled1
,
result
:
username
}
=
await
os
.
inputText
({
title
:
i18n
.
ts
.
username
,
});
if
(
canceled1
)
return
;
const
{
canceled
:
canceled2
,
result
:
password
}
=
await
os
.
inputText
({
title
:
i18n
.
ts
.
password
,
type
:
'
password
'
});
if
(
canceled2
)
return
;
os
.
apiWithDialog
(
'
admin/accounts/create
'
,
{
username
:
username
,
password
:
password
,
}).
then
(
res
=>
{
paginationComponent
.
reload
();
});
}
function
show
(
user
)
{
os
.
pageWindow
(
`/user-info/
${
user
.
id
}
`
);
}
defineExpose
({
[
symbols
.
PAGE_INFO
]:
computed
(()
=>
({
title
:
i18n
.
ts
.
users
,
icon
:
'
fas fa-users
'
,
bg
:
'
var(--bg)
'
,
actions
:
[{
icon
:
'
fas fa-search
'
,
text
:
i18n
.
ts
.
search
,
handler
:
searchUser
},
{
asFullButton
:
true
,
icon
:
'
fas fa-plus
'
,
text
:
i18n
.
ts
.
addUser
,
handler
:
addUser
},
{
asFullButton
:
true
,
icon
:
'
fas fa-search
'
,
text
:
i18n
.
ts
.
lookup
,
handler
:
lookupUser
}],
})),
});
</
script
>
...
...
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