Commit e194c543b8cf4c80f80c8aca33c69a59e6c457b8
language + style fixes
mix irving committed on 12/8/2017, 6:56:30 AMParent: db07f3aa11263d691a9cda69238563a05b7c440e
Files changed
app/html/header.js | changed |
app/page/settings.js | changed |
app/page/settings.mcss | changed |
app/page/userShow.mcss | changed |
translations/en.js | changed |
translations/zh.js | changed |
app/html/header.js | ||
---|---|---|
@@ -14,29 +14,33 @@ | ||
14 | 14 | |
15 | 15 | exports.create = (api) => { |
16 | 16 | return nest('app.html.header', (nav) => { |
17 | 17 | const { location, push } = nav |
18 | + const myKey = api.keys.sync.id() | |
18 | 19 | |
19 | 20 | const loc = computed(location, location => { |
20 | 21 | if (typeof location != 'object') return {} |
21 | 22 | return location |
22 | 23 | }) |
23 | 24 | |
24 | 25 | if (loc().page === 'splash') return |
25 | 26 | |
26 | - const isSettings = computed(loc, loc => { | |
27 | - return SETTINGS_PAGES.includes(loc.page) | |
28 | - }) | |
27 | + const isProfile = computed(loc, loc => loc.feed == myKey) | |
28 | + const isSettings = computed(loc, loc => SETTINGS_PAGES.includes(loc.page)) | |
29 | 29 | |
30 | - const isFeed = computed([isSettings], isSettings => !isSettings) | |
30 | + const isFeed = computed([isProfile, isSettings], (p, s) => !p && !s) | |
31 | 31 | |
32 | 32 | return h('Header', [ |
33 | 33 | h('nav', [ |
34 | 34 | h('img.feed', { |
35 | 35 | src: when(isFeed, assetPath('feed_on.png'), assetPath('feed.png')), |
36 | 36 | 'ev-click': () => push({page: 'blogIndex'}), |
37 | 37 | }), |
38 | - h('img.feed', { | |
38 | + h('img.profile', { | |
39 | + src: when(isProfile, assetPath('address_bk_on.png'), assetPath('address_bk.png')), | |
40 | + 'ev-click': () => push({page: 'userShow', feed: myKey}) | |
41 | + }), | |
42 | + h('img.settings', { | |
39 | 43 | src: when(isSettings, assetPath('settings_on.png'), assetPath('settings.png')), |
40 | 44 | 'ev-click': () => push({page: 'settings'}) |
41 | 45 | }), |
42 | 46 | ]), |
app/page/settings.js | ||
---|---|---|
@@ -100,9 +100,9 @@ | ||
100 | 100 | } |
101 | 101 | |
102 | 102 | function zoomButton (increment, symbol) { |
103 | 103 | const { getCurrentWebContents } = electron.remote |
104 | - return h('Button -language', | |
104 | + return h('Button -zoom', | |
105 | 105 | { |
106 | 106 | 'ev-click': () => { |
107 | 107 | var zoomFactor = api.settings.sync.get('ticktack.electron.zoomFactor', 1) |
108 | 108 | var newZoomFactor = zoomFactor + increment |
app/page/settings.mcss | ||
---|---|---|
@@ -61,4 +61,9 @@ | ||
61 | 61 | Button -language { |
62 | 62 | margin-right: 1rem |
63 | 63 | } |
64 | 64 | |
65 | +Button -zoom { | |
66 | + margin-right: 1rem | |
67 | + min-width: .5rem | |
68 | +} | |
69 | + |
app/page/userShow.mcss | ||
---|---|---|
@@ -14,8 +14,9 @@ | ||
14 | 14 | img.Avatar { |
15 | 15 | } |
16 | 16 | div.introduction { |
17 | 17 | $maxWidthSmaller |
18 | + text-align: center | |
18 | 19 | } |
19 | 20 | |
20 | 21 | h1 { |
21 | 22 | font-weight: 300 |
Built with git-ssb-web