hyxfish27 / AttackOnGame

聚人 AttackOnGame
https://attack-on-game.vercel.app
1 stars 2 forks source link

feat-error-msg-modal-試調 #132

Open ML-Kami opened 3 months ago

ML-Kami commented 3 months ago
image

主要是想讓他跟loading的畫面是類似的,加上給不同的訊息不同的icon跟配色

switch (alert.type) {
        case 'success':
            return {
                icon: 'sentiment_satisfied',
                value: '成功',
                color: 'success',
            };
        case 'error':
            return { icon: 'error', value: '錯誤', color: 'danger' };
        case 'warning':
            return { icon: 'warning', value: '警告', color: 'warning' };
        case 'timeout':
            return {
                icon: 'sentiment_very_dissatisfied',
                value: '連線逾時',
                color: 'grey9F',
            };
        default:
            return { icon: 'info', value: '提示', color: 'info' };
    }

但我目前對間距沒什麼想法,也認為似乎可以放大字體,你覺得呢?

vercel[bot] commented 3 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
attack-on-game ❌ Failed (Inspect) Jul 4, 2024 4:33am
eee317 commented 3 months ago

哦哦 感覺顏色會花花滴 我明天用薪水小偷的時間來看一下怎麼處理較好~

eee317 commented 3 months ago

結果今天不方便當薪水小偷,我看了看圖,感覺好像還是需要做一下彈窗的 UI,這樣網站的視覺才會比較一致~ 但我還是比較掛念店家後台的新增活動頁面,等這個新增活動頁面完成,我會再回來處理一下這支PR的彈窗 UI :D

ML-Kami commented 3 months ago

可以!我是覺得前端還是要根據錯誤訊息的種類給予不同的ICON跟顏色,這樣未來在各種組件的複用上比較方便 例如【請先登入帳號】【登出成功】等等其他也需要提示文字的談窗之類的 具體可以測試的話可以看看AdminHeader.vue 我已經把這個效果跟AdminHeader.vue都套好了

eee317 commented 3 months ago

跟彈窗有關的 PR 在這邊記錄一下 https://github.com/hyxfish27/AttackOnGame/pull/134/files

eee317 commented 3 months ago

相關 PR https://github.com/hyxfish27/AttackOnGame/pull/156