<template>
  <view class="page">
		<navbar title="设置" leftClick @leftClick="$utils.navigateBack" />

    <view class="content">
      <!-- todo -->
      <view class="card flex operate" @click="$refs.popup.open('getPrivacyPolicy')">
        <text>隐私政策</text>
        <uv-icon name="arrow-right" color="#000000" size="28rpx"></uv-icon>
      </view>

      <!-- todo: check is logined -->
      <button plain class="btn-logout" @click="onLogout"></button>
    </view>
 
		<configPopup ref="popup"></configPopup>
  </view>
</template>

<script>
	export default {
		data() {
			return {
      }
    },
    methods: {
      onLogout() {
				this.$store.commit('logout')
      }
    },
  }
</script>

<style scoped lang="scss">
.page {
	background-color: $uni-fg-color;
	position: relative;
	width: 100vw;
	height: 100vh;
}

.content {
  padding: 20rpx;
}

.operate {
  padding: 28rpx 22rpx 28rpx 20rpx;
  justify-content: space-between;

  color: #1B1B1B;
  font-weight: 500;
  font-size: 32rpx;
}

.btn-logout {
  width: calc(100% - 40rpx);
  height: 90rpx;
  background-color: $uni-bg-color-highlight;
  color: $uni-text-color-highlight;
  font-size: 36rpx;
  border-radius: 45rpx;

  position: absolute;
  left: 20rpx;
  bottom: 159rpx;
}
</style>