forked from FoundKeyGang/FoundKey
✌️
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"
|
security: "Security"
|
||||||
password: "Password"
|
password: "Password"
|
||||||
2fa: "Two-factor authentication"
|
2fa: "Two-factor authentication"
|
||||||
|
other: "Other"
|
||||||
|
license: "License"
|
||||||
|
|
||||||
mk-timeline-post:
|
mk-timeline-post:
|
||||||
reposted-by: "Reposted by {}"
|
reposted-by: "Reposted by {}"
|
||||||
|
|
|
@ -365,6 +365,8 @@ desktop:
|
||||||
security: "セキュリティ"
|
security: "セキュリティ"
|
||||||
password: "パスワード"
|
password: "パスワード"
|
||||||
2fa: "二段階認証"
|
2fa: "二段階認証"
|
||||||
|
other: "その他"
|
||||||
|
license: "ライセンス"
|
||||||
|
|
||||||
mk-timeline-post:
|
mk-timeline-post:
|
||||||
reposted-by: "{}がRepost"
|
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 == '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 == '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 == '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>
|
||||||
<div class="pages">
|
<div class="pages">
|
||||||
<section class="profile" show={ page == 'profile' }>
|
<section class="profile" show={ page == 'profile' }>
|
||||||
|
@ -54,6 +55,11 @@
|
||||||
<h1>API</h1>
|
<h1>API</h1>
|
||||||
<mk-api-info/>
|
<mk-api-info/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section class="other" show={ page == 'other' }>
|
||||||
|
<h1>%i18n:desktop.tags.mk-settings.license%</h1>
|
||||||
|
%license%
|
||||||
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<style>
|
<style>
|
||||||
:scope
|
:scope
|
||||||
|
@ -96,8 +102,9 @@
|
||||||
|
|
||||||
> section
|
> section
|
||||||
margin 32px
|
margin 32px
|
||||||
|
color #4a535a
|
||||||
|
|
||||||
h1
|
> h1
|
||||||
display block
|
display block
|
||||||
margin 0 0 1em 0
|
margin 0 0 1em 0
|
||||||
padding 0 0 8px 0
|
padding 0 0 8px 0
|
||||||
|
@ -105,24 +112,6 @@
|
||||||
color #555
|
color #555
|
||||||
border-bottom solid 1px #eee
|
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>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
this.page = 'profile';
|
this.page = 'profile';
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import i18n from './i18n';
|
import i18n from './i18n';
|
||||||
|
import license from './license';
|
||||||
import fa from './fa';
|
import fa from './fa';
|
||||||
import base64 from './base64';
|
import base64 from './base64';
|
||||||
import themeColor from './theme-color';
|
import themeColor from './theme-color';
|
||||||
|
@ -8,6 +9,7 @@ import typescript from './typescript';
|
||||||
|
|
||||||
export default (lang, locale) => [
|
export default (lang, locale) => [
|
||||||
i18n(lang, locale),
|
i18n(lang, locale),
|
||||||
|
license(),
|
||||||
fa(),
|
fa(),
|
||||||
base64(),
|
base64(),
|
||||||
themeColor(),
|
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