diff --git a/package.json b/package.json index 29067b4ea4..f7001725ea 100644 --- a/package.json +++ b/package.json @@ -97,6 +97,7 @@ "deepcopy": "0.6.3", "diskusage": "0.2.4", "elasticsearch": "14.1.0", + "element-ui": "^2.2.0", "emojilib": "^2.2.12", "escape-regexp": "0.0.1", "eslint": "4.18.0", @@ -104,6 +105,7 @@ "eventemitter3": "3.0.1", "exif-js": "2.3.0", "express": "4.16.2", + "file-loader": "^1.1.10", "file-type": "7.6.0", "fuckadblock": "3.2.1", "gm": "1.23.1", @@ -137,6 +139,8 @@ "morgan": "1.9.0", "ms": "2.1.1", "multer": "1.3.0", + "node-sass": "^4.7.2", + "node-sass-json-importer": "^3.1.3", "nprogress": "0.2.0", "os-utils": "0.0.14", "progress-bar-webpack-plugin": "^1.11.0", @@ -152,6 +156,7 @@ "rimraf": "2.6.2", "rndstr": "1.0.0", "s-age": "1.1.2", + "sass-loader": "^6.0.6", "seedrandom": "2.4.3", "serve-favicon": "2.4.5", "speakeasy": "2.0.0", @@ -181,7 +186,7 @@ "vue-template-compiler": "2.5.13", "vuedraggable": "2.16.0", "web-push": "3.3.0", - "webpack": "^3.11.0", + "webpack": "3.11.0", "webpack-cli": "^2.0.8", "webpack-replace-loader": "1.3.0", "websocket": "1.0.25", diff --git a/src/api/endpoints/i/update.ts b/src/api/endpoints/i/update.ts index 43c5245044..fc12665ad6 100644 --- a/src/api/endpoints/i/update.ts +++ b/src/api/endpoints/i/update.ts @@ -46,13 +46,19 @@ module.exports = async (params, user, _, isSecure) => new Promise(async (res, re if (bannerIdErr) return rej('invalid banner_id param'); if (bannerId) user.banner_id = bannerId; + // Get 'is_bot' parameter + const [isBot, isBotErr] = $(params.is_bot).optional.boolean().$; + if (isBotErr) return rej('invalid is_bot param'); + if (isBot) user.is_bot = isBot; + await User.update(user._id, { $set: { name: user.name, description: user.description, avatar_id: user.avatar_id, banner_id: user.banner_id, - profile: user.profile + profile: user.profile, + is_bot: user.is_bot } }); diff --git a/src/api/models/user.ts b/src/api/models/user.ts index e92f244dd0..278b949db5 100644 --- a/src/api/models/user.ts +++ b/src/api/models/user.ts @@ -75,6 +75,7 @@ export type IUser = { last_used_at: Date; latest_post: IPost; pinned_post_id: mongo.ObjectID; + is_bot: boolean; is_pro: boolean; is_suspended: boolean; keywords: string[]; diff --git a/src/web/app/common/views/components/poll.vue b/src/web/app/common/views/components/poll.vue index 7ed5bc6b1e..556d8ebf6c 100644 --- a/src/web/app/common/views/components/poll.vue +++ b/src/web/app/common/views/components/poll.vue @@ -5,14 +5,14 @@
%fa:check% - {{ choice.text }} + {{ choice.text }} ({{ '%i18n:common.tags.mk-poll.vote-count%'.replace('{}', choice.votes) }}){{ '%i18n:common.tags.mk-poll.total-users%'.replace('{}', total) }} - ・ + ・ {{ showResult ? '%i18n:common.tags.mk-poll.vote%' : '%i18n:common.tags.mk-poll.show-result%' }} %i18n:common.tags.mk-poll.voted%
@@ -98,8 +98,12 @@ export default Vue.extend({ background $theme-color transition width 1s ease - > .votes - margin-left 4px + > span + > [data-fa] + margin-right 4px + + > .votes + margin-left 4px > p a diff --git a/src/web/app/config.ts b/src/web/app/config.ts index 2461b22158..b51279192c 100644 --- a/src/web/app/config.ts +++ b/src/web/app/config.ts @@ -12,6 +12,7 @@ declare const _SW_PUBLICKEY_: string; declare const _THEME_COLOR_: string; declare const _COPYRIGHT_: string; declare const _VERSION_: string; +declare const _LICENSE_: string; export const host = _HOST_; export const url = _URL_; @@ -27,3 +28,4 @@ export const swPublickey = _SW_PUBLICKEY_; export const themeColor = _THEME_COLOR_; export const copyright = _COPYRIGHT_; export const version = _VERSION_; +export const license = _LICENSE_; diff --git a/src/web/app/desktop/script.ts b/src/web/app/desktop/script.ts index f0412805ef..78549741b0 100644 --- a/src/web/app/desktop/script.ts +++ b/src/web/app/desktop/script.ts @@ -4,6 +4,7 @@ // Style import './style.styl'; +import '../../element.scss'; import init from '../init'; import fuckAdBlock from '../common/scripts/fuck-ad-block'; diff --git a/src/web/app/desktop/style.styl b/src/web/app/desktop/style.styl index 4d295035f7..49f71fbde7 100644 --- a/src/web/app/desktop/style.styl +++ b/src/web/app/desktop/style.styl @@ -1,6 +1,5 @@ @import "../app" @import "../reset" -@import "../../../../node_modules/cropperjs/dist/cropper.css" @import "./ui" diff --git a/src/web/app/desktop/views/components/settings.profile.vue b/src/web/app/desktop/views/components/settings.profile.vue index 97a382d798..218da67e81 100644 --- a/src/web/app/desktop/views/components/settings.profile.vue +++ b/src/web/app/desktop/views/components/settings.profile.vue @@ -22,6 +22,10 @@ +