Skip to content

Commit

Permalink
show uploader name
Browse files Browse the repository at this point in the history
Former-commit-id: 3d3307a8834a2441dff6568b673895235095dcd1 [formerly db343a5]
Former-commit-id: 15ddc76b55d69765e4ab8fb539aaed0f468b3a92
  • Loading branch information
OpportunityLiu committed Aug 8, 2019
1 parent 926c027 commit 19003fa
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 11 deletions.
3 changes: 2 additions & 1 deletion ExViewer/Strings/en/Resources.resJson
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@
},
"GalleryPage": {
"$TorrentDownloaded": "Download finished, torrent file saved to {path}",
"$Uploader": "Uploader:{uploader}",
"AppBarButtonAddComment/Label": "Post new comment",
"AppBarButtonLatestRevision/Label": "Go to latest revision",
"CommentsEmptyTextBlock/Text": "No comments",
Expand All @@ -240,7 +241,7 @@
"PivotHeaderTorrentsTextBlock/Text": "Torrents",
"RenameAppBarButton/Label": "Petition to rename",
"SaveAppBarButton/Label": "Save this gallery",
"SearchUploaderAppBarButton/Label": "Search all galleries of the uploader",
"SearchUploaderAppBarButton/ToolTipService/ToolTip": "Search all galleries of the uploader",
"ShareAppBarButton/Label": "Share",
"TorrentDownloadButton/ToolTipService/ToolTip": "Download",
"TorrentDownloading": "Start downloading…",
Expand Down
3 changes: 2 additions & 1 deletion ExViewer/Strings/ko/Resources.resJson
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@
},
"GalleryPage": {
"$TorrentDownloaded": "다운로드 완료, {path}에 토렌트 파일 저장됨",
"$Uploader": "Uploader:{uploader}",
"AppBarButtonAddComment/Label": "새 댓글 달기",
"AppBarButtonLatestRevision/Label": "최신 개정판으로 이동",
"CommentsEmptyTextBlock/Text": "댓글 없음",
Expand All @@ -240,7 +241,7 @@
"PivotHeaderTorrentsTextBlock/Text": "토렌트",
"RenameAppBarButton/Label": "이름 변경 요청",
"SaveAppBarButton/Label": "이 갤러리 저장",
"SearchUploaderAppBarButton/Label": "업로더의 모든 갤러리 검색",
"SearchUploaderAppBarButton/ToolTipService/ToolTip": "업로더의 모든 갤러리 검색",
"ShareAppBarButton/Label": "공유",
"TorrentDownloadButton/ToolTipService/ToolTip": "다운로드",
"TorrentDownloading": "다운로드 시작…",
Expand Down
3 changes: 2 additions & 1 deletion ExViewer/Strings/zh-hans/Resources.resJson
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@
},
"GalleryPage": {
"$TorrentDownloaded": "种子下载完成,已保存至 {path}",
"$Uploader": "上传者:{uploader}",
"AppBarButtonAddComment/Label": "发表新评论",
"AppBarButtonLatestRevision/Label": "转到最新版本",
"CommentsEmptyTextBlock/Text": "没有评论",
Expand All @@ -240,7 +241,7 @@
"PivotHeaderTorrentsTextBlock/Text": "种子",
"RenameAppBarButton/Label": "请求重命名画廊",
"SaveAppBarButton/Label": "保存此画廊",
"SearchUploaderAppBarButton/Label": "搜索该上传者的所有画廊",
"SearchUploaderAppBarButton/ToolTipService/ToolTip": "搜索该上传者的所有画廊",
"ShareAppBarButton/Label": "共享",
"TorrentDownloadButton/ToolTipService/ToolTip": "下载",
"TorrentDownloading": "开始下载种子…",
Expand Down
3 changes: 2 additions & 1 deletion ExViewer/Strings/zh-hant/Resources.resJson
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@
},
"GalleryPage": {
"$TorrentDownloaded": "種子下載完成,已儲存至 {path}",
"$Uploader": "上傳者:{uploader}",
"AppBarButtonAddComment/Label": "發表新評論",
"AppBarButtonLatestRevision/Label": "轉到最新版本",
"CommentsEmptyTextBlock/Text": "沒有評論",
Expand All @@ -240,7 +241,7 @@
"PivotHeaderTorrentsTextBlock/Text": "種子",
"RenameAppBarButton/Label": "請求重新命名畫廊",
"SaveAppBarButton/Label": "儲存此畫廊",
"SearchUploaderAppBarButton/Label": "搜尋該上傳者的所有畫廊",
"SearchUploaderAppBarButton/ToolTipService/ToolTip": "搜尋該上傳者的所有畫廊",
"ShareAppBarButton/Label": "共享",
"TorrentDownloadButton/ToolTipService/ToolTip": "下載",
"TorrentDownloading": "開始下載種子…",
Expand Down
4 changes: 3 additions & 1 deletion ExViewer/Views/GalleryPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
x:Name="page"
xmlns:xb="using:Opportunity.UWP.Converters.XBind"
xmlns:sys="using:System"
xmlns:ev="using:ExViewer"
Loading="page_Loading"
Loaded="page_Loaded"
Unloaded="page_Unloaded"
Expand Down Expand Up @@ -566,7 +567,8 @@
<AppBarButton x:Uid="Views/GalleryPage/SearchUploaderAppBarButton"
Command="{x:Bind xb:Command.Delay(ViewModel.SearchUploader, 250), Mode=OneWay}"
Icon="ContactInfo"
Label="Search uploader" />
Label="{x:Bind ev:Strings.Resources.Views.GalleryPage.Uploader(ViewModel.Gallery.Uploader), Mode=OneWay}"
ToolTipService.ToolTip="Search uploader" />
<AppBarButton x:Uid="Views/GalleryPage/RenameAppBarButton"
Command="{x:Bind ViewModel.Rename, Mode=OneWay}"
Icon="Rename"
Expand Down
14 changes: 8 additions & 6 deletions ExViewer/Views/GalleryPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -510,24 +510,26 @@ private static Brush operationStateToBrush(OperationState value)

internal sealed class GalleryPagePanel : Panel
{
private Grid gdPvContentHeaderPresenter;
private Grid _GdPvContentHeaderPresenter;

protected override Size MeasureOverride(Size availableSize)
{
var height = availableSize.Height;
var width = availableSize.Width;
var infoH = height - this.Ancestors<GalleryPage>().First().VisibleBounds.Bottom;
var gp = this.Ancestors<GalleryPage>().FirstOrDefault();
var infoH = height - (gp is null ? 0 : gp.VisibleBounds.Bottom);
if (InputPane.GetForCurrentView().OccludedRect.Height == 0)
{
if (gdPvContentHeaderPresenter is null)
if (_GdPvContentHeaderPresenter is null)
{
gdPvContentHeaderPresenter = Children[1].Descendants<Grid>("HeaderPresenter").FirstOrDefault();
_GdPvContentHeaderPresenter = Children[1].Descendants<Grid>("HeaderPresenter").FirstOrDefault();
}
if (gdPvContentHeaderPresenter != null)
if (_GdPvContentHeaderPresenter != null)
{
infoH -= gdPvContentHeaderPresenter.ActualHeight + 24/*this.btn_Scroll.ActualHeight*/;
infoH -= _GdPvContentHeaderPresenter.ActualHeight + 24/*this.btn_Scroll.ActualHeight*/;
}
}
Strings.Resources.Views.GalleryPage.Uploader()
infoH = Math.Max(80, Math.Min(infoH, 360));
Children[0].Measure(new Size(width, infoH));
Children[1].Measure(availableSize);
Expand Down

0 comments on commit 19003fa

Please sign in to comment.