mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-25 15:15:12 +00:00
✌️
This commit is contained in:
parent
f849dcb7b9
commit
845dc26184
5 changed files with 36 additions and 19 deletions
|
@ -365,6 +365,8 @@ desktop:
|
|||
security: "Security"
|
||||
password: "Password"
|
||||
2fa: "Two-factor authentication"
|
||||
other: "Other"
|
||||
license: "License"
|
||||
|
||||
mk-timeline-post:
|
||||
reposted-by: "Reposted by {}"
|
||||
|
|
|
@ -365,6 +365,8 @@ desktop:
|
|||
security: "セキュリティ"
|
||||
password: "パスワード"
|
||||
2fa: "二段階認証"
|
||||
other: "その他"
|
||||
license: "ライセンス"
|
||||
|
||||
mk-timeline-post:
|
||||
reposted-by: "{}がRepost"
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<p class={ active: page == 'twitter' } onmousedown={ setPage.bind(null, 'twitter') }>%fa:B twitter .fw%Twitter</p>
|
||||
<p class={ active: page == 'security' } onmousedown={ setPage.bind(null, 'security') }>%fa:unlock-alt .fw%%i18n:desktop.tags.mk-settings.security%</p>
|
||||
<p class={ active: page == 'api' } onmousedown={ setPage.bind(null, 'api') }>%fa:key .fw%API</p>
|
||||
<p class={ active: page == 'other' } onmousedown={ setPage.bind(null, 'other') }>%fa:cogs .fw%%i18n:desktop.tags.mk-settings.other%</p>
|
||||
</div>
|
||||
<div class="pages">
|
||||
<section class="profile" show={ page == 'profile' }>
|
||||
|
@ -54,6 +55,11 @@
|
|||
<h1>API</h1>
|
||||
<mk-api-info/>
|
||||
</section>
|
||||
|
||||
<section class="other" show={ page == 'other' }>
|
||||
<h1>%i18n:desktop.tags.mk-settings.license%</h1>
|
||||
%license%
|
||||
</section>
|
||||
</div>
|
||||
<style>
|
||||
:scope
|
||||
|
@ -96,8 +102,9 @@
|
|||
|
||||
> section
|
||||
margin 32px
|
||||
color #4a535a
|
||||
|
||||
h1
|
||||
> h1
|
||||
display block
|
||||
margin 0 0 1em 0
|
||||
padding 0 0 8px 0
|
||||
|
@ -105,24 +112,6 @@
|
|||
color #555
|
||||
border-bottom solid 1px #eee
|
||||
|
||||
label.checkbox
|
||||
> input
|
||||
position absolute
|
||||
top 0
|
||||
left 0
|
||||
|
||||
&:checked + p
|
||||
color $theme-color
|
||||
|
||||
> p
|
||||
width calc(100% - 32px)
|
||||
margin 0 0 0 32px
|
||||
font-weight bold
|
||||
|
||||
&:last-child
|
||||
font-weight normal
|
||||
color #999
|
||||
|
||||
</style>
|
||||
<script>
|
||||
this.page = 'profile';
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import i18n from './i18n';
|
||||
import license from './license';
|
||||
import fa from './fa';
|
||||
import base64 from './base64';
|
||||
import themeColor from './theme-color';
|
||||
|
@ -8,6 +9,7 @@ import typescript from './typescript';
|
|||
|
||||
export default (lang, locale) => [
|
||||
i18n(lang, locale),
|
||||
license(),
|
||||
fa(),
|
||||
base64(),
|
||||
themeColor(),
|
||||
|
|
22
webpack/module/rules/license.ts
Normal file
22
webpack/module/rules/license.ts
Normal file
|
@ -0,0 +1,22 @@
|
|||
/**
|
||||
* Inject license
|
||||
*/
|
||||
|
||||
import * as fs from 'fs';
|
||||
const StringReplacePlugin = require('string-replace-webpack-plugin');
|
||||
|
||||
const license = fs.readFileSync(__dirname + '/../../../LICENSE', 'utf-8')
|
||||
.replace(/\r\n/g, '\n')
|
||||
.replace(/(.)\n(.)/g, '$1 $2')
|
||||
.replace(/(^|\n)(.*?)($|\n)/g, '<p>$2</p>');
|
||||
|
||||
export default () => ({
|
||||
enforce: 'pre',
|
||||
test: /\.(tag|js)$/,
|
||||
exclude: /node_modules/,
|
||||
loader: StringReplacePlugin.replace({
|
||||
replacements: [{
|
||||
pattern: '%license%', replacement: () => license
|
||||
}]
|
||||
})
|
||||
});
|
Loading…
Reference in a new issue