git ssb

2+

mixmix / ticktack



Commit e194c543b8cf4c80f80c8aca33c69a59e6c457b8

language + style fixes

mix irving committed on 12/8/2017, 6:56:30 AM
Parent: db07f3aa11263d691a9cda69238563a05b7c440e

Files changed

app/html/header.jschanged
app/page/settings.jschanged
app/page/settings.mcsschanged
app/page/userShow.mcsschanged
translations/en.jschanged
translations/zh.jschanged
app/html/header.jsView
@@ -14,29 +14,33 @@
1414
1515 exports.create = (api) => {
1616 return nest('app.html.header', (nav) => {
1717 const { location, push } = nav
18+ const myKey = api.keys.sync.id()
1819
1920 const loc = computed(location, location => {
2021 if (typeof location != 'object') return {}
2122 return location
2223 })
2324
2425 if (loc().page === 'splash') return
2526
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))
2929
30- const isFeed = computed([isSettings], isSettings => !isSettings)
30+ const isFeed = computed([isProfile, isSettings], (p, s) => !p && !s)
3131
3232 return h('Header', [
3333 h('nav', [
3434 h('img.feed', {
3535 src: when(isFeed, assetPath('feed_on.png'), assetPath('feed.png')),
3636 'ev-click': () => push({page: 'blogIndex'}),
3737 }),
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', {
3943 src: when(isSettings, assetPath('settings_on.png'), assetPath('settings.png')),
4044 'ev-click': () => push({page: 'settings'})
4145 }),
4246 ]),
app/page/settings.jsView
@@ -100,9 +100,9 @@
100100 }
101101
102102 function zoomButton (increment, symbol) {
103103 const { getCurrentWebContents } = electron.remote
104- return h('Button -language',
104+ return h('Button -zoom',
105105 {
106106 'ev-click': () => {
107107 var zoomFactor = api.settings.sync.get('ticktack.electron.zoomFactor', 1)
108108 var newZoomFactor = zoomFactor + increment
app/page/settings.mcssView
@@ -61,4 +61,9 @@
6161 Button -language {
6262 margin-right: 1rem
6363 }
6464
65+Button -zoom {
66+ margin-right: 1rem
67+ min-width: .5rem
68+}
69+
app/page/userShow.mcssView
@@ -14,8 +14,9 @@
1414 img.Avatar {
1515 }
1616 div.introduction {
1717 $maxWidthSmaller
18+ text-align: center
1819 }
1920
2021 h1 {
2122 font-weight: 300
translations/en.jsView
@@ -109,8 +109,8 @@
109109 }
110110 },
111111 languages: {
112112 en: 'English',
113- zh: 'Chinese'
113+ zh: '中文'
114114 }
115115
116116 }
translations/zh.jsView
@@ -103,8 +103,8 @@
103103 friendsInCommon: '共同的好友'
104104 }
105105 },
106106 languages: {
107- en: '英文',
107+ en: 'English',
108108 zh: '中文'
109109 }
110110 }

Built with git-ssb-web